Documentation ¶
Index ¶
- Variables
- func Test(v any)
- type Groupor
- type Groupot
- type HackType
- type Hackor
- type Hackot
- type Methodor
- type Methodot
- func (m *Methodot[i, o]) Description(desc string) *Methodot[i, o]
- func (m *Methodot[i, o]) Handler(handler func(ctx context.Context, input *i) (o, error)) *Methodot[i, o]
- func (m *Methodot[req, res]) Invoke(ctx context.Context, input interface{}) (interface{}, error)
- func (m *Methodot[i, o]) Summary(summary string) *Methodot[i, o]
- func (m *Methodot[i, o]) Tags(ss ...string) *Methodot[i, o]
- type Middlewareor
- type Middlewareot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrvalueNotStructOrPointer value is not struct or pointer / value 不是结构体或指针 ErrValueNotStructOrPointer = errors.New("value is not struct or pointer") ErrInvalidType = errors.New("invalid type") )
Functions ¶
Types ¶
type Methodor ¶
type Methodor interface { Invoke(ctx context.Context, input interface{}) (interface{}, error) // contains filtered or unexported methods }
端点接口
type Methodot ¶
type Methodot[i, o any] struct { // contains filtered or unexported fields }
端点结构
func Method ¶
func Method[req, res any](handler func(ctx context.Context, input *req) (res, error)) *Methodot[req, res]
新建端点
func (*Methodot[i, o]) Description ¶
type Middlewareor ¶
type Middlewareot ¶
type Middlewareot struct {
// contains filtered or unexported fields
}
群组元数据
func Middleware ¶
func Middleware(handler func(ctx context.Context)) *Middlewareot
func (*Middlewareot) Invoke ¶
func (m *Middlewareot) Invoke(ctx context.Context)
func (*Middlewareot) Name ¶
func (m *Middlewareot) Name() string
Click to show internal directories.
Click to hide internal directories.