Documentation ¶
Index ¶
Constants ¶
View Source
const SudoToken = "sudo-token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { admin_token_service_public.Service ReadTokenInfo(token string) (*admin_token_model.Token, error) UpdateTokenInfo(tokenRaw string, param admin_token_model.TokenParam) error DeleteToken(tokenRaw string) error CreateToken(param admin_token_model.TokenParam) (token admin_token_model.Token, err error) ReadTokensByQuery(ids []string) (token []admin_token_model.Token, err error) //ReadSelectTokens(tokenRaws []string) (token []admin_token_model.Token, err error) CreateSudoToken() (sudoToken string, err error) IsTokenExist(token string) bool IsSudoTokenValid(token string) bool GenerateTempUserToken(permissions []string, checkPermissionExist bool, expiresAt *time.Time) (token string, err error) GenerateTempUserTokenWithAllPermission(expiresAt *time.Time) (token string, err error) }
func New ¶
func New(db *gorm.DB, model admin_token_model.Model, publicService admin_token_service_public.Service, permissionPublicService permission_service_public.Service, auther auth.Authable, config admin_token_config.Config) Service
Click to show internal directories.
Click to hide internal directories.