Documentation
¶
Index ¶
- Variables
- func RegisterCurrencyServer(s *grpc.Server, srv CurrencyServer)
- type Currencies
- type CurrencyClient
- type CurrencyServer
- type RateRequest
- func (*RateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RateRequest) GetBase() Currencies
- func (x *RateRequest) GetDestination() Currencies
- func (*RateRequest) ProtoMessage()
- func (x *RateRequest) ProtoReflect() protoreflect.Message
- func (x *RateRequest) Reset()
- func (x *RateRequest) String() string
- type RateResponse
- type UnimplementedCurrencyServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Currencies_name = map[int32]string{ 0: "USD", 1: "INR", 2: "JPY", 3: "CAD", 4: "EUR", } Currencies_value = map[string]int32{ "USD": 0, "INR": 1, "JPY": 2, "CAD": 3, "EUR": 4, } )
Enum value maps for Currencies.
View Source
var File_currency_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCurrencyServer ¶
func RegisterCurrencyServer(s *grpc.Server, srv CurrencyServer)
Types ¶
type Currencies ¶
type Currencies int32
const ( Currencies_USD Currencies = 0 Currencies_INR Currencies = 1 Currencies_JPY Currencies = 2 Currencies_CAD Currencies = 3 Currencies_EUR Currencies = 4 )
func (Currencies) Descriptor ¶
func (Currencies) Descriptor() protoreflect.EnumDescriptor
func (Currencies) Enum ¶
func (x Currencies) Enum() *Currencies
func (Currencies) EnumDescriptor
deprecated
func (Currencies) EnumDescriptor() ([]byte, []int)
Deprecated: Use Currencies.Descriptor instead.
func (Currencies) Number ¶
func (x Currencies) Number() protoreflect.EnumNumber
func (Currencies) String ¶
func (x Currencies) String() string
func (Currencies) Type ¶
func (Currencies) Type() protoreflect.EnumType
type CurrencyClient ¶
type CurrencyClient interface {
GetRate(ctx context.Context, in *RateRequest, opts ...grpc.CallOption) (*RateResponse, error)
}
CurrencyClient is the client API for Currency service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCurrencyClient ¶
func NewCurrencyClient(cc grpc.ClientConnInterface) CurrencyClient
type CurrencyServer ¶
type CurrencyServer interface {
GetRate(context.Context, *RateRequest) (*RateResponse, error)
}
CurrencyServer is the server API for Currency service.
type RateRequest ¶
type RateRequest struct { Base Currencies `protobuf:"varint,1,opt,name=Base,proto3,enum=Currencies" json:"Base,omitempty"` Destination Currencies `protobuf:"varint,2,opt,name=Destination,proto3,enum=Currencies" json:"Destination,omitempty"` // contains filtered or unexported fields }
func (*RateRequest) Descriptor
deprecated
func (*RateRequest) Descriptor() ([]byte, []int)
Deprecated: Use RateRequest.ProtoReflect.Descriptor instead.
func (*RateRequest) GetBase ¶
func (x *RateRequest) GetBase() Currencies
func (*RateRequest) GetDestination ¶
func (x *RateRequest) GetDestination() Currencies
func (*RateRequest) ProtoMessage ¶
func (*RateRequest) ProtoMessage()
func (*RateRequest) ProtoReflect ¶
func (x *RateRequest) ProtoReflect() protoreflect.Message
func (*RateRequest) Reset ¶
func (x *RateRequest) Reset()
func (*RateRequest) String ¶
func (x *RateRequest) String() string
type RateResponse ¶
type RateResponse struct { Rate float32 `protobuf:"fixed32,1,opt,name=Rate,proto3" json:"Rate,omitempty"` // contains filtered or unexported fields }
func (*RateResponse) Descriptor
deprecated
func (*RateResponse) Descriptor() ([]byte, []int)
Deprecated: Use RateResponse.ProtoReflect.Descriptor instead.
func (*RateResponse) GetRate ¶
func (x *RateResponse) GetRate() float32
func (*RateResponse) ProtoMessage ¶
func (*RateResponse) ProtoMessage()
func (*RateResponse) ProtoReflect ¶
func (x *RateResponse) ProtoReflect() protoreflect.Message
func (*RateResponse) Reset ¶
func (x *RateResponse) Reset()
func (*RateResponse) String ¶
func (x *RateResponse) String() string
type UnimplementedCurrencyServer ¶
type UnimplementedCurrencyServer struct { }
UnimplementedCurrencyServer can be embedded to have forward compatible implementations.
func (*UnimplementedCurrencyServer) GetRate ¶
func (*UnimplementedCurrencyServer) GetRate(context.Context, *RateRequest) (*RateResponse, error)
Click to show internal directories.
Click to hide internal directories.