Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysteriumAPI ¶
type MysteriumAPI struct {
// contains filtered or unexported fields
}
MysteriumAPI provides access to Mysterium owned central discovery service.
func NewClient ¶
func NewClient(httpClient *requests.HTTPClient, discoveryAPIAddress string) *MysteriumAPI
NewClient creates a Discovery client.
func (*MysteriumAPI) GetPricing ¶
func (mApi *MysteriumAPI) GetPricing() (market.LatestPrices, error)
GetPricing gets the pricing from discovery.
func (*MysteriumAPI) QueryCountries ¶
func (mApi *MysteriumAPI) QueryCountries(query ProposalsQuery) (map[string]int, error)
QueryCountries returns active service proposals number per country.
func (*MysteriumAPI) QueryProposals ¶
func (mApi *MysteriumAPI) QueryProposals(query ProposalsQuery) ([]market.ServiceProposal, error)
QueryProposals returns active service proposals.
type ProposalsQuery ¶
type ProposalsQuery struct { ProviderID string ProviderIDs []string ServiceType string LocationCountry string CompatibilityMin, CompatibilityMax int AccessPolicy, AccessPolicySource string IPType string NATCompatibility nat.NATType BandwidthMin float64 QualityMin float32 IncludeMonitoringFailed bool PresetID int }
ProposalsQuery represents URL query for proposal listing
func (ProposalsQuery) ToURLValues ¶
func (q ProposalsQuery) ToURLValues() url.Values
ToURLValues converts the query to url.Values.
Click to show internal directories.
Click to hide internal directories.