api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDocumentNotFound = echo.NewHTTPError(http.StatusNotFound, "document not found")

Functions

func ErrorHandler

func ErrorHandler(err error, c echo.Context)

func GetDocumentHandler

func GetDocumentHandler(db *database.DB) echo.HandlerFunc

func GetUserDocumentsHandler

func GetUserDocumentsHandler(db *database.DB) echo.HandlerFunc

func ListenAndServe

func ListenAndServe(ctx context.Context, e *echo.Echo, addr string) error

func NewServer

func NewServer(config Config) *echo.Echo

New creates a new server. Use ListenAndServe to start accepting connections.

func PostAgreementsHandler

func PostAgreementsHandler(db *database.DB) echo.HandlerFunc

func PutDocumentHandler

func PutDocumentHandler(db *database.DB) echo.HandlerFunc

Types

type Config

type Config struct {
	DB                *database.DB
	BasicAuthUsername string
	BasicAuthPassword string
	LogWriter         io.Writer
}

Jump to

Keyboard shortcuts

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