service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBizCtx

func RegisterBizCtx(i IBizCtx)

func RegisterCustom

func RegisterCustom(i ICustom)

func RegisterFeishu

func RegisterFeishu(i IFeishu)

func RegisterMiddleware

func RegisterMiddleware(i IMiddleware)

Types

type IBizCtx

type IBizCtx interface {
	Init(r *ghttp.Request)
	SetValue(ctx context.Context, key string, value any)
	GetValue(ctx context.Context, key string) any
}

func BizCtx

func BizCtx() IBizCtx

type ICustom

type ICustom interface {
	Send(ctx context.Context, req *v1.CustomReq) error
}

func Custom

func Custom() ICustom

type IFeishu

type IFeishu interface {
	Send(ctx context.Context, req *v1.FeishuReq) error
}

func Feishu

func Feishu() IFeishu

type IMiddleware

type IMiddleware interface {
	CORS(r *ghttp.Request)
	Log(r *ghttp.Request)
	Ctx(r *ghttp.Request)
	I18n(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