server

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefixAPIV3 = "/v3/"

	PrefixAPIDefault = "/v4/"
)

Variables

This section is empty.

Functions

func P

func P(mf MethodFunc, action string, hdrs ...interface{})

P .

Types

type MethodFunc

type MethodFunc func(relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes

type Router

type Router struct {
	Prefix string
	// contains filtered or unexported fields
}

Router .

func NewRouter

func NewRouter(apiPrefix string) *Router

NewRouter .

func (*Router) Any added in v0.1.21

func (svr *Router) Any(action string, hdrs ...interface{})

Any .

func (Router) AuthInject

func (ai Router) AuthInject(name string, injector auth.InjectorFunc)

func (Router) Default

func (ai Router) Default(injector auth.InjectorFunc)

func (*Router) G

func (svr *Router) G(action string, hdrs ...interface{})

G .

func (*Router) GinEngine

func (svr *Router) GinEngine() *gin.Engine

GinEngine .

func (*Router) HandleDoc

func (svr *Router) HandleDoc(model string)

func (Router) Inject

func (ai Router) Inject(ctx *gin.Context)

func (*Router) ListAllRouters

func (svr *Router) ListAllRouters()

ListAllRouters 列出所有路由

func (*Router) P

func (svr *Router) P(action string, hdrs ...interface{})

P .

func (*Router) PRequireCustomer added in v0.1.9

func (svr *Router) PRequireCustomer(action string, hdrs ...interface{})

PRequireCustomer .

func (*Router) PRequireEmployee

func (svr *Router) PRequireEmployee(action string, hdrs ...interface{})

PRequireEmployee .

func (*Router) PRequireLogin added in v0.1.9

func (svr *Router) PRequireLogin(action string, hdrs ...interface{})

PRequireLogin .

func (*Router) Run

func (svr *Router) Run(l net.Listener) error

Run .

Jump to

Keyboard shortcuts

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