api

package
v0.0.0-...-c188a41 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Method string
	Path   string
	Func   gin.HandlerFunc
}

type ApiServer

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

func (*ApiServer) Init

func (s *ApiServer) Init()

func (*ApiServer) RegController

func (s *ApiServer) RegController(arr []Api) *ApiServer

func (*ApiServer) RegFilter

func (s *ApiServer) RegFilter(fs []gin.HandlerFunc) *ApiServer

func (*ApiServer) Run

func (s *ApiServer) Run()

func (*ApiServer) Stop

func (s *ApiServer) Stop()

type BaseController

type BaseController struct {
}

func (*BaseController) RetFailed

func (c *BaseController) RetFailed(ctx *gin.Context, code int, msg ...string)

func (*BaseController) RetFailedf

func (c *BaseController) RetFailedf(ctx *gin.Context, code int, format string, vals ...any)

func (*BaseController) RetSuccess

func (c *BaseController) RetSuccess(ctx *gin.Context, d any)

Jump to

Keyboard shortcuts

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