Documentation
¶
Index ¶
- Constants
- func AlertBox(messageType AlertType, message string) string
- func DefaultHtml(input any, defaultValue string) template.HTML
- func DefaultString(input any, defaultValue string) string
- func FormatDateTime(datetime time.Time) string
- func GenerateHTML(tmpl string, data any) (string, error)
- func GenerateRandomString(length int) (string, error)
- func GetFieldValue(input any, fieldName string) (any, error)
- func GetMapKeys[T any](m map[string]T) []string
- func IsCommandAvailable(cmd string) bool
- func IsCronValid(fl validator.FieldLevel) bool
- func MergeMaps[K comparable, V any](map1, map2 map[K]V) map[K]V
- func ParseInt(s string) int
- func ParseInt64(s string) int64
- func PrintBanner(viewsFS embed.FS, data any)
- func RemoveDuplicates(input []string) []string
- func ToMap(data any) map[string]any
- func ToastHeader(message string) (string, string)
- func TransformToMaps[T any](items []T, typeName string) []map[string]any
- type AlertType
Constants ¶
View Source
const ( BlockEntity string = "blocks" WebhookEntity string = "webhooks" PageEntity string = "pages" PeriodicTaskEntity string = "periodic_tasks" )
Variables ¶
This section is empty.
Functions ¶
func DefaultHtml ¶
defaultString returns the default string if the input is empty.
func DefaultString ¶
func FormatDateTime ¶
func GenerateRandomString ¶
GenerateRandomString creates a random string of a specified length
func GetMapKeys ¶
func IsCommandAvailable ¶
func IsCronValid ¶
func IsCronValid(fl validator.FieldLevel) bool
func MergeMaps ¶
func MergeMaps[K comparable, V any](map1, map2 map[K]V) map[K]V
MergeMaps merges two maps. Values from map2 will overwrite values from map1 if keys are the same.
func ParseInt64 ¶
func PrintBanner ¶
func RemoveDuplicates ¶
func ToastHeader ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.