wrapper

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilRouter = errors.New("nil router")

ErrNilRouter signals that a nil router has been provided

Functions

This section is empty.

Types

type RouterWrapper

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

RouterWrapper is a wrapper over the gin RouterGroup in order to handle the logic of enabling or disabling routes

func NewRouterWrapper

func NewRouterWrapper(packageName string, router *gin.RouterGroup, routesConfig config.ApiRoutesConfig) (*RouterWrapper, error)

NewRouterWrapper will return a new instance of RouterWrapper

func (*RouterWrapper) RegisterHandler

func (rw *RouterWrapper) RegisterHandler(method string, path string, handlers ...gin.HandlerFunc)

RegisterHandler will register the handler for the given method and path

Jump to

Keyboard shortcuts

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