Skip to content

Utility Go-API

import "givc/modules/pkgs/utility"

Copyright 2024 TII (SSRC) and the Ghaf contributors SPDX-License-Identifier: Apache-2.0

Copyright 2024 TII (SSRC) and the Ghaf contributors SPDX-License-Identifier: Apache-2.0

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(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

func TlsClientConfigFromTlsConfig(tlsConfig *tls.Config, serverName string) *tls.Config

func TlsServerConfig(cacertFilePath string, certFilePath string, keyFilePath string, mutual bool) *tls.Config

Generated by gomarkdoc