Documentation ¶
Index ¶
- type APIEndPoint
- func (api *APIEndPoint) AddHandler(handler hdl.Handler) *APIEndPoint
- func (api *APIEndPoint) BootBackends()
- func (api *APIEndPoint) GinLogger() gin.HandlerFunc
- func (api *APIEndPoint) SetPort(port int) *APIEndPoint
- func (api *APIEndPoint) SetStaticDirectoryRoot(root string) *APIEndPoint
- func (api *APIEndPoint) Start()
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndPoint ¶
type APIEndPoint struct {
// contains filtered or unexported fields
}
func NewAPIEndPoint ¶
func NewAPIEndPoint(root string, db *dbx.Dbx) *APIEndPoint
func (*APIEndPoint) AddHandler ¶
func (api *APIEndPoint) AddHandler(handler hdl.Handler) *APIEndPoint
Add handler to the server with all declared API endpoints
func (*APIEndPoint) BootBackends ¶
func (api *APIEndPoint) BootBackends()
func (*APIEndPoint) GinLogger ¶
func (api *APIEndPoint) GinLogger() gin.HandlerFunc
GinLogger makes a custom logger via logrus
func (*APIEndPoint) SetPort ¶
func (api *APIEndPoint) SetPort(port int) *APIEndPoint
func (*APIEndPoint) SetStaticDirectoryRoot ¶
func (api *APIEndPoint) SetStaticDirectoryRoot(root string) *APIEndPoint
SetStaticDirectoryRoot sets static directory to be served. Usually it is a fileserver for everything: binaries, states etc. It is available as "/pub".
func (*APIEndPoint) Start ¶
func (api *APIEndPoint) Start()
type Middleware ¶
type Middleware struct { Methods []gin.HandlerFunc // contains filtered or unexported fields }
func NewMiddleware ¶
func NewMiddleware(root string) *Middleware
func (*Middleware) MW_CheckToken ¶
func (m *Middleware) MW_CheckToken(ctx *gin.Context)
MW_CheckToken provides an example of token verification
Click to show internal directories.
Click to hide internal directories.