handlers

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2015 License: MIT Imports: 18 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) 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)

Proxy returns a handler to proxy HTTP(S) requests.

func ProxyDNS

func ProxyDNS(server *app.App) func(w dns.ResponseWriter, req *dns.Msg)

ProxyDNS returns a handler for a proxy DNS server.

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)

UserToken returns an HTTP handler to generate a token for a user.

Types

type Infos

type Infos struct {
	Version string `json:"version"`
	Proxy   struct {
		DNS struct {
			Enabled  bool   `json:"enabled"`
			Listener string `json:"listener"`
		} `json:"dns"`
		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