Back to godoc.org

Package controller

v0.0.0-...-fb34084
Latest Go to latest

The highest tagged major version is .

Published: Aug 23, 2020 | License: MIT | Module: github.com/ybkuroki/go-webapp-project-template

Index

Constants

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"
)
const (
	// API represents the group of API.
	API = "/api"
)
const (
	// APIHealth represents the API to get the status of this application.
	APIHealth = API + "/health"
)

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.

type APIError

type APIError struct {
	Code    int
	Message string
}

APIError represents

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier