Documentation
¶
Index ¶
- func GetJWTTokenFromUser(user *database.User, jwtSecret string) (access string, refresh string, err error)
- func RespondWithError(w http.ResponseWriter, code int, msg string)
- func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
- func RespondWithOK(w http.ResponseWriter)
- type PaginatedResult
- type PaginationParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJWTTokenFromUser ¶
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, msg string)
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
func RespondWithOK ¶
func RespondWithOK(w http.ResponseWriter)
Types ¶
type PaginatedResult ¶
type PaginatedResult struct {
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
Items []interface{} `json:"items"`
}
func PaginateResult ¶
func PaginateResult(items []interface{}, params PaginationParams) PaginatedResult
type PaginationParams ¶
Click to show internal directories.
Click to hide internal directories.