Documentation ¶
Overview ¶
Package walletv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterWalletServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterWalletServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletServiceClient) error
- func RegisterWalletServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterWalletServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServiceServer) error
- func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer)
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type UnimplementedWalletServiceServer
- func (UnimplementedWalletServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedWalletServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedWalletServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedWalletServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- type UnsafeWalletServiceServer
- type Wallet
- type WalletServiceClient
- type WalletServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_osaifu_wallet_v1_wallet_proto protoreflect.FileDescriptor
var WalletService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "osaifu.wallet.v1.WalletService", HandlerType: (*WalletServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _WalletService_Create_Handler, }, { MethodName: "List", Handler: _WalletService_List_Handler, }, { MethodName: "Get", Handler: _WalletService_Get_Handler, }, { MethodName: "Delete", Handler: _WalletService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "osaifu/wallet/v1/wallet.proto", }
WalletService_ServiceDesc is the grpc.ServiceDesc for WalletService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWalletServiceHandler ¶
func RegisterWalletServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterWalletServiceHandler registers the http handlers for service WalletService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterWalletServiceHandlerClient ¶
func RegisterWalletServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletServiceClient) error
RegisterWalletServiceHandlerClient registers the http handlers for service WalletService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WalletServiceClient" to call the correct interceptors.
func RegisterWalletServiceHandlerFromEndpoint ¶
func RegisterWalletServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterWalletServiceHandlerFromEndpoint is same as RegisterWalletServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWalletServiceHandlerServer ¶
func RegisterWalletServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServiceServer) error
RegisterWalletServiceHandlerServer registers the http handlers for service WalletService to "mux". UnaryRPC :call WalletServiceServer 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 RegisterWalletServiceHandlerFromEndpoint instead.
func RegisterWalletServiceServer ¶
func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetOwner ¶
func (x *CreateRequest) GetOwner() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Wallet *Wallet `protobuf:"bytes,1,opt,name=wallet,proto3" json:"wallet,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetWallet ¶
func (x *CreateResponse) GetWallet() *Wallet
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type GetRequest ¶
type GetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Wallet *Wallet `protobuf:"bytes,1,opt,name=wallet,proto3" json:"wallet,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetWallet ¶
func (x *GetResponse) GetWallet() *Wallet
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Wallets []*Wallet `protobuf:"bytes,1,rep,name=wallets,proto3" json:"wallets,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetWallets ¶
func (x *ListResponse) GetWallets() []*Wallet
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type UnimplementedWalletServiceServer ¶
type UnimplementedWalletServiceServer struct { }
UnimplementedWalletServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedWalletServiceServer) Create ¶
func (UnimplementedWalletServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedWalletServiceServer) Delete ¶
func (UnimplementedWalletServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedWalletServiceServer) Get ¶
func (UnimplementedWalletServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedWalletServiceServer) List ¶
func (UnimplementedWalletServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
type UnsafeWalletServiceServer ¶
type UnsafeWalletServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWalletServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WalletServiceServer will result in compilation errors.
type Wallet ¶
type Wallet struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*Wallet) Descriptor
deprecated
func (*Wallet) GetBalance ¶
func (*Wallet) ProtoMessage ¶
func (*Wallet) ProtoMessage()
func (*Wallet) ProtoReflect ¶
func (x *Wallet) ProtoReflect() protoreflect.Message
type WalletServiceClient ¶
type WalletServiceClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) }
WalletServiceClient is the client API for WalletService 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 NewWalletServiceClient ¶
func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient
type WalletServiceServer ¶
type WalletServiceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) }
WalletServiceServer is the server API for WalletService service. All implementations should embed UnimplementedWalletServiceServer for forward compatibility