Documentation ¶
Index ¶
- Constants
- Variables
- type AppUserGroupID
- type AppUserGroupModel
- type AppUserID
- type AppUserModel
- type Model
- type OrganizationID
- type OrganizationModel
- type OwnerModel
- type Privileges
- type RBACAction
- type RBACObject
- type RBACRole
- type RBACUser
- type Role
- type SpaceID
- type SpaceModel
- type SpaceTypeID
- type SystemAdminModel
- type SystemOwnerModel
- type UserPreference
Constants ¶
View Source
const SystemAdminID = 1
View Source
const SystemOwnerID = 2
Variables ¶
View Source
var AdministratorRole = &role{Name: "Administrator"}
View Source
var GuestRole = &role{Name: "Guest"}
View Source
var ManagerRole = &role{Name: "Manager"}
View Source
var OwnerRole = &role{Name: "Owner"}
View Source
var UnknownRole = &role{Name: "Unknown"}
View Source
var UserRole = &role{Name: "User"}
Functions ¶
This section is empty.
Types ¶
type AppUserGroupID ¶
type AppUserGroupID uint
type AppUserGroupModel ¶
type AppUserGroupModel interface { Model GetAppUerGroupID() AppUserGroupID GetOrganizationID() OrganizationID GetKey() string GetName() string GetDescription() string }
func NewAppUserGroup ¶
func NewAppUserGroup(model Model, organizationID OrganizationID, key, name, description string) (AppUserGroupModel, error)
NewAppUserGroup returns a new AppUserGroup
type AppUserModel ¶
type AppUserModel interface { Model GetAppUserID() AppUserID GetOrganizationID() OrganizationID GetLoginID() string GetUsername() string GetRoles() []string GetProperties() map[string]string }
func NewAppUserModel ¶
func NewAppUserModel(model Model, organizationID OrganizationID, loginID, username string, roles []string, properties map[string]string) (AppUserModel, error)
type Model ¶
type OrganizationID ¶
type OrganizationID uint
type OrganizationModel ¶
func NewOrganizationModel ¶
func NewOrganizationModel(model Model, name string) (OrganizationModel, error)
type OwnerModel ¶
type OwnerModel interface { AppUserModel IsOwnerModel() bool }
func NewOwnerModel ¶
func NewOwnerModel(appUser AppUserModel) (OwnerModel, error)
type Privileges ¶
type Privileges interface {
HasPrivilege(privilege RBACAction) bool
}
func NewPrivileges ¶
func NewPrivileges(privs []RBACAction) Privileges
type RBACAction ¶
type RBACAction string
type RBACObject ¶
type RBACObject string
func NewSpaceObject ¶
func NewSpaceObject(spaceID SpaceID) RBACObject
type SpaceModel ¶
type SpaceModel interface { Model GetOrganizationID() OrganizationID GetKey() string GetName() string GetDescription() string }
func NewSpaceModel ¶
func NewSpaceModel(model Model, organizationID OrganizationID, spaceType int, key, name, description string) (SpaceModel, error)
type SpaceTypeID ¶
type SpaceTypeID int
type SystemAdminModel ¶
func NewSystemAdminModel ¶
func NewSystemAdminModel() SystemAdminModel
type SystemOwnerModel ¶
type SystemOwnerModel interface { OwnerModel IsSystemOwnerModel() bool }
func NewSystemOwnerModel ¶
func NewSystemOwnerModel(appUser OwnerModel) (SystemOwnerModel, error)
type UserPreference ¶
type UserPreference interface {
GetPreferences() map[string]interface{}
}
func NewUserPreference ¶
func NewUserPreference(preferences map[string]interface{}) UserPreference
Source Files ¶
Click to show internal directories.
Click to hide internal directories.