countystore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 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 DefaultSelector added in v0.0.2

type DefaultSelector struct {
	datastore.Datastorer
}

DefaultSelector is the database implementation for reading Filings

func NewDefaultSelector added in v0.0.2

func NewDefaultSelector(ds datastore.Datastorer) DefaultSelector

NewDefaultSelector is an initializer for DefaultSelector

func (DefaultSelector) FindByCountyCode added in v0.0.2

func (d DefaultSelector) FindByCountyCode(ctx context.Context, s cspc.StateProvince, cc string) (cspc.County, error)

FindByCountyCode returns a County struct given a StateProvince and a County Code

type DefaultTransactor added in v0.0.2

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

DefaultTransactor is the default database implementation for DML operations

func NewDefaultTransactor added in v0.0.2

func NewDefaultTransactor(ds datastore.Datastorer) DefaultTransactor

NewDefaultTransactor is an initializer for DefaultTransactor

func (DefaultTransactor) CreateCounty added in v0.0.2

func (dt DefaultTransactor) CreateCounty(ctx context.Context, stateProv cspc.StateProvince, county cspc.County, tx *sql.Tx) error

CreateCounty inserts a record in the lookup.county_lkup table

type Selector

type Selector interface {
	FindByCountyCode(ctx context.Context, s cspc.StateProvince, cc string) (cspc.County, error)
}

Selector reads records from the db

type Transactor

type Transactor interface {
	CreateCounty(ctx context.Context, stateProv cspc.StateProvince, county cspc.County, tx *sql.Tx) error
}

Transactor performs DML actions against the DB

Jump to

Keyboard shortcuts

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