admin_token_service

package
v0.0.0-...-1dc8ef7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL