server

package
v0.0.0-...-2c27311 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Server  *http.Server
	Storage model.Storage
	Router  http.Handler
	Config  conf.Config
}

App ...

func (*App) Bootstrap

func (a *App) Bootstrap()

Bootstrap prepares app for run by setting things up based on provided config.

func (*App) BootstrapLogger

func (a *App) BootstrapLogger()

func (*App) BootstrapServer

func (a *App) BootstrapServer()

func (*App) CreateCat

func (a *App) CreateCat(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*App) DeleteCat

func (a *App) DeleteCat(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*App) GetCat

func (a *App) GetCat(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*App) GetCats

func (a *App) GetCats(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*App) Health

func (a *App) Health(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*App) Run

func (a *App) Run()

RunApp

func (*App) UpdateCat

func (a *App) UpdateCat(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

type Error

type Error struct {
	Status  int         `json:"status,omitempty"`
	Message interface{} `json:"message,omitempty"`
}

type Response

type Response struct {
	Result interface{} `json:"result,omitempty"`
	Error  Error       `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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