Documentation ¶
Index ¶
- type Group
- type GroupCollection
- func (this *GroupCollection) All() (groups []Group, err *backend.Error)
- func (this *GroupCollection) AllByUser(name_or_uid string) (groups []Group, err *backend.Error)
- func (this *GroupCollection) AllByUserWithoutPermissions(name_or_uid string) (groups []Group, err *backend.Error)
- func (this *GroupCollection) AllPermissions() (groups []Group, err *backend.Error)
- func (this *GroupCollection) AllWithoutPermissions() (groups []Group, err *backend.Error)
- func (this *GroupCollection) Create(name string) (created bool, id int64, err *backend.Error)
- func (this *GroupCollection) Destroy(name_or_uid string) (deleted bool, err *backend.Error)
- type Permission
- type PermissionCollection
- func (this *PermissionCollection) All() (permissions []*Permission)
- func (this *PermissionCollection) AllInternal() (permissions []*Permission)
- func (this *PermissionCollection) AllNames() []string
- func (this *PermissionCollection) BuildName(object string, verb string) string
- func (this *PermissionCollection) Create(object string, verb string)
- func (this *PermissionCollection) CreateAllInternal()
- func (this *PermissionCollection) Destroy(name string)
- func (this *PermissionCollection) GroupName(name string) (groupName string)
- func (this *PermissionCollection) IsPermissionGroupName(groupName string) (isPermissionGroupName bool)
- func (this *PermissionCollection) Name(groupName string) (name string)
- type StatsCollection
- type User
- type UserCollection
- func (this *UserCollection) AddUserToGroup(name_or_uid string, group_id string) (updated bool, err *backend.Error)
- func (this *UserCollection) All() (users []User, err *backend.Error)
- func (this *UserCollection) AllByGroup(groupId string) (users []User, err *backend.Error)
- func (this *UserCollection) Create(username string, password string) (created bool, id int64, err *backend.Error)
- func (this *UserCollection) Destroy(name_or_uid string) (deleted bool, err *backend.Error)
- func (this *UserCollection) Disable(name_or_uid string) (deleted bool, err *backend.Error)
- func (this *UserCollection) Enable(name_or_uid string) (deleted bool, err *backend.Error)
- func (this *UserCollection) Find(uid int64) (user *User, err *backend.Error)
- func (this *UserCollection) FindByName(username string) (user *User, err *backend.Error)
- func (this *UserCollection) Login(username string, password string) (loggedIn bool, id int64, err *backend.Error)
- func (this *UserCollection) RemoveUserFromGroup(name_or_uid string, group_id string) (updated bool, err *backend.Error)
- func (this *UserCollection) UpdatePassword(name_or_uid string, password string, newPassword string) (updated bool, err *backend.Error)
- func (this *UserCollection) UpdateUsername(name_or_uid string, password string, newUsername string) (updated bool, err *backend.Error)
- type UserPermission
- type UserPermissionCollection
- func (this *UserPermissionCollection) Abilities(name_or_uid string) (abilities map[string]bool)
- func (this *UserPermissionCollection) All(name_or_uid string) (userPermissions []*UserPermission)
- func (this *UserPermissionCollection) Allow(name_or_uid string, permissionName string)
- func (this *UserPermissionCollection) AllowAll(name_or_uid string)
- func (this *UserPermissionCollection) Deny(name_or_uid string, permissionName string)
- func (this *UserPermissionCollection) NoAbilities() (allGroupNamesMap map[string]bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupCollection ¶
type GroupCollection struct { }
func Groups ¶
func Groups() *GroupCollection
func (*GroupCollection) All ¶
func (this *GroupCollection) All() (groups []Group, err *backend.Error)
func (*GroupCollection) AllByUser ¶
func (this *GroupCollection) AllByUser(name_or_uid string) (groups []Group, err *backend.Error)
func (*GroupCollection) AllByUserWithoutPermissions ¶
func (this *GroupCollection) AllByUserWithoutPermissions(name_or_uid string) (groups []Group, err *backend.Error)
func (*GroupCollection) AllPermissions ¶
func (this *GroupCollection) AllPermissions() (groups []Group, err *backend.Error)
func (*GroupCollection) AllWithoutPermissions ¶
func (this *GroupCollection) AllWithoutPermissions() (groups []Group, err *backend.Error)
type Permission ¶
type Permission struct { Internal bool // when it belongs to user stack web Name string // e.g. list_users }
func (*Permission) GroupName ¶
func (this *Permission) GroupName() string
type PermissionCollection ¶
type PermissionCollection struct { }
func Permissions ¶
func Permissions() *PermissionCollection
func (*PermissionCollection) All ¶
func (this *PermissionCollection) All() (permissions []*Permission)
func (*PermissionCollection) AllInternal ¶
func (this *PermissionCollection) AllInternal() (permissions []*Permission)
func (*PermissionCollection) AllNames ¶
func (this *PermissionCollection) AllNames() []string
func (*PermissionCollection) BuildName ¶
func (this *PermissionCollection) BuildName(object string, verb string) string
e.g. users, list => users_list
func (*PermissionCollection) Create ¶
func (this *PermissionCollection) Create(object string, verb string)
func (*PermissionCollection) CreateAllInternal ¶
func (this *PermissionCollection) CreateAllInternal()
func (*PermissionCollection) Destroy ¶
func (this *PermissionCollection) Destroy(name string)
func (*PermissionCollection) GroupName ¶
func (this *PermissionCollection) GroupName(name string) (groupName string)
e.g. list_users => perm.users.list
func (*PermissionCollection) IsPermissionGroupName ¶
func (this *PermissionCollection) IsPermissionGroupName(groupName string) (isPermissionGroupName bool)
func (*PermissionCollection) Name ¶
func (this *PermissionCollection) Name(groupName string) (name string)
e.g. list_users
type UserCollection ¶
type UserCollection struct { }
func Users ¶
func Users() *UserCollection
func (*UserCollection) AddUserToGroup ¶
func (*UserCollection) AllByGroup ¶
func (this *UserCollection) AllByGroup(groupId string) (users []User, err *backend.Error)
func (*UserCollection) Destroy ¶
func (this *UserCollection) Destroy(name_or_uid string) (deleted bool, err *backend.Error)
func (*UserCollection) Disable ¶
func (this *UserCollection) Disable(name_or_uid string) (deleted bool, err *backend.Error)
func (*UserCollection) Enable ¶
func (this *UserCollection) Enable(name_or_uid string) (deleted bool, err *backend.Error)
func (*UserCollection) Find ¶
func (this *UserCollection) Find(uid int64) (user *User, err *backend.Error)
func (*UserCollection) FindByName ¶
func (this *UserCollection) FindByName(username string) (user *User, err *backend.Error)
func (*UserCollection) RemoveUserFromGroup ¶
func (*UserCollection) UpdatePassword ¶
func (*UserCollection) UpdateUsername ¶
type UserPermission ¶
type UserPermission struct { Permission *Permission Granted bool }
type UserPermissionCollection ¶
type UserPermissionCollection struct { }
func UserPermissions ¶
func UserPermissions() *UserPermissionCollection
func (*UserPermissionCollection) Abilities ¶
func (this *UserPermissionCollection) Abilities(name_or_uid string) (abilities map[string]bool)
func (*UserPermissionCollection) All ¶
func (this *UserPermissionCollection) All(name_or_uid string) (userPermissions []*UserPermission)
func (*UserPermissionCollection) Allow ¶
func (this *UserPermissionCollection) Allow(name_or_uid string, permissionName string)
func (*UserPermissionCollection) AllowAll ¶
func (this *UserPermissionCollection) AllowAll(name_or_uid string)
func (*UserPermissionCollection) Deny ¶
func (this *UserPermissionCollection) Deny(name_or_uid string, permissionName string)
func (*UserPermissionCollection) NoAbilities ¶
func (this *UserPermissionCollection) NoAbilities() (allGroupNamesMap map[string]bool)
Click to show internal directories.
Click to hide internal directories.