Documentation
¶
Index ¶
- Variables
- func RegisterDataProviderServiceServer(s grpc.ServiceRegistrar, srv DataProviderServiceServer)
- type Adapter
- func (*Adapter) Descriptor() ([]byte, []int)deprecated
- func (x *Adapter) GetActive() bool
- func (x *Adapter) GetAdapterId() string
- func (x *Adapter) GetCategory() FeedCategory
- func (x *Adapter) GetFeeds() []*Feed
- func (x *Adapter) GetFrequency() int64
- func (x *Adapter) GetJobType() JobTypes
- func (x *Adapter) GetName() string
- func (x *Adapter) GetOracleAddress() string
- func (*Adapter) ProtoMessage()
- func (x *Adapter) ProtoReflect() protoreflect.Message
- func (x *Adapter) Reset()
- func (x *Adapter) String() string
- type AdapterHead
- func (*AdapterHead) Descriptor() ([]byte, []int)deprecated
- func (x *AdapterHead) GetAdapterId() string
- func (x *AdapterHead) GetOracleAddress() string
- func (*AdapterHead) ProtoMessage()
- func (x *AdapterHead) ProtoReflect() protoreflect.Message
- func (x *AdapterHead) Reset()
- func (x *AdapterHead) String() string
- type Adapters
- type DPInfo
- func (*DPInfo) Descriptor() ([]byte, []int)deprecated
- func (x *DPInfo) GetBootstraps() map[string]*DPInfo
- func (x *DPInfo) GetKOrgId() string
- func (x *DPInfo) GetKnownPeers() map[string]*DPInfo
- func (x *DPInfo) GetListenAddress() string
- func (x *DPInfo) GetName() string
- func (x *DPInfo) GetUptime() int64
- func (x *DPInfo) GetWebsite() string
- func (*DPInfo) ProtoMessage()
- func (x *DPInfo) ProtoReflect() protoreflect.Message
- func (x *DPInfo) Reset()
- func (x *DPInfo) String() string
- type DPInfos
- type DataProviderServiceClient
- type DataProviderServiceServer
- type Feed
- func (*Feed) Descriptor() ([]byte, []int)deprecated
- func (x *Feed) GetHeaders() []*Feed_Header
- func (x *Feed) GetPayload() string
- func (x *Feed) GetReducers() []*Reducer
- func (x *Feed) GetRequestType() RequestType
- func (x *Feed) GetUrl() string
- func (*Feed) ProtoMessage()
- func (x *Feed) ProtoReflect() protoreflect.Message
- func (x *Feed) Reset()
- func (x *Feed) String() string
- type FeedCategory
- func (FeedCategory) Descriptor() protoreflect.EnumDescriptor
- func (x FeedCategory) Enum() *FeedCategory
- func (FeedCategory) EnumDescriptor() ([]byte, []int)deprecated
- func (x FeedCategory) Number() protoreflect.EnumNumber
- func (x FeedCategory) String() string
- func (FeedCategory) Type() protoreflect.EnumType
- type Feed_Header
- type JobTypes
- type Node
- type Null
- type Reducer
- type RequestType
- func (RequestType) Descriptor() protoreflect.EnumDescriptor
- func (x RequestType) Enum() *RequestType
- func (RequestType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RequestType) Number() protoreflect.EnumNumber
- func (x RequestType) String() string
- func (RequestType) Type() protoreflect.EnumType
- type ServerStatus
- func (*ServerStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ServerStatus) GetAlive() bool
- func (x *ServerStatus) GetMessage() string
- func (*ServerStatus) ProtoMessage()
- func (x *ServerStatus) ProtoReflect() protoreflect.Message
- func (x *ServerStatus) Reset()
- func (x *ServerStatus) String() string
- type UnimplementedDataProviderServiceServer
- func (UnimplementedDataProviderServiceServer) AddToKnownPeers(context.Context, *DPInfo) (*Null, error)
- func (UnimplementedDataProviderServiceServer) ListFeeds(context.Context, *Null) (*Adapters, error)
- func (UnimplementedDataProviderServiceServer) ListFeedsFromAll(context.Context, *Null) (*Adapters, error)
- func (UnimplementedDataProviderServiceServer) ListKnownPeers(context.Context, *Null) (*DPInfos, error)
- type UnsafeDataProviderServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( JobTypes_name = map[int32]string{ 0: "DATA_FEED", 1: "RANDOM_NUMBER", } JobTypes_value = map[string]int32{ "DATA_FEED": 0, "RANDOM_NUMBER": 1, } )
Enum value maps for JobTypes.
var ( RequestType_name = map[int32]string{ 0: "GET", 1: "POST", } RequestType_value = map[string]int32{ "GET": 0, "POST": 1, } )
Enum value maps for RequestType.
var ( FeedCategory_name = map[int32]string{ 0: "RNG", 1: "SPORT", 2: "PRICE_FEED", 3: "WEATHER", 4: "FLIGHT", 5: "BLOCKCHAIN", 6: "NFT_DATA", } FeedCategory_value = map[string]int32{ "RNG": 0, "SPORT": 1, "PRICE_FEED": 2, "WEATHER": 3, "FLIGHT": 4, "BLOCKCHAIN": 5, "NFT_DATA": 6, } )
Enum value maps for FeedCategory.
var DataProviderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protoadapter.DataProviderService", HandlerType: (*DataProviderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddToKnownPeers", Handler: _DataProviderService_AddToKnownPeers_Handler, }, { MethodName: "ListKnownPeers", Handler: _DataProviderService_ListKnownPeers_Handler, }, { MethodName: "ListFeeds", Handler: _DataProviderService_ListFeeds_Handler, }, { MethodName: "ListFeedsFromAll", Handler: _DataProviderService_ListFeedsFromAll_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "data-provider/protoadapter/adapter.proto", }
DataProviderService_ServiceDesc is the grpc.ServiceDesc for DataProviderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_data_provider_protoadapter_adapter_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDataProviderServiceServer ¶
func RegisterDataProviderServiceServer(s grpc.ServiceRegistrar, srv DataProviderServiceServer)
Types ¶
type Adapter ¶
type Adapter struct { Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` JobType JobTypes `protobuf:"varint,3,opt,name=job_type,json=jobType,proto3,enum=protoadapter.JobTypes" json:"job_type,omitempty"` AdapterId string `protobuf:"bytes,4,opt,name=adapter_id,json=adapterId,proto3" json:"adapter_id,omitempty"` OracleAddress string `protobuf:"bytes,5,opt,name=oracle_address,json=oracleAddress,proto3" json:"oracle_address,omitempty"` Feeds []*Feed `protobuf:"bytes,6,rep,name=feeds,proto3" json:"feeds,omitempty"` Category FeedCategory `protobuf:"varint,7,opt,name=category,proto3,enum=protoadapter.FeedCategory" json:"category,omitempty"` Frequency int64 `protobuf:"varint,8,opt,name=frequency,proto3" json:"frequency,omitempty"` // contains filtered or unexported fields }
func (*Adapter) Descriptor
deprecated
func (*Adapter) GetAdapterId ¶
func (*Adapter) GetCategory ¶
func (x *Adapter) GetCategory() FeedCategory
func (*Adapter) GetFrequency ¶
func (*Adapter) GetJobType ¶
func (*Adapter) GetOracleAddress ¶
func (*Adapter) ProtoMessage ¶
func (*Adapter) ProtoMessage()
func (*Adapter) ProtoReflect ¶
func (x *Adapter) ProtoReflect() protoreflect.Message
type AdapterHead ¶
type AdapterHead struct { AdapterId string `protobuf:"bytes,1,opt,name=adapter_id,json=adapterId,proto3" json:"adapter_id,omitempty"` OracleAddress string `protobuf:"bytes,2,opt,name=oracle_address,json=oracleAddress,proto3" json:"oracle_address,omitempty"` // contains filtered or unexported fields }
Contains field that doesn't change throughout the lifetime of an adapter.
func (*AdapterHead) Descriptor
deprecated
func (*AdapterHead) Descriptor() ([]byte, []int)
Deprecated: Use AdapterHead.ProtoReflect.Descriptor instead.
func (*AdapterHead) GetAdapterId ¶
func (x *AdapterHead) GetAdapterId() string
func (*AdapterHead) GetOracleAddress ¶
func (x *AdapterHead) GetOracleAddress() string
func (*AdapterHead) ProtoMessage ¶
func (*AdapterHead) ProtoMessage()
func (*AdapterHead) ProtoReflect ¶
func (x *AdapterHead) ProtoReflect() protoreflect.Message
func (*AdapterHead) Reset ¶
func (x *AdapterHead) Reset()
func (*AdapterHead) String ¶
func (x *AdapterHead) String() string
type Adapters ¶
type Adapters struct { Adapters []*Adapter `protobuf:"bytes,1,rep,name=adapters,proto3" json:"adapters,omitempty"` // contains filtered or unexported fields }
func (*Adapters) Descriptor
deprecated
func (*Adapters) GetAdapters ¶
func (*Adapters) ProtoMessage ¶
func (*Adapters) ProtoMessage()
func (*Adapters) ProtoReflect ¶
func (x *Adapters) ProtoReflect() protoreflect.Message
type DPInfo ¶
type DPInfo struct { ListenAddress string `protobuf:"bytes,1,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` KOrgId string `protobuf:"bytes,3,opt,name=k_org_id,json=kOrgId,proto3" json:"k_org_id,omitempty"` KnownPeers map[string]*DPInfo `` /* 161-byte string literal not displayed */ Bootstraps map[string]*DPInfo `` /* 161-byte string literal not displayed */ Website string `protobuf:"bytes,6,opt,name=website,proto3" json:"website,omitempty"` Uptime int64 `protobuf:"varint,8,opt,name=uptime,proto3" json:"uptime,omitempty"` // contains filtered or unexported fields }
func (*DPInfo) Descriptor
deprecated
func (*DPInfo) GetBootstraps ¶
func (*DPInfo) GetKnownPeers ¶
func (*DPInfo) GetListenAddress ¶
func (*DPInfo) GetWebsite ¶
func (*DPInfo) ProtoMessage ¶
func (*DPInfo) ProtoMessage()
func (*DPInfo) ProtoReflect ¶
func (x *DPInfo) ProtoReflect() protoreflect.Message
type DPInfos ¶
type DPInfos struct { List []*DPInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func (*DPInfos) Descriptor
deprecated
func (*DPInfos) ProtoMessage ¶
func (*DPInfos) ProtoMessage()
func (*DPInfos) ProtoReflect ¶
func (x *DPInfos) ProtoReflect() protoreflect.Message
type DataProviderServiceClient ¶
type DataProviderServiceClient interface { AddToKnownPeers(ctx context.Context, in *DPInfo, opts ...grpc.CallOption) (*Null, error) ListKnownPeers(ctx context.Context, in *Null, opts ...grpc.CallOption) (*DPInfos, error) ListFeeds(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Adapters, error) ListFeedsFromAll(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Adapters, error) }
DataProviderServiceClient is the client API for DataProviderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDataProviderServiceClient ¶
func NewDataProviderServiceClient(cc grpc.ClientConnInterface) DataProviderServiceClient
type DataProviderServiceServer ¶
type DataProviderServiceServer interface { AddToKnownPeers(context.Context, *DPInfo) (*Null, error) ListKnownPeers(context.Context, *Null) (*DPInfos, error) ListFeeds(context.Context, *Null) (*Adapters, error) ListFeedsFromAll(context.Context, *Null) (*Adapters, error) // contains filtered or unexported methods }
DataProviderServiceServer is the server API for DataProviderService service. All implementations must embed UnimplementedDataProviderServiceServer for forward compatibility
type Feed ¶
type Feed struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Headers []*Feed_Header `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` RequestType RequestType `protobuf:"varint,3,opt,name=request_type,json=requestType,proto3,enum=protoadapter.RequestType" json:"request_type,omitempty"` Reducers []*Reducer `protobuf:"bytes,4,rep,name=reducers,proto3" json:"reducers,omitempty"` Payload string `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*Feed) Descriptor
deprecated
func (*Feed) GetHeaders ¶
func (x *Feed) GetHeaders() []*Feed_Header
func (*Feed) GetPayload ¶
func (*Feed) GetReducers ¶
func (*Feed) GetRequestType ¶
func (x *Feed) GetRequestType() RequestType
func (*Feed) ProtoMessage ¶
func (*Feed) ProtoMessage()
func (*Feed) ProtoReflect ¶
func (x *Feed) ProtoReflect() protoreflect.Message
type FeedCategory ¶
type FeedCategory int32
const ( FeedCategory_RNG FeedCategory = 0 // random number generator FeedCategory_SPORT FeedCategory = 1 // live scores, past data e.t.c FeedCategory_PRICE_FEED FeedCategory = 2 // data such as spot prices FeedCategory_WEATHER FeedCategory = 3 // transactions or balances happening on other blockchains FeedCategory_FLIGHT FeedCategory = 4 // departure and arrival statuses on-chain FeedCategory_BLOCKCHAIN FeedCategory = 5 // transactions or balances happening on other blockchains FeedCategory_NFT_DATA FeedCategory = 6 // floor Prices, Asset Listings, Collection Details )
func (FeedCategory) Descriptor ¶
func (FeedCategory) Descriptor() protoreflect.EnumDescriptor
func (FeedCategory) Enum ¶
func (x FeedCategory) Enum() *FeedCategory
func (FeedCategory) EnumDescriptor
deprecated
func (FeedCategory) EnumDescriptor() ([]byte, []int)
Deprecated: Use FeedCategory.Descriptor instead.
func (FeedCategory) Number ¶
func (x FeedCategory) Number() protoreflect.EnumNumber
func (FeedCategory) String ¶
func (x FeedCategory) String() string
func (FeedCategory) Type ¶
func (FeedCategory) Type() protoreflect.EnumType
type Feed_Header ¶
type Feed_Header struct { Field map[string]string `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Feed_Header) Descriptor
deprecated
func (*Feed_Header) Descriptor() ([]byte, []int)
Deprecated: Use Feed_Header.ProtoReflect.Descriptor instead.
func (*Feed_Header) GetField ¶
func (x *Feed_Header) GetField() map[string]string
func (*Feed_Header) ProtoMessage ¶
func (*Feed_Header) ProtoMessage()
func (*Feed_Header) ProtoReflect ¶
func (x *Feed_Header) ProtoReflect() protoreflect.Message
func (*Feed_Header) Reset ¶
func (x *Feed_Header) Reset()
func (*Feed_Header) String ¶
func (x *Feed_Header) String() string
type JobTypes ¶
type JobTypes int32
func (JobTypes) Descriptor ¶
func (JobTypes) Descriptor() protoreflect.EnumDescriptor
func (JobTypes) EnumDescriptor
deprecated
func (JobTypes) Number ¶
func (x JobTypes) Number() protoreflect.EnumNumber
func (JobTypes) Type ¶
func (JobTypes) Type() protoreflect.EnumType
type Node ¶
type Node struct { IP string `protobuf:"bytes,1,opt,name=IP,proto3" json:"IP,omitempty"` // contains filtered or unexported fields }
Node sends its IP details, sign `an arbitrary message and provides hash of message and signature to proof that it can request information from a Data Provider
func (*Node) Descriptor
deprecated
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type Null ¶
type Null struct {
// contains filtered or unexported fields
}
func (*Null) Descriptor
deprecated
func (*Null) ProtoMessage ¶
func (*Null) ProtoMessage()
func (*Null) ProtoReflect ¶
func (x *Null) ProtoReflect() protoreflect.Message
type Reducer ¶
type Reducer struct { Function string `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*Reducer) Descriptor
deprecated
func (*Reducer) GetFunction ¶
func (*Reducer) ProtoMessage ¶
func (*Reducer) ProtoMessage()
func (*Reducer) ProtoReflect ¶
func (x *Reducer) ProtoReflect() protoreflect.Message
type RequestType ¶
type RequestType int32
const ( RequestType_GET RequestType = 0 RequestType_POST RequestType = 1 )
func (RequestType) Descriptor ¶
func (RequestType) Descriptor() protoreflect.EnumDescriptor
func (RequestType) Enum ¶
func (x RequestType) Enum() *RequestType
func (RequestType) EnumDescriptor
deprecated
func (RequestType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RequestType.Descriptor instead.
func (RequestType) Number ¶
func (x RequestType) Number() protoreflect.EnumNumber
func (RequestType) String ¶
func (x RequestType) String() string
func (RequestType) Type ¶
func (RequestType) Type() protoreflect.EnumType
type ServerStatus ¶
type ServerStatus struct { Alive bool `protobuf:"varint,1,opt,name=alive,proto3" json:"alive,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ServerStatus) Descriptor
deprecated
func (*ServerStatus) Descriptor() ([]byte, []int)
Deprecated: Use ServerStatus.ProtoReflect.Descriptor instead.
func (*ServerStatus) GetAlive ¶
func (x *ServerStatus) GetAlive() bool
func (*ServerStatus) GetMessage ¶
func (x *ServerStatus) GetMessage() string
func (*ServerStatus) ProtoMessage ¶
func (*ServerStatus) ProtoMessage()
func (*ServerStatus) ProtoReflect ¶
func (x *ServerStatus) ProtoReflect() protoreflect.Message
func (*ServerStatus) Reset ¶
func (x *ServerStatus) Reset()
func (*ServerStatus) String ¶
func (x *ServerStatus) String() string
type UnimplementedDataProviderServiceServer ¶
type UnimplementedDataProviderServiceServer struct { }
UnimplementedDataProviderServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDataProviderServiceServer) AddToKnownPeers ¶
func (UnimplementedDataProviderServiceServer) ListFeedsFromAll ¶
func (UnimplementedDataProviderServiceServer) ListKnownPeers ¶
type UnsafeDataProviderServiceServer ¶
type UnsafeDataProviderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDataProviderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataProviderServiceServer will result in compilation errors.