types

package
v0.0.0-...-6dd2e59 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArkeoStats

type ArkeoStats struct {
	ContractsOpen           int64 `db:"open_contracts"`
	ContractsTotal          int64 `db:"total_contracts"`
	ContractsMedianDuration int64 `db:"median_open_contract_length"`
	ContractsMedianRate     int64 `db:"median_open_contract_rate"`
	ProviderCount           int64 `db:"total_online_providers"`
	QueryCount              int64 `db:"total_queries"`
	TotalIncome             int64 `db:"total_paid"`
}

swagger:model ArkeoStats

type BaseContractEvent

type BaseContractEvent struct {
	ProviderPubkey string `mapstructure:"provider"`
	Chain          string `mapstructure:"chain"`
	ClientPubkey   string `mapstructure:"client"`
	DelegatePubkey string `mapstructure:"delegate"` // see BaseContractEvent.GetDelegatePubkey()
	TxID           string `mapstructure:"hash"`
	Height         int64  `mapstructure:"height"`
	EventHeight    int64  `mapstructure:"eventHeight"`
}

func (BaseContractEvent) GetDelegatePubkey

func (b BaseContractEvent) GetDelegatePubkey() string

get the delegate pubkey falling back to client pubkey if undefined

type BondProviderEvent

type BondProviderEvent struct {
	Pubkey       string `mapstructure:"provider"`
	Chain        string `mapstructure:"chain"`
	Height       int64  `mapstructure:"height"`
	TxID         string `mapstructure:"hash"`
	BondRelative string `mapstructure:"bond_rel"`
	BondAbsolute string `mapstructure:"bond_abs"`
}

type ChainStats

type ChainStats struct {
	Chain              string
	ProviderCount      int64
	QueryCount         int64
	QueryCountLastDay  int64
	TotalIncome        int64
	TotalIncomeLastDay int64
}

swagger:model ChainStats

type ClaimContractIncomeEvent

type ClaimContractIncomeEvent struct {
	ContractSettlementEvent `mapstructure:",squash"`
}

type CloseContractEvent

type CloseContractEvent struct {
	ContractSettlementEvent `mapstructure:",squash"`
}

type ContractSettlementEvent

type ContractSettlementEvent struct {
	BaseContractEvent `mapstructure:",squash"`
	Nonce             string `mapstructure:"nonce"`
	Paid              string `mapstructure:"paid"`
	Reserve           string `mapstructure:"reserve"`
}

type ContractType

type ContractType string
var (
	ContractTypePayAsYouGo   ContractType = "PayAsYouGo"
	ContractTypeSubscription ContractType = "Subscription"
)

type Coordinates

type Coordinates struct {
	Latitude  float64
	Longitude float64
}

type ModProviderEvent

type ModProviderEvent struct {
	Pubkey              string         `mapstructure:"pubkey"` // TODO provider
	Chain               string         `mapstructure:"chain"`
	Height              int64          `mapstructure:"height"`
	TxID                string         `mapstructure:"hash"`
	MetadataURI         string         `mapstructure:"metadata_uri"`
	MetadataNonce       uint64         `mapstructure:"metadata_nonce"`
	Status              ProviderStatus `mapstructure:"status"`
	MinContractDuration int64          `mapstructure:"min_contract_duration"`
	MaxContractDuration int64          `mapstructure:"max_contract_duration"`
	SubscriptionRate    int64          `mapstructure:"subscription_rate"`
	PayAsYouGoRate      int64          `mapstructure:"pay-as-you-go_rate"`
}

type OpenContractEvent

type OpenContractEvent struct {
	BaseContractEvent `mapstructure:",squash"`
	Duration          int64        `mapstructure:"duration"`
	ContractType      ContractType `mapstructure:"type"`
	Rate              int64        `mapstructure:"rate"`
	OpenCost          int64        `mapstructure:"open_cost"`
}

type ProviderSearchParams

type ProviderSearchParams struct {
	Pubkey                     string
	Chain                      string
	SortKey                    ProviderSortKey
	MaxDistance                int64
	IsMaxDistanceSet           bool
	Coordinates                Coordinates
	MinValidatorPayments       int64
	IsMinValidatorPaymentsSet  bool
	MinProviderAge             int64
	IsMinProviderAgeSet        bool
	MinFreeRateLimit           int64
	IsMinFreeRateLimitSet      bool
	MinPaygoRateLimit          int64
	IsMinPaygoRateLimitSet     bool
	MinSubscribeRateLimit      int64
	IsMinSubscribeRateLimitSet bool
	MinOpenContracts           int64
	IsMinOpenContractsSet      bool
}

type ProviderSortKey

type ProviderSortKey string
var (
	ProviderSortKeyNone          ProviderSortKey = ""
	ProviderSortKeyAge           ProviderSortKey = "age"
	ProviderSortKeyContractCount ProviderSortKey = "contract_count"
	ProviderSortKeyAmountPaid    ProviderSortKey = "amount_paid"
)

type ProviderStatus

type ProviderStatus string
var (
	ProviderStatusOnline  ProviderStatus = "Online"
	ProviderStatusOffline ProviderStatus = "Offline"
)

type ValidatorPayoutEvent

type ValidatorPayoutEvent struct {
	Validator string `mapstructure:"validator"`
	Height    int64  `mapstructure:"height"`
	TxID      string `mapstructure:"hash"`
	Paid      int64  `mapstructure:"paid"`
}

Jump to

Keyboard shortcuts

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