Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminPermission ¶
type AdminPermission = string
const ( AdminPermissionRoot AdminPermission = "root" AdminPermissionSudo AdminPermission = "sudo" AdminPermissionRead AdminPermission = "read" AdminPermissionWrite AdminPermission = "write" )
type Model ¶
type Model interface { TokenModel db.AutoMigrater }
type Token ¶
type TokenModel ¶
type TokenModel interface { ReadTokenInfoByRaw(tokenRaw string) (*Token, error) UpdateTokenInfoByRaw(tokenRaw string, param TokenParam) error DeleteTokenByRaw(tokenRaw string) error CreateToken(param TokenParam) (token Token, err error) ReadAllTokens() (token []Token, err error) ReadTokensByQuery(tokenRaws []string) (token []Token, err error) IsTokenExist(token string) bool GenerateSudoToken(sudoToken string) (token Token) GenerateRootToken(rootToken string) (token Token) }
type TokenParam ¶
Click to show internal directories.
Click to hide internal directories.