Documentation
¶
Index ¶
- type Document
- type DocumentDao
- type DocumentDaoImpl
- type Filer
- type FilerDao
- type FilerDaoImpl
- func (dao *FilerDaoImpl) GetSet(term string) (found bool, filers []*model.Filer, err error)
- func (dao *FilerDaoImpl) GetSetBySIC(term string) (found bool, filers []*model.Filer, err error)
- func (dao *FilerDaoImpl) Put(filer *model.Filer) (bool, error)
- func (dao *FilerDaoImpl) Search(condition string) (found bool, filers []*model.Filer, err error)
- type Filing
- type FilingDao
- type FilingDaoImpl
- func (dao *FilingDaoImpl) Add(filing *model.Filing) (created *model.Filing, existed bool, err error)
- func (dao *FilingDaoImpl) AddDocuments(filing *model.Filing, docs []*model.Document) error
- func (dao *FilingDaoImpl) Get(accession string) (exists bool, filing *model.Filing, err error)
- func (dao *FilingDaoImpl) GetAll(params *QueryParams) (exists bool, result *QueryResult, err error)
- func (dao *FilingDaoImpl) GetByCIK(params *QueryParams) (exists bool, result *QueryResult, err error)
- func (dao *FilingDaoImpl) GetByFiler(params *QueryParams) (exists bool, result *QueryResult, err error)
- func (dao *FilingDaoImpl) GetByID(filingID string) (exists bool, filing *model.Filing, err error)
- func (dao *FilingDaoImpl) GetBySymbol(params *QueryParams) (exists bool, result *QueryResult, err error)
- func (dao *FilingDaoImpl) StrictExists(cik, accession, relation string) (bool, error)
- func (dao *FilingDaoImpl) Update(filing *model.Filing) (bool, error)
- type Form
- type FormDao
- type FormDaoImpl
- type Handle
- type Options
- type QueryParams
- type QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
ID string
Created time.Time
Sequence int64 `sql:"seq"`
DocType string `sql:"doc_type"`
EdgarURL string `sql:"edgar_url"`
Description string `sql:"doc_desc"`
Data []byte `sql:"data"`
SizeEstimate string `sql:"size_est"`
FilingID string `sql:"filing_id"`
}
Document is an ORM object for the `documents` table.
type DocumentDao ¶
type DocumentDao interface {
GetByFilingID(filingID string) (exists bool, docs []*model.Document, err error)
GetIDs(filingID string) (exists bool, ids []string, err error)
Get(documentID string) (exists bool, doc *model.Document, err error)
}
DocumentDao provides access to document storage.
type DocumentDaoImpl ¶
type DocumentDaoImpl struct {
// contains filtered or unexported fields
}
DocumentDaoImpl implements DocumentDao.
func (*DocumentDaoImpl) GetByFilingID ¶
func (dao *DocumentDaoImpl) GetByFilingID(filingID string) (exists bool, docs []*model.Document, err error)
GetByFilingID gets docs by filing id.
type Filer ¶
type Filer struct {
ID string
Symbol string
CIK string
Name string `sql:"name"`
SIC string
SICDescription string `sql:"sic_desc"`
}
Filer is an ORM object for the `filers` table.
type FilerDao ¶
type FilerDao interface {
Search(condition string) (bool, []*model.Filer, error)
GetSet(term string) (bool, []*model.Filer, error)
Put(filer *model.Filer) (bool, error)
}
FilerDao abstracts access to sec filers.
type FilerDaoImpl ¶
type FilerDaoImpl struct {
// contains filtered or unexported fields
}
FilerDaoImpl implements the FilerDao.
func (*FilerDaoImpl) GetSetBySIC ¶
GetSetBySIC get filers by sic.
type Filing ¶
type Filing struct {
ID string
Created time.Time
Updated time.Time
Filer string
Accession string
CIK string
EdgarURL string `sql:"edgar_url"`
EdgarTime time.Time `sql:"edgar_time"`
FilerRelation string `sql:"relation"`
FormType string `sql:"form_type"`
DocumentCount int64 `sql:"doc_count"`
TotalSizeEstimate string `sql:"total_size_est"`
Symbol string
AllSymbols []string `sql:"all_symbols,array"`
AllCIKs []string `sql:"all_ciks,array"`
}
Filing is an ORM object for the `filings` table.
type FilingDao ¶
type FilingDao interface {
StrictExists(cik, accession, relation string) (bool, error)
Add(filing *model.Filing) (created *model.Filing, existed bool, err error)
Update(filing *model.Filing) (bool, error)
AddDocuments(filing *model.Filing, docs []*model.Document) error
Get(accession string) (exists bool, filing *model.Filing, err error)
GetByID(filingID string) (exists bool, filing *model.Filing, err error)
GetBySymbol(params *QueryParams) (exists bool, result *QueryResult, err error)
GetByCIK(params *QueryParams) (exists bool, result *QueryResult, err error)
GetByFiler(params *QueryParams) (exists bool, result *QueryResult, err error)
GetAll(params *QueryParams) (exists bool, result *QueryResult, err error)
}
FilingDao provides access to filing storage.
type FilingDaoImpl ¶
type FilingDaoImpl struct {
// contains filtered or unexported fields
}
FilingDaoImpl implements FilingDao.
func (*FilingDaoImpl) Add ¶
func (dao *FilingDaoImpl) Add(filing *model.Filing) (created *model.Filing, existed bool, err error)
Add adds a new filing.
func (*FilingDaoImpl) AddDocuments ¶
AddDocuments adds docs to an existing filing.
func (*FilingDaoImpl) GetAll ¶
func (dao *FilingDaoImpl) GetAll(params *QueryParams) (exists bool, result *QueryResult, err error)
GetAll gets filings.
func (*FilingDaoImpl) GetByCIK ¶
func (dao *FilingDaoImpl) GetByCIK(params *QueryParams) (exists bool, result *QueryResult, err error)
GetByCIK gets filings by cik.
func (*FilingDaoImpl) GetByFiler ¶
func (dao *FilingDaoImpl) GetByFiler(params *QueryParams) (exists bool, result *QueryResult, err error)
GetByFiler gets filings by filer name.
func (*FilingDaoImpl) GetBySymbol ¶
func (dao *FilingDaoImpl) GetBySymbol(params *QueryParams) (exists bool, result *QueryResult, err error)
GetBySymbol gets filings by symbol.
func (*FilingDaoImpl) StrictExists ¶
func (dao *FilingDaoImpl) StrictExists(cik, accession, relation string) (bool, error)
StrictExists checks strictly.
type Form ¶
type Form struct {
ID string
FormType string `sql:"form_type"`
Description string `sql:"form_desc"`
Active bool
}
Form is an ORM object for the `forms` table.
type FormDaoImpl ¶
type FormDaoImpl struct {
// contains filtered or unexported fields
}
FormDaoImpl implements the FormDao.
func (*FormDaoImpl) GetActiveForms ¶
func (dao *FormDaoImpl) GetActiveForms() (forms []*model.Form, err error)
GetActiveForms gets all the active forms.
type Handle ¶
Handle is a database handle.
func (*Handle) NewDocumentDao ¶
func (h *Handle) NewDocumentDao() *DocumentDaoImpl
NewDocumentDao returns a document dao.
func (*Handle) NewFilerDao ¶
func (h *Handle) NewFilerDao() *FilerDaoImpl
NewFilerDao returns a filer dao.
func (*Handle) NewFilingDao ¶
func (h *Handle) NewFilingDao() *FilingDaoImpl
NewFilingDao returns a filing dao.
func (*Handle) NewFormDao ¶
func (h *Handle) NewFormDao() *FormDaoImpl
NewFormDao returns a form dao.
type QueryParams ¶
type QueryParams struct {
Term string
Page int
Size int
Sort int
Form string
Start string
End string
}
QueryParams holds api query parameters.
type QueryResult ¶
QueryResult holds db query result.