Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedisClient ¶
func RedisClient() *redis.Client
RedisClient returns the redis client based on the environment.
func RedisCloseConnections ¶
func RedisCloseConnections() error
RedisCloseConnections closes connections to the server.
func RedisIsAlive ¶
func RedisIsAlive() error
RedisIsAlive returns an error if we cannot communicate with redis.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...ServerOption) *Server
New returns a server with the provided opts, if any.
type ServerOption ¶
type ServerOption = func(*Server)
func SetListenAddress ¶
func SetListenAddress(address string) ServerOption
SetListenAddress sets the server's listen address to address
func WithHostOverride ¶
func WithHostOverride(override string) ServerOption
WithHostOverride informs the server that links should override the default host value with override.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix informs the server that links should include prefix in the URI. This does not change path handling, and only impacts link rendering when providing the user with their credential link.
func WithProto ¶
func WithProto(proto string) ServerOption
WithProto sets the proto returned for password links. Should be http or https
func WithRedisKeyPrefix ¶
func WithRedisKeyPrefix(prefix string) ServerOption
WithRedisKeyPrefix instructs the server to prefix all keys inserted into the database with prefix.