Documentation ¶
Index ¶
- Constants
- func DownloadCSV(registry *Registry) (fileName string, err error)
- type Formats
- type LoggerType
- type OUIDB
- func (ouidb *OUIDB) BulkInsert(defs []*VendorDef) (int64, error)
- func (ouidb *OUIDB) Clear() (err error)
- func (ouidb *OUIDB) Close() error
- func (ouidb *OUIDB) Count() (count int64, err error)
- func (ouidb *OUIDB) Delete() error
- func (ouidb *OUIDB) Find(search string) ([]*VendorDef, error)
- func (ouidb *OUIDB) Insert(d *VendorDef) (res sql.Result, err error)
- func (ouidb *OUIDB) Populate() (records int64, err error)
- type Option
- func CreatePostgresOption(connectionString string) (Option, error)
- func CreateSQLiteOption(optionalFileName ...string) (Option, error)
- func WithConnection(conn *sql.DB) Option
- func WithLogging(logger LoggerType) Option
- func WithMaxConnections(max uint) Option
- func WithProgress(p *progress.Progress) Option
- func WithVersion(version string) Option
- type Options
- type Registry
- type VendorDef
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DownloadCSV ¶
Types ¶
type LoggerType ¶
type OUIDB ¶
type OUIDB struct { Connection *sql.DB Version string Progress *progress.Progress Logger *LoggerType // contains filtered or unexported fields }
func (*OUIDB) BulkInsert ¶ added in v2.0.2
type Option ¶
type Option func(*Options)
func CreatePostgresOption ¶
func CreateSQLiteOption ¶
func WithConnection ¶
func WithLogging ¶
func WithLogging(logger LoggerType) Option
func WithMaxConnections ¶ added in v2.0.2
func WithProgress ¶
func WithVersion ¶
type VendorDef ¶
func CollectAll ¶
func CollectAll(p *progress.Progress, logger LoggerType) ([]*VendorDef, error)
func ReadCSV ¶
func ReadCSV(registry *Registry, fileName string, logger LoggerType) (results []*VendorDef)
func (*VendorDef) PrefixString ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.