util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON format = "json"
	YAML format = "yaml"
)

Variables

This section is empty.

Functions

func IsValueInList added in v0.3.6

func IsValueInList(value string, list []string) bool

IsValueInList checks if a value is in the string slice

func ValidateSections added in v0.3.3

func ValidateSections(unmarshal func(interface{}) error, i interface{}, whitelist map[string]bool) error

ValidateSections validates the sections of the config file

func WhitelistAttrs added in v0.3.3

func WhitelistAttrs(i interface{}, format format) (map[string]bool, error)

Types

type Command

type Command struct {
	Cmd            *exec.Cmd
	Stdout, Stderr bytes.Buffer
	Err            error
	Status         int
	// contains filtered or unexported fields
}

Command represents a command which can be executed

func NewCommand

func NewCommand(name string, arg ...string) *Command

NewCommand creates a command

func (*Command) Run

func (c *Command) Run() error

Run executes the command and writes the results to its properties

type Config added in v0.0.18

type Config struct {
	IgnoreList        []string
	Timeout           int
	AllowInsecure     bool
	NoFollowRedirects bool
	Server            string
	Username          string
	Password          string
	Header            map[string][]string
	RequestHeaders    map[string][]string
	Certificate       tls.Certificate
}

Config type is a helper type which holds the configuration of the given resource

type OutputConfig added in v0.3.6

type OutputConfig struct {
	FormatOptions []string
}

type Request added in v0.4.0

type Request struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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