funcs

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSFuncs

func AWSFuncs(f map[string]interface{})

AWSFuncs -

func AddBase64Funcs

func AddBase64Funcs(f map[string]interface{})

AddBase64Funcs -

func AddConvFuncs

func AddConvFuncs(f map[string]interface{})

AddConvFuncs -

func AddCryptoFuncs

func AddCryptoFuncs(f map[string]interface{})

AddCryptoFuncs -

func AddDataFuncs

func AddDataFuncs(f map[string]interface{}, d *data.Data)

AddDataFuncs -

func AddEnvFuncs added in v1.10.0

func AddEnvFuncs(f map[string]interface{})

AddEnvFuncs -

func AddFileFuncs

func AddFileFuncs(f map[string]interface{})

AddFileFuncs -

func AddMathFuncs

func AddMathFuncs(f map[string]interface{})

AddMathFuncs -

func AddNetFuncs added in v1.9.0

func AddNetFuncs(f map[string]interface{})

AddNetFuncs -

func AddReFuncs added in v1.9.0

func AddReFuncs(f map[string]interface{})

AddReFuncs -

func AddSockaddrFuncs

func AddSockaddrFuncs(f map[string]interface{})

AddSockaddrFuncs -

func AddStringFuncs added in v1.9.0

func AddStringFuncs(f map[string]interface{})

AddStringFuncs -

func AddTimeFuncs

func AddTimeFuncs(f map[string]interface{})

AddTimeFuncs -

Types

type Base64Funcs

type Base64Funcs struct{}

Base64Funcs -

func Base64NS

func Base64NS() *Base64Funcs

Base64NS - the base64 namespace

func (*Base64Funcs) Decode

func (f *Base64Funcs) Decode(in interface{}) string

Decode -

func (*Base64Funcs) Encode

func (f *Base64Funcs) Encode(in interface{}) string

Encode -

type ConvFuncs

type ConvFuncs struct{}

ConvFuncs -

func ConvNS

func ConvNS() *ConvFuncs

ConvNS -

func (*ConvFuncs) Atoi

func (f *ConvFuncs) Atoi(s string) int

func (*ConvFuncs) Bool

func (f *ConvFuncs) Bool(s string) bool

func (*ConvFuncs) Has

func (f *ConvFuncs) Has(in interface{}, key string) bool

func (*ConvFuncs) Join

func (f *ConvFuncs) Join(in interface{}, sep string) string

func (*ConvFuncs) ParseFloat

func (f *ConvFuncs) ParseFloat(s string, bitSize int) float64

func (*ConvFuncs) ParseInt

func (f *ConvFuncs) ParseInt(s string, base, bitSize int) int64

func (*ConvFuncs) ParseUint

func (f *ConvFuncs) ParseUint(s string, base, bitSize int) uint64

func (*ConvFuncs) Slice

func (f *ConvFuncs) Slice(args ...interface{}) []interface{}

func (*ConvFuncs) ToFloat64

func (f *ConvFuncs) ToFloat64(in interface{}) float64

func (*ConvFuncs) ToFloat64s

func (f *ConvFuncs) ToFloat64s(in ...interface{}) []float64

func (*ConvFuncs) ToInt

func (f *ConvFuncs) ToInt(in interface{}) int

func (*ConvFuncs) ToInt64

func (f *ConvFuncs) ToInt64(in interface{}) int64

func (*ConvFuncs) ToInt64s

func (f *ConvFuncs) ToInt64s(in ...interface{}) []int64

func (*ConvFuncs) ToInts

func (f *ConvFuncs) ToInts(in ...interface{}) []int

func (*ConvFuncs) URL

func (f *ConvFuncs) URL(s string) (*url.URL, error)

type CryptoFuncs

type CryptoFuncs struct{}

CryptoFuncs -

func CryptoNS

func CryptoNS() *CryptoFuncs

CryptoNS - the crypto namespace

func (*CryptoFuncs) PBKDF2

func (f *CryptoFuncs) PBKDF2(password, salt, iter, keylen interface{}, hashFunc ...string) (k string, err error)

PBKDF2 - Run the Password-Based Key Derivation Function #2 as defined in RFC 2898 (PKCS #5 v2.0). This function outputs the binary result in hex format.

func (*CryptoFuncs) SHA1

func (f *CryptoFuncs) SHA1(input interface{}) string

SHA1 -

func (*CryptoFuncs) SHA224

func (f *CryptoFuncs) SHA224(input interface{}) string

SHA224 -

func (*CryptoFuncs) SHA256

func (f *CryptoFuncs) SHA256(input interface{}) string

SHA256 -

func (*CryptoFuncs) SHA384

func (f *CryptoFuncs) SHA384(input interface{}) string

