groclick

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 19 Imported by: 0

README

groclick

codecov Go Report Card License

extension for running clickhouse container for groat integratrion tests

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRequireNamespacePrefixForHostedDB = errors.New("hosted db requires namespace prefix")

Functions

func New

func New[T any](options ...Option) integration.Bootstrap[T]

Types

type ClickhouseContainer

type ClickhouseContainer interface {
	ConnectionString(ctx context.Context, args ...string) (string, error)
	Terminate(ctx context.Context, opts ...testcontainers.TerminateOption) error
}

type Connect

type Connect struct {
	driver.Conn
}

type Container

type Container[T any] struct {
	// contains filtered or unexported fields
}

func (*Container[T]) Injector

func (c *Container[T]) Injector(t *testing.T, to T) T

type DB

type DB interface {
	Exec(ctx context.Context, query string, args ...any) error
}

type Migrator

type Migrator func(ctx context.Context, migratorConfig MigratorConfig) error

func PlainMigrator

func PlainMigrator(fs afero.Fs, path string) (Migrator, error)

type MigratorConfig

type MigratorConfig struct {
	DBName   string
	Path     string
	DB       DB
	UserName string
	Password string
	Config   *clickConn.Options
}

type Option

type Option func(*config)

func WithContainerImage

func WithContainerImage(image string) Option

func WithHostedDBNamespace

func WithHostedDBNamespace(namespace string) Option

func WithInjectLabel

func WithInjectLabel(label string) Option

func WithInjectLabelForConfig added in v0.0.3

func WithInjectLabelForConfig(label string) Option

func WithInjectLabelForDSN added in v0.0.4

func WithInjectLabelForDSN(label string) Option

func WithMigrationsPath

func WithMigrationsPath(path string) Option

func WithMigrator added in v0.0.2

func WithMigrator(migrator Migrator) Option

func WithPassword

func WithPassword(password string) Option

func WithUsername

func WithUsername(user string) Option

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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