api

package
v1.1.38 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDefaultValidators added in v1.1.27

func RegisterDefaultValidators() error

RegisterDefaultValidators will call register validation on all validator functions

func RegisterRoutes added in v1.1.27

func RegisterRoutes(ws *gin.Engine, routesConfig config.ApiRoutesConfig, elrondFacade middleware.Handler)

RegisterRoutes will register all routes available on the web server

func Start

func Start(elrondFacade MainApiHandler, routesConfig config.ApiRoutesConfig, processors ...MiddlewareProcessor) error

Start will boot up the api and appropriate routes, handlers and validators

Types

type MainApiHandler

type MainApiHandler interface {
	RestApiInterface() string
	RestAPIServerDebugMode() bool
	PprofEnabled() bool
	IsInterfaceNil() bool
}

MainApiHandler interface defines methods that can be used from `elrondFacade` context variable

type MiddlewareProcessor

type MiddlewareProcessor interface {
	MiddlewareHandlerFunc() gin.HandlerFunc
	IsInterfaceNil() bool
}

MiddlewareProcessor defines a processor used internally by the web server when processing requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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