statestore

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) FindByStateProvCode added in v0.0.2

func (d DefaultSelector) FindByStateProvCode(ctx context.Context, c cspc.Country, spc string) (cspc.StateProvince, error)

FindByStateProvCode returns a StateProvince struct given an Alpha 2 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) CreateStateProvince added in v0.0.2

func (dt DefaultTransactor) CreateStateProvince(ctx context.Context, country cspc.Country, stateProv cspc.StateProvince, tx *sql.Tx) error

CreateStateProvince inserts a record in the lookup.state_prov_cd_lkup table

type Selector

type Selector interface {
	FindByStateProvCode(ctx context.Context, c cspc.Country, spc string) (cspc.StateProvince, error)
}

Selector reads records from the db

type Transactor

type Transactor interface {
	CreateStateProvince(ctx context.Context, country cspc.Country, stateProv cspc.StateProvince, 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