Documentation
¶
Index ¶
Constants ¶
View Source
const FactTypeDividend = "dividend"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fact ¶
type Fact struct {
CompanyID int64 `json:"company_id" csv:"company_id"`
InstrumentID int64 `json:"instrument_id" csv:"instrument_id"`
Provider provider.ProviderID `json:"provider" csv:"provider"`
Group provider.GroupID `json:"provider_group" csv:"provider_group"`
Operation provider.OperationID `json:"operation" csv:"operation"`
ProviderCompanyIdentifierType string `json:"provider_company_identifier_type" csv:"provider_company_identifier_type"`
ProviderCompanyIdentifierValue string `json:"provider_company_identifier_value" csv:"provider_company_identifier_value"`
FactType string `json:"fact_type" csv:"fact_type"`
FiscalYear string `json:"fiscal_year" csv:"fiscal_year"`
ReportCode string `json:"report_code" csv:"report_code"`
RceptNo string `json:"rcept_no" csv:"rcept_no"`
FactDate string `json:"fact_date" csv:"fact_date"`
Key string `json:"key" csv:"key"`
ValueText string `json:"value_text" csv:"value_text"`
ValueNumber string `json:"value_number" csv:"value_number"`
CurrencyCode string `json:"currency_code,omitempty" csv:"currency_code"`
Raw map[string]any `json:"raw,omitempty" csv:"-"`
}
type FactInput ¶
type FactInput struct {
Provider provider.ProviderID
Group provider.GroupID
Operation provider.OperationID
ProviderCompanyIdentifierType string
ProviderCompanyIdentifierValue string
FactType string
FiscalYear string
ReportCode string
RceptNo string
FactDate string
Key string
ValueText string
ValueNumber string
CurrencyCode string
Raw any
}
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(database *storage.Database) (Repository, error)
func (Repository) ListFacts ¶
func (r Repository) ListFacts(ctx context.Context, company companyidentity.InspectResult, query Query) ([]Fact, error)
func (Repository) UpsertFacts ¶
func (r Repository) UpsertFacts(ctx context.Context, company companyidentity.InspectResult, facts []FactInput) (UpsertResult, error)
type UpsertResult ¶
type UpsertResult struct {
FactsWritten int `json:"facts_written" csv:"facts_written"`
}
Click to show internal directories.
Click to hide internal directories.