api

package
v0.0.0-...-87faeab Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(apiCfg *ApiConfig) (*chi.Mux, error)

New configures application resources and routers.

Types

type ApiConfig

type ApiConfig struct {
	Logger     *logrus.Logger
	Cfg        *config.Config
	Store      store.Store
	Mailer     *provider.Mailer
	EnableCORS bool
}

ApiConfig declares the required api server dependencies.

type Server

type Server struct {
	*http.Server
}

Server defines our server dependencies

func NewServer

func NewServer() (*Server, error)

NewServer creates and configures an fupisha API Server serving all application routes.

func (*Server) Start

func (srv *Server) Start()

Start runs ListenAndServe on the http.Server with graceful shutdown.

Directories

Path Synopsis
v1
url

Jump to

Keyboard shortcuts

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