chore: bootstrap CHFS NG workspace
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package auth
|
||||
|
||||
type PermMask uint8
|
||||
|
||||
const (
|
||||
None PermMask = 0
|
||||
Read PermMask = 1 << iota
|
||||
Write
|
||||
Delete
|
||||
)
|
||||
|
||||
func (p PermMask) HasRead() bool { return p&Read != 0 }
|
||||
func (p PermMask) HasWrite() bool { return p&Write != 0 }
|
||||
func (p PermMask) HasDelete() bool { return p&Delete != 0 }
|
||||
|
||||
type Account struct {
|
||||
Username, Password string
|
||||
Mask PermMask
|
||||
}
|
||||
Reference in New Issue
Block a user