Documentation
¶
Index ¶
- type Address
- type DelegationStateBalances
- type DelegationStateStatus
- type Store
- func (s *Store) GetDelegationState(delegate tezos.Address, cycle int64) (*StoredDelegationState, error)
- func (s *Store) GetLastFetchedCycle() (int64, error)
- func (s *Store) IsDelegationStateAvailable(delegate tezos.Address, cycle int64) (bool, error)
- func (s *Store) PruneDelegationState(cycle int64) error
- func (s *Store) Statistics(cycle int64) (*common.CycleStatistics, error)
- func (s *Store) StoreDelegationState(state *StoredDelegationState) error
- type StoredDelegationState
- type TzktDelegator
- type TzktLikeDelegationState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelegationStateBalances ¶
type DelegationStateBalances common.DelegatedBalances
func (*DelegationStateBalances) Scan ¶
func (j *DelegationStateBalances) Scan(src interface{}) error
type DelegationStateStatus ¶
type DelegationStateStatus int
const ( DelegationStateStatusOk DelegationStateStatus = iota DelegationStateStatusMinimumNotAvailable // 1 )
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetDelegationState ¶
func (*Store) GetLastFetchedCycle ¶
func (*Store) IsDelegationStateAvailable ¶
func (*Store) PruneDelegationState ¶
func (*Store) Statistics ¶
func (s *Store) Statistics(cycle int64) (*common.CycleStatistics, error)
func (*Store) StoreDelegationState ¶
func (s *Store) StoreDelegationState(state *StoredDelegationState) error
type StoredDelegationState ¶
type StoredDelegationState struct { Delegate Address `json:"delegate" gorm:"primaryKey"` Cycle int64 `json:"cycle" gorm:"primaryKey"` Status DelegationStateStatus `json:"status"` Balances DelegationStateBalances `json:"balances" gorm:"type:jsonb;default:'{}'"` }
func CreateStoredDelegationStateFromDelegationState ¶
func CreateStoredDelegationStateFromDelegationState(state *common.DelegationState) *StoredDelegationState
func (*StoredDelegationState) ExternalDelegatedBalance ¶
func (s *StoredDelegationState) ExternalDelegatedBalance() common.DelegatorBalances
func (*StoredDelegationState) OwnDelegatedbalance ¶
func (s *StoredDelegationState) OwnDelegatedbalance() common.DelegatorBalances
func (*StoredDelegationState) ToTzktState ¶
func (s *StoredDelegationState) ToTzktState() *TzktLikeDelegationState
type TzktDelegator ¶
type TzktLikeDelegationState ¶
type TzktLikeDelegationState struct { Cycle int64 `json:"cycle"` OwnDelegatedBalance int64 `json:"ownDelegatedBalance"` OwnStakedBalance int64 `json:"ownStakedBalance"` ExternalDelegatedBalance int64 `json:"externalDelegatedBalance"` ExternalStakedBalance int64 `json:"externalStakedBalance"` DelegatorsCount int `json:"delegatorsCount"` Delegators []TzktDelegator `json:"delegators"` }
Click to show internal directories.
Click to hide internal directories.