Documentation ¶
Overview ¶
Heavily inspired by approach in terraform providers (google, aws etc).
Index ¶
- Constants
- func CheckDir(path string) (string, bool)
- func CheckMatch(name string, globs []glob.Glob) bool
- func DefaultVarEncoder(c *VarContext, input interface{}) ([]byte, error)
- func DefaultVarKeyGetter(c *VarContext, vars map[string]interface{}) (val interface{}, err error)
- func DirExists(path string) bool
- func FileExists(path string) bool
- func LimitString(n string, lim int) string
- func MapstructureDecode(in, out interface{}, tag string) error
- func MapstructureJSONDecode(in, out interface{}) error
- func MergeMaps(a ...map[string]interface{}) map[string]interface{}
- func MergeStringMaps(a ...map[string]string) map[string]string
- func MustNewStruct(m map[string]interface{}) *structpb.Struct
- func RandomString(length int) string
- func RandomStringCrypto(length int) string
- func RandomStringCryptoCustom(lower, upper, numeric, special bool, length int) string
- func RandomStringCustom(lower, upper, numeric, special bool, length int) string
- func SHAString(n string) string
- func SanitizeEnvVar(in string) string
- func SanitizeName(n string, allowUnderscore, allowDot bool) string
- func StringSliceContains(arr []string, s string) bool
- func StripAnsiControl(in string) string
- func WalkWithExclusions(dir string, excludes []string, ...) error
- type BaseVarEvaluator
- func (e *BaseVarEvaluator) ExpandRaw(input []byte) (output []byte, params []interface{}, err error)
- func (e *BaseVarEvaluator) WithCommentsChar(commentsChar byte) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithEncoder(encoder func(c *VarContext, val interface{}) ([]byte, error)) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithIgnoreComments(ignoreComments bool) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithIgnoreInvalid(ignoreInvalid bool) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithKeyGetter(...) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithSkipRowColumnInfo(skipRowColumnInfo bool) *BaseVarEvaluator
- func (e *BaseVarEvaluator) WithVarChar(varChar byte) *BaseVarEvaluator
- type MutexKV
- type Unmarshaler
- type VarContext
Constants ¶
View Source
const (
GOOSWindows = "windows"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultVarEncoder ¶
func DefaultVarEncoder(c *VarContext, input interface{}) ([]byte, error)
func DefaultVarKeyGetter ¶
func DefaultVarKeyGetter(c *VarContext, vars map[string]interface{}) (val interface{}, err error)
func FileExists ¶
func LimitString ¶
func MapstructureDecode ¶
func MapstructureJSONDecode ¶
func MapstructureJSONDecode(in, out interface{}) error
func MustNewStruct ¶
func RandomString ¶
func RandomStringCrypto ¶
func RandomStringCustom ¶
func SanitizeEnvVar ¶
func SanitizeName ¶
func StringSliceContains ¶
func StripAnsiControl ¶
Types ¶
type BaseVarEvaluator ¶
type BaseVarEvaluator struct {
// contains filtered or unexported fields
}
func NewBaseVarEvaluator ¶
func NewBaseVarEvaluator(vars map[string]interface{}) *BaseVarEvaluator
func (*BaseVarEvaluator) ExpandRaw ¶
func (e *BaseVarEvaluator) ExpandRaw(input []byte) (output []byte, params []interface{}, err error)
func (*BaseVarEvaluator) WithCommentsChar ¶
func (e *BaseVarEvaluator) WithCommentsChar(commentsChar byte) *BaseVarEvaluator
func (*BaseVarEvaluator) WithEncoder ¶
func (e *BaseVarEvaluator) WithEncoder(encoder func(c *VarContext, val interface{}) ([]byte, error)) *BaseVarEvaluator
func (*BaseVarEvaluator) WithIgnoreComments ¶
func (e *BaseVarEvaluator) WithIgnoreComments(ignoreComments bool) *BaseVarEvaluator
func (*BaseVarEvaluator) WithIgnoreInvalid ¶
func (e *BaseVarEvaluator) WithIgnoreInvalid(ignoreInvalid bool) *BaseVarEvaluator
func (*BaseVarEvaluator) WithKeyGetter ¶
func (e *BaseVarEvaluator) WithKeyGetter(keyGetter func(c *VarContext, vars map[string]interface{}) (val interface{}, err error)) *BaseVarEvaluator
func (*BaseVarEvaluator) WithSkipRowColumnInfo ¶
func (e *BaseVarEvaluator) WithSkipRowColumnInfo(skipRowColumnInfo bool) *BaseVarEvaluator
func (*BaseVarEvaluator) WithVarChar ¶
func (e *BaseVarEvaluator) WithVarChar(varChar byte) *BaseVarEvaluator
type MutexKV ¶
type MutexKV struct {
// contains filtered or unexported fields
}
MutexKV is a simple key/value store for arbitrary mutexes. It can be used to serialize changes across arbitrary collaborators that share knowledge of the keys they must serialize on.
type Unmarshaler ¶
type Unmarshaler interface {
UnmarshalMapstructure(interface{}) error
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.