utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeChecksum

func ComputeChecksum(filename string) (string, error)

ComputeChecksum compute the md5 hash for the given filename

func CreateDirectory

func CreateDirectory(path string) error

CreateDirectory creates directory recursively if does not exists

func GetConfigFileName

func GetConfigFileName(path string) (string, error)

GetConfigFileName returns the name of the configuration file

func GetOutboundIP

func GetOutboundIP() string

GetOutboundIP returns preferred outbound ip of this container

func InterfaceToMap

func InterfaceToMap(in interface{}) map[string]string

InterfaceToMap converts interface{} to map[string]string

func Min

func Min(x, y int) int

Min returns the smaller of x or y.

func ValidateStruct

func ValidateStruct(ctx context.Context, ymlContent []byte) (*core.TASConfig, error)

func WriteFileToDirectory

func WriteFileToDirectory(path, filename string, data []byte) error

WriteFileToDirectory writes `data` file to `filename`/`path`

Types

This section is empty.

Jump to

Keyboard shortcuts

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