api

package
v0.0.0-...-abcb19d Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnauthorizedError

func UnauthorizedError(w http.ResponseWriter, message string)

UnauthorizedError is simple Error Wrapper

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPIWithVersion

func NewAPIWithVersion(config *conf.Configuration, version string) *API

func (*API) ListenAndServe

func (a *API) ListenAndServe(hostAndPort string) error

ListenAndServe starts the REST API

func (*API) ServeHTTP

func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*API) Version

func (a *API) Version(w http.ResponseWriter, r *http.Request)

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

Error is an error with a message

type JWTClaims

type JWTClaims struct {
	Email        string                 `json:"email"`
	AppMetaData  map[string]interface{} `json:"app_metadata"`
	UserMetaData map[string]interface{} `json:"user_metadata"`
	*jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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