Documentation
¶
Index ¶
- func BodyParser(r *http.Request) ([]byte, error)
- func CheckErr(err error)
- func ExtractBearerToken(r *http.Request) string
- func GenerateJWT(user models.User) (string, error)
- func JwtExtract(r *http.Request) (map[string]interface{}, error)
- func RespondWithError(response http.ResponseWriter, message string, statusCode int)
- func RespondWithJSON(response http.ResponseWriter, data interface{}, statusCode int)
- func ToJson(w http.ResponseWriter, data interface{}, statusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBearerToken ¶
func RespondWithError ¶
func RespondWithError(response http.ResponseWriter, message string, statusCode int)
func RespondWithJSON ¶
func RespondWithJSON(response http.ResponseWriter, data interface{}, statusCode int)
func ToJson ¶
func ToJson(w http.ResponseWriter, data interface{}, statusCode int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.