__

package
v13.0.0-...-ff4b850 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Currency_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Currency",
	HandlerType: (*CurrencyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRate",
			Handler:    _Currency_GetRate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "currency.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)

View Source
var File_currency_proto protoreflect.FileDescriptor

Functions

func RegisterCurrencyServer

func RegisterCurrencyServer(s grpc.ServiceRegistrar, srv CurrencyServer)

Types

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#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. All implementations should embed UnimplementedCurrencyServer for forward compatibility

type RateRequest

type RateRequest struct {
	Base        string `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
	Destination string `protobuf:"bytes,2,opt,name=destination,proto3" 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() string

func (*RateRequest) GetDestination

func (x *RateRequest) GetDestination() string

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 should be embedded to have forward compatible implementations.

func (UnimplementedCurrencyServer) GetRate

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.

Jump to

Keyboard shortcuts

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