stub

package
v3.0.0-prev2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DROP = "DROP"

Variables

This section is empty.

Functions

func WithInstance

func WithInstance(instance interface{}, config *Config) (database.Driver, error)

Types

type Config

type Config struct{}

type Stub

type Stub struct {
	Url               string
	Instance          interface{}
	CurrentVersion    int
	MigrationSequence []string
	LastRunMigration  []byte // todo: make []string
	IsLocked          bool

	Config *Config
}

func (*Stub) Close

func (s *Stub) Close() error

func (*Stub) Drop

func (s *Stub) Drop() error

func (*Stub) EqualSequence

func (s *Stub) EqualSequence(seq []string) bool

func (*Stub) Lock

func (s *Stub) Lock() error

func (*Stub) Open

func (s *Stub) Open(url string) (database.Driver, error)

func (*Stub) Run

func (s *Stub) Run(version int, migration io.Reader) error

func (*Stub) Unlock

func (s *Stub) Unlock() error

func (*Stub) Version

func (s *Stub) Version() (int, error)

Jump to

Keyboard shortcuts

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