handlers

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRecord

func CreateRecord(server *app.App) func(w http.ResponseWriter, req *http.Request)

CreateRecord handles a request to create a new record.

func CreateUser

func CreateUser(server *app.App) func(w http.ResponseWriter, req *http.Request)

CreateUser is a http handler function to creation a new user.

func DeleteRecord

func DeleteRecord(server *app.App) func(w http.ResponseWriter, req *http.Request)

DeleteRecord handles a request to delete a single record provided the mux parameter id.

func DeleteUser

func DeleteUser(server *app.App) func(w http.ResponseWriter, req *http.Request)

DeleteUser deletes a single user provided by an id mux parameter.

func IndexRecord

func IndexRecord(server *app.App) func(w http.ResponseWriter, req *http.Request)

IndexRecord handles a request to return a list of all records.

func IndexUser

func IndexUser(server *app.App) func(w http.ResponseWriter, req *http.Request)

IndexUser returns a list of all users.

func Info

func Info(server *app.App, version string, conf *config.Config) func(w http.ResponseWriter, req *http.Request)

Info returns some useful information for the client.

func Proxy

func Proxy(server *app.App, isHttps bool) func(w http.ResponseWriter, req *http.Request)

func ShowRecord

func ShowRecord(server *app.App) func(w http.ResponseWriter, req *http.Request)

ShowRecord handles a request to return a single record provided by the mux parameter id.

func ShowUser

func ShowUser(server *app.App) func(w http.ResponseWriter, req *http.Request)

ShowUser returns a single user provided by an id mux parameter.

func UpdateRecord

func UpdateRecord(server *app.App) func(w http.ResponseWriter, req *http.Request)

UpdateRecord handles a request to update a single record provided the mux parameter id.

func UpdateUser

func UpdateUser(server *app.App) func(w http.ResponseWriter, req *http.Request)

UpdateUser updates selected fields of a user provided by an id mux parameter.

func UserToken

func UserToken(server *app.App) func(w http.ResponseWriter, req *http.Request)

Types

type Infos

type Infos struct {
	Version string `json:"version"`
	Proxy   struct {
		SSL struct {
			Enabled  bool   `json:"enabled"`
			Listener string `json:"listener"`
		} `json:"ssl"`
		HTTP struct {
			Enabled  bool   `json:"enabled"`
			Listener string `json:"listener"`
		} `json:"http"`
	} `json:"proxy"`
}

Infos struct holds version and proxy info.

Jump to

Keyboard shortcuts

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