Documentation ¶
Index ¶
- Variables
- func NewBitcoinEndpoints() []*api.Endpoint
- func RegisterBitcoinHandler(s server.Server, hdlr BitcoinHandler, opts ...server.HandlerOption) error
- type BitcoinHandler
- type BitcoinService
- type PriceRequest
- type PriceResponse
- func (*PriceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PriceResponse) GetPrice() float64
- func (x *PriceResponse) GetSymbol() string
- func (*PriceResponse) ProtoMessage()
- func (x *PriceResponse) ProtoReflect() protoreflect.Message
- func (x *PriceResponse) Reset()
- func (x *PriceResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_bitcoin_proto protoreflect.FileDescriptor
Functions ¶
func NewBitcoinEndpoints ¶
func RegisterBitcoinHandler ¶
func RegisterBitcoinHandler(s server.Server, hdlr BitcoinHandler, opts ...server.HandlerOption) error
Types ¶
type BitcoinHandler ¶
type BitcoinHandler interface {
Price(context.Context, *PriceRequest, *PriceResponse) error
}
type BitcoinService ¶
type BitcoinService interface {
Price(ctx context.Context, in *PriceRequest, opts ...client.CallOption) (*PriceResponse, error)
}
func NewBitcoinService ¶
func NewBitcoinService(name string, c client.Client) BitcoinService
type PriceRequest ¶
type PriceRequest struct { // symbol to use e.g BTCUSD Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` // contains filtered or unexported fields }
Get the price of bitcoin
func (*PriceRequest) Descriptor
deprecated
func (*PriceRequest) Descriptor() ([]byte, []int)
Deprecated: Use PriceRequest.ProtoReflect.Descriptor instead.
func (*PriceRequest) GetSymbol ¶
func (x *PriceRequest) GetSymbol() string
func (*PriceRequest) ProtoMessage ¶
func (*PriceRequest) ProtoMessage()
func (*PriceRequest) ProtoReflect ¶
func (x *PriceRequest) ProtoReflect() protoreflect.Message
func (*PriceRequest) Reset ¶
func (x *PriceRequest) Reset()
func (*PriceRequest) String ¶
func (x *PriceRequest) String() string
type PriceResponse ¶
type PriceResponse struct { Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*PriceResponse) Descriptor
deprecated
func (*PriceResponse) Descriptor() ([]byte, []int)
Deprecated: Use PriceResponse.ProtoReflect.Descriptor instead.
func (*PriceResponse) GetPrice ¶
func (x *PriceResponse) GetPrice() float64
func (*PriceResponse) GetSymbol ¶
func (x *PriceResponse) GetSymbol() string
func (*PriceResponse) ProtoMessage ¶
func (*PriceResponse) ProtoMessage()
func (*PriceResponse) ProtoReflect ¶
func (x *PriceResponse) ProtoReflect() protoreflect.Message
func (*PriceResponse) Reset ¶
func (x *PriceResponse) Reset()
func (*PriceResponse) String ¶
func (x *PriceResponse) String() string
Click to show internal directories.
Click to hide internal directories.