Documentation
¶
Index ¶
- func ContainedIn(value string, list []string) bool
- func ContainsSubString(value string, list []string) bool
- func DecodeKeyPairs(list []string) (map[string]string, error)
- func DecodeText(state, key string) (string, error)
- func DefaultTo(v, d string) string
- func EncodeText(plaintext string, key string) (string, error)
- func FileExists(filename string) bool
- func FindCookie(name string, cookies []*http.Cookie) *http.Cookie
- func GetHashKey(token *jose.JWT) string
- func GetRequestHostURL(r *http.Request) string
- func GetWithin(expires time.Time, within float64) time.Duration
- func HasAccess(need, have []string, all bool) bool
- func IsUpgradedConnection(req *http.Request) bool
- func IsValidHTTPMethod(method string) bool
- func LoadCA(cert, key string) (*tls.Certificate, error)
- func MergeMaps(dest, source map[string]string) map[string]string
- func PrintError(message string, args ...interface{}) *cli.ExitError
- func RealIP(req *http.Request) string
- func ToHeader(v string) string
- func TryUpdateConnection(req *http.Request, writer http.ResponseWriter, endpoint *url.URL) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainedIn ¶
util.ContainedIn checks if a value in a list of a strings
func ContainsSubString ¶
ContainsSubString checks if substring exists
func DecodeKeyPairs ¶
DecodeKeyPairs converts a list of strings (key=pair) to a map
func DecodeText ¶
DecodeText decodes the session state cookie value
func EncodeText ¶
EncodeText encodes the session state information into a value for a cookie to consume
func FindCookie ¶
FindCookie looks for a cookie in a list of cookies
func GetHashKey ¶
GetHashKey returns a hash of the encodes jwt token
func GetRequestHostURL ¶
GetRequestHostURL returns the hostname from the request
func GetWithin ¶
GetWithin calculates a duration of x percent of the time period, i.e. something expires in 1 hours, get me a duration within 80%
func IsUpgradedConnection ¶
IsUpgradedConnection checks to see if the request is requesting
func IsValidHTTPMethod ¶
IsValidHTTPMethod ensure this is a valid http method type
func LoadCA ¶
func LoadCA(cert, key string) (*tls.Certificate, error)
LoadCA loads the certificate authority
func PrintError ¶
printError display the command line usage and error
func TryUpdateConnection ¶
TryUpdateConnection attempt to upgrade the connection to a http pdy stream
Types ¶
This section is empty.