bitcoin

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_bitcoin_proto protoreflect.FileDescriptor

Functions

func NewBitcoinEndpoints

func NewBitcoinEndpoints() []*api.Endpoint

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL