service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBizCtx

func RegisterBizCtx(i IBizCtx)

func RegisterInternalDict

func RegisterInternalDict(i IInternalDict)

func RegisterMiddleware

func RegisterMiddleware(i IMiddleware)

func RegisterSession

func RegisterSession(i ISession)

Types

type IBizCtx

type IBizCtx interface {
	Init(r *ghttp.Request, customCtx *model.Context)
	Get(ctx context.Context) *model.Context
	SetUser(ctx context.Context, ctxUser *model.ContextUser)
}

func BizCtx

func BizCtx() IBizCtx

type IInternalDict

type IInternalDict interface {
	GetDictDataByType(ctx context.Context, req *common.GetInternalDictByTypeReq) (res *common.GetInternalDictByTypeRes, err error)
}

func InternalDict

func InternalDict() IInternalDict

type IMiddleware

type IMiddleware interface {
	Ctx(r *ghttp.Request)
	Auth(r *ghttp.Request)
	CORS(r *ghttp.Request)
	HandlerResponse(r *ghttp.Request)
}

func Middleware

func Middleware() IMiddleware

type ISession

type ISession interface {
	SetUser(ctx context.Context, user *entity.SysUser) error
	GetUser(ctx context.Context) *entity.SysUser
	RemoveUser(ctx context.Context) error
}

func Session

func Session() ISession

Jump to

Keyboard shortcuts

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