utils

package
v1.0.119 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: Unlicense Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const SanitizedStringSizeLimit = 100

Variables

This section is empty.

Functions

func FingerPrint added in v1.0.65

func FingerPrint(config *types.ConfigFile)

func FormatDBLogPrefix

func FormatDBLogPrefix(input_time *time.Time) (result string)

Year , Month , Day

func FormatTime

func FormatTime(input_time *time.Time) (result string)

func GenerateNewKeys

func GenerateNewKeys()

func GetFormattedTimeString

func GetFormattedTimeString() (result string)

func GetFormattedTimeStringOBJ

func GetFormattedTimeStringOBJ() (result_string string, result_time time.Time)

func GetJSON

func GetJSON(baseURL string, headers map[string]string, params map[string]string) (target interface{})

func GetLocalIPAddresses added in v1.0.65

func GetLocalIPAddresses() (ip_addresses []string)

func HexToRGBColor added in v1.0.117

func HexToRGBColor(hex_color string) (result color.RGBA)

func IsURL added in v1.0.105

func IsURL(input string) (result bool, url *url.URL)

func IsUUID added in v1.0.96

func IsUUID(u string) (result bool)

func ParseConfig

func ParseConfig(file_path string) (result types.ConfigFile)

func ParseFormattedTimeString

func ParseFormattedTimeString(time_str string) (result time.Time)

func PostJSON

func PostJSON(url string, headers map[string]string, payload interface{}) (result interface{})

func PrettyPrint added in v1.0.75

func PrettyPrint(input interface{})

func RemoveNonASCII

func RemoveNonASCII(input string) (result string)

func SanitizeInputString

func SanitizeInputString(input string) (result string)

func SetupStackTraceReport

func SetupStackTraceReport()

func Sha256 added in v1.0.71

func Sha256(input string) (result string)

func ShuffleKeys

func ShuffleKeys[K comparable, V any](m map[K]V) (result []K)

func StringToInt

func StringToInt(input string) (result int)

func WakeOnLan

func WakeOnLan(mac_address string)

func WriteJSON

func WriteJSON(filePath string, data interface{})

func WriteLoginURLPrefix

func WriteLoginURLPrefix(server_login_url_prefix string)

func WriteLoginURLPrefixWG

func WriteLoginURLPrefixWG(wg *sync.WaitGroup, server_login_url_prefix string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL