Documentation ¶
Index ¶
- func ContainsInvalidChars(charset, s string) error
- func ContainsValidCharset(charset, s string) error
- func GetCodeURI(opts map[string]interface{}) (string, error)
- func GetContentType(r *http.Request) string
- func GetCurrentBaseURL(r *http.Request) string
- func GetCurrentURL(r *http.Request) string
- func GetRandomEncodedStringFromRange(a, b int) string
- func GetRandomString(i int) string
- func GetRandomStringFromRange(a, b int) string
- func GetSourceAddress(r *http.Request) string
- func NewLogger() *zap.Logger
- func ParseCredentials(r *http.Request) (map[string]string, error)
- func ReadCertFile(filePath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsInvalidChars ¶
ContainsInvalidChars returns error if the provided string contains characters outside of the allowed character set.
func ContainsValidCharset ¶
ContainsValidCharset returns error if the provided string contains characters outside of the provided character set.
func GetCodeURI ¶
GetCodeURI returns TOTP/HOTP Key URI
func GetContentType ¶
GetContentType returns requested content type.
func GetCurrentBaseURL ¶
GetCurrentBaseURL returns current base URL
func GetRandomEncodedStringFromRange ¶
GetRandomEncodedStringFromRange return the number returned by GetRandomStringFromRange() and encoded with Base32
func GetRandomString ¶
GetRandomString returns X character long random string.
func GetRandomStringFromRange ¶
GetRandomStringFromRange generates random string of a random length. The random lenght is bounded by a and b.
func GetSourceAddress ¶
GetSourceAddress returns the IP address of the request.
func ParseCredentials ¶
ParseCredentials extracts credentials from HTTP request.
func ReadCertFile ¶
ReadCertFile return certificate content as a string.
Types ¶
This section is empty.