Documentation ¶
Overview ¶
Package bank_account is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBankAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBankAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BankAccountClient) error
- func RegisterBankAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBankAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BankAccountServer) error
- func RegisterBankAccountServer(s *grpc.Server, srv BankAccountServer)
- type BankAccountClient
- type BankAccountServer
- type CreateAccountRequest
- func (*CreateAccountRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAccountRequest) GetUserID() int64
- func (*CreateAccountRequest) ProtoMessage()
- func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAccountRequest) Reset()
- func (x *CreateAccountRequest) String() string
- type CreateAccountResponse
- type UnimplementedBankAccountServer
Constants ¶
This section is empty.
Variables ¶
var File_vendor_protogen_bank_account_bank_account_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBankAccountHandler ¶
func RegisterBankAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBankAccountHandler registers the http handlers for service BankAccount to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBankAccountHandlerClient ¶
func RegisterBankAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BankAccountClient) error
RegisterBankAccountHandlerClient registers the http handlers for service BankAccount to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BankAccountClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BankAccountClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BankAccountClient" to call the correct interceptors.
func RegisterBankAccountHandlerFromEndpoint ¶
func RegisterBankAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBankAccountHandlerFromEndpoint is same as RegisterBankAccountHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBankAccountHandlerServer ¶
func RegisterBankAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BankAccountServer) error
RegisterBankAccountHandlerServer registers the http handlers for service BankAccount to "mux". UnaryRPC :call BankAccountServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBankAccountHandlerFromEndpoint instead.
func RegisterBankAccountServer ¶
func RegisterBankAccountServer(s *grpc.Server, srv BankAccountServer)
Types ¶
type BankAccountClient ¶
type BankAccountClient interface {
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
}
BankAccountClient is the client API for BankAccount service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBankAccountClient ¶
func NewBankAccountClient(cc grpc.ClientConnInterface) BankAccountClient
type BankAccountServer ¶
type BankAccountServer interface {
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
}
BankAccountServer is the server API for BankAccount service.
type CreateAccountRequest ¶
type CreateAccountRequest struct { UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*CreateAccountRequest) Descriptor
deprecated
func (*CreateAccountRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.
func (*CreateAccountRequest) GetUserID ¶
func (x *CreateAccountRequest) GetUserID() int64
func (*CreateAccountRequest) ProtoMessage ¶
func (*CreateAccountRequest) ProtoMessage()
func (*CreateAccountRequest) ProtoReflect ¶
func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message
func (*CreateAccountRequest) Reset ¶
func (x *CreateAccountRequest) Reset()
func (*CreateAccountRequest) String ¶
func (x *CreateAccountRequest) String() string
type CreateAccountResponse ¶
type CreateAccountResponse struct {
// contains filtered or unexported fields
}
func (*CreateAccountResponse) Descriptor
deprecated
func (*CreateAccountResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead.
func (*CreateAccountResponse) ProtoMessage ¶
func (*CreateAccountResponse) ProtoMessage()
func (*CreateAccountResponse) ProtoReflect ¶
func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message
func (*CreateAccountResponse) Reset ¶
func (x *CreateAccountResponse) Reset()
func (*CreateAccountResponse) String ¶
func (x *CreateAccountResponse) String() string
type UnimplementedBankAccountServer ¶
type UnimplementedBankAccountServer struct { }
UnimplementedBankAccountServer can be embedded to have forward compatible implementations.
func (*UnimplementedBankAccountServer) CreateAccount ¶
func (*UnimplementedBankAccountServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)