Documentation ¶ Index ¶ func Mount(r services.Response) services.Response type Service func New() *Service func (s *Service) Build(code int, args ...any) services.Response func (s *Service) Handle(c *gin.Context) bool func (s *Service) Init(args ...services.Service) services.Service func (s *Service) IsToken(token string) bool Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Mount ¶ func Mount(r services.Response) services.Response 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 Source Files ¶ View all Source files response.go Click to show internal directories. Click to hide internal directories.