dbe

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEngine

type DBEngine interface {
	IsConfigured() bool                 // Has this database already been used by migrate?
	Configure() error                   // Set up the table needed to track patches
	GetInstalledIDs() (*set.Set, error) // Return the IDs of patches that have already been installed
	Patch(*patch.Patch) error
}

func NewMockDBE

func NewMockDBE(flags *pflag.FlagSet) DBEngine

func NewPGDBE

func NewPGDBE(credsName string) (DBEngine, error)

func NewSQLiteDBE

func NewSQLiteDBE(credsName string) DBEngine

type MockDBE

type MockDBE struct {
}

func (*MockDBE) Configure

func (p *MockDBE) Configure() error

func (*MockDBE) GetInstalledIDs

func (p *MockDBE) GetInstalledIDs() (*set.Set, error)

func (*MockDBE) IsConfigured

func (p *MockDBE) IsConfigured() bool

func (*MockDBE) Patch

func (p *MockDBE) Patch(thepatch *patch.Patch) error

type PGArgs

type PGArgs struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Name     string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type PGDBE

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

func (*PGDBE) CheckInstall

func (p *PGDBE) CheckInstall() error

func (*PGDBE) Configure

func (p *PGDBE) Configure() error

func (*PGDBE) GetInstalledIDs

func (p *PGDBE) GetInstalledIDs() (*set.Set, error)

func (*PGDBE) IsConfigured

func (p *PGDBE) IsConfigured() bool

func (*PGDBE) Patch

func (p *PGDBE) Patch(ptch *patch.Patch) error

type SQLiteDBE

type SQLiteDBE struct {
}

func (*SQLiteDBE) Configure

func (p *SQLiteDBE) Configure() error

func (*SQLiteDBE) GetInstalledIDs

func (p *SQLiteDBE) GetInstalledIDs() (*set.Set, error)

func (*SQLiteDBE) IsConfigured

func (p *SQLiteDBE) IsConfigured() bool

func (*SQLiteDBE) Patch

func (p *SQLiteDBE) Patch(*patch.Patch) error

Jump to

Keyboard shortcuts

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