SHA384 -

func (*CryptoFuncs) SHA512

func (f *CryptoFuncs) SHA512(input interface{}) string

SHA512 -

func (*CryptoFuncs) SHA512_224

func (f *CryptoFuncs) SHA512_224(input interface{}) string

SHA512_224 -

func (*CryptoFuncs) SHA512_256

func (f *CryptoFuncs) SHA512_256(input interface{}) string

SHA512_256 -

func (*CryptoFuncs) WPAPSK

func (f *CryptoFuncs) WPAPSK(ssid, password interface{}) (string, error)

WPAPSK - Convert an ASCII passphrase to WPA PSK for a given SSID

type DataFuncs

type DataFuncs struct{}

DataFuncs -

func DataNS

func DataNS() *DataFuncs

DataNS -

func (*DataFuncs) CSV

func (f *DataFuncs) CSV(args ...string) [][]string

CSV -

func (*DataFuncs) CSVByColumn

func (f *DataFuncs) CSVByColumn(args ...string) (cols map[string][]string)

CSVByColumn -

func (*DataFuncs) CSVByRow

func (f *DataFuncs) CSVByRow(args ...string) (rows []map[string]string)

CSVByRow -

func (*DataFuncs) JSON

func (f *DataFuncs) JSON(in string) map[string]interface{}

JSON -

func (*DataFuncs) JSONArray

func (f *DataFuncs) JSONArray(in string) []interface{}

JSONArray -

func (*DataFuncs) TOML

func (f *DataFuncs) TOML(in string) interface{}

TOML -

func (*DataFuncs) ToCSV

func (f *DataFuncs) ToCSV(args ...interface{}) string

ToCSV -

func (*DataFuncs) ToJSON

func (f *DataFuncs) ToJSON(in interface{}) string

ToJSON -

func (*DataFuncs) ToJSONPretty

func (f *DataFuncs) ToJSONPretty(indent string, in interface{}) string

ToJSONPretty -

func (*DataFuncs) ToTOML

func (f *DataFuncs) ToTOML(in interface{}) string

ToTOML -

func (*DataFuncs) ToYAML

func (f *DataFuncs) ToYAML(in interface{}) string

ToYAML -

func (*DataFuncs) YAML

func (f *DataFuncs) YAML(in string) map[string]interface{}

YAML -

func (*DataFuncs) YAMLArray

func (f *DataFuncs) YAMLArray(in string) []interface{}

YAMLArray -

type EnvFuncs added in v1.10.0

type EnvFuncs struct{}

EnvFuncs -

func EnvNS added in v1.10.0

func EnvNS() *EnvFuncs

EnvNS - the Env namespace

func (*EnvFuncs) Getenv added in v1.10.0

func (f *EnvFuncs) Getenv(key string, def ...string) string

Getenv -

type FileFuncs

type FileFuncs struct {
	// contains filtered or unexported fields
}

FileFuncs -

func FileNS

func FileNS() *FileFuncs

FileNS - the File namespace

func (*FileFuncs) Exists

func (f *FileFuncs) Exists(path string) bool

Exists -

func (*FileFuncs) IsDir

func (f *FileFuncs) IsDir(path string) bool

IsDir -

func (*FileFuncs) Read

func (f *FileFuncs) Read(path string) (string, error)

Read -

func (*FileFuncs) ReadDir

func (f *FileFuncs) ReadDir(path string) ([]string, error)

ReadDir -

func (*FileFuncs) Stat

func (f *FileFuncs) Stat(path string) (os.FileInfo, error)

Stat -

type Funcs

type Funcs struct {
	// contains filtered or unexported fields
}

Funcs -

func AWSNS

func AWSNS() *Funcs

AWSNS - the aws namespace

func (*Funcs) EC2Dynamic

func (a *Funcs) EC2Dynamic(key string, def ...string) string

EC2Dynamic -

func (*Funcs) EC2Meta

func (a *Funcs) EC2Meta(key string, def ...string) string

EC2Meta -

func (*Funcs) EC2Region

func (a *Funcs) EC2Region(def ...string) string

EC2Region -

func (*Funcs) EC2Tag

func (a *Funcs) EC2Tag(tag string, def ...string) string

EC2Tag -

type MathFuncs

type MathFuncs struct{}

MathFuncs -

func MathNS

func MathNS() *MathFuncs

MathNS - the math namespace

func (*MathFuncs) Add

func (f *MathFuncs) Add(n ...interface{}) int64

Add -

func (*MathFuncs) Div

func (f *MathFuncs) Div(a, b interface{}) (int64, error)

Div -

func (*MathFuncs) Mul

func (f *MathFuncs) Mul(n ...interface{}) int64

Mul -

