service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICache

type ICache interface {
	libCache.IGCache
}

func Cache

func Cache() ICache

type ICaptcha

type ICaptcha interface {
	GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error)
	VerifyString(id, answer string) bool
}

func Captcha

func Captcha() ICaptcha

type IGToken

type IGToken interface {
	GenerateToken(ctx context.Context, key string, data interface{}) (keys string, err error)
	Middleware(group *ghttp.RouterGroup) error
	ParseToken(r *ghttp.Request) (*gtoken.CustomClaims, error)
	IsLogin(r *ghttp.Request) (b bool, failed *gtoken.AuthFailed)
	GetRequestToken(r *ghttp.Request) (token string)
	RemoveToken(ctx context.Context, token string) (err error)
}

func GToken

func GToken(options *model.TokenOptions) IGToken

type IMiddleware

type IMiddleware interface {
	MiddlewareCORS(r *ghttp.Request)
}

func Middleware

func Middleware() IMiddleware

Jump to

Keyboard shortcuts

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