Documentation ¶
Overview ¶
Package funcs is an internal package that provides gomplate namespaces and functions to be used in 'text/template' templates.
The different namespaces can be added individually:
f := template.FuncMap{} funcs.AddMathFuncs(f) funcs.AddNetFuncs(f)
Even though the functions are exported, these are not intended to be called programmatically by external consumers, but instead only to be used as template functions.
Index ¶
- func AddBase64Funcs(f map[string]interface{})
- func AddCollFuncs(f map[string]interface{})
- func AddConvFuncs(f map[string]interface{})
- func AddCryptoFuncs(f map[string]interface{})
- func AddEnvFuncs(f map[string]interface{})
- func AddFileFuncs(f map[string]interface{})
- func AddFilePathFuncs(f map[string]interface{})
- func AddMathFuncs(f map[string]interface{})
- func AddNetFuncs(f map[string]interface{})
- func AddPathFuncs(f map[string]interface{})
- func AddRandomFuncs(f map[string]interface{})
- func AddReFuncs(f map[string]interface{})
- func AddSockaddrFuncs(f map[string]interface{})
- func AddStringFuncs(f map[string]interface{})
- func AddTimeFuncs(f map[string]interface{})
- func AddUUIDFuncs(f map[string]interface{})
- func CreateBase64Funcs(ctx context.Context) map[string]interface{}
- func CreateCollFuncs(ctx context.Context) map[string]interface{}
- func CreateConvFuncs(ctx context.Context) map[string]interface{}
- func CreateCryptoFuncs(ctx context.Context) map[string]interface{}
- func CreateEnvFuncs(ctx context.Context) map[string]interface{}
- func CreateFileFuncs(ctx context.Context) map[string]interface{}
- func CreateFilePathFuncs(ctx context.Context) map[string]interface{}
- func CreateMathFuncs(ctx context.Context) map[string]interface{}
- func CreateNetFuncs(ctx context.Context) map[string]interface{}
- func CreatePathFuncs(ctx context.Context) map[string]interface{}
- func CreateRandomFuncs(ctx context.Context) map[string]interface{}
- func CreateReFuncs(ctx context.Context) map[string]interface{}
- func CreateSockaddrFuncs(ctx context.Context) map[string]interface{}
- func CreateStringFuncs(ctx context.Context) map[string]interface{}
- func CreateTimeFuncs(ctx context.Context) map[string]interface{}
- func CreateUUIDFuncs(ctx context.Context) map[string]interface{}
- type Base64Funcs
- type CollFuncs
- func (f *CollFuncs) Append(v interface{}, list interface{}) ([]interface{}, error)
- func (f *CollFuncs) Dict(in ...interface{}) (map[string]interface{}, error)
- func (f *CollFuncs) Flatten(args ...interface{}) ([]interface{}, error)
- func (f *CollFuncs) Has(in interface{}, key string) bool
- func (f *CollFuncs) Keys(in ...map[string]interface{}) ([]string, error)
- func (f *CollFuncs) Merge(dst map[string]interface{}, src ...map[string]interface{}) (map[string]interface{}, error)
- func (f *CollFuncs) Omit(args ...interface{}) (map[string]interface{}, error)
- func (f *CollFuncs) Pick(args ...interface{}) (map[string]interface{}, error)
- func (f *CollFuncs) Prepend(v interface{}, list interface{}) ([]interface{}, error)
- func (f *CollFuncs) Reverse(in interface{}) ([]interface{}, error)
- func (f *CollFuncs) Slice(args ...interface{}) []interface{}
- func (f *CollFuncs) Sort(args ...interface{}) ([]interface{}, error)
- func (f *CollFuncs) Uniq(in interface{}) ([]interface{}, error)
- func (f *CollFuncs) Values(in ...map[string]interface{}) ([]interface{}, error)
- type ConvFuncs
- func (f *ConvFuncs) Atoi(s interface{}) int
- func (f *ConvFuncs) Bool(s interface{}) bool
- func (f *ConvFuncs) Default(def, in interface{}) interface{}
- func (f *ConvFuncs) Dict(in ...interface{}) (map[string]interface{}, error)
- func (f *ConvFuncs) Has(in interface{}, key string) bool
- func (f *ConvFuncs) Join(in interface{}, sep string) (string, error)
- func (f *ConvFuncs) ParseFloat(s interface{}, bitSize int) float64
- func (f *ConvFuncs) ParseInt(s interface{}, base, bitSize int) int64
- func (f *ConvFuncs) ParseUint(s interface{}, base, bitSize int) uint64
- func (f *ConvFuncs) Slice(args ...interface{}) []interface{}
- func (f *ConvFuncs) ToBool(in interface{}) bool
- func (f *ConvFuncs) ToBools(in ...interface{}) []bool
- func (f *ConvFuncs) ToFloat64(in interface{}) float64
- func (f *ConvFuncs) ToFloat64s(in ...interface{}) []float64
- func (f *ConvFuncs) ToInt(in interface{}) int
- func (f *ConvFuncs) ToInt64(in interface{}) int64
- func (f *ConvFuncs) ToInt64s(in ...interface{}) []int64
- func (f *ConvFuncs) ToInts(in ...interface{}) []int
- func (f *ConvFuncs) ToString(in interface{}) string
- func (f *ConvFuncs) ToStrings(in ...interface{}) []string
- func (f *ConvFuncs) URL(s interface{}) (*url.URL, error)
- type CryptoFuncs
- func (f *CryptoFuncs) Bcrypt(args ...interface{}) (string, error)
- func (f *CryptoFuncs) PBKDF2(password, salt, iter, keylen interface{}, hashFunc ...string) (k string, err error)
- func (f *CryptoFuncs) RSADecrypt(key string, in []byte) (string, error)
- func (f *CryptoFuncs) RSADecryptBytes(key string, in []byte) ([]byte, error)
- func (f *CryptoFuncs) RSADerivePublicKey(privateKey string) (string, error)
- func (f *CryptoFuncs) RSAEncrypt(key string, in interface{}) ([]byte, error)
- func (f *CryptoFuncs) RSAGenerateKey(args ...interface{}) (string, error)
- func (f *CryptoFuncs) SHA1(input interface{}) string
- func (f *CryptoFuncs) SHA224(input interface{}) string
- func (f *CryptoFuncs) SHA256(input interface{}) string
- func (f *CryptoFuncs) SHA384(input interface{}) string
- func (f *CryptoFuncs) SHA512(input interface{}) string
- func (f *CryptoFuncs) SHA512_224(input interface{}) string
- func (f *CryptoFuncs) SHA512_256(input interface{}) string
- func (f *CryptoFuncs) WPAPSK(ssid, password interface{}) (string, error)
- type EnvFuncs
- type FileFuncs
- func (f *FileFuncs) Exists(path interface{}) bool
- func (f *FileFuncs) IsDir(path interface{}) bool
- func (f *FileFuncs) Read(path interface{}) (string, error)
- func (f *FileFuncs) ReadDir(path interface{}) ([]string, error)
- func (f *FileFuncs) Stat(path interface{}) (os.FileInfo, error)
- func (f *FileFuncs) Walk(path interface{}) ([]string, error)
- func (f *FileFuncs) Write(path interface{}, data interface{}) (s string, err error)
- type FilePathFuncs
- func (f *FilePathFuncs) Base(in interface{}) string
- func (f *FilePathFuncs) Clean(in interface{}) string
- func (f *FilePathFuncs) Dir(in interface{}) string
- func (f *FilePathFuncs) Ext(in interface{}) string
- func (f *FilePathFuncs) FromSlash(in interface{}) string
- func (f *FilePathFuncs) IsAbs(in interface{}) bool
- func (f *FilePathFuncs) Join(elem ...interface{}) string
- func (f *FilePathFuncs) Match(pattern, name interface{}) (matched bool, err error)
- func (f *FilePathFuncs) Rel(basepath, targpath interface{}) (string, error)
- func (f *FilePathFuncs) Split(in interface{}) []string
- func (f *FilePathFuncs) ToSlash(in interface{}) string
- func (f *FilePathFuncs) VolumeName(in interface{}) string
- type MathFuncs
- func (f *MathFuncs) Abs(n interface{}) interface{}
- func (f *MathFuncs) Add(n ...interface{}) interface{}
- func (f *MathFuncs) Ceil(n interface{}) interface{}
- func (f *MathFuncs) Div(a, b interface{}) (interface{}, error)
- func (f *MathFuncs) Floor(n interface{}) interface{}
- func (f *MathFuncs) IsFloat(n interface{}) bool
- func (f *MathFuncs) IsInt(n interface{}) bool
- func (f *MathFuncs) IsNum(n interface{}) bool
- func (f *MathFuncs) Max(a interface{}, b ...interface{}) (interface{}, error)
- func (f *MathFuncs) Min(a interface{}, b ...interface{}) (interface{}, error)
- func (f *MathFuncs) Mul(n ...interface{}) interface{}
- func (f *MathFuncs) Pow(a, b interface{}) interface{}
- func (f *MathFuncs) Rem(a, b interface{}) interface{}
- func (f *MathFuncs) Round(n interface{}) interface{}
- func (f *MathFuncs) Seq(n ...interface{}) ([]int64, error)
- func (f *MathFuncs) Sub(a, b interface{}) interface{}
- type NetFuncs
- func (f *NetFuncs) LookupCNAME(name interface{}) (string, error)
- func (f *NetFuncs) LookupIP(name interface{}) (string, error)
- func (f *NetFuncs) LookupIPs(name interface{}) ([]string, error)
- func (f *NetFuncs) LookupSRV(name interface{}) (*stdnet.SRV, error)
- func (f *NetFuncs) LookupSRVs(name interface{}) ([]*stdnet.SRV, error)
- func (f *NetFuncs) LookupTXT(name interface{}) ([]string, error)
- type PathFuncs
- func (f *PathFuncs) Base(in interface{}) string
- func (f *PathFuncs) Clean(in interface{}) string
- func (f *PathFuncs) Dir(in interface{}) string
- func (f *PathFuncs) Ext(in interface{}) string
- func (f *PathFuncs) IsAbs(in interface{}) bool
- func (f *PathFuncs) Join(elem ...interface{}) string
- func (f *PathFuncs) Match(pattern, name interface{}) (matched bool, err error)
- func (f *PathFuncs) Split(in interface{}) []string
- type RandomFuncs
- func (f *RandomFuncs) ASCII(count interface{}) (string, error)
- func (f *RandomFuncs) Alpha(count interface{}) (string, error)
- func (f *RandomFuncs) AlphaNum(count interface{}) (string, error)
- func (f *RandomFuncs) Float(args ...interface{}) (float64, error)
- func (f *RandomFuncs) Item(items interface{}) (interface{}, error)
- func (f *RandomFuncs) Number(args ...interface{}) (int64, error)
- func (f *RandomFuncs) String(count interface{}, args ...interface{}) (s string, err error)
- type ReFuncs
- func (f *ReFuncs) Find(re, input interface{}) (string, error)
- func (f *ReFuncs) FindAll(args ...interface{}) ([]string, error)
- func (f *ReFuncs) Match(re, input interface{}) bool
- func (f *ReFuncs) QuoteMeta(in interface{}) string
- func (f *ReFuncs) Replace(re, replacement, input interface{}) string
- func (f *ReFuncs) ReplaceLiteral(re, replacement, input interface{}) (string, error)
- func (f *ReFuncs) Split(args ...interface{}) ([]string, error)
- type SockaddrFuncs
- func (f *SockaddrFuncs) Attr(selectorName string, ifAddrsRaw interface{}) (string, error)
- func (f *SockaddrFuncs) Exclude(selectorName, selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) GetAllInterfaces() (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) GetDefaultInterfaces() (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) GetInterfaceIP(namedIfRE string) (string, error)
- func (f *SockaddrFuncs) GetInterfaceIPs(namedIfRE string) (string, error)
- func (f *SockaddrFuncs) GetPrivateIP() (string, error)
- func (f *SockaddrFuncs) GetPrivateIPs() (string, error)
- func (f *SockaddrFuncs) GetPrivateInterfaces() (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) GetPublicIP() (string, error)
- func (f *SockaddrFuncs) GetPublicIPs() (string, error)
- func (f *SockaddrFuncs) GetPublicInterfaces() (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Include(selectorName, selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Join(selectorName, joinString string, inputIfAddrs sockaddr.IfAddrs) (string, error)
- func (f *SockaddrFuncs) Limit(lim uint, in sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Math(operation, value string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Offset(off int, in sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Sort(selectorParam string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- func (f *SockaddrFuncs) Unique(selectorName string, inputIfAddrs sockaddr.IfAddrs) (sockaddr.IfAddrs, error)
- type StringFuncs
- func (f *StringFuncs) Abbrev(args ...interface{}) (string, error)
- func (f *StringFuncs) CamelCase(in interface{}) (string, error)
- func (f *StringFuncs) Contains(substr string, s interface{}) bool
- func (f *StringFuncs) HasPrefix(prefix string, s interface{}) bool
- func (f *StringFuncs) HasSuffix(suffix string, s interface{}) bool
- func (f *StringFuncs) Indent(args ...interface{}) (string, error)
- func (f *StringFuncs) KebabCase(in interface{}) (string, error)
- func (f *StringFuncs) Quote(in interface{}) string
- func (f *StringFuncs) Repeat(count int, s interface{}) (string, error)
- func (f *StringFuncs) ReplaceAll(old, new string, s interface{}) string
- func (f *StringFuncs) RuneCount(args ...interface{}) (int, error)
- func (f *StringFuncs) ShellQuote(in interface{}) string
- func (f *StringFuncs) Slug(in interface{}) string
- func (f *StringFuncs) SnakeCase(in interface{}) (string, error)
- func (f *StringFuncs) Sort(list interface{}) ([]string, error)deprecated
- func (f *StringFuncs) Split(sep string, s interface{}) []string
- func (f *StringFuncs) SplitN(sep string, n int, s interface{}) []string
- func (f *StringFuncs) Squote(in interface{}) string
- func (f *StringFuncs) Title(s interface{}) string
- func (f *StringFuncs) ToLower(s interface{}) string
- func (f *StringFuncs) ToUpper(s interface{}) string
- func (f *StringFuncs) Trim(cutset string, s interface{}) string
- func (f *StringFuncs) TrimPrefix(cutset string, s interface{}) string
- func (f *StringFuncs) TrimSpace(s interface{}) string
- func (f *StringFuncs) TrimSuffix(cutset string, s interface{}) string
- func (f *StringFuncs) Trunc(length int, s interface{}) string
- func (f *StringFuncs) WordWrap(args ...interface{}) (string, error)
- type TimeFuncs
- func (f *TimeFuncs) Hour(n interface{}) gotime.Duration
- func (f *TimeFuncs) Microsecond(n interface{}) gotime.Duration
- func (f *TimeFuncs) Millisecond(n interface{}) gotime.Duration
- func (f *TimeFuncs) Minute(n interface{}) gotime.Duration
- func (f *TimeFuncs) Nanosecond(n interface{}) gotime.Duration
- func (f *TimeFuncs) Now() gotime.Time
- func (f *TimeFuncs) Parse(layout string, value interface{}) (gotime.Time, error)
- func (f *TimeFuncs) ParseDuration(n interface{}) (gotime.Duration, error)
- func (f *TimeFuncs) ParseInLocation(layout, location string, value interface{}) (gotime.Time, error)
- func (f *TimeFuncs) ParseLocal(layout string, value interface{}) (gotime.Time, error)
- func (f *TimeFuncs) Second(n interface{}) gotime.Duration
- func (f *TimeFuncs) Since(n gotime.Time) gotime.Duration
- func (f *TimeFuncs) Unix(in interface{}) (gotime.Time, error)
- func (f *TimeFuncs) Until(n gotime.Time) gotime.Duration
- func (f *TimeFuncs) ZoneName() string
- func (f *TimeFuncs) ZoneOffset() int
- type UUIDFuncs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBase64Funcs ¶
CreateBase64Funcs -
func CreateCollFuncs ¶
CreateCollFuncs -
func CreateConvFuncs ¶
CreateConvFuncs -
func CreateCryptoFuncs ¶
CreateCryptoFuncs -
func CreateEnvFuncs ¶
CreateEnvFuncs -
func CreateFileFuncs ¶
CreateFileFuncs -
func CreateFilePathFuncs ¶
CreateFilePathFuncs -
func CreateMathFuncs ¶
CreateMathFuncs -
func CreateNetFuncs ¶
CreateNetFuncs -
func CreatePathFuncs ¶
CreatePathFuncs -
func CreateRandomFuncs ¶
CreateRandomFuncs -
func CreateSockaddrFuncs ¶
CreateSockaddrFuncs -
func CreateStringFuncs ¶
CreateStringFuncs -
func CreateTimeFuncs ¶
CreateTimeFuncs -
func CreateUUIDFuncs ¶
CreateUUIDFuncs -
Types ¶
type Base64Funcs ¶
type Base64Funcs struct {
// contains filtered or unexported fields
}
Base64Funcs -
func (*Base64Funcs) DecodeBytes ¶
func (f *Base64Funcs) DecodeBytes(in interface{}) ([]byte, error)
DecodeBytes -
type CollFuncs ¶
type CollFuncs struct {
// contains filtered or unexported fields
}
CollFuncs -
func (*CollFuncs) Merge ¶
func (f *CollFuncs) Merge(dst map[string]interface{}, src ...map[string]interface{}) (map[string]interface{}, error)
Merge -
type ConvFuncs ¶
type ConvFuncs struct {
// contains filtered or unexported fields
}
ConvFuncs -
func (*ConvFuncs) ParseFloat ¶
ParseFloat -
func (*ConvFuncs) ToFloat64s ¶
ToFloat64s -
type CryptoFuncs ¶
type CryptoFuncs struct {
// contains filtered or unexported fields
}
CryptoFuncs -
func (*CryptoFuncs) Bcrypt ¶
func (f *CryptoFuncs) Bcrypt(args ...interface{}) (string, error)
Bcrypt -
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) RSADecrypt ¶
func (f *CryptoFuncs) RSADecrypt(key string, in []byte) (string, error)
RSADecrypt - Experimental!
func (*CryptoFuncs) RSADecryptBytes ¶
func (f *CryptoFuncs) RSADecryptBytes(key string, in []byte) ([]byte, error)
RSADecryptBytes - Experimental!
func (*CryptoFuncs) RSADerivePublicKey ¶
func (f *CryptoFuncs) RSADerivePublicKey(privateKey string) (string, error)
RSADerivePublicKey - Experimental!
func (*CryptoFuncs) RSAEncrypt ¶
func (f *CryptoFuncs) RSAEncrypt(key string, in interface{}) ([]byte, error)
RSAEncrypt - Experimental!
func (*CryptoFuncs) RSAGenerateKey ¶
func (f *CryptoFuncs) RSAGenerateKey(args ...interface{}) (string, error)
RSAGenerateKey - Experimental!
func (*CryptoFuncs) SHA1 ¶
func (f *CryptoFuncs) SHA1(input interface{}) string
SHA1 - Note: SHA-1 is cryptographically broken and should not be used for secure applications.
func (*CryptoFuncs) SHA512_224 ¶
func (f *CryptoFuncs) SHA512_224(input interface{}) string
SHA512_224 - nolint: golint,stylecheck
func (*CryptoFuncs) SHA512_256 ¶
func (f *CryptoFuncs) SHA512_256(input interface{}) string
SHA512_256 - nolint: golint,stylecheck
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 FileFuncs ¶
type FileFuncs struct {
// contains filtered or unexported fields
}
FileFuncs -
type FilePathFuncs ¶
type FilePathFuncs struct {
// contains filtered or unexported fields
}
FilePathFuncs -
func (*FilePathFuncs) FromSlash ¶
func (f *FilePathFuncs) FromSlash(in interface{}) string
FromSlash -
func (*FilePathFuncs) Match ¶
func (f *FilePathFuncs) Match(pattern, name interface{}) (matched bool, err error)
Match -
func (*FilePathFuncs) Rel ¶
func (f *FilePathFuncs) Rel(basepath, targpath interface{}) (string, error)
Rel -
func (*FilePathFuncs) VolumeName ¶
func (f *FilePathFuncs) VolumeName(in interface{}) string
VolumeName -
type MathFuncs ¶
type MathFuncs struct {
// contains filtered or unexported fields
}
MathFuncs -
type NetFuncs ¶
type NetFuncs struct {
// contains filtered or unexported fields
}
NetFuncs -
func (*NetFuncs) LookupCNAME ¶
LookupCNAME -
func (*NetFuncs) LookupSRVs ¶
LookupSRVs -
type PathFuncs ¶
type PathFuncs struct {
// contains filtered or unexported fields
}
PathFuncs -
type RandomFuncs ¶
type RandomFuncs struct {
// contains filtered or unexported fields
}
RandomFuncs -
func (*RandomFuncs) AlphaNum ¶
func (f *RandomFuncs) AlphaNum(count interface{}) (string, error)
AlphaNum -
func (*RandomFuncs) Float ¶
func (f *RandomFuncs) Float(args ...interface{}) (float64, error)
Float -
func (*RandomFuncs) Item ¶
func (f *RandomFuncs) Item(items interface{}) (interface{}, error)
Item -
func (*RandomFuncs) Number ¶
func (f *RandomFuncs) Number(args ...interface{}) (int64, error)
Number -
func (*RandomFuncs) String ¶
func (f *RandomFuncs) String(count interface{}, args ...interface{}) (s string, err error)
String -
type ReFuncs ¶
type ReFuncs struct {
// contains filtered or unexported fields
}
ReFuncs -
func (*ReFuncs) ReplaceLiteral ¶
ReplaceLiteral -
type SockaddrFuncs ¶
type SockaddrFuncs struct {
// contains filtered or unexported fields
}
SockaddrFuncs -
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 ¶
type StringFuncs struct {
// contains filtered or unexported fields
}
StringFuncs -
func (*StringFuncs) Abbrev ¶
func (f *StringFuncs) Abbrev(args ...interface{}) (string, error)
Abbrev -
func (*StringFuncs) CamelCase ¶
func (f *StringFuncs) CamelCase(in interface{}) (string, error)
CamelCase -
func (*StringFuncs) Contains ¶
func (f *StringFuncs) Contains(substr string, s interface{}) bool
Contains -
func (*StringFuncs) HasPrefix ¶
func (f *StringFuncs) HasPrefix(prefix string, s interface{}) bool
HasPrefix -
func (*StringFuncs) HasSuffix ¶
func (f *StringFuncs) HasSuffix(suffix string, s interface{}) bool
HasSuffix -
func (*StringFuncs) Indent ¶
func (f *StringFuncs) Indent(args ...interface{}) (string, error)
Indent -
func (*StringFuncs) KebabCase ¶
func (f *StringFuncs) KebabCase(in interface{}) (string, error)
KebabCase -
func (*StringFuncs) Repeat ¶
func (f *StringFuncs) Repeat(count int, s interface{}) (string, error)
Repeat -
func (*StringFuncs) ReplaceAll ¶
func (f *StringFuncs) ReplaceAll(old, new string, s interface{}) string
ReplaceAll -
func (*StringFuncs) RuneCount ¶
func (f *StringFuncs) RuneCount(args ...interface{}) (int, error)
RuneCount - like len(s), but for runes
func (*StringFuncs) ShellQuote ¶
func (f *StringFuncs) ShellQuote(in interface{}) string
ShellQuote -
func (*StringFuncs) SnakeCase ¶
func (f *StringFuncs) SnakeCase(in interface{}) (string, error)
SnakeCase -
func (*StringFuncs) Sort
deprecated
func (f *StringFuncs) Sort(list interface{}) ([]string, error)
Sort -
Deprecated: use coll.Sort instead
func (*StringFuncs) SplitN ¶
func (f *StringFuncs) SplitN(sep string, n int, s interface{}) []string
SplitN -
func (*StringFuncs) TrimPrefix ¶
func (f *StringFuncs) TrimPrefix(cutset string, s interface{}) string
TrimPrefix -
func (*StringFuncs) TrimSuffix ¶
func (f *StringFuncs) TrimSuffix(cutset string, s interface{}) string
TrimSuffix -
func (*StringFuncs) WordWrap ¶
func (f *StringFuncs) WordWrap(args ...interface{}) (string, error)
WordWrap -
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 // contains filtered or unexported fields }
TimeFuncs -
func (*TimeFuncs) Microsecond ¶
Microsecond -
func (*TimeFuncs) Millisecond ¶
Millisecond -
func (*TimeFuncs) Nanosecond ¶
Nanosecond -
func (*TimeFuncs) ParseDuration ¶
ParseDuration -
func (*TimeFuncs) ParseInLocation ¶
func (f *TimeFuncs) ParseInLocation(layout, location string, value interface{}) (gotime.Time, error)
ParseInLocation -
func (*TimeFuncs) ParseLocal ¶
ParseLocal -
func (*TimeFuncs) Unix ¶
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) ZoneOffset ¶
ZoneOffset - return the local system's time zone's name
type UUIDFuncs ¶
type UUIDFuncs struct {
// contains filtered or unexported fields
}
UUIDFuncs -
func (*UUIDFuncs) IsValid ¶
IsValid - checks if the given UUID is in the correct format. It does not validate whether the version or variant are correct.
func (*UUIDFuncs) Parse ¶
Parse - parse a UUID for further manipulation or inspection.
Both the standard UUID forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.