func (*MathFuncs) Pow

func (f *MathFuncs) Pow(a, b interface{}) int64

Pow -

func (*MathFuncs) Rem

func (f *MathFuncs) Rem(a, b interface{}) int64

Rem -

func (*MathFuncs) Seq

func (f *MathFuncs) Seq(n ...interface{}) ([]int64, error)

Seq - return a sequence from `start` to `end`, in steps of `step` start and step are optional, and default to 1.

func (*MathFuncs) Sub

func (f *MathFuncs) Sub(a, b interface{}) int64

Sub -

type NetFuncs added in v1.9.0

type NetFuncs struct{}

NetFuncs -

func NetNS added in v1.9.0

func NetNS() *NetFuncs

NetNS - the net namespace

func (*NetFuncs) LookupCNAME added in v1.9.0

func (f *NetFuncs) LookupCNAME(name string) string

LookupCNAME -

func (*NetFuncs) LookupIP added in v1.9.0

func (f *NetFuncs) LookupIP(name string) string

LookupIP -

func (*NetFuncs) LookupIPs added in v1.9.0

func (f *NetFuncs) LookupIPs(name string) []string

LookupIPs -

func (*NetFuncs) LookupSRV added in v1.9.0

func (f *NetFuncs) LookupSRV(name string) *stdnet.SRV

LookupSRV -

func (*NetFuncs) LookupSRVs added in v1.9.0

func (f *NetFuncs) LookupSRVs(name string) []*stdnet.SRV

LookupSRVs -

func (*NetFuncs) LookupTXT added in v1.9.0

func (f *NetFuncs) LookupTXT(name string) []string

LookupTXT -

type ReFuncs added in v1.9.0

type ReFuncs struct{}

ReFuncs -

func ReNS added in v1.9.0

func ReNS() *ReFuncs

ReNS -

func (*ReFuncs) Match added in v1.9.0

func (f *ReFuncs) Match(re, input string) bool

Match -

func (*ReFuncs) Replace added in v1.9.0

func (f *ReFuncs) Replace(re, replacement, input string) string

Replace -

type SockaddrFuncs

type SockaddrFuncs struct{}

SockaddrFuncs -

func SockaddrNS

func SockaddrNS() *SockaddrFuncs

SockaddrNS - the sockaddr namespace

func (*SockaddrFuncs) Attr

func (f *SockaddrFuncs) Attr(selectorName string, ifAddrsRaw interface{}) (string, error)

Attr -

func (*SockaddrFuncs) Exclude

