Documentation ¶
Index ¶
- Constants
- type Broker
- type BrokersList
- type CertificateOfDeposit
- func (s CertificateOfDeposit) GetBrokerSlug() string
- func (s CertificateOfDeposit) GetCollectionName() string
- func (s CertificateOfDeposit) GetComission() float64
- func (s CertificateOfDeposit) GetItemType() string
- func (s CertificateOfDeposit) GetPrice() float64
- func (s CertificateOfDeposit) GetShares() float64
- func (s CertificateOfDeposit) GetType() string
- type CertificateOfDepositList
- type FICFI
- type FICFIList
- type FII
- type FIIList
- type OperationsList
- type Portfolio
- type Position
- type Queryable
- type Stock
- type StockFund
- type StockFundList
- type StockList
- type Tradable
- type TreasuryDirect
- func (s TreasuryDirect) GetBrokerSlug() string
- func (s TreasuryDirect) GetCollectionName() string
- func (s TreasuryDirect) GetComission() float64
- func (s TreasuryDirect) GetItemType() string
- func (s TreasuryDirect) GetPrice() float64
- func (s TreasuryDirect) GetShares() float64
- func (s TreasuryDirect) GetType() string
- type TreasuryDirectList
Constants ¶
View Source
const CertificateOfDepositItemType = "certificate-of-deposit"
View Source
const FICFIItemType = "ficfi"
View Source
const FIIItemType = "fiis"
View Source
const StockFundItemType = "stocks-funds"
View Source
const StockItemType = "stocks"
View Source
const TreasuryDirectItemType = "treasury-direct"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct { CNPJ string `json:"CNPJ" bson:"CNPJ"` ID string `json:"id,omitempty" bson:"_id,omitempty"` Name string `json:"name" bson:"name" validate:"required"` Slug string `json:"slug" bson:"slug" validate:"required"` }
func (Broker) GetCollectionName ¶
func (Broker) GetItemType ¶
type BrokersList ¶
type BrokersList struct {
Brokers []Broker `json:"brokers" bson:"brokers"`
}
type CertificateOfDeposit ¶
type CertificateOfDeposit struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` DueDate *time.Time `json:"dueDate" bson:"dueDate" validate:"required"` FixedInterestRate float64 `json:"fixedInterestRate" bson:"fixedInterestRate" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func NewCertificateOfDeposit ¶
func NewCertificateOfDeposit() *CertificateOfDeposit
func (CertificateOfDeposit) GetBrokerSlug ¶
func (s CertificateOfDeposit) GetBrokerSlug() string
func (CertificateOfDeposit) GetCollectionName ¶
func (s CertificateOfDeposit) GetCollectionName() string
func (CertificateOfDeposit) GetComission ¶
func (s CertificateOfDeposit) GetComission() float64
func (CertificateOfDeposit) GetItemType ¶
func (s CertificateOfDeposit) GetItemType() string
func (CertificateOfDeposit) GetPrice ¶
func (s CertificateOfDeposit) GetPrice() float64
func (CertificateOfDeposit) GetShares ¶
func (s CertificateOfDeposit) GetShares() float64
func (CertificateOfDeposit) GetType ¶
func (s CertificateOfDeposit) GetType() string
type CertificateOfDepositList ¶
type CertificateOfDepositList []CertificateOfDeposit
type FICFI ¶
type FICFI struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func (FICFI) GetBrokerSlug ¶
func (FICFI) GetCollectionName ¶
func (FICFI) GetComission ¶
func (FICFI) GetItemType ¶
type FII ¶
type FII struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func (FII) GetBrokerSlug ¶
func (FII) GetCollectionName ¶
func (FII) GetComission ¶
func (FII) GetItemType ¶
type OperationsList ¶
type OperationsList []Tradable
type Portfolio ¶
type Portfolio struct { CostBasis float64 `json:"costBasis" bson:"costBasis,omitempty"` Gain float64 `json:"gain" bson:"gain,omitempty"` ID string `json:"id,omitempty" bson:"_id,omitempty"` Items map[string][]Position `json:"items" bson:"items,omitempty"` Name string `json:"name" bson:"name" validate:"required"` OverallReturn float64 `json:"overallReturn" bson:"overallReturn,omitempty"` Slug string `json:"slug" bson:"slug" validate:"required"` }
func (Portfolio) GetCollectionName ¶
func (Portfolio) GetItemType ¶
func (*Portfolio) Recalculate ¶
func (p *Portfolio) Recalculate()
type Position ¶
type Position struct { AveragePrice float64 `json:"averagePrice" bson:"averagePrice"` Change float64 `json:"change" bson:"change"` ClosingPrice float64 `json:"closingPrice" bson:"closingPrice"` Commission float64 `json:"commission" bson:"commission"` CostBasis float64 `json:"costBasis" bson:"costBasis"` Gain float64 `json:"gain" bson:"gain"` ItemType string `json:"itemType" bson:"itemType"` LastPrice float64 `json:"lastPrice" bson:"lastPrice"` LastYearHigh float64 `json:"lastYearHigh" bson:"lastYearHigh"` LastYearLow float64 `json:"lastYearLow" bson:"lastYearLow"` Name string `json:"name" bson:"name"` Operations OperationsList `json:"operations" bson:"operations"` OverallReturn float64 `json:"overallReturn" bson:"overallReturn"` Sector string `json:"sector" bson:"sector"` Segment string `json:"segment" bson:"segment"` SubSector string `json:"subSector" bson:"subSector"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` }
func (*Position) Recalculate ¶
func (pi *Position) Recalculate()
type Stock ¶
type Stock struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func (Stock) GetBrokerSlug ¶
func (Stock) GetCollectionName ¶
func (Stock) GetComission ¶
func (Stock) GetItemType ¶
type StockFund ¶
type StockFund struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func NewStockFund ¶
func NewStockFund() *StockFund
func (StockFund) GetBrokerSlug ¶
func (StockFund) GetCollectionName ¶
func (StockFund) GetComission ¶
func (StockFund) GetItemType ¶
type StockFundList ¶
type StockFundList []StockFund
type TreasuryDirect ¶
type TreasuryDirect struct { BrokerSlug string `json:"brokerSlug" bson:"brokerSlug" validate:"required"` Commission float64 `json:"commission" bson:"commission"` Date *time.Time `json:"date" bson:"date" validate:"required"` //DueDate *time.Time `json:"dueDate" bson:"dueDate" validate:"required"` FixedInterestRate float64 `json:"fixedInterestRate" bson:"fixedInterestRate" validate:"required"` ID string `json:"id,omitempty" bson:"_id,omitempty"` ItemType string `json:"itemType" bson:"itemType" validate:"required"` PortfolioSlug string `json:"portfolioSlug" bson:"portfolioSlug" validate:"required"` Price float64 `json:"price" bson:"price" validate:"required"` Symbol string `json:"symbol" bson:"symbol" validate:"required"` Type string `json:"type" bson:"type" validate:"required"` }
func NewTreasuryDirect ¶
func NewTreasuryDirect() *TreasuryDirect
func (TreasuryDirect) GetBrokerSlug ¶
func (s TreasuryDirect) GetBrokerSlug() string
func (TreasuryDirect) GetCollectionName ¶
func (s TreasuryDirect) GetCollectionName() string
func (TreasuryDirect) GetComission ¶
func (s TreasuryDirect) GetComission() float64
func (TreasuryDirect) GetItemType ¶
func (s TreasuryDirect) GetItemType() string
func (TreasuryDirect) GetPrice ¶
func (s TreasuryDirect) GetPrice() float64
func (TreasuryDirect) GetShares ¶
func (s TreasuryDirect) GetShares() float64
func (TreasuryDirect) GetType ¶
func (s TreasuryDirect) GetType() string
type TreasuryDirectList ¶
type TreasuryDirectList []TreasuryDirect
Click to show internal directories.
Click to hide internal directories.