Documentation
¶
Index ¶
- func GenerateAuthToken(userId int) (string, error)
- func GetReqPathIntVal(r *http.Request, key string) int
- func GetRequestQueryIntVal(r *http.Request, key string, fallback int) int
- func ParseRequestBody[T any](r *http.Request, payload *T) error
- func ValidateAuthToken(tokenString string) (int, error)
- func WriteErroresponseToJson(w http.ResponseWriter, statusCode int, err error) error
- func WriteSuccessResponseToJson(w http.ResponseWriter, statusCode int, message string, data interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAuthToken ¶
func GetRequestQueryIntVal ¶
func ValidateAuthToken ¶
func WriteErroresponseToJson ¶
func WriteErroresponseToJson(w http.ResponseWriter, statusCode int, err error) error
func WriteSuccessResponseToJson ¶
func WriteSuccessResponseToJson(w http.ResponseWriter, statusCode int, message string, data interface{}) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.