func (f *SockaddrFuncs) Exclude(selectorName, selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Exclude -

func (*SockaddrFuncs) GetAllInterfaces

func (f *SockaddrFuncs) GetAllInterfaces() (sockaddr.IfAddrs, error)

GetAllInterfaces -

func (*SockaddrFuncs) GetDefaultInterfaces

func (f *SockaddrFuncs) GetDefaultInterfaces() (sockaddr.IfAddrs, error)

GetDefaultInterfaces -

func (*SockaddrFuncs) GetInterfaceIP

func (f *SockaddrFuncs) GetInterfaceIP(namedIfRE string) (string, error)

GetInterfaceIP -

func (*SockaddrFuncs) GetInterfaceIPs

func (f *SockaddrFuncs) GetInterfaceIPs(namedIfRE string) (string, error)

GetInterfaceIPs -

func (*SockaddrFuncs) GetPrivateIP

func (f *SockaddrFuncs) GetPrivateIP() (string, error)

GetPrivateIP -

func (*SockaddrFuncs) GetPrivateIPs

func (f *SockaddrFuncs) GetPrivateIPs() (string, error)

GetPrivateIPs -

func (*SockaddrFuncs) GetPrivateInterfaces

func (f *SockaddrFuncs) GetPrivateInterfaces() (sockaddr.IfAddrs, error)

GetPrivateInterfaces -

func (*SockaddrFuncs) GetPublicIP

func (f *SockaddrFuncs) GetPublicIP() (string, error)

GetPublicIP -

func (*SockaddrFuncs) GetPublicIPs

func (f *SockaddrFuncs) GetPublicIPs() (string, error)

GetPublicIPs -

func (*SockaddrFuncs) GetPublicInterfaces

func (f *SockaddrFuncs) GetPublicInterfaces() (sockaddr.IfAddrs, error)

GetPublicInterfaces -

func (*SockaddrFuncs) Include

func (f *SockaddrFuncs) Include(selectorName, selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Include -

func (*SockaddrFuncs) Join

func (f *SockaddrFuncs) Join(selectorName, joinString string, inputIfAddrs sockaddr.IfAddrs) (string, error)

Join -

func (*SockaddrFuncs) Limit

func (f *SockaddrFuncs) Limit(lim uint, in sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Limit -

func (*SockaddrFuncs) Math

func (f *SockaddrFuncs) Math(operation, value string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Math -

func (*SockaddrFuncs) Offset

func (f *SockaddrFuncs) Offset(off int, in sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Offset -

func (*SockaddrFuncs) Sort

func (f *SockaddrFuncs) Sort(selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Sort -

func (*SockaddrFuncs) Unique

func (f *SockaddrFuncs) Unique(selectorName string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)

Unique -

type StringFuncs added in v1.9.0

type StringFuncs struct{}

StringFuncs -

func StrNS added in v1.9.0

func StrNS() *StringFuncs

StrNS -

func (*StringFuncs) Contains added in v1.9.0

func (f *StringFuncs) Contains(substr, s string) bool

Contains -

func (*StringFuncs) HasPrefix added in v1.9.0

func (f *StringFuncs) HasPrefix(prefix, s string) bool

HasPrefix -

func (*StringFuncs) HasSuffix added in v1.9.0

func (f *StringFuncs) HasSuffix(suffix, s string) bool

HasSuffix -

func (*StringFuncs) Indent added in v1.9.0

func (f *StringFuncs) Indent(args ...interface{}) string

Indent -

func (*StringFuncs) ReplaceAll added in v1.9.0

func (f *StringFuncs) ReplaceAll(old, new, s string) string

ReplaceAll -

func (*StringFuncs) Split added in v1.9.0

func (f *StringFuncs) Split(sep, s string) []string

Split -

func (*StringFuncs) SplitN added in v1.9.0

func (f *StringFuncs) SplitN(sep string, n int, s string) []string

SplitN -

func (*StringFuncs) Title added in v1.9.0

func (f *StringFuncs) Title(s string) string

Title -

func (*StringFuncs) ToLower added in v1.9.0

func (f *StringFuncs) ToLower(s string) string

ToLower -

func (*StringFuncs) ToUpper added in v1.9.0

func (f *StringFuncs) ToUpper(s string) string

ToUpper -

func (*StringFuncs) Trim added in v1.9.0

func (f *StringFuncs) Trim(cutset, s string) string

Trim -

func (*StringFuncs) TrimSpace added in v1.9.0

func (f *StringFuncs) TrimSpace(s string) string

TrimSpace -

type TimeFuncs

type TimeFuncs struct {
	ANSIC       string
	UnixDate    string
	RubyDate    string
	RFC822      string
	RFC822Z     string
	RFC850      string
	RFC1123     string
	RFC1123Z    string
	RFC3339     string
	RFC3339Nano string
	Kitchen     string
	Stamp       string
	StampMilli  string
	StampMicro  string
	StampNano   string
}

TimeFuncs -

func TimeNS

func TimeNS() *TimeFuncs

TimeNS -

func (*TimeFuncs) Hour

func (f *TimeFuncs) Hour(n int64) gotime.Duration

Hour -

func (*TimeFuncs) Microsecond

func (f *TimeFuncs) Microsecond(n int64) gotime.Duration

Microsecond -

func (*TimeFuncs) Millisecond

func (f *TimeFuncs) Millisecond(n int64) gotime.Duration

Millisecond -

func (*TimeFuncs) Minute

func (f *TimeFuncs) Minute(n int64) gotime.Duration

Minute -

func (*TimeFuncs) Nanosecond

func (f *TimeFuncs) Nanosecond(n int64) gotime.Duration

Nanosecond -

func (*TimeFuncs) Now

func (f *TimeFuncs) Now() gotime.Time

Now -

func (*TimeFuncs) Parse

func (f *TimeFuncs) Parse(layout, value string) (gotime.Time, error)

Parse -

func (*TimeFuncs) ParseInLocation

func (f *TimeFuncs) ParseInLocation(layout, location, value string) (gotime.Time, error)

ParseInLocation -

func (*TimeFuncs) ParseLocal

func (f *TimeFuncs) ParseLocal(layout, value string) (gotime.Time, error)

ParseLocal -

func (*TimeFuncs) Second

func (f *TimeFuncs) Second(n int64) gotime.Duration

Second -

func (*TimeFuncs) Unix

func (f *TimeFuncs) Unix(in interface{}) (gotime.Time, error)

Unix - convert UNIX time (in seconds since the UNIX epoch) into a time.Time for further processing Takes a string or number (int or float)

func (*TimeFuncs) ZoneName

func (f *TimeFuncs) ZoneName() string

ZoneName - return the local system's time zone's name

func (*TimeFuncs) ZoneOffset

func (f *TimeFuncs) ZoneOffset() int

ZoneOffset - return the local system's time zone's name

Jump to

Keyboard shortcuts

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