Documentation ¶
Index ¶
- type Repository
- func (repository Repository) GetByAddress(address string) []*models.Stake
- func (repository Repository) GetPaginatedByAddress(address string, pagination *tools.Pagination) []models.Stake
- func (repository Repository) GetPaginatedDelegatorsForValidator(pubKey string, pagination *tools.Pagination) []models.Stake
- func (repository Repository) GetPaginatedStakeForCoin(coinSymbol string, pagination *tools.Pagination) []models.Stake
- func (repository Repository) GetSumInNoahValue() (string, error)
- func (repository Repository) GetSumInNoahValueByAddress(address string) (string, error)
- type Resource
- type ResourceDelegatorsForValidator
- type ResourceStakeDelegation
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) 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 ¶
func (Resource) Transform(model resource.ItemInterface, params ...resource.ParamInterface) resource.Interface
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 ¶
func (ResourceDelegatorsForValidator) Transform(model resource.ItemInterface, params ...resource.ParamInterface) resource.Interface
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 ¶
func (ResourceStakeDelegation) Transform(model resource.ItemInterface, params ...resource.ParamInterface) resource.Interface
Click to show internal directories.
Click to hide internal directories.