utils

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 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 DeleteDirectory added in v0.3.20

func DeleteDirectory(path string) error

DeleteDirectory deletes directory and all its children

func FetchQueryParams added in v0.3.18

func FetchQueryParams() (params map[string]string)

FetchQueryParams returns the params which are required in API

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, ymlFilename string) (*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