Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionUserList = "iam:user.list" ActionUserRead = "iam:user.read" ActionUserLock = "iam:user.lock" ActionUserWrite = "iam:user.write" ActionUserChangePassword = "iam:user.change-password" ActionUserConsole = "iam:user.console" ActionGroupRead = "iam:group.list" ActionGroupWrite = "iam:group.write" )
Actions defined by the IAM service
Variables ¶
View Source
var Actions = map[string]string{ ActionUserList: "List available users", ActionUserRead: "Read user data", ActionUserLock: "Lock or unlock a user account", ActionUserWrite: "Create or delete a user", ActionUserChangePassword: "Reset user password", ActionUserConsole: "Use the user adminstration console", ActionGroupRead: "Read available groups", ActionGroupWrite: "Create and update existing groups", }
Actions holds all registered actions and a description for each of them
Functions ¶
Types ¶
type Group ¶
type Group struct { ID uint `json:"id" gorm:"primary_key"` Name string `json:"name"` Description string `json:"description"` ResourceName string `sql:"-" json:"urn"` Users []*User `json:"-" gorm:"many2many:group_users"` }
Group represents a group in IAM
type User ¶
type User struct { AccountID string `json:"accountID" gorm:"primary_key"` Username string `json:"username"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` MailAddress string `json:"email"` PhoneNumber string `json:"phone"` Job string `json:"job"` Street string `json:"street"` City string `json:"city"` CityCode string `json:"cityCode"` Birthday *time.Time `json:"birthday,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `sql:"index" json:"deletedAt"` Groups []*Group `json:"-" gorm:"many2many:group_users"` ResourceName string `sql:"-" json:"urn"` // will be calculated by URN() before marshaling to JSON Locked *bool `json:"locked" sql:"-"` // will be loaded from the authn-server }
User is the user model exposed via a V1 API It also serves as a micro resource
Click to show internal directories.
Click to hide internal directories.