types

package
v0.0.0-...-850f989 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Chain.ProtoReflect.Descriptor instead.

func (*Chain) GetAddr

func (x *Chain) GetAddr() string

func (*Chain) GetLastUpdated

func (x *Chain) GetLastUpdated() *timestamp.Timestamp

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

func (*Chain) Reset

func (x *Chain) Reset()

func (*Chain) String

func (x *Chain) String() string

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 CreateBlankPortfolio(name string) *Portfolio

func (*Portfolio) AddAccount

func (p *Portfolio) AddAccount(accountName string) error

func (*Portfolio) AddChain

func (p *Portfolio) AddChain(accountName, chainName, address string) error

func (*Portfolio) AddToken

func (p *Portfolio) AddToken(accountName, chainName, tokenName string) error

func (*Portfolio) AddTokenAmount

func (p *Portfolio) AddTokenAmount(accountName, chainName, tokenName string, amount float64) error

func (*Portfolio) ClearAccountHistory

func (p *Portfolio) ClearAccountHistory(accountName string) error

func (*Portfolio) ClearChainHistory

func (p *Portfolio) ClearChainHistory(accountName, chainName string) error

func (*Portfolio) ClearHistory

func (p *Portfolio) ClearHistory()

func (*Portfolio) ClearTokenHistory

func (p *Portfolio) ClearTokenHistory(accountName, chainName, tokenName string) error

func (*Portfolio) Descriptor deprecated

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

Deprecated: Use Portfolio.ProtoReflect.Descriptor instead.

func (*Portfolio) GetAccount

func (p *Portfolio) GetAccount(name string) (*Account, error)

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) GetName

func (x *Portfolio) GetName() string

func (*Portfolio) GetTokenEntry

func (p *Portfolio) GetTokenEntry(accountName, chainName, tokenName string) (*TokenEntry, error)

func (*Portfolio) GetTrackedTokens

func (x *Portfolio) GetTrackedTokens() []*PriceHistory

func (*Portfolio) Println

func (p *Portfolio) Println()

func (*Portfolio) ProtoMessage

func (*Portfolio) ProtoMessage()

func (*Portfolio) ProtoReflect

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

func (*Portfolio) RemoveAccount

func (p *Portfolio) RemoveAccount(accountName string) error

func (*Portfolio) RemoveChain

func (p *Portfolio) RemoveChain(accountName, chainName string) error

func (*Portfolio) RemoveToken

func (p *Portfolio) RemoveToken(accountName, chainName, tokenName string) error

func (*Portfolio) Reset

func (x *Portfolio) Reset()

func (*Portfolio) String

func (x *Portfolio) String() string

func (*Portfolio) UpdateAccountName

func (p *Portfolio) UpdateAccountName(accountName, newName string) error

func (*Portfolio) UpdateTokenGeckoId

func (p *Portfolio) UpdateTokenGeckoId(accountName, chainName, tokenName, geckoId string) error

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) Descriptor() ([]byte, []int)

Deprecated: Use SpotPrice.ProtoReflect.Descriptor instead.

func (*SpotPrice) GetPrice

func (x *SpotPrice) GetPrice() float64

func (*SpotPrice) GetTime

func (x *SpotPrice) GetTime() *timestamp.Timestamp

func (*SpotPrice) ProtoMessage

func (*SpotPrice) ProtoMessage()

func (*SpotPrice) ProtoReflect

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

func (*SpotPrice) Reset

func (x *SpotPrice) Reset()

func (*SpotPrice) String

func (x *SpotPrice) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAmounts

func (x *Token) GetAmounts() map[int64]*AmountEntry

func (*Token) GetBaseDenom

func (x *Token) GetBaseDenom() string

func (*Token) GetGeckoId

func (x *Token) GetGeckoId() string

func (*Token) GetLastPrice

func (x *Token) GetLastPrice() uint64

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

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

Jump to

Keyboard shortcuts

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