rdbms

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestSuite

func NewTestSuite(model *suite.Model) (storage.TestSuite, error)

NewTestSuite creates a common test suite

Types

type ModuleStore

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

ModuleStore represents a rdbms(postgres, mysql, sqlite, cockroachdb) backed storage backend.

func NewRDBMSStorage

func NewRDBMSStorage(connectionName string) *ModuleStore

NewRDBMSStorage returns an unconnected RDBMS Module Storage that satisfies the Storage interface. You must call Connect() on the returned store before using it. connectionName

func NewRDBMSStorageWithConn

func NewRDBMSStorageWithConn(connection *pop.Connection) *ModuleStore

NewRDBMSStorageWithConn returns a connected RDBMS Module Storage that satisfies the Storage interface. You must call Connect() on the returned store before using it. connectionName

func (*ModuleStore) Connect

func (r *ModuleStore) Connect() error

Connect creates connection to rdmbs backend.

func (*ModuleStore) Delete

func (r *ModuleStore) Delete(ctx context.Context, module, version string) error

Delete removes a specific version of a module.

func (*ModuleStore) Exists

func (r *ModuleStore) Exists(ctx context.Context, module, vsn string) bool

Exists checks for a specific version of a module

func (*ModuleStore) Get

func (r *ModuleStore) Get(ctx context.Context, module, vsn string) (*storage.Version, error)

Get a specific version of a module

func (*ModuleStore) List

func (r *ModuleStore) List(ctx context.Context, module string) ([]string, error)

List lists all versions of a module

func (*ModuleStore) Save

func (r *ModuleStore) Save(ctx context.Context, module, version string, mod []byte, zip io.Reader, info []byte) error

Save stores a module in rdbms storage.

type TestSuite

type TestSuite struct {
	*suite.Model
	// contains filtered or unexported fields
}

TestSuite implements TestSuite interface

func (*TestSuite) Cleanup

func (ts *TestSuite) Cleanup()

Cleanup tears down test

func (*TestSuite) Storage

func (ts *TestSuite) Storage() storage.Backend

Storage retrieves initialized storage backend

func (*TestSuite) StorageHumanReadableName

func (ts *TestSuite) StorageHumanReadableName() string

StorageHumanReadableName retrieves readable identifier of the storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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