ctx

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Use

func Use(e ICtx) gin.HandlerFunc

Types

type Flow

type Flow struct {
	// contains filtered or unexported fields
}

实现了 CtxInterface 接口的结构体

func (*Flow) Do

func (f *Flow) Do()

func (*Flow) Error

func (f *Flow) Error(err error)

func (*Flow) GetAuthor added in v0.5.7

func (f *Flow) GetAuthor() string

func (*Flow) ReturnJson

func (f *Flow) ReturnJson(code int, data *replyx.T)

type ICtx added in v0.5.7

type ICtx interface {
	GetAuthor() string                   // 获取作者
	Do()                                 // 业务逻辑
	ReturnJson(code int, data *replyx.T) // 返回 json
	Error(err error)                     // 错误处理
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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