Utility Go-API
utility
Section titled “utility”import "givc/modules/pkgs/utility"SPDX-FileCopyrightText: 2024-2026 TII (SSRC) and the Ghaf contributors SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2024-2026 TII (SSRC) and the Ghaf contributors SPDX-License-Identifier: Apache-2.0
- Variables
- func CheckStringInArray(element string, array []string) bool
- func FindCGroupPath(serviceName string) (string, error)
- func GetCGroupPathForProcess(pid uint32) (string, error)
- func GetFqdn(addrs []net.IP) (string, error)
- func GetHostname() (string, error)
- func GetInterfaceIpv4(ifname string) (string, error)
- func GetInterfaceIpv4Dns(hostname string) (string, error)
- func GetIps(hostname string) ([]net.IP, error)
- func GetOutboundIP() net.IP
- func IsRoot() bool
- func IsUser(username string) bool
- func ParseVsockAddress(addr string) (uint32, uint32, error)
- func TlsClientConfig(cacertFilePath string, certFilePath string, keyFilePath string, serverName string) (*tls.Config, error)
- func TlsClientConfigFromTlsConfig(tlsConfig *tls.Config, serverName string) (*tls.Config, error)
- func TlsServerConfig(cacertFilePath string, certFilePath string, keyFilePath string, mutual bool) (*tls.Config, error)
Variables
Section titled “Variables”var ( CIPHER_SUITES = []uint16{ tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, })func CheckStringInArray
Section titled “func CheckStringInArray”func CheckStringInArray(element string, array []string) boolfunc FindCGroupPath
Section titled “func FindCGroupPath”func FindCGroupPath(serviceName string) (string, error)func GetCGroupPathForProcess
Section titled “func GetCGroupPathForProcess”func GetCGroupPathForProcess(pid uint32) (string, error)func GetFqdn
Section titled “func GetFqdn”func GetFqdn(addrs []net.IP) (string, error)func GetHostname
Section titled “func GetHostname”func GetHostname() (string, error)func GetInterfaceIpv4
Section titled “func GetInterfaceIpv4”func GetInterfaceIpv4(ifname string) (string, error)func GetInterfaceIpv4Dns
Section titled “func GetInterfaceIpv4Dns”func GetInterfaceIpv4Dns(hostname string) (string, error)func GetIps
Section titled “func GetIps”func GetIps(hostname string) ([]net.IP, error)func GetOutboundIP
Section titled “func GetOutboundIP”func GetOutboundIP() net.IPfunc IsRoot
Section titled “func IsRoot”func IsRoot() boolfunc IsUser
Section titled “func IsUser”func IsUser(username string) boolfunc ParseVsockAddress
Section titled “func ParseVsockAddress”func ParseVsockAddress(addr string) (uint32, uint32, error)func TlsClientConfig
Section titled “func TlsClientConfig”func TlsClientConfig(cacertFilePath string, certFilePath string, keyFilePath string, serverName string) (*tls.Config, error)func TlsClientConfigFromTlsConfig
Section titled “func TlsClientConfigFromTlsConfig”func TlsClientConfigFromTlsConfig(tlsConfig *tls.Config, serverName string) (*tls.Config, error)func TlsServerConfig
Section titled “func TlsServerConfig”func TlsServerConfig(cacertFilePath string, certFilePath string, keyFilePath string, mutual bool) (*tls.Config, error)Generated by gomarkdoc