Documentation ¶
Index ¶
- Constants
- Variables
- func Authorize(myApiKey string)
- type AnnualReturn
- type ColferError
- type ColferMax
- type ColferTail
- type CompareOperator
- type DrawDown
- type Holding
- type Justification
- type Metrics
- type Performance
- type PerformanceMeasurement
- func (o *PerformanceMeasurement) MarshalBinary() (data []byte, err error)
- func (o *PerformanceMeasurement) MarshalLen() (int, error)
- func (o *PerformanceMeasurement) MarshalTo(buf []byte) int
- func (o *PerformanceMeasurement) Unmarshal(data []byte) (int, error)
- func (o *PerformanceMeasurement) UnmarshalBinary(data []byte) error
- type PerformanceMeasurementItem
- func (o *PerformanceMeasurementItem) MarshalBinary() (data []byte, err error)
- func (o *PerformanceMeasurementItem) MarshalLen() (int, error)
- func (o *PerformanceMeasurementItem) MarshalTo(buf []byte) int
- func (o *PerformanceMeasurementItem) Unmarshal(data []byte) (int, error)
- func (o *PerformanceMeasurementItem) UnmarshalBinary(data []byte) error
- type PerformanceMeasurementItemList
- func (o *PerformanceMeasurementItemList) MarshalBinary() (data []byte, err error)
- func (o *PerformanceMeasurementItemList) MarshalLen() (int, error)
- func (o *PerformanceMeasurementItemList) MarshalTo(buf []byte) int
- func (o *PerformanceMeasurementItemList) Unmarshal(data []byte) (int, error)
- func (o *PerformanceMeasurementItemList) UnmarshalBinary(data []byte) error
- type Portfolio
- func (p *Portfolio) DownloadOrders(transactions []*Transaction) error
- func (o *Portfolio) MarshalBinary() (data []byte, err error)
- func (o *Portfolio) MarshalLen() (int, error)
- func (o *Portfolio) MarshalTo(buf []byte) int
- func (o *Portfolio) Unmarshal(data []byte) (int, error)
- func (o *Portfolio) UnmarshalBinary(data []byte) error
- func (p *Portfolio) UploadTransactions(transactions []*Transaction) error
- type PortfolioHoldingItem
- func (o *PortfolioHoldingItem) MarshalBinary() (data []byte, err error)
- func (o *PortfolioHoldingItem) MarshalLen() (int, error)
- func (o *PortfolioHoldingItem) MarshalTo(buf []byte) int
- func (o *PortfolioHoldingItem) Unmarshal(data []byte) (int, error)
- func (o *PortfolioHoldingItem) UnmarshalBinary(data []byte) error
- type PortfolioHoldingItemList
- func (o *PortfolioHoldingItemList) MarshalBinary() (data []byte, err error)
- func (o *PortfolioHoldingItemList) MarshalLen() (int, error)
- func (o *PortfolioHoldingItemList) MarshalTo(buf []byte) int
- func (o *PortfolioHoldingItemList) Unmarshal(data []byte) (int, error)
- func (o *PortfolioHoldingItemList) UnmarshalBinary(data []byte) error
- type PortfolioTransactionList
- func (o *PortfolioTransactionList) MarshalBinary() (data []byte, err error)
- func (o *PortfolioTransactionList) MarshalLen() (int, error)
- func (o *PortfolioTransactionList) MarshalTo(buf []byte) int
- func (o *PortfolioTransactionList) Unmarshal(data []byte) (int, error)
- func (o *PortfolioTransactionList) UnmarshalBinary(data []byte) error
- type ReportableHolding
- func (o *ReportableHolding) MarshalBinary() (data []byte, err error)
- func (o *ReportableHolding) MarshalLen() (int, error)
- func (o *ReportableHolding) MarshalTo(buf []byte) int
- func (o *ReportableHolding) Unmarshal(data []byte) (int, error)
- func (o *ReportableHolding) UnmarshalBinary(data []byte) error
- type Returns
- type SearchCriteria
- type Transaction
- func (o *Transaction) MarshalBinary() (data []byte, err error)
- func (o *Transaction) MarshalLen() (int, error)
- func (o *Transaction) MarshalTo(buf []byte) int
- func (t *Transaction) MarshalZerologObject(e *zerolog.Event)
- func (o *Transaction) Unmarshal(data []byte) (int, error)
- func (o *Transaction) UnmarshalBinary(data []byte) error
Constants ¶
const ( SellTransaction = "SELL" BuyTransaction = "BUY" DividendTransaction = "DIVIDEND" SplitTransaction = "SPLIT" DepositTransaction = "DEPOSIT" WithdrawTransaction = "WITHDRAW" InterestTransaction = "INTEREST" )
Variables ¶
var ( // ColferSizeMax is the upper limit for serial byte sizes. ColferSizeMax = 16 * 1024 * 1024 // ColferListMax is the upper limit for the number of elements in a list. ColferListMax = 4 * 1024 * 1024 )
Colfer configuration attributes
Functions ¶
Types ¶
type AnnualReturn ¶
func (*AnnualReturn) MarshalBinary ¶
func (o *AnnualReturn) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*AnnualReturn) MarshalLen ¶
func (o *AnnualReturn) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*AnnualReturn) MarshalTo ¶
func (o *AnnualReturn) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*AnnualReturn) Unmarshal ¶
func (o *AnnualReturn) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*AnnualReturn) UnmarshalBinary ¶
func (o *AnnualReturn) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type CompareOperator ¶
type CompareOperator string
const ( Equal CompareOperator = "eq" GreaterThan CompareOperator = "gt" LessThan CompareOperator = "lt" Like CompareOperator = "like" )
type DrawDown ¶
func (*DrawDown) MarshalBinary ¶
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*DrawDown) MarshalLen ¶
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*DrawDown) MarshalTo ¶
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*DrawDown) Unmarshal ¶
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*DrawDown) UnmarshalBinary ¶
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Holding ¶
func (*Holding) MarshalBinary ¶
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*Holding) MarshalLen ¶
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Holding) MarshalTo ¶
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*Holding) Unmarshal ¶
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Holding) UnmarshalBinary ¶
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Justification ¶
func (*Justification) MarshalBinary ¶
func (o *Justification) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*Justification) MarshalLen ¶
func (o *Justification) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Justification) MarshalTo ¶
func (o *Justification) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*Justification) Unmarshal ¶
func (o *Justification) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Justification) UnmarshalBinary ¶
func (o *Justification) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Metrics ¶
type Metrics struct { AlphaSinceInception float64 AvgDrawDown float64 BestYear *AnnualReturn BetaSinceInception float64 DownsideDeviationSinceInception float64 ExcessKurtosisSinceInception float64 FinalBalance float64 SharpeRatioSinceInception float64 Skewness float64 SortinoRatioSinceInception float64 StdDevSinceInception float64 TotalDeposited float64 TotalWithdrawn float64 UlcerIndexAvg float64 UlcerIndexP50 float64 UlcerIndexP90 float64 UlcerIndexP99 float64 WorstYear *AnnualReturn DynamicWithdrawalRateSinceInception float64 PerpetualWithdrawalRateSinceInception float64 SafeWithdrawalRateSinceInception float64 }
func (*Metrics) MarshalBinary ¶
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*Metrics) MarshalLen ¶
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Metrics) MarshalTo ¶
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*Metrics) Unmarshal ¶
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Metrics) UnmarshalBinary ¶
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Performance ¶
type Performance struct { PortfolioID []byte PeriodStart time.Time PeriodEnd time.Time ComputedOn time.Time CurrentAssets []*ReportableHolding Measurements []*PerformanceMeasurement DrawDowns []*DrawDown PortfolioReturns *Returns BenchmarkReturns *Returns PortfolioMetrics *Metrics BenchmarkMetrics *Metrics }
func (*Performance) MarshalBinary ¶
func (o *Performance) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.CurrentAssets will be replaced with a new value. All nil entries in o.Measurements will be replaced with a new value. All nil entries in o.DrawDowns will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*Performance) MarshalLen ¶
func (o *Performance) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Performance) MarshalTo ¶
func (o *Performance) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.CurrentAssets will be replaced with a new value. All nil entries in o.Measurements will be replaced with a new value. All nil entries in o.DrawDowns will be replaced with a new value.
func (*Performance) Unmarshal ¶
func (o *Performance) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Performance) UnmarshalBinary ¶
func (o *Performance) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type PerformanceMeasurement ¶
type PerformanceMeasurement struct { Time time.Time Value float64 BenchmarkValue float64 RiskFreeValue float64 StrategyGrowthOf10K float64 BenchmarkGrowthOf10K float64 RiskFreeGrowthOf10K float64 Holdings []*ReportableHolding Justification []*Justification TotalDeposited float64 TotalWithdrawn float64 // Time-weighted rate of return TWRROneDay float32 TWRRWeekToDate float32 TWRROneWeek float32 TWRRMonthToDate float32 TWRROneMonth float32 TWRRThreeMonth float32 TWRRYearToDate float32 TWRROneYear float32 TWRRThreeYear float32 TWRRFiveYear float32 TWRRTenYear float32 // Money-weighted rate of return MWRROneDay float32 MWRRWeekToDate float32 MWRROneWeek float32 MWRRMonthToDate float32 MWRROneMonth float32 MWRRThreeMonth float32 MWRRYearToDate float32 MWRROneYear float32 MWRRThreeYear float32 MWRRFiveYear float32 MWRRTenYear float32 // active return ActiveReturnOneYear float32 ActiveReturnThreeYear float32 ActiveReturnFiveYear float32 ActiveReturnTenYear float32 // alpha AlphaOneYear float32 AlphaThreeYear float32 AlphaFiveYear float32 AlphaTenYear float32 // beta BetaOneYear float32 BetaThreeYear float32 BetaFiveYear float32 BetaTenYear float32 // ratios CalmarRatio float32 DownsideDeviation float32 InformationRatio float32 KRatio float32 KellerRatio float32 SharpeRatio float32 SortinoRatio float32 StdDev float32 TreynorRatio float32 UlcerIndex float32 }
func (*PerformanceMeasurement) MarshalBinary ¶
func (o *PerformanceMeasurement) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Holdings will be replaced with a new value. All nil entries in o.Justification will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurement) MarshalLen ¶
func (o *PerformanceMeasurement) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurement) MarshalTo ¶
func (o *PerformanceMeasurement) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Holdings will be replaced with a new value. All nil entries in o.Justification will be replaced with a new value.
func (*PerformanceMeasurement) Unmarshal ¶
func (o *PerformanceMeasurement) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PerformanceMeasurement) UnmarshalBinary ¶
func (o *PerformanceMeasurement) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type PerformanceMeasurementItem ¶
func (*PerformanceMeasurementItem) MarshalBinary ¶
func (o *PerformanceMeasurementItem) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurementItem) MarshalLen ¶
func (o *PerformanceMeasurementItem) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurementItem) MarshalTo ¶
func (o *PerformanceMeasurementItem) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*PerformanceMeasurementItem) Unmarshal ¶
func (o *PerformanceMeasurementItem) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PerformanceMeasurementItem) UnmarshalBinary ¶
func (o *PerformanceMeasurementItem) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type PerformanceMeasurementItemList ¶
type PerformanceMeasurementItemList struct { Items []*PerformanceMeasurementItem FieldNames []string }
func (*PerformanceMeasurementItemList) MarshalBinary ¶
func (o *PerformanceMeasurementItemList) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Items will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurementItemList) MarshalLen ¶
func (o *PerformanceMeasurementItemList) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PerformanceMeasurementItemList) MarshalTo ¶
func (o *PerformanceMeasurementItemList) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Items will be replaced with a new value.
func (*PerformanceMeasurementItemList) Unmarshal ¶
func (o *PerformanceMeasurementItemList) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PerformanceMeasurementItemList) UnmarshalBinary ¶
func (o *PerformanceMeasurementItemList) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Portfolio ¶
type Portfolio struct { ID []byte UserID string Name string StartDate time.Time EndDate time.Time Benchmark string StrategyShortcode string StrategyArguments string Schedule string Notifications int32 Transactions []*Transaction CurrentHoldings []*Holding PredictedAssets *PortfolioHoldingItem }
func (*Portfolio) DownloadOrders ¶
func (p *Portfolio) DownloadOrders(transactions []*Transaction) error
DownloadOrders retrieves the list of orders that should be executed on the account
func (*Portfolio) MarshalBinary ¶
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Transactions will be replaced with a new value. All nil entries in o.CurrentHoldings will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*Portfolio) MarshalLen ¶
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Portfolio) MarshalTo ¶
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Transactions will be replaced with a new value. All nil entries in o.CurrentHoldings will be replaced with a new value.
func (*Portfolio) Unmarshal ¶
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Portfolio) UnmarshalBinary ¶
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
func (*Portfolio) UploadTransactions ¶
func (p *Portfolio) UploadTransactions(transactions []*Transaction) error
UploadTransactions uploads the provided transactions to the portfolio
type PortfolioHoldingItem ¶
type PortfolioHoldingItem struct { Time time.Time Holdings []*ReportableHolding Justification []*Justification PercentReturn float64 Value float64 Predicted bool }
func (*PortfolioHoldingItem) MarshalBinary ¶
func (o *PortfolioHoldingItem) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Holdings will be replaced with a new value. All nil entries in o.Justification will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*PortfolioHoldingItem) MarshalLen ¶
func (o *PortfolioHoldingItem) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PortfolioHoldingItem) MarshalTo ¶
func (o *PortfolioHoldingItem) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Holdings will be replaced with a new value. All nil entries in o.Justification will be replaced with a new value.
func (*PortfolioHoldingItem) Unmarshal ¶
func (o *PortfolioHoldingItem) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PortfolioHoldingItem) UnmarshalBinary ¶
func (o *PortfolioHoldingItem) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type PortfolioHoldingItemList ¶
type PortfolioHoldingItemList struct {
Items []*PortfolioHoldingItem
}
func (*PortfolioHoldingItemList) MarshalBinary ¶
func (o *PortfolioHoldingItemList) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Items will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*PortfolioHoldingItemList) MarshalLen ¶
func (o *PortfolioHoldingItemList) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PortfolioHoldingItemList) MarshalTo ¶
func (o *PortfolioHoldingItemList) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Items will be replaced with a new value.
func (*PortfolioHoldingItemList) Unmarshal ¶
func (o *PortfolioHoldingItemList) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PortfolioHoldingItemList) UnmarshalBinary ¶
func (o *PortfolioHoldingItemList) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type PortfolioTransactionList ¶
type PortfolioTransactionList struct {
Items []*Transaction
}
func (*PortfolioTransactionList) MarshalBinary ¶
func (o *PortfolioTransactionList) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Items will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*PortfolioTransactionList) MarshalLen ¶
func (o *PortfolioTransactionList) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*PortfolioTransactionList) MarshalTo ¶
func (o *PortfolioTransactionList) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Items will be replaced with a new value.
func (*PortfolioTransactionList) Unmarshal ¶
func (o *PortfolioTransactionList) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*PortfolioTransactionList) UnmarshalBinary ¶
func (o *PortfolioTransactionList) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type ReportableHolding ¶
func (*ReportableHolding) MarshalBinary ¶
func (o *ReportableHolding) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*ReportableHolding) MarshalLen ¶
func (o *ReportableHolding) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*ReportableHolding) MarshalTo ¶
func (o *ReportableHolding) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*ReportableHolding) Unmarshal ¶
func (o *ReportableHolding) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*ReportableHolding) UnmarshalBinary ¶
func (o *ReportableHolding) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type Returns ¶
type Returns struct { MWRRSinceInception float64 MWRRYTD float64 MWRROneYear float64 MWRRThreeYear float64 MWRRFiveYear float64 MWRRTenYear float64 TWRRSinceInception float64 TWRRYTD float64 TWRROneYear float64 TWRRThreeYear float64 TWRRFiveYear float64 TWRRTenYear float64 }
func (*Returns) MarshalBinary ¶
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. The error return option is portfolio.ColferMax.
func (*Returns) MarshalLen ¶
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Returns) MarshalTo ¶
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic.
func (*Returns) Unmarshal ¶
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Returns) UnmarshalBinary ¶
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.
type SearchCriteria ¶
type SearchCriteria struct { Name *string StringValue *string IntValue *int Comparator CompareOperator }
type Transaction ¶
type Transaction struct { ID []byte Cleared bool Commission float64 CompositeFIGI string Date time.Time Justification []*Justification Kind string Memo string Predicted bool Source string SourceID string Tags []string TaxDisposition string Ticker string TotalValue float64 }
func (*Transaction) MarshalBinary ¶
func (o *Transaction) MarshalBinary() (data []byte, err error)
MarshalBinary encodes o as Colfer conform encoding.BinaryMarshaler. All nil entries in o.Justification will be replaced with a new value. The error return option is portfolio.ColferMax.
func (*Transaction) MarshalLen ¶
func (o *Transaction) MarshalLen() (int, error)
MarshalLen returns the Colfer serial byte size. The error return option is portfolio.ColferMax.
func (*Transaction) MarshalTo ¶
func (o *Transaction) MarshalTo(buf []byte) int
MarshalTo encodes o as Colfer into buf and returns the number of bytes written. If the buffer is too small, MarshalTo will panic. All nil entries in o.Justification will be replaced with a new value.
func (*Transaction) MarshalZerologObject ¶
func (t *Transaction) MarshalZerologObject(e *zerolog.Event)
func (*Transaction) Unmarshal ¶
func (o *Transaction) Unmarshal(data []byte) (int, error)
Unmarshal decodes data as Colfer and returns the number of bytes read. The error return options are io.EOF, portfolio.ColferError and portfolio.ColferMax.
func (*Transaction) UnmarshalBinary ¶
func (o *Transaction) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes data as Colfer conform encoding.BinaryUnmarshaler. The error return options are io.EOF, portfolio.ColferError, portfolio.ColferTail and portfolio.ColferMax.