cli

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFile

func CheckFile(path string) (string, error)

CheckFile checks if path exists and can be `stat`ed at given `path`

func DecorateResults added in v0.6.5

func DecorateResults(result *parser.Result, cmd *cobra.Command) error

func FindParser

func FindParser(path string, cmd *cobra.Command) (parser.Parser, error)

FindParser finds parser according to file type or flag specified by user

func GzipCompress added in v0.7.0

func GzipCompress(data []byte) ([]byte, error)

takes a slice of data bytes, compresses it and replaces with compressed bytes

func GzipDecompress added in v0.7.0

func GzipDecompress(data []byte) ([]byte, error)

func IsGzipCompressed added in v0.7.0

func IsGzipCompressed(bytes []byte) bool

func Load added in v0.3.0

func Load(path string) (*parser.Result, error)

Load ...

func LoadFiles added in v0.3.0

func LoadFiles(inPaths []string, ext string) ([]string, error)

LoadFiles checks if path exists and can be `stat`ed at given `path`

func Marshal

func Marshal(testResults parser.Result) ([]byte, error)

Marshal provides json output for given test results

func MergeFiles added in v0.3.0

func MergeFiles(path string, cmd *cobra.Command) (*parser.Result, error)

MergeFiles merges all json files found in path into one big blob

func Parse

func Parse(p parser.Parser, path string, cmd *cobra.Command) (parser.Result, error)

Parse parses file at `path` with given `parser`

func PullArtifacts added in v0.3.0

func PullArtifacts(level string, remotePath string, localPath string, cmd *cobra.Command) (string, error)

PullArtifacts fetches artifacts from semaphore artifact storage

func PushArtifacts

func PushArtifacts(level string, file string, destination string, cmd *cobra.Command) (string, error)

PushArtifacts publishes artifacts to semaphore artifact storage

func SetLogLevel

func SetLogLevel(cmd *cobra.Command) error

SetLogLevel sets log level according to flags

func WriteToFile

func WriteToFile(data []byte, file *os.File, compress bool) (string, error)

func WriteToFilePath added in v0.6.8

func WriteToFilePath(data []byte, path string, compress bool) (string, error)

WriteToFilePath saves data to given file

func WriteToTmpFile

func WriteToTmpFile(data []byte, compress bool) (string, error)

WriteToTmpFile saves data to temporary file

Types

This section is empty.

Jump to

Keyboard shortcuts

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