db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterType

type FilterType int

FilterType is used as an enum of filter types

const (
	// ExcludeFilterType ...
	ExcludeFilterType FilterType = iota
	// OnlyFilterType ...
	OnlyFilterType
)

type FilteredRetriever

type FilteredRetriever struct {
	R      Retriever
	Filter FilterType
	DBs    []string
}

FilteredRetriever is a retreiever with filters applied

func (FilteredRetriever) Retrieve

func (r FilteredRetriever) Retrieve(ctx context.Context) ([]string, error)

Retrieve is an isntance of a Retreiver with appllied filters

type Retriever

type Retriever interface {
	Retrieve(context.Context) ([]string, error)
}

Retriever is an interface to a Retriever function

type SystemRetriever

type SystemRetriever struct {
	Dsn string
}

SystemRetriever is an instance of a Retreiver

func NewSystemRetriever

func NewSystemRetriever(dsn string) (SystemRetriever, error)

NewSystemRetriever returns a popualted SystemRetriever

func (SystemRetriever) Retrieve

func (r SystemRetriever) Retrieve(ctx context.Context) ([]string, error)

Retrieve retrieves the list of databases from a DB host.

Jump to

Keyboard shortcuts

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