bank

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BankService_GetCurrentBalance_FullMethodName  = "/bank.BankService/GetCurrentBalance"
	BankService_FetchExchangeRates_FullMethodName = "/bank.BankService/FetchExchangeRates"
)

Variables

View Source
var BankService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bank.BankService",
	HandlerType: (*BankServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCurrentBalance",
			Handler:    _BankService_GetCurrentBalance_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "FetchExchangeRates",
			Handler:       _BankService_FetchExchangeRates_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/bank/service.proto",
}

BankService_ServiceDesc is the grpc.ServiceDesc for BankService 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_proto_bank_service_proto protoreflect.FileDescriptor
View Source
var File_proto_bank_type_account_proto protoreflect.FileDescriptor
View Source
var File_proto_bank_type_exchange_proto protoreflect.FileDescriptor

Functions

func RegisterBankServiceServer

func RegisterBankServiceServer(s grpc.ServiceRegistrar, srv BankServiceServer)

Types

type BankServiceClient

type BankServiceClient interface {
	GetCurrentBalance(ctx context.Context, in *CurrentBalanceRequest, opts ...grpc.CallOption) (*CurrentBalanceResponse, error)
	FetchExchangeRates(ctx context.Context, in *ExchangeRateRequest, opts ...grpc.CallOption) (BankService_FetchExchangeRatesClient, error)
}

BankServiceClient is the client API for BankService 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.

type BankServiceServer

type BankServiceServer interface {
	GetCurrentBalance(context.Context, *CurrentBalanceRequest) (*CurrentBalanceResponse, error)
	FetchExchangeRates(*ExchangeRateRequest, BankService_FetchExchangeRatesServer) error
	// contains filtered or unexported methods
}

BankServiceServer is the server API for BankService service. All implementations must embed UnimplementedBankServiceServer for forward compatibility

type BankService_FetchExchangeRatesClient added in v0.0.9

type BankService_FetchExchangeRatesClient interface {
	Recv() (*ExchangeRateResponse, error)
	grpc.ClientStream
}

type BankService_FetchExchangeRatesServer added in v0.0.9

type BankService_FetchExchangeRatesServer interface {
	Send(*ExchangeRateResponse) error
	grpc.ServerStream
}

type CurrentBalanceRequest

type CurrentBalanceRequest struct {
	AccountNumber string `protobuf:"bytes,1,opt,name=account_number,proto3" json:"account_number,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentBalanceRequest) Descriptor deprecated

func (*CurrentBalanceRequest) Descriptor() ([]byte, []int)

Deprecated: Use CurrentBalanceRequest.ProtoReflect.Descriptor instead.

func (*CurrentBalanceRequest) GetAccountNumber

func (x *CurrentBalanceRequest) GetAccountNumber() string

func (*CurrentBalanceRequest) ProtoMessage

func (*CurrentBalanceRequest) ProtoMessage()

func (*CurrentBalanceRequest) ProtoReflect

func (x *CurrentBalanceRequest) ProtoReflect() protoreflect.Message

func (*CurrentBalanceRequest) Reset

func (x *CurrentBalanceRequest) Reset()

func (*CurrentBalanceRequest) String

func (x *CurrentBalanceRequest) String() string

type CurrentBalanceResponse

type CurrentBalanceResponse struct {
	Amount      float64    `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	CurrentDate *date.Date `protobuf:"bytes,2,opt,name=current_date,proto3" json:"current_date,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentBalanceResponse) Descriptor deprecated

func (*CurrentBalanceResponse) Descriptor() ([]byte, []int)

Deprecated: Use CurrentBalanceResponse.ProtoReflect.Descriptor instead.

func (*CurrentBalanceResponse) GetAmount

func (x *CurrentBalanceResponse) GetAmount() float64

func (*CurrentBalanceResponse) GetCurrentDate

func (x *CurrentBalanceResponse) GetCurrentDate() *date.Date

func (*CurrentBalanceResponse) ProtoMessage

func (*CurrentBalanceResponse) ProtoMessage()

func (*CurrentBalanceResponse) ProtoReflect

func (x *CurrentBalanceResponse) ProtoReflect() protoreflect.Message

func (*CurrentBalanceResponse) Reset

func (x *CurrentBalanceResponse) Reset()

func (*CurrentBalanceResponse) String

func (x *CurrentBalanceResponse) String() string

type ExchangeRateRequest added in v0.0.9

type ExchangeRateRequest struct {
	FromCurrency string `protobuf:"bytes,1,opt,name=from_currency,proto3" json:"from_currency,omitempty"`
	ToCurrency   string `protobuf:"bytes,2,opt,name=to_currency,proto3" json:"to_currency,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeRateRequest) Descriptor deprecated added in v0.0.9

func (*ExchangeRateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExchangeRateRequest.ProtoReflect.Descriptor instead.

func (*ExchangeRateRequest) GetFromCurrency added in v0.0.9

func (x *ExchangeRateRequest) GetFromCurrency() string

func (*ExchangeRateRequest) GetToCurrency added in v0.0.9

func (x *ExchangeRateRequest) GetToCurrency() string

func (*ExchangeRateRequest) ProtoMessage added in v0.0.9

func (*ExchangeRateRequest) ProtoMessage()

func (*ExchangeRateRequest) ProtoReflect added in v0.0.9

func (x *ExchangeRateRequest) ProtoReflect() protoreflect.Message

func (*ExchangeRateRequest) Reset added in v0.0.9

func (x *ExchangeRateRequest) Reset()

func (*ExchangeRateRequest) String added in v0.0.9

func (x *ExchangeRateRequest) String() string

type ExchangeRateResponse added in v0.0.9

type ExchangeRateResponse struct {
	FromCurrency string  `protobuf:"bytes,1,opt,name=from_currency,proto3" json:"from_currency,omitempty"`
	ToCurrency   string  `protobuf:"bytes,2,opt,name=to_currency,proto3" json:"to_currency,omitempty"`
	Rate         float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"`
	Timestamp    string  `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeRateResponse) Descriptor deprecated added in v0.0.9

func (*ExchangeRateResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExchangeRateResponse.ProtoReflect.Descriptor instead.

func (*ExchangeRateResponse) GetFromCurrency added in v0.0.9

func (x *ExchangeRateResponse) GetFromCurrency() string

func (*ExchangeRateResponse) GetRate added in v0.0.9

func (x *ExchangeRateResponse) GetRate() float64

func (*ExchangeRateResponse) GetTimestamp added in v0.0.9

func (x *ExchangeRateResponse) GetTimestamp() string

func (*ExchangeRateResponse) GetToCurrency added in v0.0.9

func (x *ExchangeRateResponse) GetToCurrency() string

func (*ExchangeRateResponse) ProtoMessage added in v0.0.9

func (*ExchangeRateResponse) ProtoMessage()

func (*ExchangeRateResponse) ProtoReflect added in v0.0.9

func (x *ExchangeRateResponse) ProtoReflect() protoreflect.Message

func (*ExchangeRateResponse) Reset added in v0.0.9

func (x *ExchangeRateResponse) Reset()

func (*ExchangeRateResponse) String added in v0.0.9

func (x *ExchangeRateResponse) String() string

type UnimplementedBankServiceServer

type UnimplementedBankServiceServer struct {
}

UnimplementedBankServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBankServiceServer) FetchExchangeRates added in v0.0.9

func (UnimplementedBankServiceServer) GetCurrentBalance

type UnsafeBankServiceServer

type UnsafeBankServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeBankServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BankServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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