contracts

package
v0.0.0-...-dc7611c Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventstoreDBContainer

type EventstoreDBContainer interface {
	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*EventstoreDBContainerOptions,
	) (*config.EventStoreDbOptions, error)

	Start(ctx context.Context,
		t *testing.T,
		options ...*EventstoreDBContainerOptions) (*esdb.Client, error)

	Cleanup(ctx context.Context) error
}

type EventstoreDBContainerOptions

type EventstoreDBContainerOptions struct {
	Host    string
	Ports   []string
	TcpPort int
	// HTTP is the primary protocol for EventStoreDB. It is used in gRPC communication and HTTP APIs (management, gossip and diagnostics).
	HttpPort  int
	ImageName string
	Name      string
	Tag       string
}

type GormContainer

type GormContainer interface {
	Start(ctx context.Context, t *testing.T, options ...*PostgresContainerOptions) (*gorm.DB, error)
	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*PostgresContainerOptions,
	) (*gormPostgres.GormOptions, error)
	Cleanup(ctx context.Context) error
}

type MongoContainer

type MongoContainer interface {
	Start(
		ctx context.Context,
		t *testing.T,
		options ...*MongoContainerOptions,
	) (*mongo.Client, error)
	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*MongoContainerOptions,
	) (*mongodb.MongoDbOptions, error)
	Cleanup(ctx context.Context) error
}

type MongoContainerOptions

type MongoContainerOptions struct {
	Database  string
	Host      string
	Port      string
	HostPort  int
	UserName  string
	Password  string
	ImageName string
	Name      string
	Tag       string
}

type PostgresContainerOptions

type PostgresContainerOptions struct {
	Database  string
	Host      string
	Port      string
	HostPort  int
	UserName  string
	Password  string
	ImageName string
	Name      string
	Tag       string
}

type PostgresPgxContainer

type PostgresPgxContainer interface {
	Start(ctx context.Context, t *testing.T, options ...*PostgresContainerOptions) (*postgres.Pgx, error)
	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*PostgresContainerOptions,
	) (*postgres.PostgresPgxOptions, error)
	Cleanup(ctx context.Context) error
}

type RabbitMQContainer

type RabbitMQContainer interface {
	Start(ctx context.Context,
		t *testing.T,
		serializer serializer.EventSerializer,
		rabbitmqBuilderFunc configurations.RabbitMQConfigurationBuilderFuc,
		options ...*RabbitMQContainerOptions) (bus.Bus, error)

	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*RabbitMQContainerOptions,
	) (*config.RabbitmqHostOptions, error)

	Cleanup(ctx context.Context) error
}

type RabbitMQContainerOptions

type RabbitMQContainerOptions struct {
	Host        string
	VirtualHost string
	Ports       []string
	HostPort    int
	HttpPort    int
	UserName    string
	Password    string
	ImageName   string
	Name        string
	Tag         string
}

func (*RabbitMQContainerOptions) AmqpEndPoint

func (h *RabbitMQContainerOptions) AmqpEndPoint() string

func (*RabbitMQContainerOptions) HttpEndPoint

func (h *RabbitMQContainerOptions) HttpEndPoint() string

type RedisContainer

type RedisContainer interface {
	Start(
		ctx context.Context,
		t *testing.T,
		options ...*RedisContainerOptions,
	) (redis.UniversalClient, error)
	CreatingContainerOptions(
		ctx context.Context,
		t *testing.T,
		options ...*RedisContainerOptions,
	) (*redis2.RedisOptions, error)
	Cleanup(ctx context.Context) error
}

type RedisContainerOptions

type RedisContainerOptions struct {
	Host      string
	Port      string
	HostPort  int
	Database  int
	ImageName string
	Name      string
	Tag       string
	PoolSize  int
}

Jump to

Keyboard shortcuts

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