Documentation
¶
Index ¶
- func AESCTRDecrypt(data string) (string, error)
- func Base64Decode(data string) (string, error)
- func Base64Encode(data string) string
- func CreateMap(values ...interface{}) (map[string]interface{}, error)
- func Getenv(key string, v ...string) string
- func Hash256Sum(data string) string
- func LookupIP(data string) []string
- func LookupIPV4(data string) []string
- func LookupIPV6(data string) []string
- func LookupSRV(service, proto, name string) []*net.SRV
- func Process(config Config) error
- func ReadContentFromFile(fpath string) (string, error)
- func ReadContentFromSecret(name, namespace, key string) (string, error)
- func Reverse(values interface{}) interface{}
- func Seq(first, last int) []int
- func SortByLength(values []string) []string
- func SortKVByLength(values []memkv.KVPair) []memkv.KVPair
- func StrconvToFloat64(s string) (float64, error)
- func UnmarshalJsonArray(data string) ([]interface{}, error)
- func UnmarshalJsonArrayAppendSomething(data string, appendStr ...string) ([]string, error)
- func UnmarshalJsonArrayPrependSomething(data string, prependStr ...string) ([]string, error)
- func UnmarshalJsonObject(data string) (map[string]interface{}, error)
- type Config
- type TemplateResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCTRDecrypt ¶
func Base64Decode ¶
func Base64Encode ¶
func CreateMap ¶
CreateMap creates a key-value map of string -> interface{} The i'th is the key and the i+1 is the value
func Getenv ¶
Getenv retrieves the value of the environment variable named by the key. It returns the value, which will the default value if the variable is not present. If no default value was given - returns "".
func Hash256Sum ¶
func LookupIPV4 ¶
func LookupIPV6 ¶
func ReadContentFromFile ¶
func ReadContentFromSecret ¶
func Reverse ¶
func Reverse(values interface{}) interface{}
Reverse returns the array in reversed order works with []string and []KVPair
func Seq ¶
Seq creates a sequence of integers. It's named and used as GNU's seq. Seq takes the first and the last element as arguments. So Seq(3, 5) will generate [3,4,5]
func SortByLength ¶
func StrconvToFloat64 ¶
func UnmarshalJsonArray ¶
func UnmarshalJsonObject ¶
Types ¶
type Config ¶
type Config struct {
StoreClient backends.StoreClient
TemplateFile string
DestFile string
}
type TemplateResource ¶
type TemplateResource struct {
Dest string
FileMode os.FileMode
Gid int
Mode string
Src string
StageFile *os.File
Uid int
// contains filtered or unexported fields
}
TemplateResource is the representation of a parsed template resource.
func NewTemplateResource ¶
func NewTemplateResource(config Config) (*TemplateResource, error)
NewTemplateResource creates a TemplateResource.