Documentation
¶
Index ¶
- Constants
- func LoadInstanceKey(home string) (string, error)
- type Permissions
- func (perms *Permissions) DeleteUser(user string)
- func (perms *Permissions) IsAllowed(action, user, password string) bool
- func (perms *Permissions) Save(home string) error
- func (perms *Permissions) SetPassword(user string, password string)
- func (perms *Permissions) SetRoles(user string, roles []string)
- type UserData
Constants ¶
View Source
const ( AllowRead = 1 << iota AllowWrite AllowInternalRead AllowTransfer AllowAccept AllowTruncate AllowStat AllowUser AllowPassword )
View Source
const ( RoleReader = 1 << iota RoleWriter RoleHub RoleAdmin RoleInstance )
View Source
const ( DefaultAdmin = "admin" Anonymous = "all" )
Variables ¶
This section is empty.
Functions ¶
func LoadInstanceKey ¶
Types ¶
type Permissions ¶
func LoadPermissions ¶
func LoadPermissions(home string) (*Permissions, error)
func (*Permissions) DeleteUser ¶
func (perms *Permissions) DeleteUser(user string)
func (*Permissions) IsAllowed ¶
func (perms *Permissions) IsAllowed(action, user, password string) bool
func (*Permissions) Save ¶
func (perms *Permissions) Save(home string) error
func (*Permissions) SetPassword ¶
func (perms *Permissions) SetPassword(user string, password string)
func (*Permissions) SetRoles ¶
func (perms *Permissions) SetRoles(user string, roles []string)
Click to show internal directories.
Click to hide internal directories.