apiserver

package
v0.0.0-...-bc82bd1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Router     *mux.Router
	DB         *sql.DB
	LangClient *language.Client
}

func (*APIServer) Delete

func (a *APIServer) Delete(path string, f func(w http.ResponseWriter, r *http.Request))

Delete wraps the router for DELETE method

func (*APIServer) Get

func (a *APIServer) Get(path string, f func(w http.ResponseWriter, r *http.Request))

Get wraps the router for GET method

func (*APIServer) Post

func (a *APIServer) Post(path string, f func(w http.ResponseWriter, r *http.Request))

Post wraps the router for POST method

func (*APIServer) Put

func (a *APIServer) Put(path string, f func(w http.ResponseWriter, r *http.Request))

Put wraps the router for PUT method

func (*APIServer) Run

func (a *APIServer) Run()

Run the aPIAPIServer on it's router

type RequestHandlerFunction

type RequestHandlerFunction func(db *sql.DB, lang *language.Client, w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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