builtin

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatErrorResponse

func FormatErrorResponse(err error) (*contract.Response, error)

Types

type Handler

type Handler interface {
	Registrations() []HandlerRegistration
}

type HandlerRegistration

type HandlerRegistration struct {
	Name    string
	Handler func(contract.Request) (*contract.Response, error)
}

type HttpServer

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

func NewHttpServer

func NewHttpServer(logger zerolog.Logger, addr string) HttpServer

func (HttpServer) RegisterHandlers

func (h HttpServer) RegisterHandlers(handlers ...Handler)

func (HttpServer) Start

func (h HttpServer) Start() error

func (HttpServer) Stop

func (h HttpServer) Stop() error

type ParseError

type ParseError struct {
	Message string
}

func NewParseError

func NewParseError(format string, a ...interface{}) ParseError

func (ParseError) Error

func (e ParseError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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