Documentation ¶
Overview ¶
Package types provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.
Index ¶
- type AddProvider
- type AddrInfo
- type AnyValue
- type Connection
- type CreateHostJSONBody
- type CreateHostJSONRequestBody
- type CreateHostRequest
- type CreateMeasurementJSONBody
- type CreateMeasurementJSONRequestBody
- type CreateMeasurementRequest
- type CreateMeasurementResponse
- type Dial
- type ErrorCode
- type ErrorResponse
- type FindNode
- type FindNodeCloserPeer
- type GetProvidersRequest
- type GetProvidersResponse
- type Host
- type NetworkType
- type Peer
- type Provide
- type ProvideDetails
- type ProvideGraph
- type ProvideMeasurementConfiguration
- type ProvidePeerInfo
- type ProvideRequest
- type ProvideType
- type QueryPeerState
- type Retrieval
- type RetrievalRequest
- type RoutingTable
- type RoutingTableDetails
- type RoutingTableEntry
- type RoutingTablePeer
- type RoutingTablePeers
- type RoutingTableUpdate
- type RoutingTableUpdateType
- type RpcGetProvidersJSONBody
- type RpcGetProvidersJSONRequestBody
- type StartProvideJSONBody
- type StartProvideJSONRequestBody
- type StartRetrievalJSONBody
- type StartRetrievalJSONRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddProvider ¶
type AddProvider struct { Distance string `json:"distance"` DurationInS float32 `json:"durationInS"` EndedAt string `json:"endedAt"` Error *string `json:"error"` Id int `json:"id"` RemoteId string `json:"remoteId"` StartedAt string `json:"startedAt"` }
AddProvider defines model for AddProvider.
type AddrInfo ¶
type AddrInfo struct { MultiAddresses []string `json:"multiAddresses"` PeerID string `json:"peerID"` }
AddrInfo defines model for AddrInfo.
type AnyValue ¶
type AnyValue interface{}
Can be any value - string, number, boolean, array or object.
func ErrDetails ¶
func ErrDetails(err interface{}) *AnyValue
type Connection ¶
type Connection struct { DurationInS float32 `json:"durationInS"` EndedAt string `json:"endedAt"` Id int `json:"id"` MultiAddress string `json:"multiAddress"` RemoteId string `json:"remoteId"` StartedAt string `json:"startedAt"` }
Connection defines model for Connection.
type CreateHostJSONBody ¶
type CreateHostJSONBody CreateHostRequest
CreateHostJSONBody defines parameters for CreateHost.
type CreateHostJSONRequestBody ¶
type CreateHostJSONRequestBody CreateHostJSONBody
CreateHostJSONRequestBody defines body for CreateHost for application/json ContentType.
type CreateHostRequest ¶
type CreateHostRequest struct { // An arbitrary name for this host. Name string `json:"name"` Network NetworkType `json:"network"` }
CreateHostRequest defines model for CreateHostRequest.
type CreateMeasurementJSONBody ¶
type CreateMeasurementJSONBody CreateMeasurementRequest
CreateMeasurementJSONBody defines parameters for CreateMeasurement.
type CreateMeasurementJSONRequestBody ¶
type CreateMeasurementJSONRequestBody CreateMeasurementJSONBody
CreateMeasurementJSONRequestBody defines body for CreateMeasurement for application/json ContentType.
type CreateMeasurementRequest ¶
type CreateMeasurementRequest struct { Configuration interface{} `json:"configuration"` // The host to use for this measurement HostId string `json:"hostId"` }
CreateMeasurementRequest defines model for CreateMeasurementRequest.
type CreateMeasurementResponse ¶
type CreateMeasurementResponse struct { EndedAt *string `json:"endedAt"` MeasurementId int `json:"measurementId"` StartedAt string `json:"startedAt"` }
CreateMeasurementResponse defines model for CreateMeasurementResponse.
type Dial ¶
type Dial struct { DurationInS float32 `json:"durationInS"` EndedAt string `json:"endedAt"` Error *string `json:"error"` Id int `json:"id"` MultiAddress string `json:"multiAddress"` RemoteId string `json:"remoteId"` StartedAt string `json:"startedAt"` Transport string `json:"transport"` }
Dial defines model for Dial.
type ErrorCode ¶
type ErrorCode string
ErrorCode defines model for ErrorCode.
const ( ErrorCodeHOSTNOTFOUND ErrorCode = "HOST_NOT_FOUND" ErrorCodeHOSTSTOPPED ErrorCode = "HOST_STOPPED" ErrorCodeINTERNAL ErrorCode = "INTERNAL" ErrorCodeMALFORMEDPEERID ErrorCode = "MALFORMED_PEER_ID" ErrorCodeMALFORMEDREQUEST ErrorCode = "MALFORMED_REQUEST" ErrorCodePEERNOTFOUND ErrorCode = "PEER_NOT_FOUND" ErrorCodeROUTINGTABLENOTFOUND ErrorCode = "ROUTING_TABLE_NOT_FOUND" ErrorCodeSAVINGROUTINGTABLE ErrorCode = "SAVING_ROUTING_TABLE" )
Defines values for ErrorCode.
type ErrorResponse ¶
type ErrorResponse struct { Code ErrorCode `json:"code"` // Can be any value - string, number, boolean, array or object. Details *AnyValue `json:"details"` Message string `json:"message"` }
ErrorResponse defines model for ErrorResponse.
type FindNode ¶
type FindNode struct { CloserPeers []FindNodeCloserPeer `json:"closerPeers"` DurationInS float32 `json:"durationInS"` EndedAt string `json:"endedAt"` Error *string `json:"error"` Id int `json:"id"` QueryId string `json:"queryId"` RemoteId string `json:"remoteId"` StartedAt string `json:"startedAt"` }
FindNode defines model for FindNode.
type FindNodeCloserPeer ¶
type FindNodeCloserPeer struct { // In which bucket was this peer of the remote peers routing table Bucket int `json:"bucket"` // How far away is this peer from the desired hash. Distance string `json:"distance"` PeerId string `json:"peerId"` }
FindNodeCloserPeer defines model for FindNodeCloserPeer.
type GetProvidersRequest ¶
type GetProvidersRequest struct { // The CID that should be asked for. ContentId string `json:"contentId"` // Peer ID of the remote peer. RemoteId string `json:"remoteId"` }
GetProvidersRequest defines model for GetProvidersRequest.
type GetProvidersResponse ¶
type GetProvidersResponse struct { CloserPeers []AddrInfo `json:"closerPeers"` Providers []AddrInfo `json:"providers"` }
GetProvidersResponse defines model for GetProvidersResponse.
type Host ¶
type Host struct { BootstrappedAt *string `json:"bootstrappedAt"` CreatedAt string `json:"createdAt"` HostId string `json:"hostId"` Name string `json:"name"` Network NetworkType `json:"network"` RunningProvidesCount float32 `json:"runningProvidesCount"` StartedAt *string `json:"startedAt"` }
Host defines model for Host.
type NetworkType ¶
type NetworkType string
NetworkType defines model for NetworkType.
const ( NetworkTypeFILECOIN NetworkType = "FILECOIN" NetworkTypeIPFS NetworkType = "IPFS" NetworkTypeKUSAMA NetworkType = "KUSAMA" NetworkTypePOLKADOT NetworkType = "POLKADOT" )
Defines values for NetworkType.
type Peer ¶
type Peer struct { AgentVersion *string `json:"agentVersion"` CreatedAt string `json:"createdAt"` PeerId string `json:"peerId"` Protocols []string `json:"protocols"` }
Peer defines model for Peer.
type Provide ¶
type Provide struct { ContentId string `json:"contentId"` EndedAt *string `json:"endedAt"` Error *string `json:"error"` FinalRoutingTableId *int `json:"finalRoutingTableId"` HostId string `json:"hostId"` InitialRoutingTableId int `json:"initialRoutingTableId"` ProvideId int `json:"provideId"` StartedAt string `json:"startedAt"` }
Provide defines model for Provide.
type ProvideDetails ¶
type ProvideDetails struct { // Embedded struct due to allOf(#/components/schemas/Provide) Provide `yaml:",inline"` // Embedded fields due to inline allOf schema AddProvidersCount int `json:"addProvidersCount"` ConnectionsCount int `json:"connectionsCount"` DialsCount int `json:"dialsCount"` Distance string `json:"distance"` FindNodesCount int `json:"findNodesCount"` }
ProvideDetails defines model for ProvideDetails.
type ProvideGraph ¶
type ProvideGraph struct { // Embedded struct due to allOf(#/components/schemas/Provide) Provide `yaml:",inline"` // Embedded fields due to inline allOf schema AddProviders []AddProvider `json:"addProviders"` Connections []Connection `json:"connections"` Dials []Dial `json:"dials"` FindNodes []FindNode `json:"findNodes"` // All peers + information in the order they should be plotted. Peers []ProvidePeerInfo `json:"peers"` }
ProvideGraph defines model for ProvideGraph.
type ProvideMeasurementConfiguration ¶
type ProvideMeasurementConfiguration struct { // Multi-Query parallelism. Concurrency *int `json:"concurrency,omitempty"` Iterations int `json:"iterations"` ProvideType ProvideType `json:"provideType"` }
ProvideMeasurementConfiguration defines model for ProvideMeasurementConfiguration.
type ProvidePeerInfo ¶
type ProvidePeerInfo struct { AgentVersion *string `json:"agentVersion"` Distance string `json:"distance"` FirstInteractedAt *string `json:"firstInteractedAt"` PeerId string `json:"peerId"` Protocols []string `json:"protocols"` ReferredBy string `json:"referredBy"` State QueryPeerState `json:"state"` }
ProvidePeerInfo defines model for ProvidePeerInfo.
type ProvideRequest ¶
type ProvideRequest struct {
Type ProvideType `json:"type"`
}
ProvideRequest defines model for ProvideRequest.
type ProvideType ¶
type ProvideType string
ProvideType defines model for ProvideType.
const ( ProvideTypeESTIMATOR ProvideType = "ESTIMATOR" ProvideTypeMULTIQUERY ProvideType = "MULTI_QUERY" ProvideTypeSINGLEQUERY ProvideType = "SINGLE_QUERY" )
Defines values for ProvideType.
type QueryPeerState ¶
type QueryPeerState string
QueryPeerState defines model for QueryPeerState.
const ( QueryPeerStateHEARD QueryPeerState = "HEARD" QueryPeerStateQUERIED QueryPeerState = "QUERIED" QueryPeerStateUNREACHABLE QueryPeerState = "UNREACHABLE" QueryPeerStateWAITING QueryPeerState = "WAITING" )
Defines values for QueryPeerState.
type Retrieval ¶
type Retrieval struct { ContentId string `json:"contentId"` EndedAt *string `json:"endedAt"` Error *string `json:"error"` FinalRoutingTableId *int `json:"finalRoutingTableId"` HostId string `json:"hostId"` InitialRoutingTableId int `json:"initialRoutingTableId"` RetrievalId int `json:"retrievalId"` StartedAt string `json:"startedAt"` }
Retrieval defines model for Retrieval.
type RetrievalRequest ¶
type RetrievalRequest struct { ContentId string `json:"contentId"` // Number of providers to find until the query stops. 0 indicates that the query will run until it completes. Count int `json:"count"` }
RetrievalRequest defines model for RetrievalRequest.
type RoutingTable ¶
type RoutingTable struct { BucketSize int `json:"bucketSize"` CreatedAt string `json:"createdAt"` EntryCount int `json:"entryCount"` HostId string `json:"hostId"` Id int `json:"id"` }
RoutingTable defines model for RoutingTable.
type RoutingTableDetails ¶
type RoutingTableDetails struct { // Embedded struct due to allOf(#/components/schemas/RoutingTable) RoutingTable `yaml:",inline"` // Embedded fields due to inline allOf schema Entries []RoutingTableEntry `json:"entries"` }
RoutingTableDetails defines model for RoutingTableDetails.
type RoutingTableEntry ¶
type RoutingTableEntry struct { AddedAt string `json:"addedAt"` Bucket int `json:"bucket"` ConnectedSince *string `json:"connectedSince"` LastSuccessfulOutboundQueryAt string `json:"lastSuccessfulOutboundQueryAt"` LastUsefulAt *string `json:"lastUsefulAt"` PeerId string `json:"peerId"` }
RoutingTableEntry defines model for RoutingTableEntry.
type RoutingTablePeer ¶
type RoutingTablePeer struct { AddedAt string `json:"addedAt"` AgentVersion *string `json:"agentVersion"` Bucket int `json:"bucket"` ConnectedSince *string `json:"connectedSince"` LastSuccessfulOutboundQueryAt string `json:"lastSuccessfulOutboundQueryAt"` LastUsefulAt *string `json:"lastUsefulAt"` PeerId string `json:"peerId"` Protocols []string `json:"protocols"` }
RoutingTablePeer defines model for RoutingTablePeer.
type RoutingTablePeers ¶
type RoutingTablePeers []RoutingTablePeer
RoutingTablePeers defines model for RoutingTablePeers.
type RoutingTableUpdate ¶
type RoutingTableUpdate struct { Type RoutingTableUpdateType `json:"type"` Update interface{} `json:"update"` }
RoutingTableUpdate defines model for RoutingTableUpdate.
type RoutingTableUpdateType ¶
type RoutingTableUpdateType string
RoutingTableUpdateType defines model for RoutingTableUpdate.Type.
const ( RoutingTableUpdateTypeFULL RoutingTableUpdateType = "FULL" RoutingTableUpdateTypePEERADDED RoutingTableUpdateType = "PEER_ADDED" RoutingTableUpdateTypePEERREMOVED RoutingTableUpdateType = "PEER_REMOVED" )
Defines values for RoutingTableUpdateType.
type RpcGetProvidersJSONBody ¶
type RpcGetProvidersJSONBody GetProvidersRequest
RpcGetProvidersJSONBody defines parameters for RpcGetProviders.
type RpcGetProvidersJSONRequestBody ¶
type RpcGetProvidersJSONRequestBody RpcGetProvidersJSONBody
RpcGetProvidersJSONRequestBody defines body for RpcGetProviders for application/json ContentType.
type StartProvideJSONBody ¶
type StartProvideJSONBody ProvideRequest
StartProvideJSONBody defines parameters for StartProvide.
type StartProvideJSONRequestBody ¶
type StartProvideJSONRequestBody StartProvideJSONBody
StartProvideJSONRequestBody defines body for StartProvide for application/json ContentType.
type StartRetrievalJSONBody ¶
type StartRetrievalJSONBody RetrievalRequest
StartRetrievalJSONBody defines parameters for StartRetrieval.
type StartRetrievalJSONRequestBody ¶
type StartRetrievalJSONRequestBody StartRetrievalJSONBody
StartRetrievalJSONRequestBody defines body for StartRetrieval for application/json ContentType.