util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(inputFormat string, outputFormat string, input string) (string, error)

func DownloadFile

func DownloadFile(filepath string, url string) error

DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.

func EncodeString

func EncodeString(value string, algorithm string, salt string) string

func GetHostFromUrl

func GetHostFromUrl(resourceUrl string) (string, error)

func GetJsonPath

func GetJsonPath(source string, sourceFormat string, jsonPath string) (string, error)

func GetParameterFromTerminalAsSecret

func GetParameterFromTerminalAsSecret(text1 string, text2 string, errorText string) (string, error)

func HexAsBigInt

func HexAsBigInt(bytes []byte) string

This is the hex conversion algorithm implemented in vamp

func PrettyJson

func PrettyJson(input string) string

func RandomEncodedString

func RandomEncodedString(length int) string

func RandomString

func RandomString(n int) string

func ReadFilesIndirectory

func ReadFilesIndirectory(root string) (map[string]string, error)

func Timestamp

func Timestamp() string

func UUID

func UUID() string

func UseSourceUrl

func UseSourceUrl(resourceUrl string) (string, error)

This function allows using a filepath or http/s url to get resource from

func ValidateName

func ValidateName(name string) bool

func VerifyCertForHost

func VerifyCertForHost(resourceUrl string, cert string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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