Documentation ¶
Index ¶
- func Contains(slice []string, search string, caseInsensitive bool) bool
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(n int) (string, error)
- func InterpolateString(val string, env ...map[string]interface{}) (string, error)
- func Mask(s string) string
- func MaskHeaders(h http.Header, maskHeaders []string) map[string]string
- func SHA256(data []byte, extra ...[]byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomBytes ¶ added in v0.0.22
GenerateRandomBytes 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 GenerateRandomString ¶ added in v0.0.22
GenerateRandomString returns a securely generated random 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.
func InterpolateString ¶ added in v0.0.9
InterpolateString replaces { } in string with values from environment maps.
func MaskHeaders ¶
MaskHeaders will return a stringified version of headers masking the headers passed in by name
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.