leshy_http

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

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

func NewAPIServer

func NewAPIServer(name string, engine *gin.Engine) *APIServer

func (*APIServer) AddHandlers

func (serv *APIServer) AddHandlers(handlers ...Handler) *APIServer

func (*APIServer) Instance

func (comp *APIServer) Instance() leshy_component.Component

func (*APIServer) Name

func (comp *APIServer) Name() string

func (*APIServer) Run

func (serv *APIServer) Run() error

type Handler

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

func NewHandler

func NewHandler(
	method string,
	path string,
	process func(*gin.Context),
	auth func(*gin.Context) bool,
) *Handler

func NewHandlerExtended

func NewHandlerExtended(
	path string,
	processMap map[string]func(*gin.Context),
	auth func(*gin.Context) bool,
) []Handler

func NewMultipathHandler

func NewMultipathHandler(
	method string,
	paths []string,
	process func(*gin.Context),
	auth func(*gin.Context) bool,
) []Handler

func NewMultipathHandlerExtended

func NewMultipathHandlerExtended(

	paths []string,
	processMap map[string]func(*gin.Context),
	auth func(*gin.Context) bool,
) []Handler

Jump to

Keyboard shortcuts

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