Documentation
¶
Index ¶
- type R
- func MustApplyTestConfig(cfg config.C) (config.C, R)
- func New(ctx context.Context, c config.C) (R, error)
- func NewForRoot(ctx context.Context, root *config.Root) (R, error)
- func NewMiniredis(redisConfig *config.RedisMiniredis, secretKey config.KeyData) (R, error)
- func NewRedis(ctx context.Context, redisConfig *config.RedisReal, secretKey config.KeyData) (R, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type R ¶
func New ¶
New creates a new database connection from the specified configuration. The type of the database returned will be determined by the configuration.
func NewForRoot ¶
NewForRoot creates a new database connection from the specified configuration. The type of the database returned will be determined by the configuration. Same as NewConnection.
func NewMiniredis ¶
NewMiniredis creates a new database connection to a SQLite database.
Parameters: - redisConfig: the configuration for the SQLite database - secretKey: the AES key used to secure cursors
func NewRedis ¶
func NewRedis(ctx context.Context, redisConfig *config.RedisReal, secretKey config.KeyData) (R, error)
NewRedis creates a new redis connection to a real redis instance.
Parameters: - redisConfig: the configuration for the Redis instance - secretKey: the AES key used to secure cursors