Documentation ¶
Index ¶
- Variables
- func AddPermission(p string)
- func CreateRole(id, name string, permissions []string) (*meta.Role, error)
- func CreateUser(id, name, plaintextPassword, role string) (*meta.User, error)
- func DeleteRole(id string) error
- func DeleteUser(id string) error
- func GeneratePassword(password, salt string) string
- func GenerateSalt() string
- func GetPermissions() []string
- func GetRole(id string) (*meta.Role, bool, error)
- func GetRoles() ([]*meta.Role, error)
- func GetUser(id string) (*meta.User, bool, error)
- func GetUsers() ([]*meta.User, error)
- func SetRole(id string, role meta.Role) error
- func SetUser(id string, user meta.User) error
- func VerifyCredentials(userID, password string) (*meta.User, bool)
- func VerifyRoleHasPermission(roleId, permission string) bool
- type Argon2Params
Constants ¶
This section is empty.
Variables ¶
View Source
var ZINC_CACHED_PERMISSIONS = cachedPermissions{/* contains filtered or unexported fields */}
View Source
var ZINC_CACHED_USERS = cachedUsers{/* contains filtered or unexported fields */}
Functions ¶
func AddPermission ¶
func AddPermission(p string)
func DeleteRole ¶
func DeleteUser ¶
func GeneratePassword ¶
func GenerateSalt ¶
func GenerateSalt() string
func GetPermissions ¶
func GetPermissions() []string
func VerifyRoleHasPermission ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.