controller

package
v0.0.0-...-0397089 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIAccount represents the group of account management API.
	APIAccount = API + "/account"
	// APIAccountLoginStatus represents the API to get the status of logged in account.
	APIAccountLoginStatus = APIAccount + "/loginStatus"
	// APIAccountLoginAccount represents the API to get the logged in account.
	APIAccountLoginAccount = APIAccount + "/loginAccount"
	// APIAccountLogin represents the API to login by session authentication.
	APIAccountLogin = APIAccount + "/login"
	// APIAccountLogout represents the API to logout.
	APIAccountLogout = APIAccount + "/logout"
)
View Source
const (
	// API represents the group of API.
	API = "/api"
)
View Source
const (
	// APIHealth represents the API to get the status of this application.
	APIHealth = API + "/health"
)

Variables

This section is empty.

Functions

func GetHealthCheck

func GetHealthCheck() echo.HandlerFunc

GetHealthCheck returns whether this application is alive or not.

func GetLoginAccount

func GetLoginAccount() echo.HandlerFunc

GetLoginAccount returns the account data of logged in user.

func GetLoginStatus

func GetLoginStatus() echo.HandlerFunc

GetLoginStatus returns the status of login.

func JSONErrorHandler

func JSONErrorHandler(err error, c echo.Context)

JSONErrorHandler is cumstomize error handler

func PostLogin

func PostLogin() echo.HandlerFunc

PostLogin is the method to login using username and password by http post.

func PostLogout

func PostLogout() echo.HandlerFunc

PostLogout is the method to logout by http post.

Types

type APIError

type APIError struct {
	Code    int
	Message string
}

APIError represents

Jump to

Keyboard shortcuts

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