portfoliov1

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PortfolioEventType_name = map[int32]string{
		0: "PORTFOLIO_EVENT_TYPE_UNSPECIFIED",
		1: "PORTFOLIO_EVENT_TYPE_BUY",
		2: "PORTFOLIO_EVENT_TYPE_SELL",
		3: "PORTFOLIO_EVENT_TYPE_DIVIDEND",
	}
	PortfolioEventType_value = map[string]int32{
		"PORTFOLIO_EVENT_TYPE_UNSPECIFIED": 0,
		"PORTFOLIO_EVENT_TYPE_BUY":         1,
		"PORTFOLIO_EVENT_TYPE_SELL":        2,
		"PORTFOLIO_EVENT_TYPE_DIVIDEND":    3,
	}
)

Enum value maps for PortfolioEventType.

Functions

This section is empty.

Types

type CreatePortfolioRequest

type CreatePortfolioRequest struct {
	Portfolio *Portfolio `protobuf:"bytes,1,opt,name=portfolio,proto3" json:"portfolio,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePortfolioRequest) Descriptor deprecated

func (*CreatePortfolioRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePortfolioRequest.ProtoReflect.Descriptor instead.

func (*CreatePortfolioRequest) GetPortfolio

func (x *CreatePortfolioRequest) GetPortfolio() *Portfolio

func (*CreatePortfolioRequest) ProtoMessage

func (*CreatePortfolioRequest) ProtoMessage()

func (*CreatePortfolioRequest) ProtoReflect

func (x *CreatePortfolioRequest) ProtoReflect() protoreflect.Message

func (*CreatePortfolioRequest) Reset

func (x *CreatePortfolioRequest) Reset()

func (*CreatePortfolioRequest) String

func (x *CreatePortfolioRequest) String() string

type CreatePortfolioTransactionRequest

type CreatePortfolioTransactionRequest struct {
	Transaction *PortfolioEvent `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePortfolioTransactionRequest) Descriptor deprecated

