api

package
v0.0.0-...-a837e86 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAuthenticate

func HandleAuthenticate(config *config.Config, r *http.Request, baseURL string) (interface{}, error)

func MakeHandlerFunc

func MakeHandlerFunc(config *config.Config, apiHandler ApiHandler) http.HandlerFunc

func RegisterApiRoutes

func RegisterApiRoutes(config *config.Config)

Types

type ApiHandler

type ApiHandler func(config *config.Config, r *http.Request, baseURL string) (interface{}, error)

type AuthenticateRequest

type AuthenticateRequest struct {
	Provider  string `json:"provider"`
	AppID     string `json:"appId"`
	AppSecret string `json:"appSecret"`
	UserName  string `json:"username"`
	Password  string `json:"password"`
}

type AuthenticateResponse

type AuthenticateResponse struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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