Documentation ¶
Index ¶
- Constants
- func GetBookList() echo.HandlerFunc
- func GetBookSearch() echo.HandlerFunc
- func GetCategoryList() echo.HandlerFunc
- func GetFormatList() echo.HandlerFunc
- func GetHealthCheck() echo.HandlerFunc
- func GetLoginAccount() echo.HandlerFunc
- func GetLoginStatus() echo.HandlerFunc
- func JSONErrorHandler(err error, c echo.Context)
- func PostBookDelete() echo.HandlerFunc
- func PostBookEdit() echo.HandlerFunc
- func PostBookRegist() echo.HandlerFunc
- func PostLogin() echo.HandlerFunc
- func PostLogout() echo.HandlerFunc
- type APIError
Constants ¶
View Source
const ( // API represents the group of API. API = "/api" // APIBook represents the group of book management API. APIBook = API + "/book" // APIBookList represents the API to get book's list. APIBookList = APIBook + "/list" // APIBookSearch represents the API to search book's list. APIBookSearch = APIBook + "/search" // APIBookRegist represents the API to register a new book. APIBookRegist = APIBook + "/new" // APIBookEdit represents the API to edit the existing book. APIBookEdit = APIBook + "/edit" // APIBookDelete represents the API to delete the existing book. APIBookDelete = APIBook + "/delete" )
View Source
const ( // APIMaster represents the group of master management API. APIMaster = API + "/master" // APIMasterCategory represents the API to get category's list. APIMasterCategory = APIMaster + "/category" // APIMasterFormat represents the API to get format's list. APIMasterFormat = APIMaster + "/format" )
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 ( // APIHealth represents the API to get the status of this application. APIHealth = API + "/health" )
Variables ¶
This section is empty.
Functions ¶
func GetBookSearch ¶
func GetBookSearch() echo.HandlerFunc
GetBookSearch returns the list of matched books by searching.
func GetCategoryList ¶
func GetCategoryList() echo.HandlerFunc
GetCategoryList returns the list of all categories.
func GetFormatList ¶
func GetFormatList() echo.HandlerFunc
GetFormatList returns the list of all formats.
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 PostBookDelete ¶
func PostBookDelete() echo.HandlerFunc
PostBookDelete deletes the existing book by http post.
func PostBookEdit ¶
func PostBookEdit() echo.HandlerFunc
PostBookEdit edit the existing book by http post.
func PostBookRegist ¶
func PostBookRegist() echo.HandlerFunc
PostBookRegist register a new book by http post.
func PostLogin ¶ added in v1.3.0
func PostLogin() echo.HandlerFunc
PostLogin is the method to login using username and password by http post.
func PostLogout ¶ added in v1.3.0
func PostLogout() echo.HandlerFunc
PostLogout is the method to logout by http post.
Types ¶
Click to show internal directories.
Click to hide internal directories.