Documentation
¶
Index ¶
- Constants
- Variables
- func ArePortsReachable(ip string, ports ...string) error
- func CheckIfPathExist(path string) bool
- func CheckIfServiceIsInstalled(serv string) (bool, error)
- func CreateLinuxService(serviceName string, execStart string) error
- func CreatePathIfNotExist(path string) error
- func DoReq[response any](url string, data []byte, method string, headers map[string]string, ...) (response, int, error)
- func DownloadFile(url string, headers map[string]string, fileName string, path string, ...) error
- func Execute(c string, dir string, arg ...string) error
- func ExecuteWithResult(c string, dir string, arg ...string) (string, bool)
- func FindLatestLog(path string, pattern *regexp.Regexp) (string, error)
- func GenerateFromTemplate(data interface{}, templateFile string, configFile string) error
- func GenerateKey(baseKey string) ([]byte, error)
- func GenerateKeyByUUID(baseKey string, uuid string) ([]byte, error)
- func GetHostAliases(hostname string) ([]string, error)
- func GetIPAddress() (string, error)
- func GetMyPath() string
- func IncrementReconnectDelay(delay time.Duration, maxReconnectDelay time.Duration) time.Duration
- func InitLogger(filename string)
- func IsDirEmpty(path string) (bool, error)
- func LoadGRPCTLSCredentials(crtName string) (credentials.TransportCredentials, error)
- func LoadHTTPTLSCredentials(crtName string) (*tls.Config, error)
- func LoadIntegrationTLSConfig(certPath, keyPath string) (*tls.Config, error)
- func LoadUserCertificatesWithStruct(src, dest CertificateFiles) error
- func PrintBanner()
- func ReadFileLines(path string) ([]string, error)
- func ReadJson(fileName string, data interface{}) error
- func ReadYAML(path string, result interface{}) error
- func StopService(name string) error
- func TailLogFile(filePath string, logLinesChan chan string, stopChan chan bool)
- func UninstallService(name string) error
- func Unzip(zipFile, destPath string) error
- func ValidateIntegrationCertificates(certPath, keyPath string) error
- func WatchFolder(logType string, logsPath string, logLinesChan chan string)
- func WriteJSON(path string, data interface{}) error
- func WriteStringToFile(fileName string, body string) error
- func WriteYAML(url string, data interface{}) error
- type CertificateFiles
- type LogLevels
- type OSInfo
- type TLSStatus
Constants ¶
View Source
const ( CertFilePermissions = 0644 KeyFilePermissions = 0600 MinTLSVersion = tls.VersionTLS12 MaxTLSVersion = tls.VersionTLS13 )
Variables ¶
View Source
var ( Logger *logger.Logger LogLevelMap = map[string]int{ "debug": 100, "info": 200, "notice": 300, "warning": 400, "error": 500, "critical": 502, "alert": 509, } )
Functions ¶
func ArePortsReachable ¶
func CheckIfPathExist ¶
func CreateLinuxService ¶
func CreatePathIfNotExist ¶
func DownloadFile ¶
func GenerateFromTemplate ¶
func GenerateKey ¶
func GetHostAliases ¶
func GetIPAddress ¶
func IncrementReconnectDelay ¶
func InitLogger ¶
func InitLogger(filename string)
func IsDirEmpty ¶
func LoadGRPCTLSCredentials ¶
func LoadGRPCTLSCredentials(crtName string) (credentials.TransportCredentials, error)
func LoadUserCertificatesWithStruct ¶
func LoadUserCertificatesWithStruct(src, dest CertificateFiles) error
func PrintBanner ¶
func PrintBanner()
func ReadFileLines ¶
func StopService ¶
func TailLogFile ¶
func UninstallService ¶
func WatchFolder ¶
func WriteStringToFile ¶
Types ¶
type CertificateFiles ¶
Click to show internal directories.
Click to hide internal directories.