Documentation ¶
Index ¶
- func AddEntertainmentRoutes(estimator estimator) func(*gin.Engine) error
- func AddRouteForStop(stop ApplicationStopper) func(*gin.Engine) error
- func AddRoutesForAccessPolicies(httpClient *requests.HTTPClient, accessPolicyEndpointURL string) func(*gin.Engine) error
- func AddRoutesForAffiliator(affiliator Affiliator) func(*gin.Engine) error
- func AddRoutesForAuthentication(auth authenticator, jwtAuth jwtAuthenticator, ssoMystnodes *sso.Mystnodes) func(*gin.Engine) error
- func AddRoutesForConfig(e *gin.Engine) error
- func AddRoutesForConnection(manager connection.MultiManager, stateProvider stateProvider, ...) func(*gin.Engine) error
- func AddRoutesForConnectionLocation(ipResolver ip.Resolver, locationResolver location.Resolver, ...) func(*gin.Engine) error
- func AddRoutesForConnectivityStatus(statusStorage connectivity.StatusStorage) func(*gin.Engine) error
- func AddRoutesForCurrencyExchange(mystex mystexchange) func(*gin.Engine) error
- func AddRoutesForDocs(c *gin.Engine) error
- func AddRoutesForFeedback(reporter *feedback.Reporter) func(*gin.Engine) error
- func AddRoutesForIdentities(idm identity.Manager, selector identity_selector.Handler, ...) func(*gin.Engine) error
- func AddRoutesForMMN(mmn *mmn.MMN, ssoMystnodes *sso.Mystnodes, authenticator authenticator) func(*gin.Engine) error
- func AddRoutesForNAT(stateProvider stateProvider, natProber natProber) func(*gin.Engine) error
- func AddRoutesForNode(nodeStatusProvider nodeStatusProvider, nodeMonitoringAgent nodeMonitoringAgent) func(*gin.Engine) error
- func AddRoutesForNodeUI(versionManager *versionmanager.VersionManager) func(*gin.Engine) error
- func AddRoutesForPProf(e *gin.Engine)
- func AddRoutesForPilvytis(pilvytis api, pt paymentsIssuer, lf paymentLocationFallback) func(*gin.Engine) error
- func AddRoutesForProposals(proposalRepository proposalRepository, pricer priceAPI, ...) func(*gin.Engine) error
- func AddRoutesForSSE(e *gin.Engine, stateProvider stateProvider, bus eventbus.EventBus) error
- func AddRoutesForService(serviceManager ServiceManager, ...) func(*gin.Engine) error
- func AddRoutesForSessions(sessionStorage sessionStorage) func(*gin.Engine) error
- func AddRoutesForTerms(e *gin.Engine) error
- func AddRoutesForTransactor(identityRegistry identityRegistry, transactor Transactor, ...) func(*gin.Engine) error
- func AddRoutesForValidator(e *gin.Engine) error
- func HealthCheckEndpointFactory(currentTimeFunc func() time.Time, procID func() int) *healthCheckEndpoint
- func NewAccessPoliciesEndpoint(httpClient *requests.HTTPClient, accessPolicyEndpointURL string) *accessPoliciesEndpoint
- func NewAffiliatorEndpoint(affiliator Affiliator) *affiliatorEndpoint
- func NewExchangeEndpoint(mystex mystexchange) *exchangeEndpoint
- func NewPilvytisEndpoint(pil api, pt paymentsIssuer, lf paymentLocationFallback) *pilvytisEndpoint
- func NewProposalsEndpoint(proposalRepository proposalRepository, pricer priceAPI, ...) *proposalsEndpoint
- func NewSessionsEndpoint(sessionStorage sessionStorage) *sessionsEndpoint
- func NewTransactorEndpoint(transactor Transactor, identityRegistry identityRegistry, ...) *transactorEndpoint
- type AddressProvider
- type Affiliator
- type ApplicationStopper
- type ConnectionEndpoint
- type ConnectionLocationEndpoint
- func (le *ConnectionLocationEndpoint) GetConnectionIP(c *gin.Context)
- func (le *ConnectionLocationEndpoint) GetConnectionLocation(c *gin.Context)
- func (le *ConnectionLocationEndpoint) GetOriginLocation(c *gin.Context)
- func (le *ConnectionLocationEndpoint) GetProxyIP(c *gin.Context)
- func (le *ConnectionLocationEndpoint) GetProxyLocation(c *gin.Context)
- type DocsEndpoint
- type EligibilityResponse
- type Event
- type EventType
- type Handler
- type NATEndpoint
- type NodeEndpoint
- func (ne *NodeEndpoint) GetLatestRelease(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderActivityStats(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderConsumersCount(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderEarningsSeries(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderQuality(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderServiceEarnings(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderSessions(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderSessionsCount(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderSessionsSeries(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderTransferredData(c *gin.Context)
- func (ne *NodeEndpoint) GetProviderTransferredDataSeries(c *gin.Context)
- func (ne *NodeEndpoint) MonitoringAgentStatuses(c *gin.Context)
- func (ne *NodeEndpoint) NodeStatus(c *gin.Context)
- type NodeUIEndpoints
- func (n *NodeUIEndpoints) Download(c *gin.Context)
- func (n *NodeUIEndpoints) DownloadStatus(c *gin.Context)
- func (n *NodeUIEndpoints) LocalVersions(c *gin.Context)
- func (n *NodeUIEndpoints) RemoteVersions(c *gin.Context)
- func (n *NodeUIEndpoints) SwitchVersion(c *gin.Context)
- func (n *NodeUIEndpoints) UI(c *gin.Context)
- type ProposalGetter
- type QualityFinder
- type ReportIssueGithubResponse
- type SSEHandler
- type ServiceEndpoint
- type ServiceManager
- type Transactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntertainmentRoutes ¶
AddEntertainmentRoutes registers routes for entertainment.
func AddRouteForStop ¶
func AddRouteForStop(stop ApplicationStopper) func(*gin.Engine) error
AddRouteForStop adds stop route to given router
func AddRoutesForAccessPolicies ¶
func AddRoutesForAccessPolicies( httpClient *requests.HTTPClient, accessPolicyEndpointURL string, ) func(*gin.Engine) error
AddRoutesForAccessPolicies attaches access policies endpoints to router
func AddRoutesForAffiliator ¶
func AddRoutesForAffiliator(affiliator Affiliator) func(*gin.Engine) error
AddRoutesForAffiliator attaches Affiliator endpoints to router
func AddRoutesForAuthentication ¶
func AddRoutesForAuthentication(auth authenticator, jwtAuth jwtAuthenticator, ssoMystnodes *sso.Mystnodes) func(*gin.Engine) error
AddRoutesForAuthentication registers /auth endpoints in Tequilapi
func AddRoutesForConfig ¶
AddRoutesForConfig registers /config endpoints in Tequilapi
func AddRoutesForConnection ¶
func AddRoutesForConnection( manager connection.MultiManager, stateProvider stateProvider, proposalRepository proposalRepository, identityRegistry identityRegistry, publisher eventbus.Publisher, addressProvider addressProvider, ) func(*gin.Engine) error
AddRoutesForConnection adds connections routes to given router
func AddRoutesForConnectionLocation ¶
func AddRoutesForConnectionLocation( ipResolver ip.Resolver, locationResolver location.Resolver, locationOriginResolver location.OriginResolver, ) func(*gin.Engine) error
AddRoutesForConnectionLocation adds connection location routes to given router
func AddRoutesForConnectivityStatus ¶
func AddRoutesForConnectivityStatus(statusStorage connectivity.StatusStorage) func(*gin.Engine) error
AddRoutesForConnectivityStatus attaches connectivity statuses endpoints to router.
func AddRoutesForCurrencyExchange ¶
AddRoutesForCurrencyExchange attaches exchange endpoints to router.
func AddRoutesForDocs ¶
AddRoutesForDocs attaches documentation endpoints to router.
func AddRoutesForFeedback ¶
AddRoutesForFeedback registers feedback routes
func AddRoutesForIdentities ¶
func AddRoutesForIdentities( idm identity.Manager, selector identity_selector.Handler, registry registry.IdentityRegistry, balanceProvider balanceProvider, addressProvider *client.MultiChainAddressProvider, earningsProvider earningsProvider, bc providerChannel, transactor Transactor, bprovider beneficiaryProvider, mover identityMover, addressStorage beneficiary.BeneficiaryStorage, hermesMigrator *migration.HermesMigrator, ) func(*gin.Engine) error
AddRoutesForIdentities creates /identities endpoint on tequilapi service
func AddRoutesForMMN ¶
func AddRoutesForMMN( mmn *mmn.MMN, ssoMystnodes *sso.Mystnodes, authenticator authenticator, ) func(*gin.Engine) error
AddRoutesForMMN registers /mmn endpoints in Tequilapi
func AddRoutesForNAT ¶
AddRoutesForNAT adds nat routes to given router
func AddRoutesForNode ¶
func AddRoutesForNode(nodeStatusProvider nodeStatusProvider, nodeMonitoringAgent nodeMonitoringAgent) func(*gin.Engine) error
AddRoutesForNode adds nat routes to given router
func AddRoutesForNodeUI ¶
func AddRoutesForNodeUI(versionManager *versionmanager.VersionManager) func(*gin.Engine) error
AddRoutesForNodeUI provides controls for nodeUI management via tequilapi
func AddRoutesForPProf ¶
AddRoutesForPProf adds pprof http handlers to given router
func AddRoutesForPilvytis ¶
func AddRoutesForPilvytis(pilvytis api, pt paymentsIssuer, lf paymentLocationFallback) func(*gin.Engine) error
AddRoutesForPilvytis adds the pilvytis routers to the given router.
func AddRoutesForProposals ¶
func AddRoutesForProposals( proposalRepository proposalRepository, pricer priceAPI, locationResolver location.Resolver, filterPresetRepository proposal.FilterPresetRepository, natProber natProber, ) func(*gin.Engine) error
AddRoutesForProposals attaches proposals endpoints to router
func AddRoutesForSSE ¶
AddRoutesForSSE adds route for sse
func AddRoutesForService ¶
func AddRoutesForService( serviceManager ServiceManager, optionsParser map[string]services.ServiceOptionsParser, proposalRepository proposalRepository, tequilaApiClient *tequilapi_client.Client, ) func(*gin.Engine) error
AddRoutesForService adds service routes to given router
func AddRoutesForSessions ¶
AddRoutesForSessions attaches sessions endpoints to router
func AddRoutesForTerms ¶
AddRoutesForTerms registers /terms endpoints in Tequilapi
func AddRoutesForTransactor ¶
func AddRoutesForTransactor( identityRegistry identityRegistry, transactor Transactor, affiliator Affiliator, promiseSettler promiseSettler, settlementHistoryProvider settlementHistoryProvider, addressProvider addressProvider, bprovider beneficiaryProvider, bhandler beneficiarySaver, pilvytis pilvytisApi, ) func(*gin.Engine) error
AddRoutesForTransactor attaches Transactor endpoints to router
func AddRoutesForValidator ¶
AddRoutesForValidator register /validation endpoint
func HealthCheckEndpointFactory ¶
func HealthCheckEndpointFactory(currentTimeFunc func() time.Time, procID func() int) *healthCheckEndpoint
HealthCheckEndpointFactory creates a structure with single HealthCheck method for healthcheck serving as http, currentTimeFunc is injected for easier testing
func NewAccessPoliciesEndpoint ¶
func NewAccessPoliciesEndpoint(httpClient *requests.HTTPClient, accessPolicyEndpointURL string) *accessPoliciesEndpoint
NewAccessPoliciesEndpoint creates and returns access policies endpoint
func NewAffiliatorEndpoint ¶
func NewAffiliatorEndpoint(affiliator Affiliator) *affiliatorEndpoint
NewAffiliatorEndpoint creates and returns affiliator endpoint
func NewExchangeEndpoint ¶
func NewExchangeEndpoint(mystex mystexchange) *exchangeEndpoint
NewExchangeEndpoint returns a new exchange endpoint
func NewPilvytisEndpoint ¶
func NewPilvytisEndpoint(pil api, pt paymentsIssuer, lf paymentLocationFallback) *pilvytisEndpoint
NewPilvytisEndpoint returns pilvytis endpoints.
func NewProposalsEndpoint ¶
func NewProposalsEndpoint(proposalRepository proposalRepository, pricer priceAPI, locationResolver location.Resolver, filterPresetRepository proposal.FilterPresetRepository, natProber natProber) *proposalsEndpoint
NewProposalsEndpoint creates and returns proposal creation endpoint
func NewSessionsEndpoint ¶
func NewSessionsEndpoint(sessionStorage sessionStorage) *sessionsEndpoint
NewSessionsEndpoint creates and returns sessions endpoint
func NewTransactorEndpoint ¶
func NewTransactorEndpoint( transactor Transactor, identityRegistry identityRegistry, promiseSettler promiseSettler, settlementHistoryProvider settlementHistoryProvider, addressProvider addressProvider, bprovider beneficiaryProvider, bhandler beneficiarySaver, pilvytis pilvytisApi, ) *transactorEndpoint
NewTransactorEndpoint creates and returns transactor endpoint
Types ¶
type AddressProvider ¶
type AddressProvider interface { GetActiveHermes(chainID int64) (common.Address, error) GetActiveChannelAddress(chainID int64, id common.Address) (common.Address, error) GetKnownHermeses(chainID int64) ([]common.Address, error) GetHermesChannelAddress(chainID int64, id, hermesAddr common.Address) (common.Address, error) }
AddressProvider provides sc addresses.
type Affiliator ¶
Affiliator represents interface to affiliator service
type ApplicationStopper ¶
type ApplicationStopper func()
ApplicationStopper stops application and performs required cleanup tasks
type ConnectionEndpoint ¶
type ConnectionEndpoint struct {
// contains filtered or unexported fields
}
ConnectionEndpoint struct represents /connection resource and it's subresources
func NewConnectionEndpoint ¶
func NewConnectionEndpoint(manager connection.MultiManager, stateProvider stateProvider, proposalRepository proposalRepository, identityRegistry identityRegistry, publisher eventbus.Publisher, addressProvider addressProvider) *ConnectionEndpoint
NewConnectionEndpoint creates and returns connection endpoint
func (*ConnectionEndpoint) Create ¶
func (ce *ConnectionEndpoint) Create(c *gin.Context)
Create starts new connection swagger:operation PUT /connection Connection connectionCreate
--- summary: Starts new connection description: Consumer opens connection to provider parameters: - in: body name: body description: Parameters in body (consumer_id, provider_id, service_type) required for creating new connection schema: $ref: "#/definitions/ConnectionCreateRequestDTO" responses: 201: description: Connection started schema: "$ref": "#/definitions/ConnectionInfoDTO" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 422: description: Unable to process the request at this point schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*ConnectionEndpoint) GetStatistics ¶
func (ce *ConnectionEndpoint) GetStatistics(c *gin.Context)
GetStatistics returns statistics about current connection swagger:operation GET /connection/statistics Connection connectionStatistics
--- summary: Returns connection statistics description: Returns statistics about current connection responses: 200: description: Connection statistics schema: "$ref": "#/definitions/ConnectionStatisticsDTO"
func (*ConnectionEndpoint) GetTraffic ¶
func (ce *ConnectionEndpoint) GetTraffic(c *gin.Context)
GetTraffic returns traffic information about requested connection swagger:operation GET /connection/traffic Connection connectionTraffic
--- summary: Returns connection traffic information description: Returns traffic information about requested connection responses: 200: description: Connection traffic schema: "$ref": "#/definitions/ConnectionTrafficDTO" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError"
func (*ConnectionEndpoint) Kill ¶
func (ce *ConnectionEndpoint) Kill(c *gin.Context)
Kill stops connection swagger:operation DELETE /connection Connection connectionCancel
--- summary: Stops connection description: Stops current connection responses: 202: description: Connection stopped 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 422: description: Unable to process the request at this point (e.g. no active connection exists) schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*ConnectionEndpoint) Status ¶
func (ce *ConnectionEndpoint) Status(c *gin.Context)
Status returns status of connection swagger:operation GET /connection Connection connectionStatus
--- summary: Returns connection status description: Returns status of current connection responses: 200: description: Status schema: "$ref": "#/definitions/ConnectionInfoDTO" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
type ConnectionLocationEndpoint ¶
type ConnectionLocationEndpoint struct {
// contains filtered or unexported fields
}
ConnectionLocationEndpoint struct represents /connection/location resource and it's subresources.
func NewConnectionLocationEndpoint ¶
func NewConnectionLocationEndpoint( ipResolver ip.Resolver, locationResolver location.Resolver, locationOriginResolver location.OriginResolver, ) *ConnectionLocationEndpoint
NewConnectionLocationEndpoint creates and returns connection location endpoint.
func (*ConnectionLocationEndpoint) GetConnectionIP ¶
func (le *ConnectionLocationEndpoint) GetConnectionIP(c *gin.Context)
GetConnectionIP responds with current ip, using its ip resolver swagger:operation GET /connection/ip Connection getConnectionIP
--- summary: Returns IP address description: Returns current public IP address responses: 200: description: Public IP address schema: "$ref": "#/definitions/IPDTO" 503: description: Service unavailable schema: "$ref": "#/definitions/APIError"
func (*ConnectionLocationEndpoint) GetConnectionLocation ¶
func (le *ConnectionLocationEndpoint) GetConnectionLocation(c *gin.Context)
GetConnectionLocation responds with current connection location swagger:operation GET /connection/location Connection getConnectionLocation
--- summary: Returns connection location description: Returns connection locations responses: 200: description: Connection locations schema: "$ref": "#/definitions/LocationDTO" 503: description: Service unavailable schema: "$ref": "#/definitions/APIError"
func (*ConnectionLocationEndpoint) GetOriginLocation ¶
func (le *ConnectionLocationEndpoint) GetOriginLocation(c *gin.Context)
GetOriginLocation responds with original locations swagger:operation GET /location Location getOriginLocation
--- summary: Returns original location description: Returns original locations responses: 200: description: Original locations schema: "$ref": "#/definitions/LocationDTO"
func (*ConnectionLocationEndpoint) GetProxyIP ¶
func (le *ConnectionLocationEndpoint) GetProxyIP(c *gin.Context)
GetProxyIP responds with proxy ip, using its ip resolver swagger:operation GET /connection/proxy/ip Connection getProxyIP
--- summary: Returns IP address description: Returns proxy public IP address responses: 200: description: Public IP address schema: "$ref": "#/definitions/IPDTO" 503: description: Service unavailable schema: "$ref": "#/definitions/APIError"
func (*ConnectionLocationEndpoint) GetProxyLocation ¶
func (le *ConnectionLocationEndpoint) GetProxyLocation(c *gin.Context)
GetProxyLocation responds with proxy connection location swagger:operation GET /connection/proxy/location Connection getProxyLocation
--- summary: Returns proxy connection location description: Returns proxy connection locations responses: 200: description: Proxy connection locations schema: "$ref": "#/definitions/LocationDTO" 503: description: Service unavailable schema: "$ref": "#/definitions/APIError"
type DocsEndpoint ¶
type DocsEndpoint struct{}
DocsEndpoint serves API documentation.
func NewDocsEndpoint ¶
func NewDocsEndpoint() *DocsEndpoint
NewDocsEndpoint creates and returns documentation endpoint.
func (*DocsEndpoint) Index ¶
func (se *DocsEndpoint) Index(c *gin.Context)
Index redirects root route to swagger docs.
type EligibilityResponse ¶
type EligibilityResponse struct {
Eligible bool `json:"eligible"`
}
EligibilityResponse represents the eligibility response swagger:model EligibilityResponse
type Event ¶
type Event struct { Payload interface{} `json:"payload"` Type EventType `json:"type"` }
Event represents an event we're gonna send
type EventType ¶
type EventType string
EventType represents all the event types we're subscribing to
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler represents an sse handler
func NewSSEHandler ¶
func NewSSEHandler(stateProvider stateProvider) *Handler
NewSSEHandler returns a new instance of handler
func (*Handler) ConsumeNodeEvent ¶
ConsumeNodeEvent consumes the node state event
func (*Handler) ConsumeStateEvent ¶
func (h *Handler) ConsumeStateEvent(event stateEvent.State)
ConsumeStateEvent consumes the state change event
type NATEndpoint ¶
type NATEndpoint struct {
// contains filtered or unexported fields
}
NATEndpoint struct represents endpoints about NAT traversal
func NewNATEndpoint ¶
func NewNATEndpoint(stateProvider stateProvider, natProber natProber) *NATEndpoint
NewNATEndpoint creates and returns nat endpoint
func (*NATEndpoint) NATType ¶
func (ne *NATEndpoint) NATType(c *gin.Context)
NATType provides NAT type in terms of traversal capabilities swagger:operation GET /nat/type NAT NATTypeDTO
--- summary: Shows NAT type in terms of traversal capabilities. description: Returns NAT type. May produce invalid result while VPN connection is established responses: 200: description: NAT type schema: "$ref": "#/definitions/NATTypeDTO" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
type NodeEndpoint ¶
type NodeEndpoint struct {
// contains filtered or unexported fields
}
NodeEndpoint struct represents endpoints about node status
func NewNodeEndpoint ¶
func NewNodeEndpoint(nodeStatusProvider nodeStatusProvider, nodeMonitoringAgent nodeMonitoringAgent) *NodeEndpoint
NewNodeEndpoint creates and returns node endpoints
func (*NodeEndpoint) GetLatestRelease ¶
func (ne *NodeEndpoint) GetLatestRelease(c *gin.Context)
GetLatestRelease retrieves information about the latest node release swagger:operation GET /node/latest-release node GetLatestRelease
--- summary: Latest Node release information description: Checks for latest Node release package and retrieves its information responses: 200: description: Latest Node release information schema: "$ref": "#/definitions/LatestReleaseResponse" 500: description: Failed to retrieve latest Node release information schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderActivityStats ¶
func (ne *NodeEndpoint) GetProviderActivityStats(c *gin.Context)
GetProviderActivityStats is an activity stats of provider swagger:operation GET /node/provider/activity-stats provider GetProviderActivityStats
--- summary: Provides Node activity stats description: Node activity stats responses: 200: description: Provider activity stats schema: "$ref": "#/definitions/ActivityStatsResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderConsumersCount ¶
func (ne *NodeEndpoint) GetProviderConsumersCount(c *gin.Context)
GetProviderConsumersCount A number of consumers served during a period of time swagger:operation GET /node/provider/consumers-count provider GetProviderConsumersCount
--- summary: Provides Node consumers number served during a period of time description: Node unique consumers count served during a period of time. parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider consumers count schema: "$ref": "#/definitions/ProviderConsumersCountResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderEarningsSeries ¶
func (ne *NodeEndpoint) GetProviderEarningsSeries(c *gin.Context)
GetProviderEarningsSeries A time series metrics of earnings during a period of time swagger:operation GET /node/provider/series/earnings provider GetProviderEarningsSeries
--- summary: Provides Node time series metrics of earnings during a period of time description: Node time series metrics of earnings during a period of time. parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider time series metrics of MYSTT earnings schema: "$ref": "#/definitions/ProviderEarningsSeriesResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderQuality ¶
func (ne *NodeEndpoint) GetProviderQuality(c *gin.Context)
GetProviderQuality a quality of provider swagger:operation GET /node/provider/quality provider GetProviderQuality
--- summary: Provides Node quality description: Node connectivity quality responses: 200: description: Provider quality schema: "$ref": "#/definitions/QualityInfoResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderServiceEarnings ¶
func (ne *NodeEndpoint) GetProviderServiceEarnings(c *gin.Context)
GetProviderServiceEarnings Node earnings per service and total earnings in the all network swagger:operation GET /node/provider/service-earnings provider GetProviderServiceEarnings
--- summary: Provides Node earnings per service and total earnings in the all network description: Node earnings per service and total earnings in the all network. responses: 200: description: earnings per service and total earnings schema: "$ref": "#/definitions/EarningsPerServiceResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderSessions ¶
func (ne *NodeEndpoint) GetProviderSessions(c *gin.Context)
GetProviderSessions A list of sessions metrics during a period of time swagger:operation GET /node/provider/sessions provider GetProviderSessions
--- summary: Provides Node sessions data during a period of time description: Node sessions metrics during a period of time parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider sessions list schema: "$ref": "#/definitions/ProviderSessionsResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderSessionsCount ¶
func (ne *NodeEndpoint) GetProviderSessionsCount(c *gin.Context)
GetProviderSessionsCount A number of sessions during a period of time swagger:operation GET /node/provider/sessions-count provider GetProviderSessionsCount
--- summary: Provides Node sessions number during a period of time description: Node sessions count during a period of time parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider sessions count schema: "$ref": "#/definitions/ProviderSessionsCountResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderSessionsSeries ¶
func (ne *NodeEndpoint) GetProviderSessionsSeries(c *gin.Context)
GetProviderSessionsSeries A time series metrics of sessions started during a period of time swagger:operation GET /node/provider/series/sessions provider GetProviderSessionsSeries
--- summary: Provides Node data series metrics of sessions started during a period of time description: Node time series metrics of sessions started during a period of time. parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider time series metrics of started sessions schema: "$ref": "#/definitions/ProviderSessionsSeriesResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderTransferredData ¶
func (ne *NodeEndpoint) GetProviderTransferredData(c *gin.Context)
GetProviderTransferredData A number of bytes transferred during a period of time swagger:operation GET /node/provider/transferred-data provider GetProviderTransferredData
--- summary: Provides total traffic served by the provider during a period of time description: Node transferred data during a period of time parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider transferred data schema: "$ref": "#/definitions/ProviderTransferredDataResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) GetProviderTransferredDataSeries ¶
func (ne *NodeEndpoint) GetProviderTransferredDataSeries(c *gin.Context)
GetProviderTransferredDataSeries A time series metrics of transferred bytes during a period of time swagger:operation GET /node/provider/series/data provider GetProviderTransferredDataSeries
--- summary: Provides Node data series metrics of transferred bytes description: Node data series metrics of transferred bytes during a period of time. parameters: - in: query name: range description: period of time ("1d", "7d", "30d") type: string responses: 200: description: Provider time series metrics of transferred bytes schema: "$ref": "#/definitions/ProviderTransferredDataSeriesResponse" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeEndpoint) MonitoringAgentStatuses ¶
func (ne *NodeEndpoint) MonitoringAgentStatuses(c *gin.Context)
MonitoringAgentStatuses Statuses from monitoring agent swagger:operation GET /node/monitoring-agent-statuses provider MonitoringAgentStatuses
--- summary: Provides Node connectivity statuses from monitoring agent description: Node connectivity statuses as seen by monitoring agent responses: 200: description: Monitoring agent statuses ("success"/"cancelled"/"connect_drop/"connect_fail/"internet_fail) schema: "$ref": "#/definitions/MonitoringAgentResponse"
func (*NodeEndpoint) NodeStatus ¶
func (ne *NodeEndpoint) NodeStatus(c *gin.Context)
NodeStatus Status provides Node proposal status swagger:operation GET /node/monitoring-status provider NodeStatus
--- summary: Provides Node proposal status description: Node Status as seen by monitoring agent responses: 200: description: Node status ("passed"/"failed"/"pending) schema: "$ref": "#/definitions/NodeStatusResponse"
type NodeUIEndpoints ¶
type NodeUIEndpoints struct {
// contains filtered or unexported fields
}
NodeUIEndpoints node ui version management endpoints
func NewNodeUIEndpoints ¶
func NewNodeUIEndpoints(versionManager *versionmanager.VersionManager) *NodeUIEndpoints
NewNodeUIEndpoints constructor
func (*NodeUIEndpoints) Download ¶
func (n *NodeUIEndpoints) Download(c *gin.Context)
Download download a remote node UI release swagger:operation POST /ui/download-version UI uiDownload
--- summary: Download description: download a remote node UI release responses: 200: description: Download in progress 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeUIEndpoints) DownloadStatus ¶
func (n *NodeUIEndpoints) DownloadStatus(c *gin.Context)
DownloadStatus returns download status swagger:operation GET /ui/download-status UI uiDownloadStatus
--- summary: Download status description: DownloadStatus can download one remote release at a time. This endpoint provides status of the download. responses: 200: description: download status schema: "$ref": "#/definitions/DownloadStatus" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeUIEndpoints) LocalVersions ¶
func (n *NodeUIEndpoints) LocalVersions(c *gin.Context)
LocalVersions locally available node UI versions swagger:operation GET /ui/local-versions UI uiLocalVersions
--- summary: List remote description: provides a list of node UI releases that have been downloaded or bundled with node responses: 200: description: Local version list schema: "$ref": "#/definitions/LocalVersionsResponse" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeUIEndpoints) RemoteVersions ¶
func (n *NodeUIEndpoints) RemoteVersions(c *gin.Context)
RemoteVersions list node UI releases from repo swagger:operation GET /ui/remote-versions UI uiRemoteVersions
--- summary: List local description: provides a list of node UI releases from github repository responses: 200: description: Remote version list schema: "$ref": "#/definitions/RemoteVersionsResponse" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeUIEndpoints) SwitchVersion ¶
func (n *NodeUIEndpoints) SwitchVersion(c *gin.Context)
SwitchVersion switches node UI version to locally available one swagger:operation POST /ui/switch-version UI uiSwitchVersion
--- summary: Switch Version description: switch node UI version to locally available one responses: 200: description: version switched 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 422: description: Unable to process the request at this point schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*NodeUIEndpoints) UI ¶
func (n *NodeUIEndpoints) UI(c *gin.Context)
UI returns download status swagger:operation GET /ui/info UI ui
--- summary: Node UI information description: Node UI information responses: 200: description: Node UI information schema: "$ref": "#/definitions/UI" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
type ProposalGetter ¶
type ProposalGetter interface {
GetProposal(id market.ProposalID) (*market.ServiceProposal, error)
}
ProposalGetter defines interface to fetch currently active service proposal by id
type QualityFinder ¶
type QualityFinder interface {
ProposalsQuality() []quality.ProposalQuality
}
QualityFinder allows to fetch proposal quality data
type ReportIssueGithubResponse ¶
type ReportIssueGithubResponse struct {
IssueID string `json:"issue_id"`
}
ReportIssueGithubResponse response for github issue creation
swagger:model ReportIssueGithubResponse
type SSEHandler ¶
type SSEHandler interface {
Sub(resp http.ResponseWriter, req *http.Request, params httprouter.Params)
}
SSEHandler represents the sse handler
type ServiceEndpoint ¶
type ServiceEndpoint struct {
// contains filtered or unexported fields
}
ServiceEndpoint struct represents management of service resource and it's sub-resources
func NewServiceEndpoint ¶
func NewServiceEndpoint(serviceManager ServiceManager, optionsParser map[string]services.ServiceOptionsParser, proposalRepository proposalRepository, tequilaApiClient *tequilapi_client.Client) *ServiceEndpoint
NewServiceEndpoint creates and returns service endpoint
func (*ServiceEndpoint) ServiceGet ¶
func (se *ServiceEndpoint) ServiceGet(c *gin.Context)
ServiceGet provides info for requested service on the node. swagger:operation GET /services/:id Service serviceGet
--- summary: Information about service description: ServiceGet provides info for requested service on the node. responses: 200: description: Service detailed information schema: "$ref": "#/definitions/ServiceInfoDTO" 404: description: Service not found schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*ServiceEndpoint) ServiceList ¶
func (se *ServiceEndpoint) ServiceList(c *gin.Context)
ServiceList provides a list of running services on the node. swagger:operation GET /services Service ServiceListResponse
--- summary: List of services description: ServiceList provides a list of running services on the node. responses: 200: description: List of running services schema: "$ref": "#/definitions/ServiceListResponse" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*ServiceEndpoint) ServiceStart ¶
func (se *ServiceEndpoint) ServiceStart(c *gin.Context)
ServiceStart starts requested service on the node. swagger:operation POST /services Service serviceStart
--- summary: Starts service description: Provider starts serving new service to consumers parameters: - in: body name: body description: Parameters in body (providerID) required for starting new service schema: $ref: "#/definitions/ServiceStartRequestDTO" responses: 201: description: Initiated service start schema: "$ref": "#/definitions/ServiceInfoDTO" 400: description: Failed to parse or request validation failed schema: "$ref": "#/definitions/APIError" 422: description: Unable to process the request at this point schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
func (*ServiceEndpoint) ServiceStop ¶
func (se *ServiceEndpoint) ServiceStop(c *gin.Context)
ServiceStop stops service on the node. swagger:operation DELETE /services/:id Service serviceStop
--- summary: Stops service description: Initiates service stop responses: 202: description: Service Stop initiated 404: description: No service exists schema: "$ref": "#/definitions/APIError" 500: description: Internal server error schema: "$ref": "#/definitions/APIError"
type ServiceManager ¶
type ServiceManager interface { Start(providerID identity.Identity, serviceType string, policies []string, options service.Options) (service.ID, error) Stop(id service.ID) error Service(id service.ID) *service.Instance Kill() error List(includeAll bool) []*service.Instance }
ServiceManager represents service manager that is used for services management.
type Transactor ¶
type Transactor interface { FetchCombinedFees(chainID int64) (registry.CombinedFeesResponse, error) FetchRegistrationFees(chainID int64) (registry.FeesResponse, error) FetchSettleFees(chainID int64) (registry.FeesResponse, error) FetchStakeDecreaseFee(chainID int64) (registry.FeesResponse, error) RegisterIdentity(id string, stake, fee *big.Int, beneficiary string, chainID int64, referralToken *string) error DecreaseStake(id string, chainID int64, amount, transactorFee *big.Int) error GetFreeRegistrationEligibility(identity identity.Identity) (bool, error) GetFreeProviderRegistrationEligibility() (bool, error) OpenChannel(chainID int64, id, hermesID, registryAddress string) error ChannelStatus(chainID int64, id, hermesID, registryAddress string) (registry.ChannelStatusResponse, error) }
Transactor represents interface to Transactor service
Source Files ¶
- access_policies.go
- affiliator.go
- auth.go
- config.go
- connection.go
- connection_location.go
- docs.go
- entertainment.go
- exchange.go
- feedback.go
- health_check.go
- identities.go
- mmn.go
- nat.go
- node.go
- pilvytis.go
- pprof.go
- proposals.go
- service.go
- session_connectivity.go
- sessions.go
- sse.go
- sse_handler.go
- stop.go
- terms.go
- transactor.go
- ui.go
- validation.go