Documentation
¶
Index ¶
- func ConvertToUUID(dataString string) uuid.UUID
- func CreateError(message string) error
- func GetENVValue(key string) string
- func GetFileType(filename string) string
- func GetQueryUUID(request *http.Request) uuid.UUID
- func GetSearchKeyword(request *http.Request) string
- func GetStringContextData(request *http.Request, key models.ContextKey) string
- func GetUUIDContextData(request *http.Request, key models.ContextKey) uuid.UUID
- func IsValidID(providedID string) bool
- func NormalizePhoneNumber(phoneNumber string, toNormal bool) string
- func RespondWithJSON(Response http.ResponseWriter, StatusCode int, Payload interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToUUID ¶ added in v1.2.6
func CreateError ¶
CreateError returns a new error with the given message
func GetENVValue ¶
GetValue loads the environment variable value for a given key (case insensitive, converts input key to UPPER_SNAKE_CASE), including those loaded from .env file.
func GetFileType ¶ added in v1.2.6
Function to determine if the file is an image or video
func GetSearchKeyword ¶ added in v1.2.6
func GetStringContextData ¶ added in v1.2.6
func GetStringContextData(request *http.Request, key models.ContextKey) string
func GetUUIDContextData ¶ added in v1.2.6
func NormalizePhoneNumber ¶ added in v1.2.6
func RespondWithJSON ¶
func RespondWithJSON(Response http.ResponseWriter, StatusCode int, Payload interface{})
RespondWithJSON writes a JSON response to the HTTP response writer. Constructs a standardized server response with payload and success flag. Sets the appropriate headers, status code, and writes the JSON data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.