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 Slugify(s string) string
- func WithCancel(parent context.Context) (context.Context, context.CancelFunc)
Constants ¶
This section is empty.
Variables ¶
View Source
var DumpLog = regexp.MustCompile("(?i)kube-probe|prometheus")
View Source
var ISO_FORMATS = [3]string{"2006-01-02T15:04:05.000Z", "2006-01-02", "2006-01-02T15:04:05"}
Functions ¶
func LoadEnv ¶ added in v0.5.0
func LoadEnv(env interface{}) error
LoadEnv loads environment variables into env
func RandomBytes ¶ added in v0.8.0
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 ¶ added in v0.8.0
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 WithCancel ¶ added in v0.10.0
WithCancel replicates context.WithCancel but listens for Interrupt and SIGTERM signals
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.