Documentation ¶
Index ¶
- Variables
- type Account
- type AccountEntry
- func (*AccountEntry) Descriptor() ([]byte, []int)deprecated
- func (x *AccountEntry) GetKey() string
- func (x *AccountEntry) GetValue() *Account
- func (*AccountEntry) ProtoMessage()
- func (x *AccountEntry) ProtoReflect() protoreflect.Message
- func (x *AccountEntry) Reset()
- func (x *AccountEntry) String() string
- type AmountData
- type AmountEntry
- func (*AmountEntry) Descriptor() ([]byte, []int)deprecated
- func (x *AmountEntry) GetKey() int64
- func (x *AmountEntry) GetValue() *AmountData
- func (*AmountEntry) ProtoMessage()
- func (x *AmountEntry) ProtoReflect() protoreflect.Message
- func (x *AmountEntry) Reset()
- func (x *AmountEntry) String() string
- type Chain
- func (*Chain) Descriptor() ([]byte, []int)deprecated
- func (x *Chain) GetAddr() string
- func (x *Chain) GetLastUpdated() *timestamp.Timestamp
- func (x *Chain) GetTokens() map[string]*TokenEntry
- func (*Chain) ProtoMessage()
- func (x *Chain) ProtoReflect() protoreflect.Message
- func (x *Chain) Reset()
- func (x *Chain) String() string
- type ChainEntry
- type Portfolio
- func (p *Portfolio) AddAccount(accountName string) error
- func (p *Portfolio) AddChain(accountName, chainName, address string) error
- func (p *Portfolio) AddToken(accountName, chainName, tokenName string) error
- func (p *Portfolio) AddTokenAmount(accountName, chainName, tokenName string, amount float64) error
- func (p *Portfolio) ClearAccountHistory(accountName string) error
- func (p *Portfolio) ClearChainHistory(accountName, chainName string) error
- func (p *Portfolio) ClearHistory()
- func (p *Portfolio) ClearTokenHistory(accountName, chainName, tokenName string) error
- func (*Portfolio) Descriptor() ([]byte, []int)deprecated
- func (p *Portfolio) GetAccount(name string) (*Account, error)
- func (p *Portfolio) GetAccountEntry(accountName string) (*AccountEntry, error)
- func (x *Portfolio) GetAccounts() map[string]*AccountEntry
- func (p *Portfolio) GetAmountData(accountName, chainName, tokenName string, time int64) (*AmountData, error)
- func (p *Portfolio) GetChainEntry(accountName, chainName string) (*ChainEntry, error)
- func (x *Portfolio) GetName() string
- func (p *Portfolio) GetTokenEntry(accountName, chainName, tokenName string) (*TokenEntry, error)
- func (x *Portfolio) GetTrackedTokens() []*PriceHistory
- func (p *Portfolio) Println()
- func (*Portfolio) ProtoMessage()
- func (x *Portfolio) ProtoReflect() protoreflect.Message
- func (p *Portfolio) RemoveAccount(accountName string) error
- func (p *Portfolio) RemoveChain(accountName, chainName string) error
- func (p *Portfolio) RemoveToken(accountName, chainName, tokenName string) error
- func (x *Portfolio) Reset()
- func (x *Portfolio) String() string
- func (p *Portfolio) UpdateAccountName(accountName, newName string) error
- func (p *Portfolio) UpdateTokenGeckoId(accountName, chainName, tokenName, geckoId string) error
- type PriceHistory
- func (*PriceHistory) Descriptor() ([]byte, []int)deprecated
- func (x *PriceHistory) GetBaseDenomId() string
- func (x *PriceHistory) GetGeckoId() string
- func (x *PriceHistory) GetPrices() []*SpotPrice
- func (x *PriceHistory) GetTokenName() string
- func (*PriceHistory) ProtoMessage()
- func (x *PriceHistory) ProtoReflect() protoreflect.Message
- func (x *PriceHistory) Reset()
- func (x *PriceHistory) String() string
- type SpotPrice
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetAmounts() map[int64]*AmountEntry
- func (x *Token) GetBaseDenom() string
- func (x *Token) GetGeckoId() string
- func (x *Token) GetLastPrice() uint64
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type TokenEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var File_portfolio_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Chains map[string]*ChainEntry `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) GetChains ¶
func (x *Account) GetChains() map[string]*ChainEntry
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type AccountEntry ¶
type AccountEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *Account `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*AccountEntry) Descriptor
deprecated
func (*AccountEntry) Descriptor() ([]byte, []int)
Deprecated: Use AccountEntry.ProtoReflect.Descriptor instead.
func (*AccountEntry) GetKey ¶
func (x *AccountEntry) GetKey() string
func (*AccountEntry) GetValue ¶
func (x *AccountEntry) GetValue() *Account
func (*AccountEntry) ProtoMessage ¶
func (*AccountEntry) ProtoMessage()
func (*AccountEntry) ProtoReflect ¶
func (x *AccountEntry) ProtoReflect() protoreflect.Message
func (*AccountEntry) Reset ¶
func (x *AccountEntry) Reset()
func (*AccountEntry) String ¶
func (x *AccountEntry) String() string
type AmountData ¶
type AmountData struct { Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*AmountData) Descriptor
deprecated
func (*AmountData) Descriptor() ([]byte, []int)
Deprecated: Use AmountData.ProtoReflect.Descriptor instead.
func (*AmountData) GetAmount ¶
func (x *AmountData) GetAmount() float64
func (*AmountData) GetPrice ¶
func (x *AmountData) GetPrice() float64
func (*AmountData) ProtoMessage ¶
func (*AmountData) ProtoMessage()
func (*AmountData) ProtoReflect ¶
func (x *AmountData) ProtoReflect() protoreflect.Message
func (*AmountData) Reset ¶
func (x *AmountData) Reset()
func (*AmountData) String ¶
func (x *AmountData) String() string
type AmountEntry ¶
type AmountEntry struct { Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` Value *AmountData `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*AmountEntry) Descriptor
deprecated
func (*AmountEntry) Descriptor() ([]byte, []int)
Deprecated: Use AmountEntry.ProtoReflect.Descriptor instead.
func (*AmountEntry) GetKey ¶
func (x *AmountEntry) GetKey() int64
func (*AmountEntry) GetValue ¶
func (x *AmountEntry) GetValue() *AmountData
func (*AmountEntry) ProtoMessage ¶
func (*AmountEntry) ProtoMessage()
func (*AmountEntry) ProtoReflect ¶
func (x *AmountEntry) ProtoReflect() protoreflect.Message
func (*AmountEntry) Reset ¶
func (x *AmountEntry) Reset()
func (*AmountEntry) String ¶
func (x *AmountEntry) String() string
type Chain ¶
type Chain struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Tokens map[string]*TokenEntry `` /* 153-byte string literal not displayed */ LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // contains filtered or unexported fields }
func (*Chain) Descriptor
deprecated
func (*Chain) GetLastUpdated ¶
func (*Chain) GetTokens ¶
func (x *Chain) GetTokens() map[string]*TokenEntry
func (*Chain) ProtoMessage ¶
func (*Chain) ProtoMessage()
func (*Chain) ProtoReflect ¶
func (x *Chain) ProtoReflect() protoreflect.Message
type ChainEntry ¶
type ChainEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *Chain `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ChainEntry) Descriptor
deprecated
func (*ChainEntry) Descriptor() ([]byte, []int)
Deprecated: Use ChainEntry.ProtoReflect.Descriptor instead.
func (*ChainEntry) GetKey ¶
func (x *ChainEntry) GetKey() string
func (*ChainEntry) GetValue ¶
func (x *ChainEntry) GetValue() *Chain
func (*ChainEntry) ProtoMessage ¶
func (*ChainEntry) ProtoMessage()
func (*ChainEntry) ProtoReflect ¶
func (x *ChainEntry) ProtoReflect() protoreflect.Message
func (*ChainEntry) Reset ¶
func (x *ChainEntry) Reset()
func (*ChainEntry) String ¶
func (x *ChainEntry) String() string
type Portfolio ¶
type Portfolio struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` TrackedTokens []*PriceHistory `protobuf:"bytes,2,rep,name=trackedTokens,proto3" json:"trackedTokens,omitempty"` Accounts map[string]*AccountEntry `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func CreateBlankPortfolio ¶
func (*Portfolio) AddAccount ¶
func (*Portfolio) AddTokenAmount ¶
func (*Portfolio) ClearAccountHistory ¶
func (*Portfolio) ClearChainHistory ¶
func (*Portfolio) ClearHistory ¶
func (p *Portfolio) ClearHistory()
func (*Portfolio) ClearTokenHistory ¶
func (*Portfolio) Descriptor
deprecated
func (*Portfolio) GetAccountEntry ¶
func (p *Portfolio) GetAccountEntry(accountName string) (*AccountEntry, error)
func (*Portfolio) GetAccounts ¶
func (x *Portfolio) GetAccounts() map[string]*AccountEntry
func (*Portfolio) GetAmountData ¶
func (p *Portfolio) GetAmountData(accountName, chainName, tokenName string, time int64) (*AmountData, error)
func (*Portfolio) GetChainEntry ¶
func (p *Portfolio) GetChainEntry(accountName, chainName string) (*ChainEntry, error)
func (*Portfolio) GetTokenEntry ¶
func (p *Portfolio) GetTokenEntry(accountName, chainName, tokenName string) (*TokenEntry, error)
func (*Portfolio) GetTrackedTokens ¶
func (x *Portfolio) GetTrackedTokens() []*PriceHistory
func (*Portfolio) ProtoMessage ¶
func (*Portfolio) ProtoMessage()
func (*Portfolio) ProtoReflect ¶
func (x *Portfolio) ProtoReflect() protoreflect.Message
func (*Portfolio) RemoveAccount ¶
func (*Portfolio) RemoveChain ¶
func (*Portfolio) RemoveToken ¶
func (*Portfolio) UpdateAccountName ¶
func (*Portfolio) UpdateTokenGeckoId ¶
type PriceHistory ¶
type PriceHistory struct { TokenName string `protobuf:"bytes,1,opt,name=tokenName,proto3" json:"tokenName,omitempty"` GeckoId string `protobuf:"bytes,2,opt,name=geckoId,proto3" json:"geckoId,omitempty"` BaseDenomId string `protobuf:"bytes,3,opt,name=baseDenomId,proto3" json:"baseDenomId,omitempty"` Prices []*SpotPrice `protobuf:"bytes,4,rep,name=prices,proto3" json:"prices,omitempty"` // contains filtered or unexported fields }
func (*PriceHistory) Descriptor
deprecated
func (*PriceHistory) Descriptor() ([]byte, []int)
Deprecated: Use PriceHistory.ProtoReflect.Descriptor instead.
func (*PriceHistory) GetBaseDenomId ¶
func (x *PriceHistory) GetBaseDenomId() string
func (*PriceHistory) GetGeckoId ¶
func (x *PriceHistory) GetGeckoId() string
func (*PriceHistory) GetPrices ¶
func (x *PriceHistory) GetPrices() []*SpotPrice
func (*PriceHistory) GetTokenName ¶
func (x *PriceHistory) GetTokenName() string
func (*PriceHistory) ProtoMessage ¶
func (*PriceHistory) ProtoMessage()
func (*PriceHistory) ProtoReflect ¶
func (x *PriceHistory) ProtoReflect() protoreflect.Message
func (*PriceHistory) Reset ¶
func (x *PriceHistory) Reset()
func (*PriceHistory) String ¶
func (x *PriceHistory) String() string
type SpotPrice ¶
type SpotPrice struct { Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*SpotPrice) Descriptor
deprecated
func (*SpotPrice) ProtoMessage ¶
func (*SpotPrice) ProtoMessage()
func (*SpotPrice) ProtoReflect ¶
func (x *SpotPrice) ProtoReflect() protoreflect.Message
type Token ¶
type Token struct { GeckoId string `protobuf:"bytes,1,opt,name=geckoId,proto3" json:"geckoId,omitempty"` BaseDenom string `protobuf:"bytes,2,opt,name=baseDenom,proto3" json:"baseDenom,omitempty"` LastPrice uint64 `protobuf:"varint,3,opt,name=lastPrice,proto3" json:"lastPrice,omitempty"` // amounts key is the seconds from the timestamp Amounts map[int64]*AmountEntry `` /* 156-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetAmounts ¶
func (x *Token) GetAmounts() map[int64]*AmountEntry
func (*Token) GetBaseDenom ¶
func (*Token) GetGeckoId ¶
func (*Token) GetLastPrice ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type TokenEntry ¶
type TokenEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *Token `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*TokenEntry) Descriptor
deprecated
func (*TokenEntry) Descriptor() ([]byte, []int)
Deprecated: Use TokenEntry.ProtoReflect.Descriptor instead.
func (*TokenEntry) GetKey ¶
func (x *TokenEntry) GetKey() string
func (*TokenEntry) GetValue ¶
func (x *TokenEntry) GetValue() *Token
func (*TokenEntry) ProtoMessage ¶
func (*TokenEntry) ProtoMessage()
func (*TokenEntry) ProtoReflect ¶
func (x *TokenEntry) ProtoReflect() protoreflect.Message
func (*TokenEntry) Reset ¶
func (x *TokenEntry) Reset()
func (*TokenEntry) String ¶
func (x *TokenEntry) String() string
Click to show internal directories.
Click to hide internal directories.