Documentation ¶
Index ¶
- func RegisterAPIServer(s *grpc.Server, srv APIServer)
- type APIClient
- type APIServer
- type GetReply
- func (*GetReply) Descriptor() ([]byte, []int)
- func (m *GetReply) GetIndex() *Index
- func (*GetReply) ProtoMessage()
- func (m *GetReply) Reset()
- func (m *GetReply) String() string
- func (m *GetReply) XXX_DiscardUnknown()
- func (m *GetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetReply) XXX_Merge(src proto.Message)
- func (m *GetReply) XXX_Size() int
- func (m *GetReply) XXX_Unmarshal(b []byte) error
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) String() string
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type Index
- func (*Index) Descriptor() ([]byte, []int)
- func (m *Index) GetLastUpdated() int64
- func (m *Index) GetStorage() map[string]*StorageAsk
- func (m *Index) GetStorageMedianPrice() uint64
- func (*Index) ProtoMessage()
- func (m *Index) Reset()
- func (m *Index) String() string
- func (m *Index) XXX_DiscardUnknown()
- func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Index) XXX_Merge(src proto.Message)
- func (m *Index) XXX_Size() int
- func (m *Index) XXX_Unmarshal(b []byte) error
- type Query
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetLimit() int32
- func (m *Query) GetMaxPrice() uint64
- func (m *Query) GetOffset() int32
- func (m *Query) GetPieceSize() uint64
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) String() string
- func (m *Query) XXX_DiscardUnknown()
- func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Query) XXX_Merge(src proto.Message)
- func (m *Query) XXX_Size() int
- func (m *Query) XXX_Unmarshal(b []byte) error
- type QueryReply
- func (*QueryReply) Descriptor() ([]byte, []int)
- func (m *QueryReply) GetAsks() []*StorageAsk
- func (*QueryReply) ProtoMessage()
- func (m *QueryReply) Reset()
- func (m *QueryReply) String() string
- func (m *QueryReply) XXX_DiscardUnknown()
- func (m *QueryReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryReply) XXX_Merge(src proto.Message)
- func (m *QueryReply) XXX_Size() int
- func (m *QueryReply) XXX_Unmarshal(b []byte) error
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)
- func (m *QueryRequest) GetQuery() *Query
- func (*QueryRequest) ProtoMessage()
- func (m *QueryRequest) Reset()
- func (m *QueryRequest) String() string
- func (m *QueryRequest) XXX_DiscardUnknown()
- func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRequest) XXX_Merge(src proto.Message)
- func (m *QueryRequest) XXX_Size() int
- func (m *QueryRequest) XXX_Unmarshal(b []byte) error
- type StorageAsk
- func (*StorageAsk) Descriptor() ([]byte, []int)
- func (m *StorageAsk) GetExpiry() uint64
- func (m *StorageAsk) GetMinPieceSize() uint64
- func (m *StorageAsk) GetMiner() string
- func (m *StorageAsk) GetPrice() uint64
- func (m *StorageAsk) GetTimestamp() uint64
- func (*StorageAsk) ProtoMessage()
- func (m *StorageAsk) Reset()
- func (m *StorageAsk) String() string
- func (m *StorageAsk) XXX_DiscardUnknown()
- func (m *StorageAsk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StorageAsk) XXX_Merge(src proto.Message)
- func (m *StorageAsk) XXX_Size() int
- func (m *StorageAsk) XXX_Unmarshal(b []byte) error
- type UnimplementedAPIServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAPIServer ¶
Types ¶
type APIClient ¶
type APIClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryReply, error) }
APIClient is the client API for API service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAPIClient ¶
func NewAPIClient(cc *grpc.ClientConn) APIClient
type APIServer ¶
type APIServer interface { Get(context.Context, *GetRequest) (*GetReply, error) Query(context.Context, *QueryRequest) (*QueryReply, error) }
APIServer is the server API for API service.
type GetReply ¶
type GetReply struct { Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetReply) Descriptor ¶
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) XXX_DiscardUnknown ¶
func (m *GetReply) XXX_DiscardUnknown()
func (*GetReply) XXX_Marshal ¶
func (*GetReply) XXX_Unmarshal ¶
type GetRequest ¶
type GetRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type Index ¶
type Index struct { LastUpdated int64 `protobuf:"varint,1,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` StorageMedianPrice uint64 `protobuf:"varint,2,opt,name=storageMedianPrice,proto3" json:"storageMedianPrice,omitempty"` Storage map[string]*StorageAsk `` /* 155-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Index) Descriptor ¶
func (*Index) GetLastUpdated ¶
func (*Index) GetStorage ¶
func (m *Index) GetStorage() map[string]*StorageAsk
func (*Index) GetStorageMedianPrice ¶
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) XXX_DiscardUnknown ¶
func (m *Index) XXX_DiscardUnknown()
func (*Index) XXX_Marshal ¶
func (*Index) XXX_Unmarshal ¶
type Query ¶
type Query struct { MaxPrice uint64 `protobuf:"varint,1,opt,name=maxPrice,proto3" json:"maxPrice,omitempty"` PieceSize uint64 `protobuf:"varint,2,opt,name=pieceSize,proto3" json:"pieceSize,omitempty"` Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Offset int32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Query) Descriptor ¶
func (*Query) GetMaxPrice ¶
func (*Query) GetPieceSize ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) XXX_DiscardUnknown ¶
func (m *Query) XXX_DiscardUnknown()
func (*Query) XXX_Marshal ¶
func (*Query) XXX_Unmarshal ¶
type QueryReply ¶
type QueryReply struct { Asks []*StorageAsk `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueryReply) Descriptor ¶
func (*QueryReply) Descriptor() ([]byte, []int)
func (*QueryReply) GetAsks ¶
func (m *QueryReply) GetAsks() []*StorageAsk
func (*QueryReply) ProtoMessage ¶
func (*QueryReply) ProtoMessage()
func (*QueryReply) Reset ¶
func (m *QueryReply) Reset()
func (*QueryReply) String ¶
func (m *QueryReply) String() string
func (*QueryReply) XXX_DiscardUnknown ¶
func (m *QueryReply) XXX_DiscardUnknown()
func (*QueryReply) XXX_Marshal ¶
func (m *QueryReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryReply) XXX_Merge ¶
func (m *QueryReply) XXX_Merge(src proto.Message)
func (*QueryReply) XXX_Size ¶
func (m *QueryReply) XXX_Size() int
func (*QueryReply) XXX_Unmarshal ¶
func (m *QueryReply) XXX_Unmarshal(b []byte) error
type QueryRequest ¶
type QueryRequest struct { Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueryRequest) Descriptor ¶
func (*QueryRequest) Descriptor() ([]byte, []int)
func (*QueryRequest) GetQuery ¶
func (m *QueryRequest) GetQuery() *Query
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) Reset ¶
func (m *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (m *QueryRequest) String() string
func (*QueryRequest) XXX_DiscardUnknown ¶
func (m *QueryRequest) XXX_DiscardUnknown()
func (*QueryRequest) XXX_Marshal ¶
func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRequest) XXX_Merge ¶
func (m *QueryRequest) XXX_Merge(src proto.Message)
func (*QueryRequest) XXX_Size ¶
func (m *QueryRequest) XXX_Size() int
func (*QueryRequest) XXX_Unmarshal ¶
func (m *QueryRequest) XXX_Unmarshal(b []byte) error
type StorageAsk ¶
type StorageAsk struct { Price uint64 `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"` MinPieceSize uint64 `protobuf:"varint,2,opt,name=minPieceSize,proto3" json:"minPieceSize,omitempty"` Miner string `protobuf:"bytes,3,opt,name=miner,proto3" json:"miner,omitempty"` Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Expiry uint64 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StorageAsk) Descriptor ¶
func (*StorageAsk) Descriptor() ([]byte, []int)
func (*StorageAsk) GetExpiry ¶
func (m *StorageAsk) GetExpiry() uint64
func (*StorageAsk) GetMinPieceSize ¶
func (m *StorageAsk) GetMinPieceSize() uint64
func (*StorageAsk) GetMiner ¶
func (m *StorageAsk) GetMiner() string
func (*StorageAsk) GetPrice ¶
func (m *StorageAsk) GetPrice() uint64
func (*StorageAsk) GetTimestamp ¶
func (m *StorageAsk) GetTimestamp() uint64
func (*StorageAsk) ProtoMessage ¶
func (*StorageAsk) ProtoMessage()
func (*StorageAsk) Reset ¶
func (m *StorageAsk) Reset()
func (*StorageAsk) String ¶
func (m *StorageAsk) String() string
func (*StorageAsk) XXX_DiscardUnknown ¶
func (m *StorageAsk) XXX_DiscardUnknown()
func (*StorageAsk) XXX_Marshal ¶
func (m *StorageAsk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StorageAsk) XXX_Merge ¶
func (m *StorageAsk) XXX_Merge(src proto.Message)
func (*StorageAsk) XXX_Size ¶
func (m *StorageAsk) XXX_Size() int
func (*StorageAsk) XXX_Unmarshal ¶
func (m *StorageAsk) XXX_Unmarshal(b []byte) error
type UnimplementedAPIServer ¶
type UnimplementedAPIServer struct { }
UnimplementedAPIServer can be embedded to have forward compatible implementations.
func (*UnimplementedAPIServer) Get ¶
func (*UnimplementedAPIServer) Get(ctx context.Context, req *GetRequest) (*GetReply, error)
func (*UnimplementedAPIServer) Query ¶
func (*UnimplementedAPIServer) Query(ctx context.Context, req *QueryRequest) (*QueryReply, error)
Click to show internal directories.
Click to hide internal directories.