Documentation ¶
Index ¶
- Variables
- func ApproveConfessionHandler(w http.ResponseWriter, r *http.Request)
- func CreateConfessionHandler(w http.ResponseWriter, r *http.Request)
- func CreateUserHandler(w http.ResponseWriter, r *http.Request)
- func DeleteUserHandler(w http.ResponseWriter, r *http.Request)
- func GetAPIInfo(w http.ResponseWriter, r *http.Request)
- func GetAllConfessionsHandler(w http.ResponseWriter, r *http.Request)
- func GetAllUsersHandler(w http.ResponseWriter, r *http.Request)
- func GetApprovedConfessionsHandler(w http.ResponseWriter, r *http.Request)
- func GetConfessionsBySenderHandler(w http.ResponseWriter, r *http.Request)
- func GetConfessionsOverviewHandler(w http.ResponseWriter, r *http.Request)
- func GetHomeFeedHandler(w http.ResponseWriter, r *http.Request)
- func GetNextConfessionNextIDHandler(w http.ResponseWriter, r *http.Request)
- func GetPostFeedHandler(w http.ResponseWriter, r *http.Request)
- func GetUserByIDHandler(w http.ResponseWriter, r *http.Request)
- func LoginHandler(w http.ResponseWriter, r *http.Request)
- func LoginHandlerWithoutPassword(w http.ResponseWriter, r *http.Request)
- func RejectConfessionHandler(w http.ResponseWriter, r *http.Request)
- func RollbackApproveConfessionHandler(w http.ResponseWriter, r *http.Request)
- func SearchConfessionsHandler(w http.ResponseWriter, r *http.Request)
- func UpdateUserHandler(w http.ResponseWriter, r *http.Request)
- type APIInfo
- type AuthParams
- type AuthResponse
- type Feed
- type FeedReponse
- type Item
- type MiniFeedReponse
- type MiniItem
- type NextConfession
- type Overview
- type RejectConfessionRequest
Constants ¶
This section is empty.
Variables ¶
var CodeDaoURLS = []string{"https://toidicodedao.com", "https://codeaholicguy.com/"}
CodeDaoURLS ...
var FPTURLs = []string{"https://daihoc.fpt.edu.vn"}
FPTURLs ...
var MediumURLs = []string{"https://codeburst.io",
"https://medium.freecodecamp.org",
"https://hackernoon.com",
"https://medium.com/javascript-scene",
"https://medium.com/dev-channel"}
MediumURLs ...
Functions ¶
func ApproveConfessionHandler ¶
func ApproveConfessionHandler(w http.ResponseWriter, r *http.Request)
ApproveConfessionHandler ...
func CreateConfessionHandler ¶
func CreateConfessionHandler(w http.ResponseWriter, r *http.Request)
CreateConfessionHandler ...
func CreateUserHandler ¶
func CreateUserHandler(w http.ResponseWriter, r *http.Request)
CreateUserHandler ...
func DeleteUserHandler ¶
func DeleteUserHandler(w http.ResponseWriter, r *http.Request)
DeleteUserHandler ...
func GetAllConfessionsHandler ¶
func GetAllConfessionsHandler(w http.ResponseWriter, r *http.Request)
GetAllConfessionsHandler ...
func GetAllUsersHandler ¶
func GetAllUsersHandler(w http.ResponseWriter, r *http.Request)
GetAllUsersHandler ...
func GetApprovedConfessionsHandler ¶
func GetApprovedConfessionsHandler(w http.ResponseWriter, r *http.Request)
GetApprovedConfessionsHandler ...
func GetConfessionsBySenderHandler ¶
func GetConfessionsBySenderHandler(w http.ResponseWriter, r *http.Request)
GetConfessionsBySenderHandler ...
func GetConfessionsOverviewHandler ¶
func GetConfessionsOverviewHandler(w http.ResponseWriter, r *http.Request)
GetConfessionsOverviewHandler ...
func GetHomeFeedHandler ¶
func GetHomeFeedHandler(w http.ResponseWriter, r *http.Request)
GetHomeFeedHandler ...
func GetNextConfessionNextIDHandler ¶
func GetNextConfessionNextIDHandler(w http.ResponseWriter, r *http.Request)
GetNextConfessionNextIDHandler ...
func GetPostFeedHandler ¶
func GetPostFeedHandler(w http.ResponseWriter, r *http.Request)
GetPostFeedHandler ...
func GetUserByIDHandler ¶
func GetUserByIDHandler(w http.ResponseWriter, r *http.Request)
GetUserByIDHandler ...
func LoginHandlerWithoutPassword ¶
func LoginHandlerWithoutPassword(w http.ResponseWriter, r *http.Request)
LoginHandlerWithoutPassword ...
func RejectConfessionHandler ¶
func RejectConfessionHandler(w http.ResponseWriter, r *http.Request)
RejectConfessionHandler ...
func RollbackApproveConfessionHandler ¶
func RollbackApproveConfessionHandler(w http.ResponseWriter, r *http.Request)
RollbackApproveConfessionHandler ...
func SearchConfessionsHandler ¶
func SearchConfessionsHandler(w http.ResponseWriter, r *http.Request)
SearchConfessionsHandler ...
func UpdateUserHandler ¶
func UpdateUserHandler(w http.ResponseWriter, r *http.Request)
UpdateUserHandler ...
Types ¶
type AuthParams ¶
type AuthParams struct { Email string `json:"email" gorm:"not null; type:varchar(250); unique_index"` Password string `json:"password" gorm:"not null; type:varchar(250)"` }
AuthParams ...
type AuthResponse ¶
type AuthResponse struct { JWT string `json:"token"` ExpiresAt int64 `json:"expire_at"` ID int `json:"id"` Nickname string `json:"nickname"` }
AuthResponse ...
type Feed ¶
type Feed struct { Title string `json:"title"` Link string `json:"link"` Author string `json:"author"` Description string `json:"description"` Image string `json:"image"` }
Feed ...
type FeedReponse ¶
type FeedReponse struct { Status string `json:"status"` Feed Feed `json:"feed"` Items []Item `json:"items"` }
FeedReponse ...
type Item ¶
type Item struct { Title string `json:"title"` PubDate string `json:"pubDate"` Link string `json:"link"` GUID string `json:"guid"` Author string `json:"author"` Thumbnail string `json:"thumbnail"` Description string `json:"description"` Content string `json:"content"` Categories []string `json:"categories"` }
Item ...
type MiniFeedReponse ¶
type MiniFeedReponse struct {
Items []MiniItem `json:"items"`
}
MiniFeedReponse ...
type MiniItem ¶
type MiniItem struct { Title string `json:"title"` PubDate string `json:"pubDate"` GUID string `json:"guid"` Thumbnail string `json:"thumbnail"` Description string `json:"description"` }
MiniItem ...
type Overview ¶
type Overview struct { TotalConfess int `json:"total"` PendingConfess int `json:"pending"` RejectedConfess int `json:"rejected"` }
Overview ...
type RejectConfessionRequest ¶
RejectConfessionRequest ...