Documentation
¶
Index ¶
- func MarketCapLayout() *mmapforge.RecordLayout
- type MarketCap
- type MarketCapRecord
- type MarketCapStore
- func (s *MarketCapStore) Get(idx int) (*MarketCapRecord, error)
- func (s *MarketCapStore) GetID(idx int) (uint64, error)
- func (s *MarketCapStore) GetMarketCap(idx int) (float64, error)
- func (s *MarketCapStore) GetPrice(idx int) (float64, error)
- func (s *MarketCapStore) GetStale(idx int) (bool, error)
- func (s *MarketCapStore) GetVolume(idx int) (float64, error)
- func (s *MarketCapStore) Set(idx int, rec *MarketCapRecord) error
- func (s *MarketCapStore) SetID(idx int, val uint64) error
- func (s *MarketCapStore) SetMarketCap(idx int, val float64) error
- func (s *MarketCapStore) SetPrice(idx int, val float64) error
- func (s *MarketCapStore) SetStale(idx int, val bool) error
- func (s *MarketCapStore) SetVolume(idx int, val float64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarketCapLayout ¶
func MarketCapLayout() *mmapforge.RecordLayout
MarketCapLayout returns the record layout for MarketCap. Fields are validated at code-generation time; ComputeLayout cannot fail here.
Types ¶
type MarketCap ¶
type MarketCap struct {
ID uint64 `mmap:"id"`
Price float64 `mmap:"price"`
Volume float64 `mmap:"volume"`
MarketCap float64 `mmap:"market_cap"`
Stale bool `mmap:"stale"`
}
mmapforge:schema version=1
type MarketCapRecord ¶
MarketCapRecord holds all fields of a MarketCap record.
type MarketCapStore ¶
MarketCapStore is the typed store for MarketCap records.
func NewMarketCapStore ¶
func NewMarketCapStore(path string) (*MarketCapStore, error)
NewMarketCapStore creates a new MarketCap store at the given path.
func OpenMarketCapStore ¶
func OpenMarketCapStore(path string) (*MarketCapStore, error)
OpenMarketCapStore opens an existing MarketCap store at the given path.
func (*MarketCapStore) Get ¶
func (s *MarketCapStore) Get(idx int) (*MarketCapRecord, error)
Get reads all fields atomically for the record at idx.
func (*MarketCapStore) GetID ¶
func (s *MarketCapStore) GetID(idx int) (uint64, error)
GetID returns the ID field for the record at idx.
func (*MarketCapStore) GetMarketCap ¶
func (s *MarketCapStore) GetMarketCap(idx int) (float64, error)
GetMarketCap returns the MarketCap field for the record at idx.
func (*MarketCapStore) GetPrice ¶
func (s *MarketCapStore) GetPrice(idx int) (float64, error)
GetPrice returns the Price field for the record at idx.
func (*MarketCapStore) GetStale ¶
func (s *MarketCapStore) GetStale(idx int) (bool, error)
GetStale returns the Stale field for the record at idx.
func (*MarketCapStore) GetVolume ¶
func (s *MarketCapStore) GetVolume(idx int) (float64, error)
GetVolume returns the Volume field for the record at idx.
func (*MarketCapStore) Set ¶
func (s *MarketCapStore) Set(idx int, rec *MarketCapRecord) error
Set writes all fields atomically for the record at idx.
func (*MarketCapStore) SetID ¶
func (s *MarketCapStore) SetID(idx int, val uint64) error
SetID sets the ID field for the record at idx.
func (*MarketCapStore) SetMarketCap ¶
func (s *MarketCapStore) SetMarketCap(idx int, val float64) error
SetMarketCap sets the MarketCap field for the record at idx.
func (*MarketCapStore) SetPrice ¶
func (s *MarketCapStore) SetPrice(idx int, val float64) error
SetPrice sets the Price field for the record at idx.