dbconnections

package
v0.0.0-...-7ec155d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDBConfig

type CacheDBConfig struct {
	ConnectionString string
}

type CacheDBConnection

type CacheDBConnection interface {
	Collection(collectionName string) *mongo.Collection
}

func NewCacheDBProductionConnection

func NewCacheDBProductionConnection(ctx context.Context, config CacheDBConfig) (CacheDBConnection, error)

type CacheDBProductionConnection

type CacheDBProductionConnection struct {
	// contains filtered or unexported fields
}

func (*CacheDBProductionConnection) Collection

func (c *CacheDBProductionConnection) Collection(collectionName string) *mongo.Collection

type CacheDBTestingConnection

type CacheDBTestingConnection struct {
	// contains filtered or unexported fields
}

func NewCacheDBTestingConnection

func NewCacheDBTestingConnection(t *testing.T) *CacheDBTestingConnection

func (*CacheDBTestingConnection) Cleanup

func (c *CacheDBTestingConnection) Cleanup()

func (*CacheDBTestingConnection) Collection

func (c *CacheDBTestingConnection) Collection(name string) *mongo.Collection

type MinioBlockStorageConnection

type MinioBlockStorageConnection interface {
	GetObject(ctx context.Context, objectName string) (*minio.Object, error)
	PutObject(ctx context.Context, objectName string, objectSize int64, mimeType string, reader io.Reader) error
	DeleteObject(ctx context.Context, objectName string) error
	ObjectExists(ctx context.Context, objectName string) (exists bool, err error)
}

type MinioBlockStorageProductionConnection

type MinioBlockStorageProductionConnection struct {
	// contains filtered or unexported fields
}

func (*MinioBlockStorageProductionConnection) DeleteObject

func (c *MinioBlockStorageProductionConnection) DeleteObject(ctx context.Context, objectName string) error

func (*MinioBlockStorageProductionConnection) GetObject

func (c *MinioBlockStorageProductionConnection) GetObject(ctx context.Context, objectName string) (*minio.Object, error)

func (*MinioBlockStorageProductionConnection) ObjectExists

func (c *MinioBlockStorageProductionConnection) ObjectExists(ctx context.Context, objectName string) (exists bool, err error)

func (*MinioBlockStorageProductionConnection) PutObject

func (c *MinioBlockStorageProductionConnection) PutObject(
	ctx context.Context,
	objectName string,
	objectSize int64,
	mimeType string,
	reader io.Reader,
) error

type MinioBlockStorageProductionConnectionConfig

type MinioBlockStorageProductionConnectionConfig struct {
	Endpoint  string
	AccessKey string
	SecretKey string
	Bucket    string
	Location  string
	UseSSL    bool
}

type MinioBlockStorageTestingConnection

type MinioBlockStorageTestingConnection struct {
	MinioBlockStorageProductionConnection
}

func NewMinioBlockStorageTestingConnection

func NewMinioBlockStorageTestingConnection(t *testing.T) *MinioBlockStorageTestingConnection

Jump to

Keyboard shortcuts

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