response

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

Mount 挂载响应体

Types

type Service

type Service struct {
	services.Response
	HttpStatus int
	// contains filtered or unexported fields
}

Service 响应结构体

func New

func New() *Service

New 新建响应服务

func (*Service) Build

func (s *Service) Build(code int, args ...any) services.Response

Build 构建每个请求的异常

func (*Service) Handle

func (s *Service) Handle(c *gin.Context) bool

Handle 处理响应

func (*Service) Init

func (s *Service) Init(args ...services.Service) services.Service

Init 初始化

func (*Service) IsToken

func (s *Service) IsToken(token string) bool

IsToken 判断是否是 Token

Jump to

Keyboard shortcuts

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