Documentation ¶
Index ¶
- Variables
- func RegisterCurrencyServer(s grpc.ServiceRegistrar, srv CurrencyServer)
- type CurrencyClient
- type CurrencyServer
- type GetAllRatesRequest
- func (*GetAllRatesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllRatesRequest) GetTimestamp() *timestamppb.Timestamp
- func (*GetAllRatesRequest) ProtoMessage()
- func (x *GetAllRatesRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllRatesRequest) Reset()
- func (x *GetAllRatesRequest) String() string
- func (m *GetAllRatesRequest) Validate() error
- type GetAllRatesRequestValidationError
- func (e GetAllRatesRequestValidationError) Cause() error
- func (e GetAllRatesRequestValidationError) Error() string
- func (e GetAllRatesRequestValidationError) ErrorName() string
- func (e GetAllRatesRequestValidationError) Field() string
- func (e GetAllRatesRequestValidationError) Key() bool
- func (e GetAllRatesRequestValidationError) Reason() string
- type GetAllRatesResponse
- func (*GetAllRatesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllRatesResponse) GetAsOf() *timestamppb.Timestamp
- func (x *GetAllRatesResponse) GetRates() map[string]float64
- func (x *GetAllRatesResponse) GetResult() GetAllRatesResponse_Result
- func (*GetAllRatesResponse) ProtoMessage()
- func (x *GetAllRatesResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllRatesResponse) Reset()
- func (x *GetAllRatesResponse) String() string
- func (m *GetAllRatesResponse) Validate() error
- type GetAllRatesResponseValidationError
- func (e GetAllRatesResponseValidationError) Cause() error
- func (e GetAllRatesResponseValidationError) Error() string
- func (e GetAllRatesResponseValidationError) ErrorName() string
- func (e GetAllRatesResponseValidationError) Field() string
- func (e GetAllRatesResponseValidationError) Key() bool
- func (e GetAllRatesResponseValidationError) Reason() string
- type GetAllRatesResponse_Result
- func (GetAllRatesResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x GetAllRatesResponse_Result) Enum() *GetAllRatesResponse_Result
- func (GetAllRatesResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetAllRatesResponse_Result) Number() protoreflect.EnumNumber
- func (x GetAllRatesResponse_Result) String() string
- func (GetAllRatesResponse_Result) Type() protoreflect.EnumType
- type UnimplementedCurrencyServer
- type UnsafeCurrencyServer
Constants ¶
This section is empty.
Variables ¶
var ( GetAllRatesResponse_Result_name = map[int32]string{ 0: "OK", 1: "MISSING_DATA", } GetAllRatesResponse_Result_value = map[string]int32{ "OK": 0, "MISSING_DATA": 1, } )
Enum value maps for GetAllRatesResponse_Result.
var Currency_ServiceDesc = grpc.ServiceDesc{ ServiceName: "code.currency.v1.Currency", HandlerType: (*CurrencyServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAllRates", Handler: _Currency_GetAllRates_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "currency/v1/currency_service.proto", }
Currency_ServiceDesc is the grpc.ServiceDesc for Currency service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_currency_v1_currency_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCurrencyServer ¶
func RegisterCurrencyServer(s grpc.ServiceRegistrar, srv CurrencyServer)
Types ¶
type CurrencyClient ¶
type CurrencyClient interface { // GetAllRates returns the exchange rates for Kin against all available currencies GetAllRates(ctx context.Context, in *GetAllRatesRequest, opts ...grpc.CallOption) (*GetAllRatesResponse, error) }
CurrencyClient is the client API for Currency 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 NewCurrencyClient ¶
func NewCurrencyClient(cc grpc.ClientConnInterface) CurrencyClient
type CurrencyServer ¶
type CurrencyServer interface { // GetAllRates returns the exchange rates for Kin against all available currencies GetAllRates(context.Context, *GetAllRatesRequest) (*GetAllRatesResponse, error) // contains filtered or unexported methods }
CurrencyServer is the server API for Currency service. All implementations must embed UnimplementedCurrencyServer for forward compatibility
type GetAllRatesRequest ¶
type GetAllRatesRequest struct { // If timestamp is included, the returned rate will be the most recent available // exchange rate prior to the provided timestamp within the same day. Otherwise, // the latest rates will be returned. Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*GetAllRatesRequest) Descriptor
deprecated
func (*GetAllRatesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllRatesRequest.ProtoReflect.Descriptor instead.
func (*GetAllRatesRequest) GetTimestamp ¶
func (x *GetAllRatesRequest) GetTimestamp() *timestamppb.Timestamp
func (*GetAllRatesRequest) ProtoMessage ¶
func (*GetAllRatesRequest) ProtoMessage()
func (*GetAllRatesRequest) ProtoReflect ¶
func (x *GetAllRatesRequest) ProtoReflect() protoreflect.Message
func (*GetAllRatesRequest) Reset ¶
func (x *GetAllRatesRequest) Reset()
func (*GetAllRatesRequest) String ¶
func (x *GetAllRatesRequest) String() string
func (*GetAllRatesRequest) Validate ¶
func (m *GetAllRatesRequest) Validate() error
Validate checks the field values on GetAllRatesRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetAllRatesRequestValidationError ¶
type GetAllRatesRequestValidationError struct {
// contains filtered or unexported fields
}
GetAllRatesRequestValidationError is the validation error returned by GetAllRatesRequest.Validate if the designated constraints aren't met.
func (GetAllRatesRequestValidationError) Cause ¶
func (e GetAllRatesRequestValidationError) Cause() error
Cause function returns cause value.
func (GetAllRatesRequestValidationError) Error ¶
func (e GetAllRatesRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetAllRatesRequestValidationError) ErrorName ¶
func (e GetAllRatesRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetAllRatesRequestValidationError) Field ¶
func (e GetAllRatesRequestValidationError) Field() string
Field function returns field value.
func (GetAllRatesRequestValidationError) Key ¶
func (e GetAllRatesRequestValidationError) Key() bool
Key function returns key value.
func (GetAllRatesRequestValidationError) Reason ¶
func (e GetAllRatesRequestValidationError) Reason() string
Reason function returns reason value.
type GetAllRatesResponse ¶
type GetAllRatesResponse struct { Result GetAllRatesResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.currency.v1.GetAllRatesResponse_Result" json:"result,omitempty"` // The time the exchange rates were observed AsOf *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=as_of,json=asOf,proto3" json:"as_of,omitempty"` // The price of 1 Kin in different currencies, keyed on 3- or 4- letter lowercase currency code. Rates map[string]float64 `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetAllRatesResponse) Descriptor
deprecated
func (*GetAllRatesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllRatesResponse.ProtoReflect.Descriptor instead.
func (*GetAllRatesResponse) GetAsOf ¶
func (x *GetAllRatesResponse) GetAsOf() *timestamppb.Timestamp
func (*GetAllRatesResponse) GetRates ¶
func (x *GetAllRatesResponse) GetRates() map[string]float64
func (*GetAllRatesResponse) GetResult ¶
func (x *GetAllRatesResponse) GetResult() GetAllRatesResponse_Result
func (*GetAllRatesResponse) ProtoMessage ¶
func (*GetAllRatesResponse) ProtoMessage()
func (*GetAllRatesResponse) ProtoReflect ¶
func (x *GetAllRatesResponse) ProtoReflect() protoreflect.Message
func (*GetAllRatesResponse) Reset ¶
func (x *GetAllRatesResponse) Reset()
func (*GetAllRatesResponse) String ¶
func (x *GetAllRatesResponse) String() string
func (*GetAllRatesResponse) Validate ¶
func (m *GetAllRatesResponse) Validate() error
Validate checks the field values on GetAllRatesResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetAllRatesResponseValidationError ¶
type GetAllRatesResponseValidationError struct {
// contains filtered or unexported fields
}
GetAllRatesResponseValidationError is the validation error returned by GetAllRatesResponse.Validate if the designated constraints aren't met.
func (GetAllRatesResponseValidationError) Cause ¶
func (e GetAllRatesResponseValidationError) Cause() error
Cause function returns cause value.
func (GetAllRatesResponseValidationError) Error ¶
func (e GetAllRatesResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetAllRatesResponseValidationError) ErrorName ¶
func (e GetAllRatesResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetAllRatesResponseValidationError) Field ¶
func (e GetAllRatesResponseValidationError) Field() string
Field function returns field value.
func (GetAllRatesResponseValidationError) Key ¶
func (e GetAllRatesResponseValidationError) Key() bool
Key function returns key value.
func (GetAllRatesResponseValidationError) Reason ¶
func (e GetAllRatesResponseValidationError) Reason() string
Reason function returns reason value.
type GetAllRatesResponse_Result ¶
type GetAllRatesResponse_Result int32
const ( GetAllRatesResponse_OK GetAllRatesResponse_Result = 0 // No currency data is available for the requested timestamp. GetAllRatesResponse_MISSING_DATA GetAllRatesResponse_Result = 1 )
func (GetAllRatesResponse_Result) Descriptor ¶
func (GetAllRatesResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (GetAllRatesResponse_Result) Enum ¶
func (x GetAllRatesResponse_Result) Enum() *GetAllRatesResponse_Result
func (GetAllRatesResponse_Result) EnumDescriptor
deprecated
func (GetAllRatesResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetAllRatesResponse_Result.Descriptor instead.
func (GetAllRatesResponse_Result) Number ¶
func (x GetAllRatesResponse_Result) Number() protoreflect.EnumNumber
func (GetAllRatesResponse_Result) String ¶
func (x GetAllRatesResponse_Result) String() string
func (GetAllRatesResponse_Result) Type ¶
func (GetAllRatesResponse_Result) Type() protoreflect.EnumType
type UnimplementedCurrencyServer ¶
type UnimplementedCurrencyServer struct { }
UnimplementedCurrencyServer must be embedded to have forward compatible implementations.
func (UnimplementedCurrencyServer) GetAllRates ¶
func (UnimplementedCurrencyServer) GetAllRates(context.Context, *GetAllRatesRequest) (*GetAllRatesResponse, error)
type UnsafeCurrencyServer ¶
type UnsafeCurrencyServer interface {
// contains filtered or unexported methods
}
UnsafeCurrencyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CurrencyServer will result in compilation errors.