Documentation
¶
Index ¶
- func AbbreviateUUID(id string) string
- func CheckError(err error)
- func GenerateSlug(title string) string
- func GetString(value *string) string
- func GetStringFromReflectValue(v reflect.Value) (string, error)
- func InitDir(path string, mode fs.FileMode) error
- func IsEventGatewayEnabled() bool
- func IsValidUUID(s string) bool
- func StringSliceFromAny(value any) ([]string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbbreviateUUID ¶ added in v0.3.0
AbbreviateUUID returns a shortened representation of a UUID suitable for text output. When the value is not a UUID, the original value is returned unchanged.
func CheckError ¶
func CheckError(err error)
func GenerateSlug ¶ added in v0.1.2
GenerateSlug converts a title to a URL-friendly slug This matches the Konnect server-side slugify implementation Example: "My API Document" -> "my-api-document"
func GetString ¶ added in v0.4.0
GetString returns the string value pointed to by value, or an empty string if value is nil.
func GetStringFromReflectValue ¶ added in v0.4.0
GetStringFromReflectValue safely extracts a string value from a reflect.Value that may be a string, *string, or nil pointer. Returns empty string if nil or invalid.
func IsEventGatewayEnabled ¶ added in v0.4.0
func IsEventGatewayEnabled() bool
IsEventGatewayEnabled returns true if Event Gateway features are enabled via the KONGCTL_ENABLE_EVENT_GATEWAY environment variable. Accepts standard boolean string values: "1", "t", "T", "TRUE", "true", "True" for true; "0", "f", "F", "FALSE", "false", "False" for false. Empty string is treated as false.
func IsValidUUID ¶ added in v0.1.3
IsValidUUID checks if a string is a valid UUID format. It validates the standard 8-4-4-4-12 hexadecimal pattern with dashes.
func StringSliceFromAny ¶ added in v0.3.8
StringSliceFromAny converts a dynamic value into a string slice. Returns false when the value is not a slice of strings.
Types ¶
This section is empty.