v1

package
v0.0.0-...-370980d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_wallet_proto protoreflect.FileDescriptor
View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.wallet.v1.Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVirtualWallet",
			Handler:    _Wallet_GetVirtualWallet_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/wallet.proto",
}

Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWalletHTTPServer

func RegisterWalletHTTPServer(s *http.Server, srv WalletHTTPServer)

func RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

Types

type GetVirtualWalletReq

type GetVirtualWalletReq struct {
	UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVirtualWalletReq) Descriptor deprecated

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

Deprecated: Use GetVirtualWalletReq.ProtoReflect.Descriptor instead.

func (*GetVirtualWalletReq) GetUserId

func (x *GetVirtualWalletReq) GetUserId() uint64

func (*GetVirtualWalletReq) ProtoMessage

func (*GetVirtualWalletReq) ProtoMessage()

func (*GetVirtualWalletReq) ProtoReflect

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

func (*GetVirtualWalletReq) Reset

func (x *GetVirtualWalletReq) Reset()

func (*GetVirtualWalletReq) String

func (x *GetVirtualWalletReq) String() string

type GetVirtualWalletResp

type GetVirtualWalletResp struct {
	Wallet *VirtualWallet `protobuf:"bytes,1,opt,name=wallet,proto3" json:"wallet,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVirtualWalletResp) Descriptor deprecated

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

Deprecated: Use GetVirtualWalletResp.ProtoReflect.Descriptor instead.

func (*GetVirtualWalletResp) GetWallet

func (x *GetVirtualWalletResp) GetWallet() *VirtualWallet

func (*GetVirtualWalletResp) ProtoMessage

func (*GetVirtualWalletResp) ProtoMessage()

func (*GetVirtualWalletResp) ProtoReflect

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

func (*GetVirtualWalletResp) Reset

func (x *GetVirtualWalletResp) Reset()

func (*GetVirtualWalletResp) String

func (x *GetVirtualWalletResp) String() string

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) GetVirtualWallet

type UnsafeWalletServer

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

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

type VirtualWallet

type VirtualWallet struct {

	// 钱包ID
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 用户ID
	UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// 总资产
	Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"`
	// 冻结金额
	FrozenAmount string `protobuf:"bytes,4,opt,name=frozen_amount,json=frozenAmount,proto3" json:"frozen_amount,omitempty"`
	// contains filtered or unexported fields
}

func (*VirtualWallet) Descriptor deprecated

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

Deprecated: Use VirtualWallet.ProtoReflect.Descriptor instead.

func (*VirtualWallet) GetBalance

func (x *VirtualWallet) GetBalance() string

func (*VirtualWallet) GetFrozenAmount

func (x *VirtualWallet) GetFrozenAmount() string

func (*VirtualWallet) GetId

func (x *VirtualWallet) GetId() uint64

func (*VirtualWallet) GetUserId

func (x *VirtualWallet) GetUserId() uint64

func (*VirtualWallet) ProtoMessage

func (*VirtualWallet) ProtoMessage()

func (*VirtualWallet) ProtoReflect

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

func (*VirtualWallet) Reset

func (x *VirtualWallet) Reset()

func (*VirtualWallet) String

func (x *VirtualWallet) String() string

type WalletClient

type WalletClient interface {
	// GetVirtualWallet 获取虚拟钱包
	GetVirtualWallet(ctx context.Context, in *GetVirtualWalletReq, opts ...grpc.CallOption) (*GetVirtualWalletResp, error)
}

WalletClient is the client API for Wallet 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 NewWalletClient

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletHTTPClient

type WalletHTTPClient interface {
	GetVirtualWallet(ctx context.Context, req *GetVirtualWalletReq, opts ...http.CallOption) (rsp *GetVirtualWalletResp, err error)
}

func NewWalletHTTPClient

func NewWalletHTTPClient(client *http.Client) WalletHTTPClient

type WalletHTTPClientImpl

type WalletHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*WalletHTTPClientImpl) GetVirtualWallet

type WalletHTTPServer

type WalletHTTPServer interface {
	GetVirtualWallet(context.Context, *GetVirtualWalletReq) (*GetVirtualWalletResp, error)
}

type WalletServer

type WalletServer interface {
	// GetVirtualWallet 获取虚拟钱包
	GetVirtualWallet(context.Context, *GetVirtualWalletReq) (*GetVirtualWalletResp, error)
	// contains filtered or unexported methods
}

WalletServer is the server API for Wallet service. All implementations must embed UnimplementedWalletServer for forward compatibility

Jump to

Keyboard shortcuts

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