Documentation ¶
Index ¶
- Variables
- func Decrypt(secret []byte, encrypted string) ([]byte, error)
- func Encrypt(secret []byte, value []byte) (string, error)
- func LoadEnv(env interface{}) error
- func NewLogger(service string) zerolog.Logger
- func ParseISO(date string) (time.Time, error)
- func RandomBytes(n int) ([]byte, error)
- func RandomString(s int) (string, error)
- func SimpleMap(m map[string][]string) map[string]interface{}
- func Slugify(s string) string
- func WithCancel(parent context.Context) (context.Context, context.CancelFunc)
Constants ¶
This section is empty.
Variables ¶
var DumpLog = regexp.MustCompile("(?i)kube-probe|prometheus")
var ISO_FORMATS = [3]string{"2006-01-02T15:04:05.000Z", "2006-01-02", "2006-01-02T15:04:05"}
Functions ¶
func RandomBytes ¶
RandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func RandomString ¶
RandomString returns a securely generated random hex string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue. Keep in mind that s is the length of the returned string, not the number of bytes to be produced
func SimpleMap ¶ added in v0.17.0
SimpleMap flattens a map of string arrays. Useful for headers and query values. Note that it converts all keys to lowercase
func WithCancel ¶
WithCancel replicates context.WithCancel but listens for Interrupt and SIGTERM signals
Types ¶
This section is empty.