Documentation ¶
Index ¶
- Constants
- func Config(c echo.Context) *home.Config
- func Error(c echo.Context, status int, err error) error
- func ErrorBadRequest(c echo.Context, err error) error
- func ErrorInternal(c echo.Context, err error) error
- func ErrorNotFound(c echo.Context, err error) error
- func ErrorUnauthorized(c echo.Context, err error) error
- func GetApp(path string) (*get3w.App, error)
- func IsAnonymous(c echo.Context) bool
- func LoadRequestInput(c echo.Context, v interface{}) error
- func Owner(c echo.Context) string
- func StaticProxy() echo.HandlerFunc
- func StaticXDomain() echo.HandlerFunc
- func StoreHeaders(options ...*StoreHeaderOptions) echo.MiddlewareFunc
- func Version(c echo.Context) string
- type StoreHeaderOptions
Constants ¶
View Source
const ( // VersionV1 is current api version VersionV1 = "v1" // Bearer is bearer header authentication Bearer = "Bearer" // TokenNameOfHeader token name of authentication header TokenNameOfHeader = "X-Get3W-Access-Token" // TokenNameOfQuery token name of authentication query TokenNameOfQuery = "access_token" // ErrFormat message ErrFormat = "Input format incorrect" // ErrUsernameExist message ErrUsernameExist = "Sorry. A user with that username already exists, or the username was invalid." // ErrEmailExist message ErrEmailExist = "Sorry. A user with that email address already exists, or the email was invalid." // ErrAppnameExist message ErrAppnameExist = "Sorry. An app with that name already exists." // ErrAppnameNotValid message ErrAppnameNotValid = "Sorry. An app with that name was invalid." // ErrPassword message ErrPassword = "Password is incorrect" // ErrPasswordLength message ErrPasswordLength = "Password is too short (minimum is 6 characters)." // ErrEmailNotExist message ErrEmailNotExist = "There is no user with that email address." // StaticProxyContent returns proxy.html content StaticProxyContent = `` /* 337-byte string literal not displayed */ // StaticXDomainContent returns xdomain.min.js content StaticXDomainContent = `` /* 13227-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func ErrorBadRequest ¶
ErrorBadRequest response bad request specified error message
func ErrorInternal ¶
ErrorInternal response internal server error with err information
func ErrorNotFound ¶
ErrorNotFound response not found error with err information
func ErrorUnauthorized ¶
ErrorUnauthorized response unauthorized error with err information
func IsAnonymous ¶
IsAnonymous return true if no authentication information in the header
func LoadRequestInput ¶
LoadRequestInput decode request body and add value to request
func StaticXDomain ¶
func StaticXDomain() echo.HandlerFunc
StaticXDomain response xdomain.min.js content
func StoreHeaders ¶
func StoreHeaders(options ...*StoreHeaderOptions) echo.MiddlewareFunc
StoreHeaders get header values and set to context
Types ¶
Click to show internal directories.
Click to hide internal directories.