server

package
v0.0.0-...-78b87b3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MustAuth     = true
	OptionalAuth = false
)

Variables

This section is empty.

Functions

func Logger

func Logger(w io.Writer) func(h http.Handler) http.Handler

Types

type ErrorM

type ErrorM map[string][]string

ErrorM is used to create the validation error response format according to the API spec

func (ErrorM) Error

func (e ErrorM) Error() string

Error is needed to implement the error interface

type M

type M map[string]interface{}

M is a generic map

type Server

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

func NewServer

func NewServer(db *postgres.DB) *Server

func (*Server) Run

func (s *Server) Run(port string) error

Jump to

Keyboard shortcuts

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