stake

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(db *pg.DB) *Repository

func (Repository) GetByAddress

func (repository Repository) GetByAddress(address string) []*models.Stake

Get list of stakes by Noah address

func (Repository) GetPaginatedByAddress

func (repository Repository) GetPaginatedByAddress(address string, pagination *tools.Pagination) []models.Stake

Get paginated list of stakes by Noah address

func (Repository) GetPaginatedDelegatorsForValidator

func (repository Repository) GetPaginatedDelegatorsForValidator(pubKey string, pagination *tools.Pagination) []models.Stake

Get paginated list of delegators by validator pubKey

func (Repository) GetPaginatedStakeForCoin

func (repository Repository) GetPaginatedStakeForCoin(coinSymbol string, pagination *tools.Pagination) []models.Stake

Get paginated list of stakes by Noah address

func (Repository) GetStakesForAddress added in v0.2.8

func (repository Repository) GetStakesForAddress(address string) (*[]models.Stake, error)

func (Repository) GetSumInNoahValue

func (repository Repository) GetSumInNoahValue() (string, error)

Get total delegated noah value

func (Repository) GetSumInNoahValueByAddress

func (repository Repository) GetSumInNoahValueByAddress(address string) (string, error)

Get total delegated sum by address

type Resource

type Resource struct {
	Coin      string `json:"coin"`
	Address   string `json:"address"`
	Value     string `json:"value"`
	NoahValue string `json:"noah_value"`
}

func (Resource) Transform

type ResourceDelegatorsForValidator

type ResourceDelegatorsForValidator struct {
	Address   string `json:"address"`
	Symbol    string `json:"symbol"`
	Value     string `json:"value"`
	NoahValue string `json:"noah_value"`
}

func (ResourceDelegatorsForValidator) Transform

type ResourceStakeDelegation

type ResourceStakeDelegation struct {
	Address   string `json:"address"`
	Value     string `json:"value"`
	NoahValue string `json:"noah_value"`
	PublicKey string `json:"public_key"`
}

func (ResourceStakeDelegation) Transform

Jump to

Keyboard shortcuts

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