api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string

Version receives its value at compile time

Functions

This section is empty.

Types

type API

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

API is the app entry point: it contains the HTTP server, config and services

func New

func New(
	e env.Bag,
	logger zerolog.Logger,
	smtpClient smtp.Client,
	converterProvider converter.Provider,
) *API

New returns a new http server for the API

func (*API) Mux

func (a *API) Mux() http.Handler

Mux returns the app routes

func (*API) Serve

func (a *API) Serve() error

Serve listens and serves for incoming HTTP request. It also handles graceful shutdown logic

func (*API) Wrap

func (a *API) Wrap(fn http.Handler) http.Handler

Wrap returns a HTTP handler wrapped by a middleware stack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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