Documentation
¶
Overview ¶
Package asmodel ...
Package asmodel ...
Package asmodel ...
Package asmodel ...
Package asmodel ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUser ¶
DeleteUser will delete the user entry from the database based on the uuid
func GetAllSessionKeys ¶
GetAllSessionKeys will collect all session keys available in the DB
Types ¶
type OEMPrivileges ¶
type OEMPrivileges struct {
List []string
}
OEMPrivileges struct definition
func GetOEMPrivileges ¶
func GetOEMPrivileges() (OEMPrivileges, *errors.Error)
GetOEMPrivileges retrives the privileges from database
func (*OEMPrivileges) Create ¶
func (p *OEMPrivileges) Create() *errors.Error
Create method is to insert the oemprivileges list to database
type Privileges ¶
type Privileges struct {
List []string
}
Privileges struct definition
func GetPrivilegeRegistry ¶
func GetPrivilegeRegistry() (Privileges, *errors.Error)
GetPrivilegeRegistry retrives the privileges from database
func (*Privileges) Create ¶
func (p *Privileges) Create() *errors.Error
Create method is to insert the privileges list to database
type RedfishRoles ¶
type RedfishRoles struct {
List []string
}
RedfishRoles struct definition
func GetRedfishRoles ¶
func GetRedfishRoles() (RedfishRoles, *errors.Error)
GetRedfishRoles retrives the privileges from database
func (*RedfishRoles) Create ¶
func (r *RedfishRoles) Create() *errors.Error
Create method is to insert the privileges list to database
type Role ¶
type Role struct { ID string `json:"RoleId"` IsPredefined bool `json:"IsPredefined"` AssignedPrivileges []string `json:"AssignedPrivileges"` OEMPrivileges []string `json:"OemPrivileges"` }
Role struct definition
func GetAllRoles ¶
GetAllRoles gets all the roles from the db
func GetRoleDetailsByID ¶
GetRoleDetailsByID retrives the privileges for a role from database
func (*Role) UpdateRoleDetails ¶
UpdateRoleDetails will modify the current details to given changes
type Session ¶
type Session struct { ID string Token string UserName string RoleID string Privileges map[string]bool Origin string CreatedTime time.Time LastUsedTime time.Time }
Session will hold the data assosiated with the session
func GetSession ¶
GetSession will get the session details from db if available
type User ¶
type User struct { UserName string `json:"UserName"` Password string `json:"Password"` RoleID string `json:"RoleId"` AccountTypes []string `json:"AccountTypes"` }
User is the model for User Account
func GetAllUsers ¶
GetAllUsers gets all the accounts from the db
func GetUserDetails ¶
GetUserDetails will fetch details of specific user from the db