Documentation ¶
Index ¶
- func AddFriend(cfg *utils.ServerConfig) gin.HandlerFunc
- func CreateCost(cfg *utils.ServerConfig) gin.HandlerFunc
- func CreateIncome(cfg *utils.ServerConfig) gin.HandlerFunc
- func CreateUser(cfg *utils.ServerConfig) gin.HandlerFunc
- func DeleteCost(cfg *utils.ServerConfig) gin.HandlerFunc
- func DeleteIncome(cfg *utils.ServerConfig) gin.HandlerFunc
- func DeleteUser(cfg *utils.ServerConfig) gin.HandlerFunc
- func ErrorWriter(c *gin.Context, code int, err error)
- func GetUser(cfg *utils.ServerConfig) gin.HandlerFunc
- func GetUserCost(cfg *utils.ServerConfig) gin.HandlerFunc
- func GetUserCostHistory(cfg *utils.ServerConfig) gin.HandlerFunc
- func GetUserIncome(cfg *utils.ServerConfig) gin.HandlerFunc
- func GetUserIncomeHistory(cfg *utils.ServerConfig) gin.HandlerFunc
- func UpdateCost(cfg *utils.ServerConfig) gin.HandlerFunc
- func UpdateIncome(cfg *utils.ServerConfig) gin.HandlerFunc
- func UpdateUser(cfg *utils.ServerConfig) gin.HandlerFunc
- func VoteCost(cfg *utils.ServerConfig) gin.HandlerFunc
- func VoteIncome(cfg *utils.ServerConfig) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFriend ¶
func AddFriend(cfg *utils.ServerConfig) gin.HandlerFunc
GetUser handle request PUT /user/addfriend/:id
func CreateCost ¶
func CreateCost(cfg *utils.ServerConfig) gin.HandlerFunc
CreateCost handle request POST /cost
func CreateIncome ¶
func CreateIncome(cfg *utils.ServerConfig) gin.HandlerFunc
CreateIncome handle request POST /income
func CreateUser ¶
func CreateUser(cfg *utils.ServerConfig) gin.HandlerFunc
CreateUser handle request POST /user
func DeleteCost ¶
func DeleteCost(cfg *utils.ServerConfig) gin.HandlerFunc
DeleteCost handle request POST /cost
func DeleteIncome ¶
func DeleteIncome(cfg *utils.ServerConfig) gin.HandlerFunc
DeleteIncome handle request POST /income
func DeleteUser ¶
func DeleteUser(cfg *utils.ServerConfig) gin.HandlerFunc
DeleteUser handle request DELETE /user/:id
func ErrorWriter ¶
ErrorWriter set redirect header to index and show error message
func GetUser ¶
func GetUser(cfg *utils.ServerConfig) gin.HandlerFunc
GetUser handle request GET /user/:id
func GetUserCost ¶
func GetUserCost(cfg *utils.ServerConfig) gin.HandlerFunc
GetUserCost handle request GET /user/:id/cost
func GetUserCostHistory ¶
func GetUserCostHistory(cfg *utils.ServerConfig) gin.HandlerFunc
GetUserCostHistory handle request GET /user/:id/income/history?range=
func GetUserIncome ¶
func GetUserIncome(cfg *utils.ServerConfig) gin.HandlerFunc
GetUserIncome handle request GET /user/:id/income/
func GetUserIncomeHistory ¶
func GetUserIncomeHistory(cfg *utils.ServerConfig) gin.HandlerFunc
GetUserIncomeHistory handle request GET /user/:id/income/history?range=
func UpdateCost ¶
func UpdateCost(cfg *utils.ServerConfig) gin.HandlerFunc
UpdateCost handle request POST /cost/:id
func UpdateIncome ¶
func UpdateIncome(cfg *utils.ServerConfig) gin.HandlerFunc
UpdateIncome handle request POST /income/:id
func UpdateUser ¶
func UpdateUser(cfg *utils.ServerConfig) gin.HandlerFunc
UpdateUser handle request PATCH /user/:id
func VoteCost ¶
func VoteCost(cfg *utils.ServerConfig) gin.HandlerFunc
VoteCost handle request PUT /cost/vote/:id
func VoteIncome ¶
func VoteIncome(cfg *utils.ServerConfig) gin.HandlerFunc
VoteIncome handle request PUT /income/vote/:id
Types ¶
This section is empty.