func (*CreatePortfolioTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePortfolioTransactionRequest.ProtoReflect.Descriptor instead.

func (*CreatePortfolioTransactionRequest) GetTransaction

func (*CreatePortfolioTransactionRequest) ProtoMessage

func (*CreatePortfolioTransactionRequest) ProtoMessage()

func (*CreatePortfolioTransactionRequest) ProtoReflect

func (*CreatePortfolioTransactionRequest) Reset

func (*CreatePortfolioTransactionRequest) String

type CreateSecurityRequest

type CreateSecurityRequest struct {
	Security *Security `protobuf:"bytes,1,opt,name=security,proto3" json:"security,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSecurityRequest) Descriptor deprecated

func (*CreateSecurityRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateSecurityRequest.ProtoReflect.Descriptor instead.

func (*CreateSecurityRequest) GetSecurity

func (x *CreateSecurityRequest) GetSecurity() *Security

func (*CreateSecurityRequest) ProtoMessage

func (*CreateSecurityRequest) ProtoMessage()

func (*CreateSecurityRequest) ProtoReflect

func (x *CreateSecurityRequest) ProtoReflect() protoreflect.Message

func (*CreateSecurityRequest) Reset

func (x *CreateSecurityRequest) Reset()

func (*CreateSecurityRequest) String

func (x *CreateSecurityRequest) String() string

type DeletePortfolioRequest

type DeletePortfolioRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePortfolioRequest) Descriptor deprecated

func (*DeletePortfolioRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeletePortfolioRequest.ProtoReflect.Descriptor instead.

func (*DeletePortfolioRequest) GetName

func (x *DeletePortfolioRequest) GetName() string

func (*DeletePortfolioRequest) ProtoMessage

func (*DeletePortfolioRequest) ProtoMessage()

func (*DeletePortfolioRequest) ProtoReflect

func (x *DeletePortfolioRequest) ProtoReflect() protoreflect.Message

func (*DeletePortfolioRequest) Reset

func (x *DeletePortfolioRequest) Reset()

func (*DeletePortfolioRequest) String

func (x *DeletePortfolioRequest) String() string

type DeletePortfolioTransactionRequest

type DeletePortfolioTransactionRequest struct {
	TransactionId int32 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePortfolioTransactionRequest) Descriptor deprecated

func (*DeletePortfolioTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeletePortfolioTransactionRequest.ProtoReflect.Descriptor instead.

func (*DeletePortfolioTransactionRequest) GetTransactionId

func (x *DeletePortfolioTransactionRequest) GetTransactionId() int32

func (*DeletePortfolioTransactionRequest) ProtoMessage

func (*DeletePortfolioTransactionRequest) ProtoMessage()

func (*DeletePortfolioTransactionRequest) ProtoReflect

func (*DeletePortfolioTransactionRequest) Reset

func (*DeletePortfolioTransactionRequest) String

type DeleteSecurityRequest

type DeleteSecurityRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSecurityRequest) Descriptor deprecated

func (*DeleteSecurityRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteSecurityRequest.ProtoReflect.Descriptor instead.

func (*DeleteSecurityRequest) GetName

func (x *DeleteSecurityRequest) GetName() string

func (*DeleteSecurityRequest) ProtoMessage

func (*DeleteSecurityRequest) ProtoMessage()

func (*DeleteSecurityRequest) ProtoReflect

func (x *DeleteSecurityRequest) ProtoReflect() protoreflect.Message

func (*DeleteSecurityRequest) Reset

func (x *DeleteSecurityRequest) Reset()

func (*DeleteSecurityRequest) String

func (x *DeleteSecurityRequest) String() string

type GetPortfolioRequest

type GetPortfolioRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPortfolioRequest) Descriptor deprecated

func (*GetPortfolioRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPortfolioRequest.ProtoReflect.Descriptor instead.

func (*GetPortfolioRequest) GetName

func (x *GetPortfolioRequest) GetName() string

func (*GetPortfolioRequest) ProtoMessage

func (*GetPortfolioRequest) ProtoMessage()

func (*GetPortfolioRequest) ProtoReflect

func (x *GetPortfolioRequest) ProtoReflect() protoreflect.Message

func (*GetPortfolioRequest) Reset

func (x *GetPortfolioRequest) Reset()

func (*GetPortfolioRequest) String

func (x *GetPortfolioRequest) String() string

type GetPortfolioSnapshotRequest

type GetPortfolioSnapshotRequest struct {

	// PortfolioName is the name / identifier of the portfolio we want to
	// "snapshot".
	PortfolioName string `protobuf:"bytes,1,opt,name=portfolio_name,json=portfolioName,proto3" json:"portfolio_name,omitempty"`
	// Time is the point in time of the requested snapshot.
	Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPortfolioSnapshotRequest) Descriptor deprecated

func (*GetPortfolioSnapshotRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPortfolioSnapshotRequest.ProtoReflect.Descriptor instead.

func (*GetPortfolioSnapshotRequest) GetPortfolioName

func (x *GetPortfolioSnapshotRequest) GetPortfolioName() string

func (*GetPortfolioSnapshotRequest) GetTime

func (*GetPortfolioSnapshotRequest) ProtoMessage

func (*GetPortfolioSnapshotRequest) ProtoMessage()

func (*GetPortfolioSnapshotRequest) ProtoReflect

func (*GetPortfolioSnapshotRequest) Reset

func (x *GetPortfolioSnapshotRequest) Reset()

func (*GetPortfolioSnapshotRequest) String

func (x *GetPortfolioSnapshotRequest) String() string

type GetSecurityRequest

type GetSecurityRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSecurityRequest) Descriptor deprecated

func (*GetSecurityRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetSecurityRequest.ProtoReflect.Descriptor instead.

func (*GetSecurityRequest) GetName

func (x *GetSecurityRequest) GetName() string

func (*GetSecurityRequest) ProtoMessage

func (*GetSecurityRequest) ProtoMessage()

func (*GetSecurityRequest) ProtoReflect

func (x *GetSecurityRequest) ProtoReflect() protoreflect.Message

func (*GetSecurityRequest) Reset

func (x *GetSecurityRequest) Reset()

func (*GetSecurityRequest) String

func (x *GetSecurityRequest) String() string

type ImportTransactionsRequest

type ImportTransactionsRequest struct {
	PortfolioName string `protobuf:"bytes,1,opt,name=portfolio_name,json=portfolioName,proto3" json:"portfolio_name,omitempty"`
	FromCsv       string `protobuf:"bytes,2,opt,name=from_csv,json=fromCsv,proto3" json:"from_csv,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportTransactionsRequest) Descriptor deprecated

func (*ImportTransactionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ImportTransactionsRequest.ProtoReflect.Descriptor instead.

func (*ImportTransactionsRequest) GetFromCsv

func (x *ImportTransactionsRequest) GetFromCsv() string

func (*ImportTransactionsRequest) GetPortfolioName

func (x *ImportTransactionsRequest) GetPortfolioName() string

func (*ImportTransactionsRequest) ProtoMessage

func (*ImportTransactionsRequest) ProtoMessage()

func (*ImportTransactionsRequest) ProtoReflect

func (*ImportTransactionsRequest) Reset

func (x *ImportTransactionsRequest) Reset()

func (*ImportTransactionsRequest) String

func (x *ImportTransactionsRequest) String() string

type ListPortfolioTransactionsRequest

type ListPortfolioTransactionsRequest struct {
	PortfolioName string `protobuf:"bytes,1,opt,name=portfolio_name,json=portfolioName,proto3" json:"portfolio_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPortfolioTransactionsRequest) Descriptor deprecated

func (*ListPortfolioTransactionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPortfolioTransactionsRequest.ProtoReflect.Descriptor instead.

func (*ListPortfolioTransactionsRequest) GetPortfolioName

func (x *ListPortfolioTransactionsRequest) GetPortfolioName() string

func (*ListPortfolioTransactionsRequest) ProtoMessage

func (*ListPortfolioTransactionsRequest) ProtoMessage()

func (*ListPortfolioTransactionsRequest) ProtoReflect

func (*ListPortfolioTransactionsRequest) Reset

func (*ListPortfolioTransactionsRequest) String

type ListPortfolioTransactionsResponse

type ListPortfolioTransactionsResponse struct {
	Transactions []*PortfolioEvent `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPortfolioTransactionsResponse) Descriptor deprecated

func (*ListPortfolioTransactionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPortfolioTransactionsResponse.ProtoReflect.Descriptor instead.

func (*ListPortfolioTransactionsResponse) GetTransactions

func (x *ListPortfolioTransactionsResponse) GetTransactions() []*PortfolioEvent

func (*ListPortfolioTransactionsResponse) ProtoMessage

func (*ListPortfolioTransactionsResponse) ProtoMessage()

func (*ListPortfolioTransactionsResponse) ProtoReflect

func (*ListPortfolioTransactionsResponse) Reset

func (*ListPortfolioTransactionsResponse) String

type ListPortfoliosRequest

type ListPortfoliosRequest struct {
	// contains filtered or unexported fields
}

func (*ListPortfoliosRequest) Descriptor deprecated

func (*ListPortfoliosRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPortfoliosRequest.ProtoReflect.Descriptor instead.

func (*ListPortfoliosRequest) ProtoMessage

func (*ListPortfoliosRequest) ProtoMessage()

func (*ListPortfoliosRequest) ProtoReflect

func (x *ListPortfoliosRequest) ProtoReflect() protoreflect.Message

func (*ListPortfoliosRequest) Reset

func (x *ListPortfoliosRequest) Reset()

func (*ListPortfoliosRequest) String

func (x *ListPortfoliosRequest) String() string

type ListPortfoliosResponse

type ListPortfoliosResponse struct {
	Portfolios []*Portfolio `protobuf:"bytes,1,rep,name=portfolios,proto3" json:"portfolios,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPortfoliosResponse) Descriptor deprecated

func (*ListPortfoliosResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPortfoliosResponse.ProtoReflect.Descriptor instead.

func (*ListPortfoliosResponse) GetPortfolios

func (x *ListPortfoliosResponse) GetPortfolios() []*Portfolio

func (*ListPortfoliosResponse) ProtoMessage

func (*ListPortfoliosResponse) ProtoMessage()

func (*ListPortfoliosResponse) ProtoReflect

func (x *ListPortfoliosResponse) ProtoReflect() protoreflect.Message

func (*ListPortfoliosResponse) Reset

func (x *ListPortfoliosResponse) Reset()

func (*ListPortfoliosResponse) String

func (x *ListPortfoliosResponse) String() string

type ListSecuritiesRequest

type ListSecuritiesRequest struct {
	Filter *ListSecuritiesRequest_Filter `protobuf:"bytes,5,opt,name=filter,proto3,oneof" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSecuritiesRequest) Descriptor deprecated

func (*ListSecuritiesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListSecuritiesRequest.ProtoReflect.Descriptor instead.

func (*ListSecuritiesRequest) GetFilter

func (*ListSecuritiesRequest) ProtoMessage

func (*ListSecuritiesRequest) ProtoMessage()

func (*ListSecuritiesRequest) ProtoReflect

func (x *ListSecuritiesRequest) ProtoReflect() protoreflect.Message

func (*ListSecuritiesRequest) Reset

func (x *ListSecuritiesRequest) Reset()

func (*ListSecuritiesRequest) String

func (x *ListSecuritiesRequest) String() string

type ListSecuritiesRequest_Filter

type ListSecuritiesRequest_Filter struct {
	SecurityNames []string `protobuf:"bytes,1,rep,name=security_names,json=securityNames,proto3" json:"security_names,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSecuritiesRequest_Filter) Descriptor deprecated

func (*ListSecuritiesRequest_Filter) Descriptor() ([]byte, []int)

Deprecated: Use ListSecuritiesRequest_Filter.ProtoReflect.Descriptor instead.

func (*ListSecuritiesRequest_Filter) GetSecurityNames

func (x *ListSecuritiesRequest_Filter) GetSecurityNames() []string

func (*ListSecuritiesRequest_Filter) ProtoMessage

func (*ListSecuritiesRequest_Filter) ProtoMessage()

func (*ListSecuritiesRequest_Filter) ProtoReflect

func (*ListSecuritiesRequest_Filter) Reset

func (x *ListSecuritiesRequest_Filter) Reset()

func (*ListSecuritiesRequest_Filter) String

type ListSecuritiesResponse

type ListSecuritiesResponse struct {
	Securities []*Security `protobuf:"bytes,1,rep,name=securities,proto3" json:"securities,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSecuritiesResponse) Descriptor deprecated

func (*ListSecuritiesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListSecuritiesResponse.ProtoReflect.Descriptor instead.

func (*ListSecuritiesResponse) GetSecurities

func (x *ListSecuritiesResponse) GetSecurities() []*Security

func (*ListSecuritiesResponse) ProtoMessage

func (*ListSecuritiesResponse) ProtoMessage()

func (*ListSecuritiesResponse) ProtoReflect

func (x *ListSecuritiesResponse) ProtoReflect() protoreflect.Message

func (*ListSecuritiesResponse) Reset

func (x *ListSecuritiesResponse) Reset()

func (*ListSecuritiesResponse) String

func (x *ListSecuritiesResponse) String() string

type ListedSecurity

type ListedSecurity struct {
	SecurityName         string                 `protobuf:"bytes,1,opt,name=security_name,json=securityName,proto3" json:"security_name,omitempty"`
	Ticker               string                 `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"`
	Currency             string                 `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
	LatestQuote          *float32               `protobuf:"fixed32,5,opt,name=latest_quote,json=latestQuote,proto3,oneof" json:"latest_quote,omitempty"`
	LatestQuoteTimestamp *timestamppb.Timestamp `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListedSecurity) Descriptor deprecated

func (*ListedSecurity) Descriptor() ([]byte, []int)

Deprecated: Use ListedSecurity.ProtoReflect.Descriptor instead.

func (*ListedSecurity) GetCurrency

func (x *ListedSecurity) GetCurrency() string

func (*ListedSecurity) GetLatestQuote

func (x *ListedSecurity) GetLatestQuote() float32

func (*ListedSecurity) GetLatestQuoteTimestamp

func (x *ListedSecurity) GetLatestQuoteTimestamp() *timestamppb.Timestamp

func (*ListedSecurity) GetSecurityName

func (x *ListedSecurity) GetSecurityName() string

func (*ListedSecurity) GetTicker

func (x *ListedSecurity) GetTicker() string

func (*ListedSecurity) InitTables

func (*ListedSecurity) InitTables(db *persistence.DB) (err error)

func (*ListedSecurity) PrepareDelete

func (*ListedSecurity) PrepareDelete(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*ListedSecurity) PrepareGet

func (*ListedSecurity) PrepareGet(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*ListedSecurity) PrepareList

func (*ListedSecurity) PrepareList(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*ListedSecurity) PrepareReplace

func (*ListedSecurity) PrepareReplace(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*ListedSecurity) PrepareUpdate

func (*ListedSecurity) PrepareUpdate(db *persistence.DB, columns []string) (stmt *sql.Stmt, err error)

func (*ListedSecurity) ProtoMessage

func (*ListedSecurity) ProtoMessage()

func (*ListedSecurity) ProtoReflect

func (x *ListedSecurity) ProtoReflect() protoreflect.Message

func (*ListedSecurity) ReplaceIntoArgs

func (l *ListedSecurity) ReplaceIntoArgs() []any

func (*ListedSecurity) Reset

func (x *ListedSecurity) Reset()

func (*ListedSecurity) Scan

func (*ListedSecurity) String

func (x *ListedSecurity) String() string

func (*ListedSecurity) UpdateArgs

func (l *ListedSecurity) UpdateArgs(columns []string) (args []any)

type Portfolio

type Portfolio struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Events contains all portfolio events, such as buy/sell transactions,
	// dividends or other. They need to be ordered by time (ascending).
	Events []*PortfolioEvent `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*Portfolio) Descriptor deprecated

func (*Portfolio) Descriptor() ([]byte, []int)

Deprecated: Use Portfolio.ProtoReflect.Descriptor instead.

func (*Portfolio) EventMap

func (p *Portfolio) EventMap() (m map[string][]*PortfolioEvent)

func (*Portfolio) GetDisplayName

func (x *Portfolio) GetDisplayName() string

func (*Portfolio) GetEvents

func (x *Portfolio) GetEvents() []*PortfolioEvent

func (*Portfolio) GetName

func (x *Portfolio) GetName() string

func (*Portfolio) InitTables

func (*Portfolio) InitTables(db *persistence.DB) (err error)

func (*Portfolio) PrepareDelete

func (*Portfolio) PrepareDelete(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Portfolio) PrepareGet

func (*Portfolio) PrepareGet(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Portfolio) PrepareList

func (*Portfolio) PrepareList(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Portfolio) PrepareReplace

func (*Portfolio) PrepareReplace(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Portfolio) PrepareUpdate

func (*Portfolio) PrepareUpdate(db *persistence.DB, columns []string) (stmt *sql.Stmt, err error)

func (*Portfolio) ProtoMessage

func (*Portfolio) ProtoMessage()

func (*Portfolio) ProtoReflect

func (x *Portfolio) ProtoReflect() protoreflect.Message

func (*Portfolio) ReplaceIntoArgs

func (p *Portfolio) ReplaceIntoArgs() []any

func (*Portfolio) Reset

func (x *Portfolio) Reset()

func (*Portfolio) Scan

func (*Portfolio) String

func (x *Portfolio) String() string

func (*Portfolio) UpdateArgs

func (p *Portfolio) UpdateArgs(columns []string) (args []any)

type PortfolioEvent

type PortfolioEvent struct {
	Name          string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type          PortfolioEventType     `protobuf:"varint,2,opt,name=type,proto3,enum=mgo.portfolio.v1.PortfolioEventType" json:"type,omitempty"`
	Time          *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	PortfolioName string                 `protobuf:"bytes,4,opt,name=portfolio_name,json=portfolioName,proto3" json:"portfolio_name,omitempty"`
	SecurityName  string                 `protobuf:"bytes,5,opt,name=security_name,json=securityName,proto3" json:"security_name,omitempty"`
	Amount        float32                `protobuf:"fixed32,10,opt,name=amount,proto3" json:"amount,omitempty"`
	Price         float32                `protobuf:"fixed32,11,opt,name=price,proto3" json:"price,omitempty"`
	Fees          float32                `protobuf:"fixed32,12,opt,name=fees,proto3" json:"fees,omitempty"`
	Taxes         float32                `protobuf:"fixed32,13,opt,name=taxes,proto3" json:"taxes,omitempty"`
	// contains filtered or unexported fields
}

func EventsBefore

func EventsBefore(txs []*PortfolioEvent, t time.Time) (out []*PortfolioEvent)

func (*PortfolioEvent) Descriptor deprecated

func (*PortfolioEvent) Descriptor() ([]byte, []int)

Deprecated: Use PortfolioEvent.ProtoReflect.Descriptor instead.

func (*PortfolioEvent) GetAmount

func (x *PortfolioEvent) GetAmount() float32

func (*PortfolioEvent) GetFees

func (x *PortfolioEvent) GetFees() float32

func (*PortfolioEvent) GetName

func (x *PortfolioEvent) GetName() string

func (*PortfolioEvent) GetPortfolioName

func (x *PortfolioEvent) GetPortfolioName() string

func (*PortfolioEvent) GetPrice

func (x *PortfolioEvent) GetPrice() float32

func (*PortfolioEvent) GetSecurityName

func (x *PortfolioEvent) GetSecurityName() string

func (*PortfolioEvent) GetTaxes

func (x *PortfolioEvent) GetTaxes() float32

func (*PortfolioEvent) GetTime

func (x *PortfolioEvent) GetTime() *timestamppb.Timestamp

func (*PortfolioEvent) GetType

func (x *PortfolioEvent) GetType() PortfolioEventType

func (*PortfolioEvent) InitTables

func (*PortfolioEvent) InitTables(db *persistence.DB) (err error)

func (*PortfolioEvent) MakeUniqueName

func (tx *PortfolioEvent) MakeUniqueName()

func (*PortfolioEvent) PrepareDelete

func (*PortfolioEvent) PrepareDelete(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*PortfolioEvent) PrepareGet

func (*PortfolioEvent) PrepareGet(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*PortfolioEvent) PrepareList

func (*PortfolioEvent) PrepareList(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*PortfolioEvent) PrepareReplace

func (*PortfolioEvent) PrepareReplace(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*PortfolioEvent) PrepareUpdate

func (*PortfolioEvent) PrepareUpdate(db *persistence.DB, columns []string) (stmt *sql.Stmt, err error)

func (*PortfolioEvent) ProtoMessage

func (*PortfolioEvent) ProtoMessage()

func (*PortfolioEvent) ProtoReflect

func (x *PortfolioEvent) ProtoReflect() protoreflect.Message

func (*PortfolioEvent) ReplaceIntoArgs

func (e *PortfolioEvent) ReplaceIntoArgs() []any

func (*PortfolioEvent) Reset

func (x *PortfolioEvent) Reset()

func (*PortfolioEvent) Scan

func (*PortfolioEvent) String

func (x *PortfolioEvent) String() string

func (*PortfolioEvent) UpdateArgs

func (e *PortfolioEvent) UpdateArgs(columns []string) (args []any)

type PortfolioEventType

type PortfolioEventType int32
const (
	PortfolioEventType_PORTFOLIO_EVENT_TYPE_UNSPECIFIED PortfolioEventType = 0
	PortfolioEventType_PORTFOLIO_EVENT_TYPE_BUY         PortfolioEventType = 1
	PortfolioEventType_PORTFOLIO_EVENT_TYPE_SELL        PortfolioEventType = 2
	PortfolioEventType_PORTFOLIO_EVENT_TYPE_DIVIDEND    PortfolioEventType = 3
)

func (PortfolioEventType) Descriptor

func (PortfolioEventType) Enum

func (PortfolioEventType) EnumDescriptor deprecated

func (PortfolioEventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PortfolioEventType.Descriptor instead.

func (PortfolioEventType) Number

func (PortfolioEventType) String

func (x PortfolioEventType) String() string

func (PortfolioEventType) Type

type PortfolioPosition

type PortfolioPosition struct {
	Security *Security `protobuf:"bytes,1,opt,name=security,proto3" json:"security,omitempty"`
	Amount   float32   `protobuf:"fixed32,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// PurchaseValue was the market value of this position when it was bought
	// (net; exclusive of any fees).
	PurchaseValue float32 `protobuf:"fixed32,5,opt,name=purchase_value,json=purchaseValue,proto3" json:"purchase_value,omitempty"`
	// PurchasePrice was the market price of this position when it was bought
	// (net; exclusive of any fees).
	PurchasePrice float32 `protobuf:"fixed32,6,opt,name=purchase_price,json=purchasePrice,proto3" json:"purchase_price,omitempty"`
	// MarketValue is the current market value of this position, as retrieved from
	// the securities service.
	MarketValue float32 `protobuf:"fixed32,10,opt,name=market_value,json=marketValue,proto3" json:"market_value,omitempty"`
	// MarketPrice is the current market price of this position, as retrieved from
	// the securities service.
	MarketPrice float32 `protobuf:"fixed32,11,opt,name=market_price,json=marketPrice,proto3" json:"market_price,omitempty"`
	// TotalFees is the total amount of fees accumulating in this position through
	// various transactions.
	TotalFees float32 `protobuf:"fixed32,15,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"`
	// contains filtered or unexported fields
}

func (*PortfolioPosition) Descriptor deprecated

func (*PortfolioPosition) Descriptor() ([]byte, []int)

Deprecated: Use PortfolioPosition.ProtoReflect.Descriptor instead.

func (*PortfolioPosition) GetAmount

func (x *PortfolioPosition) GetAmount() float32

func (*PortfolioPosition) GetMarketPrice

func (x *PortfolioPosition) GetMarketPrice() float32

func (*PortfolioPosition) GetMarketValue

func (x *PortfolioPosition) GetMarketValue() float32

func (*PortfolioPosition) GetPurchasePrice

func (x *PortfolioPosition) GetPurchasePrice() float32

func (*PortfolioPosition) GetPurchaseValue

func (x *PortfolioPosition) GetPurchaseValue() float32

func (*PortfolioPosition) GetSecurity

func (x *PortfolioPosition) GetSecurity() *Security

func (*PortfolioPosition) GetTotalFees

func (x *PortfolioPosition) GetTotalFees() float32

func (*PortfolioPosition) ProtoMessage

func (*PortfolioPosition) ProtoMessage()

func (*PortfolioPosition) ProtoReflect

func (x *PortfolioPosition) ProtoReflect() protoreflect.Message

func (*PortfolioPosition) Reset

func (x *PortfolioPosition) Reset()

func (*PortfolioPosition) String

func (x *PortfolioPosition) String() string

type PortfolioSnapshot

type PortfolioSnapshot struct {

	// Time is the time when this snapshot was taken.
	Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// Positions holds the current positions within the snapshot and their value.
	Positions map[string]*PortfolioPosition `` /* 159-byte string literal not displayed */
	// FirstTransactionTime is the time of the first transaction with the
	// snapshot.
	FirstTransactionTime *timestamppb.Timestamp `` /* 129-byte string literal not displayed */
	// TotalPurchaseValue contains the total purchase value of all positions
	TotalPurchaseValue float32 `protobuf:"fixed32,10,opt,name=total_purchase_value,json=totalPurchaseValue,proto3" json:"total_purchase_value,omitempty"`
	// TotalMarketValue contains the total market value of all positions
	TotalMarketValue float32 `protobuf:"fixed32,11,opt,name=total_market_value,json=totalMarketValue,proto3" json:"total_market_value,omitempty"`
	// contains filtered or unexported fields
}

PortfolioSnapshot represents a snapshot in time of the portfolio. It can for example be the current state of the portfolio but also represent the state of the portfolio at a certain time in the past.

func (*PortfolioSnapshot) Descriptor deprecated

func (*PortfolioSnapshot) Descriptor() ([]byte, []int)

Deprecated: Use PortfolioSnapshot.ProtoReflect.Descriptor instead.

func (*PortfolioSnapshot) GetFirstTransactionTime

func (x *PortfolioSnapshot) GetFirstTransactionTime() *timestamppb.Timestamp

func (*PortfolioSnapshot) GetPositions

func (x *PortfolioSnapshot) GetPositions() map[string]*PortfolioPosition

func (*PortfolioSnapshot) GetTime

func (x *PortfolioSnapshot) GetTime() *timestamppb.Timestamp

func (*PortfolioSnapshot) GetTotalMarketValue

func (x *PortfolioSnapshot) GetTotalMarketValue() float32

func (*PortfolioSnapshot) GetTotalPurchaseValue

func (x *PortfolioSnapshot) GetTotalPurchaseValue() float32

func (*PortfolioSnapshot) ProtoMessage

func (*PortfolioSnapshot) ProtoMessage()

func (*PortfolioSnapshot) ProtoReflect

func (x *PortfolioSnapshot) ProtoReflect() protoreflect.Message

func (*PortfolioSnapshot) Reset

func (x *PortfolioSnapshot) Reset()

func (*PortfolioSnapshot) String

func (x *PortfolioSnapshot) String() string

type Security

type Security struct {

	// Name contains the unique resource name. For a stock or bond, this should be
	// an ISIN.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// DisplayName contains the human readable name.
	DisplayName   string            `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	ListedOn      []*ListedSecurity `protobuf:"bytes,4,rep,name=listed_on,json=listedOn,proto3" json:"listed_on,omitempty"`
	QuoteProvider *string           `protobuf:"bytes,10,opt,name=quote_provider,json=quoteProvider,proto3,oneof" json:"quote_provider,omitempty"`
	// contains filtered or unexported fields
}

func (*Security) Descriptor deprecated

func (*Security) Descriptor() ([]byte, []int)

Deprecated: Use Security.ProtoReflect.Descriptor instead.

func (*Security) GetDisplayName

func (x *Security) GetDisplayName() string

func (*Security) GetListedOn

func (x *Security) GetListedOn() []*ListedSecurity

func (*Security) GetName

func (x *Security) GetName() string

func (*Security) GetQuoteProvider

func (x *Security) GetQuoteProvider() string

func (*Security) InitTables

func (*Security) InitTables(db *persistence.DB) (err error)

func (*Security) PrepareDelete

func (*Security) PrepareDelete(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Security) PrepareGet

func (*Security) PrepareGet(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Security) PrepareList

func (*Security) PrepareList(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Security) PrepareReplace

func (*Security) PrepareReplace(db *persistence.DB) (stmt *sql.Stmt, err error)

func (*Security) PrepareUpdate

func (*Security) PrepareUpdate(db *persistence.DB, columns []string) (stmt *sql.Stmt, err error)

func (*Security) ProtoMessage

func (*Security) ProtoMessage()

func (*Security) ProtoReflect

func (x *Security) ProtoReflect() protoreflect.Message

func (*Security) ReplaceIntoArgs

func (s *Security) ReplaceIntoArgs() []any

func (*Security) Reset

func (x *Security) Reset()

func (*Security) Scan

func (*Security) String

func (x *Security) String() string

func (*Security) UpdateArgs

func (s *Security) UpdateArgs(columns []string) (args []any)

type TriggerQuoteUpdateRequest

type TriggerQuoteUpdateRequest struct {
	SecurityNames []string `protobuf:"bytes,1,rep,name=security_names,json=securityNames,proto3" json:"security_names,omitempty"`
	// contains filtered or unexported fields
}

func (*TriggerQuoteUpdateRequest) Descriptor deprecated

func (*TriggerQuoteUpdateRequest) Descriptor() ([]byte, []int)

Deprecated: Use TriggerQuoteUpdateRequest.ProtoReflect.Descriptor instead.

func (*TriggerQuoteUpdateRequest) GetSecurityNames

func (x *TriggerQuoteUpdateRequest) GetSecurityNames() []string

func (*TriggerQuoteUpdateRequest) ProtoMessage

func (*TriggerQuoteUpdateRequest) ProtoMessage()

func (*TriggerQuoteUpdateRequest) ProtoReflect

func (*TriggerQuoteUpdateRequest) Reset

func (x *TriggerQuoteUpdateRequest) Reset()

func (*TriggerQuoteUpdateRequest) String

func (x *TriggerQuoteUpdateRequest) String() string

type TriggerQuoteUpdateResponse

type TriggerQuoteUpdateResponse struct {
	// contains filtered or unexported fields
}

func (*TriggerQuoteUpdateResponse) Descriptor deprecated

func (*TriggerQuoteUpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use TriggerQuoteUpdateResponse.ProtoReflect.Descriptor instead.

func (*TriggerQuoteUpdateResponse) ProtoMessage

func (*TriggerQuoteUpdateResponse) ProtoMessage()

func (*TriggerQuoteUpdateResponse) ProtoReflect

func (*TriggerQuoteUpdateResponse) Reset

func (x *TriggerQuoteUpdateResponse) Reset()

func (*TriggerQuoteUpdateResponse) String

func (x *TriggerQuoteUpdateResponse) String() string

type UpdatePortfolioRequest

type UpdatePortfolioRequest struct {
	Portfolio  *Portfolio             `protobuf:"bytes,1,opt,name=portfolio,proto3" json:"portfolio,omitempty"`
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePortfolioRequest) Descriptor deprecated

func (*UpdatePortfolioRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePortfolioRequest.ProtoReflect.Descriptor instead.

func (*UpdatePortfolioRequest) GetPortfolio

func (x *UpdatePortfolioRequest) GetPortfolio() *Portfolio

func (*UpdatePortfolioRequest) GetUpdateMask

func (x *UpdatePortfolioRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdatePortfolioRequest) ProtoMessage

func (*UpdatePortfolioRequest) ProtoMessage()

func (*UpdatePortfolioRequest) ProtoReflect

func (x *UpdatePortfolioRequest) ProtoReflect() protoreflect.Message

func (*UpdatePortfolioRequest) Reset

func (x *UpdatePortfolioRequest) Reset()

func (*UpdatePortfolioRequest) String

func (x *UpdatePortfolioRequest) String() string

type UpdatePortfolioTransactionRequest

type UpdatePortfolioTransactionRequest struct {
	Transaction *PortfolioEvent        `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	UpdateMask  *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePortfolioTransactionRequest) Descriptor deprecated

func (*UpdatePortfolioTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePortfolioTransactionRequest.ProtoReflect.Descriptor instead.

func (*UpdatePortfolioTransactionRequest) GetTransaction

func (*UpdatePortfolioTransactionRequest) GetUpdateMask

func (*UpdatePortfolioTransactionRequest) ProtoMessage

func (*UpdatePortfolioTransactionRequest) ProtoMessage()

func (*UpdatePortfolioTransactionRequest) ProtoReflect

func (*UpdatePortfolioTransactionRequest) Reset

func (*UpdatePortfolioTransactionRequest) String

type UpdateSecurityRequest

type UpdateSecurityRequest struct {
	Security   *Security              `protobuf:"bytes,1,opt,name=security,proto3" json:"security,omitempty"`
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSecurityRequest) Descriptor deprecated

func (*UpdateSecurityRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateSecurityRequest.ProtoReflect.Descriptor instead.

func (*UpdateSecurityRequest) GetSecurity

func (x *UpdateSecurityRequest) GetSecurity() *Security

func (*UpdateSecurityRequest) GetUpdateMask

func (x *UpdateSecurityRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateSecurityRequest) ProtoMessage

func (*UpdateSecurityRequest) ProtoMessage()

func (*UpdateSecurityRequest) ProtoReflect

func (x *UpdateSecurityRequest) ProtoReflect() protoreflect.Message

func (*UpdateSecurityRequest) Reset

func (x *UpdateSecurityRequest) Reset()

func (*UpdateSecurityRequest) String

func (x *UpdateSecurityRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL