Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes returns n bytes from crypt/rand.Reader.
func WeakRandomSource ¶
WeakRandomSource returns a weak math/rand RNG (non-crypto-grade) initialized with a random seed.
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
A Renderer just renders HTML templates with some common context variables. Context is represented as a map[string]interface{}, to allow the merge operation.
func NewRenderer ¶
NewRenderer creates a new Renderer with the provided templates and default variables.
type SessionAuthenticationKey ¶
type SessionAuthenticationKey YAMLBytes
SessionAuthenticationKey is a binary type for gorilla.session authentication keys, that is YAML-unserializable.
func (*SessionAuthenticationKey) UnmarshalYAML ¶
func (k *SessionAuthenticationKey) UnmarshalYAML(value *yaml.Node) error
type SessionEncryptionKey ¶
type SessionEncryptionKey YAMLBytes
SessionEncryptionKey is a binary type for gorilla.session encryption keys, that is YAML-unserializable.
func (*SessionEncryptionKey) UnmarshalYAML ¶
func (k *SessionEncryptionKey) UnmarshalYAML(value *yaml.Node) error
type URLMap ¶
URLMap is an interface between our logical view of application URLs and the user's. The only implementation allows us to serve the app below its own URL path prefix.
func NewURLPathPrefix ¶
NewURLPathPrefix creates a URLMap where everything is served under a path prefix.
type YAMLBytes ¶
type YAMLBytes []byte
YAMLBytes is a []byte slice that can be safely unmarshaled from YAML. For the time being, the value is just decoded as-is, but for full binary blob support we might switch to expect base64-encoding.
func (*YAMLBytes) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.