Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SchemaSQL contains db/schema.sql via main.go SchemaSQL string Cmd = cobra.Command{ Use: "db", Short: "Database staff", Long: `All sub-commands require EDGAR_DB_URL environment variable set: EDGAR_DB_URL="postgres://username:password@localhost:5432/database_name" Before using any of sub-commands, please create database: $ createuser -U postgres -e -P edgar $ createdb -U postgres -O edgar -E UTF8 --locale en_US.UTF-8 -T template0 edgar and initialize it: $ edgar db init `, } )
Functions ¶
Types ¶
type Repo ¶
type Repo interface { AddCompany(ctx context.Context, cik uint32, name string) (bool, error) AddFact(ctx context.Context, tax, name string) (uint32, error) AddLabel(ctx context.Context, factId uint32, label, descr string, labelHash, descrHash uint64) error AddUnit(ctx context.Context, name string) (uint32, error) AddFactUnit(ctx context.Context, fact repo.FactUnit) error CopyFactUnits(ctx context.Context, length int, next func(i int) (repo.FactUnit, error)) error LastFiled(ctx context.Context) (map[uint32]time.Time, error) FactLabels(ctx context.Context) ([]repo.FactLabels, error) Units(ctx context.Context) (map[uint32]string, error) FiledCounts(ctx context.Context, cik uint32) (map[time.Time]uint32, error) ReplaceFactUnits(ctx context.Context, cik uint32, lastFiled time.Time, length int, next func(i int) (repo.FactUnit, error)) error AddLastUpdate(ctx context.Context, at time.Time) error LastUpdated(ctx context.Context) (lastUpdated time.Time, err error) }
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
func (*Upload) WithProcsLimit ¶
Click to show internal directories.
Click to hide internal directories.