Documentation ¶
Overview ¶
Package utils provides small utility functions
Index ¶
- func Abs(p string) (string, error)
- func ConfigPath() (string, error)
- func DecodeBase64(input string, target interface{}) error
- func EncodeBase64(input interface{}) (string, error)
- func Join(p ...string) string
- func RandomByteSlice(n uint32) ([]byte, error)
- func RandomCryptoString(n int) (string, error)
- func RandomString(n int) (string, error)
- func ToNullTime(t time.Time) null.Time
- func UserHome() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase64 ¶
DecodeBase64 decodes a base64 'input' and unmarshals it into 'target'
func EncodeBase64 ¶
EncodeBase64 encodes 'input' to base64 string
func RandomByteSlice ¶
RandomByteSlice returns a random byte slice with length n
func RandomCryptoString ¶
RandomCryptoString returns a cryptographically secure random string with length n
func RandomString ¶
RandomString returns a random string with length n
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.