Documentation ¶
Index ¶
- Constants
- func Base10Version(hex int) int64
- func BytesToString(b []byte) string
- func CheckSingleton()
- func EmbedServer()
- func FileAndLine() string
- func FileExist(name string) bool
- func FindOne[T any](slice []T, filter func(*T) bool) (element *T)
- func FirstUpper(s string) string
- func Fn(public interface{}) string
- func GenerateRandomString(n int) (string, error)
- func GetFunctionName(i interface{}) string
- func GetRemoteAddr(req *http.Request) string
- func HasHan(txt string) bool
- func InStringSlice(x []string, find string) bool
- func IsNullValue(i any) bool
- func IsRoutableIP(ipStr string) bool
- func IsUnixAddr(addr string) bool
- func IsUrl(text string) bool
- func MD5(txt string) string
- func MarkdownTitle(txt string) string
- func Masker(input string, start int) string
- func Max(a, b int) int
- func MergeMaps(dst, src map[string]any) (map[string]any, bool)
- func NetListener(addr string) (net.Listener, error)
- func NewUUID() string
- func ParseFunctionName(name string) (string, string)
- func ParseTLSConfig(tlsEnabled bool, conf config.TLSConfig) (*tls.Config, error)
- func ParseVersion(vers string) int
- func ParseVersionPart(vers string) int
- func PortAvailable(port string) bool
- func PrettyPrintJsonStyle(data any)
- func PrettyPrintYamlStyle(data any)
- func SHA1(txt string) string
- func SameStringSlice(x, y []string) bool
- func SignalHandler() <-chan bool
- func StringToBytes(s string) []byte
- func ToAbsolutePath(base, path string) string
- func ValidImageContentType(ct string) bool
- func VersionCompare(v1, v2 int) int
Constants ¶
const EmbedServerPort = "5678"
Variables ¶
This section is empty.
Functions ¶
func Base10Version ¶
Base10Version Version as a base-10 number. Used by monitoring.
func BytesToString ¶
BytesToString converts byte slice to string.
func CheckSingleton ¶ added in v0.13.1
func CheckSingleton()
func EmbedServer ¶ added in v0.13.1
func EmbedServer()
func FileAndLine ¶
func FileAndLine() string
func FirstUpper ¶
func GenerateRandomString ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func GetRemoteAddr ¶
GetRemoteAddr Obtain IP address of the client.
func InStringSlice ¶
func IsNullValue ¶
IsNullValue Check if the interface contains a string with a single Unicode Del control character.
func IsRoutableIP ¶
func IsUnixAddr ¶
IsUnixAddr Check if specified address is a unix socket like "unix:/run/flowbot.sock".
func MarkdownTitle ¶
func NetListener ¶
NetListener creates net.Listener for tcp and unix domains: if addr is in the form "unix:/run/flowbot.sock" it's a unix socket, otherwise TCP host:port.
func ParseFunctionName ¶
func ParseTLSConfig ¶
func ParseVersion ¶
ParseVersion Parses semantic version string in the following formats:
1.2, 1.2abc, 1.2.3, 1.2.3-abc, v0.12.34-rc5
Unparceable values are replaced with zeros.
func ParseVersionPart ¶
ParseVersionPart Parse one component of a semantic version string.
func PortAvailable ¶ added in v0.13.1
func PrettyPrintJsonStyle ¶ added in v0.18.1
func PrettyPrintJsonStyle(data any)
func PrettyPrintYamlStyle ¶ added in v0.18.1
func PrettyPrintYamlStyle(data any)
func SameStringSlice ¶
func SignalHandler ¶ added in v0.18.1
func SignalHandler() <-chan bool
func StringToBytes ¶
StringToBytes converts string to byte slice.
func ToAbsolutePath ¶
ToAbsolutePath Convert relative filepath to absolute.
func ValidImageContentType ¶
func VersionCompare ¶
VersionCompare Returns > 0 if v1 > v2; zero if equal; < 0 if v1 < v2 Only Major and Minor parts are compared, the trailer is ignored.
Types ¶
This section is empty.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package reexec facilitates the busybox style reexec of the docker binary that we require because of the forking limitations of using Go.
|
Package reexec facilitates the busybox style reexec of the docker binary that we require because of the forking limitations of using Go. |