utils

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 19 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 GenerateUUID added in v0.10.2

func GenerateUUID() string

GenerateUUID generates uuid v4

func GetArgs added in v0.6.0

func GetArgs(command string, frameWork string, frameworkVersion int,
	configFile string,
	target []string) []string

func GetConfigFileName

func GetConfigFileName(path string) (string, error)

GetConfigFileName returns the name of the configuration file

func GetDefaultQueryAndHeaders added in v0.6.20

func GetDefaultQueryAndHeaders() (query map[string]interface{}, headers map[string]string)

GetDefaultQueryAndHeaders returns the query and headers that should be supplied with each request made to TAS Server

func GetOutboundIP

func GetOutboundIP() string

GetOutboundIP returns preferred outbound ip of this container

func GetTASFilePath added in v0.10.2

func GetTASFilePath(path string) (string, error)

GetTASFilePath returns tas file path

func GetVersion added in v0.5.0

func GetVersion(ymlContent []byte) (int, error)

GetVersion returns version of tas yml file

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 ValidateStructTASYml added in v0.10.2

func ValidateStructTASYml(ctx context.Context, ymlContent []byte, ymlFilename string) (interface{}, error)

ValidateStructTASYml validates the TAS config for all supported version

func ValidateStructTASYmlV1 added in v0.5.0

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

func ValidateStructTASYmlV2 added in v0.5.0

func ValidateStructTASYmlV2(ctx context.Context, ymlContent []byte, ymlFileName string) (*core.TASConfigV2, error)

ValidateStructTASYmlV2 validates tas configuration file

func ValidateSubModule added in v0.5.0

func ValidateSubModule(module *core.SubModule) error

ValidateSubModule validates submodule

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