api

package
v0.0.0-...-74d5043 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoHostInConfig = errors.New("no-api-host-in-config")
	ErrNoPortInConfig = errors.New("no-api-port-in-config")
)

Functions

func InfosHandler

func InfosHandler(ctx context.Context) http.Handler

InfosHandler will handle the infos route swagger:route GET /infos Miscellaneous infos

Return informations on the server

Produces:

  • application/json

Schemes: http, https

Responses:

default: GenericError
200: Infos

Types

type API

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

func New

func New(ctx context.Context, c Config) (*API, error)

func (*API) Run

func (s *API) Run() error

type Config

type Config struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
}

func (Config) Validate

func (c Config) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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