services

package
v0.0.0-...-e01acf0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMC

type CMC interface {
	GetCurrencies() (currencies []cmc.Currency, err error)
}

type Node

type Node interface {
	GetCommunityPoolAmount() (amount decimal.Decimal, err error)
	GetValidators() (items []node.Validator, err error)
	GetInflation() (amount decimal.Decimal, err error)
	GetTotalSupply() (amount decimal.Decimal, err error)
	GetStakingPool() (sp node.StakingPool, err error)
	GetBalance(address string) (amount decimal.Decimal, err error)
	GetStake(address string) (amount decimal.Decimal, err error)
	GetUnbonding(address string) (amount decimal.Decimal, err error)
	GetProposals() (proposals node.ProposalsResult, err error)
	GetDelegatorValidatorStake(delegator string, validator string) (amount decimal.Decimal, err error)
	ProposalTallyResult(id uint64) (result node.ProposalTallyResult, err error)
}

type ServiceFacade

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

func (*ServiceFacade) GetAggBlocksCount

func (s *ServiceFacade) GetAggBlocksCount(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggBlocksDelay

func (s *ServiceFacade) GetAggBlocksDelay(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggBondedRatio

func (s *ServiceFacade) GetAggBondedRatio(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggDelegationsVolume

func (s *ServiceFacade) GetAggDelegationsVolume(filter filters.DelegationsAgg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggOperationsCount

func (s *ServiceFacade) GetAggOperationsCount(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggTransactionsFee

func (s *ServiceFacade) GetAggTransactionsFee(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggTransfersVolume

func (s *ServiceFacade) GetAggTransfersVolume(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggUnbondingVolume

func (s *ServiceFacade) GetAggUnbondingVolume(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggUndelegationsVolume

func (s *ServiceFacade) GetAggUndelegationsVolume(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggUniqBlockValidators

func (s *ServiceFacade) GetAggUniqBlockValidators(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggValidators33Power

func (s *ServiceFacade) GetAggValidators33Power(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAggWhaleAccounts

func (s *ServiceFacade) GetAggWhaleAccounts(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetAvgOperationsPerBlock

func (s *ServiceFacade) GetAvgOperationsPerBlock(filter filters.Agg) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetFeeRanges

func (s *ServiceFacade) GetFeeRanges() (items []smodels.FeeRange, err error)

func (*ServiceFacade) GetHistoricalState

func (s *ServiceFacade) GetHistoricalState() (state smodels.HistoricalState, err error)

func (*ServiceFacade) GetMetaData

func (s *ServiceFacade) GetMetaData() (meta smodels.MetaData, err error)

func (*ServiceFacade) GetMostJailedValidators

func (s *ServiceFacade) GetMostJailedValidators() (items []dmodels.ValidatorValue, err error)

func (*ServiceFacade) GetNetworkStates

func (s *ServiceFacade) GetNetworkStates(filter filters.Stats) (map[string][]decimal.Decimal, error)

func (*ServiceFacade) GetProposalDeposits

func (s *ServiceFacade) GetProposalDeposits(filter filters.ProposalDeposits) (deposits []dmodels.ProposalDeposit, err error)

func (*ServiceFacade) GetProposalVotes

func (s *ServiceFacade) GetProposalVotes(filter filters.ProposalVotes) (items []smodels.ProposalVote, err error)

func (*ServiceFacade) GetProposals

func (s *ServiceFacade) GetProposals(filter filters.Proposals) (proposals []dmodels.Proposal, err error)

func (*ServiceFacade) GetProposalsChartData

func (s *ServiceFacade) GetProposalsChartData() (items []smodels.ProposalChartData, err error)

func (*ServiceFacade) GetSizeOfNode

func (s *ServiceFacade) GetSizeOfNode() (size float64, err error)

func (*ServiceFacade) GetStakingPie

func (s *ServiceFacade) GetStakingPie() (pie smodels.Pie, err error)

func (*ServiceFacade) GetTopProposedBlocksValidators

func (s *ServiceFacade) GetTopProposedBlocksValidators() (items []dmodels.ValidatorValue, err error)

func (*ServiceFacade) GetValidator

func (s *ServiceFacade) GetValidator(address string) (validator smodels.Validator, err error)

func (*ServiceFacade) GetValidatorBalance

func (s *ServiceFacade) GetValidatorBalance(valAddress string) (balance smodels.Balance, err error)

func (*ServiceFacade) GetValidatorBlocksStat

func (s *ServiceFacade) GetValidatorBlocksStat(validatorAddress string) (stat smodels.ValidatorBlocksStat, err error)

func (*ServiceFacade) GetValidatorDelegationsAgg

func (s *ServiceFacade) GetValidatorDelegationsAgg(validatorAddress string) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetValidatorDelegators

func (s *ServiceFacade) GetValidatorDelegators(filter filters.ValidatorDelegators) (resp smodels.PaginatableResponse, err error)

func (*ServiceFacade) GetValidatorDelegatorsAgg

func (s *ServiceFacade) GetValidatorDelegatorsAgg(validatorAddress string) (items []smodels.AggItem, err error)

func (*ServiceFacade) GetValidatorMap

func (s *ServiceFacade) GetValidatorMap() (map[string]node.Validator, error)

func (*ServiceFacade) GetValidators

func (s *ServiceFacade) GetValidators() (validators []smodels.Validator, err error)

func (*ServiceFacade) GetValidatorsDelegatorsTotal

func (s *ServiceFacade) GetValidatorsDelegatorsTotal() (values []dmodels.ValidatorValue, err error)

func (ServiceFacade) KeepHistoricalState

func (s ServiceFacade) KeepHistoricalState()

func (*ServiceFacade) MakeStats

func (s *ServiceFacade) MakeStats()

func (*ServiceFacade) MakeUpdateBalances

func (s *ServiceFacade) MakeUpdateBalances()

func (ServiceFacade) Test

func (s ServiceFacade) Test() (state dmodels.HistoricalState, err error)

func (*ServiceFacade) UpdateProposals

func (s *ServiceFacade) UpdateProposals()

func (*ServiceFacade) UpdateValidators

func (s *ServiceFacade) UpdateValidators()

func (*ServiceFacade) UpdateValidatorsMap

func (s *ServiceFacade) UpdateValidatorsMap()

type Services

type Services interface {
	KeepHistoricalState()
	UpdateValidatorsMap()
	GetValidatorMap() (map[string]node.Validator, error)
	GetMetaData() (meta smodels.MetaData, err error)
	GetAggTransactionsFee(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggOperationsCount(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggTransfersVolume(filter filters.Agg) (items []smodels.AggItem, err error)
	GetHistoricalState() (state smodels.HistoricalState, err error)
	GetAggBlocksCount(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggBlocksDelay(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggUniqBlockValidators(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggDelegationsVolume(filter filters.DelegationsAgg) (items []smodels.AggItem, err error)
	GetAggUndelegationsVolume(filter filters.Agg) (items []smodels.AggItem, err error)
	GetNetworkStates(filter filters.Stats) (map[string][]decimal.Decimal, error)
	GetStakingPie() (pie smodels.Pie, err error)
	MakeUpdateBalances()
	GetSizeOfNode() (size float64, err error)
	MakeStats()
	UpdateProposals()
	GetProposals(filter filters.Proposals) (proposals []dmodels.Proposal, err error)
	GetProposalVotes(filter filters.ProposalVotes) (items []smodels.ProposalVote, err error)
	GetProposalDeposits(filter filters.ProposalDeposits) (deposits []dmodels.ProposalDeposit, err error)
	GetProposalsChartData() (items []smodels.ProposalChartData, err error)
	GetAggValidators33Power(filter filters.Agg) (items []smodels.AggItem, err error)
	GetValidators() (validators []smodels.Validator, err error)
	UpdateValidators()
	GetAvgOperationsPerBlock(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggWhaleAccounts(filter filters.Agg) (items []smodels.AggItem, err error)
	GetTopProposedBlocksValidators() (items []dmodels.ValidatorValue, err error)
	GetMostJailedValidators() (items []dmodels.ValidatorValue, err error)
	GetFeeRanges() (items []smodels.FeeRange, err error)
	GetValidatorsDelegatorsTotal() (values []dmodels.ValidatorValue, err error)
	GetValidator(address string) (validator smodels.Validator, err error)
	GetValidatorBalance(valAddress string) (balance smodels.Balance, err error)
	GetValidatorDelegationsAgg(validatorAddress string) (items []smodels.AggItem, err error)
	GetValidatorDelegatorsAgg(validatorAddress string) (items []smodels.AggItem, err error)
	GetValidatorBlocksStat(validatorAddress string) (stat smodels.ValidatorBlocksStat, err error)
	GetValidatorDelegators(filter filters.ValidatorDelegators) (resp smodels.PaginatableResponse, err error)
	GetAggBondedRatio(filter filters.Agg) (items []smodels.AggItem, err error)
	GetAggUnbondingVolume(filter filters.Agg) (items []smodels.AggItem, err error)
	Test() (state dmodels.HistoricalState, err error)
}

func NewServices

func NewServices(d dao.DAO, cfg config.Config) (svc Services, err error)

Directories

Path Synopsis
parser

Jump to

Keyboard shortcuts

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