storetesting

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package storetesting contains support code for tests.

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger = log.New(os.Stdout).WithDebug().WithoutColor()
	Set    = wire.NewSet(
		cache.Set,
		metrics.Set,
		ProvideCacheConfig,
		ProvideStoreConfig,
		ProvideDB,
		wire.Value(Logger),
	)
)

Set is used by wire.

Functions

func ProvideCacheConfig

func ProvideCacheConfig() (*cache.Config, func(), error)

ProvideCacheConfig returns a configuration with sane defaults.

func ProvideDB

func ProvideDB(
	ctx context.Context,
	config *config.Config,
	logger *log.Logger,
) (*pgxpool.Pool, func(), error)

ProvideDB provides a database connection. It will automatically create and tear down a temporary database. This connection also disallows full-table scans.

func ProvideStoreConfig

func ProvideStoreConfig() (*config.Config, error)

ProvideStoreConfig returns a configuration with sane defaults.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL