proto

package
v0.0.0-...-a6aa03c Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Wallet_BatchCreateWallet_FullMethodName  = "/Wallet/BatchCreateWallet"
	Wallet_UpdateWalletUser_FullMethodName   = "/Wallet/UpdateWalletUser"
	Wallet_GetAddressByUserId_FullMethodName = "/Wallet/GetAddressByUserId"
	Wallet_GetAddress_FullMethodName         = "/Wallet/GetAddress"
)

Variables

View Source
var File_wallet_proto protoreflect.FileDescriptor
View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchCreateWallet",
			Handler:    _Wallet_BatchCreateWallet_Handler,
		},
		{
			MethodName: "UpdateWalletUser",
			Handler:    _Wallet_UpdateWalletUser_Handler,
		},
		{
			MethodName: "GetAddressByUserId",
			Handler:    _Wallet_GetAddressByUserId_Handler,
		},
		{
			MethodName: "GetAddress",
			Handler:    _Wallet_GetAddress_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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 RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

Types

type BatchCreateWalletReq

type BatchCreateWalletReq struct {
	Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // 创建新地址数量
	// contains filtered or unexported fields
}

func (*BatchCreateWalletReq) Descriptor deprecated

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

Deprecated: Use BatchCreateWalletReq.ProtoReflect.Descriptor instead.

func (*BatchCreateWalletReq) GetNum

func (x *BatchCreateWalletReq) GetNum() uint32

func (*BatchCreateWalletReq) ProtoMessage

func (*BatchCreateWalletReq) ProtoMessage()

func (*BatchCreateWalletReq) ProtoReflect

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

func (*BatchCreateWalletReq) Reset

func (x *BatchCreateWalletReq) Reset()

func (*BatchCreateWalletReq) String

func (x *BatchCreateWalletReq) String() string

type GetAddressByUserIdReq

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

func (*GetAddressByUserIdReq) Descriptor deprecated

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

Deprecated: Use GetAddressByUserIdReq.ProtoReflect.Descriptor instead.

func (*GetAddressByUserIdReq) GetUserId

func (x *GetAddressByUserIdReq) GetUserId() uint64

func (*GetAddressByUserIdReq) ProtoMessage

func (*GetAddressByUserIdReq) ProtoMessage()

func (*GetAddressByUserIdReq) ProtoReflect

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

func (*GetAddressByUserIdReq) Reset

func (x *GetAddressByUserIdReq) Reset()

func (*GetAddressByUserIdReq) String

func (x *GetAddressByUserIdReq) String() string

type GetAddressReq

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

func (*GetAddressReq) Descriptor deprecated

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

Deprecated: Use GetAddressReq.ProtoReflect.Descriptor instead.

func (*GetAddressReq) GetAddress

func (x *GetAddressReq) GetAddress() string

func (*GetAddressReq) ProtoMessage

func (*GetAddressReq) ProtoMessage()

func (*GetAddressReq) ProtoReflect

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

func (*GetAddressReq) Reset

func (x *GetAddressReq) Reset()

func (*GetAddressReq) String

func (x *GetAddressReq) String() string

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) BatchCreateWallet

func (UnimplementedWalletServer) GetAddress

func (UnimplementedWalletServer) GetAddressByUserId

func (UnimplementedWalletServer) UpdateWalletUser

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 UpdateWalletUserReq

type UpdateWalletUserReq struct {
	UserId  uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateWalletUserReq) Descriptor deprecated

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

Deprecated: Use UpdateWalletUserReq.ProtoReflect.Descriptor instead.

func (*UpdateWalletUserReq) GetAddress

func (x *UpdateWalletUserReq) GetAddress() string

func (*UpdateWalletUserReq) GetUserId

func (x *UpdateWalletUserReq) GetUserId() uint64

func (*UpdateWalletUserReq) ProtoMessage

func (*UpdateWalletUserReq) ProtoMessage()

func (*UpdateWalletUserReq) ProtoReflect

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

func (*UpdateWalletUserReq) Reset

func (x *UpdateWalletUserReq) Reset()

func (*UpdateWalletUserReq) String

func (x *UpdateWalletUserReq) String() string

type WalletClient

type WalletClient interface {
	// 批量生成地址
	BatchCreateWallet(ctx context.Context, in *BatchCreateWalletReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 通过私钥生成地址信息
	//
	//	rpc CreateAddressByPrivateKey(CreateAddressByPrivateKeyReq) returns (google.protobuf.Empty);
	//
	// 将公钥转换为地址信息
	//
	//	rpc GetAddressByPublicKey(GetAddressByPublicKeyReq) returns(google.protobuf.Empty);
	//
	// 为新用户分配地址
	UpdateWalletUser(ctx context.Context, in *UpdateWalletUserReq, opts ...grpc.CallOption) (*WalletInfo, error)
	// 通过用户ID查询地址地址信息
	GetAddressByUserId(ctx context.Context, in *GetAddressByUserIdReq, opts ...grpc.CallOption) (*WalletInfo, error)
	// 通过用户地址信息查询地址地址信息
	GetAddress(ctx context.Context, in *GetAddressReq, opts ...grpc.CallOption) (*WalletInfo, 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 WalletInfo

type WalletInfo struct {
	UserId      uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Address     string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	PublicKey   string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	UpdateTime  uint64 `protobuf:"varint,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	AddressType uint32 `protobuf:"varint,5,opt,name=address_type,json=addressType,proto3" json:"address_type,omitempty"`
	// contains filtered or unexported fields
}

func (*WalletInfo) Descriptor deprecated

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

Deprecated: Use WalletInfo.ProtoReflect.Descriptor instead.

func (*WalletInfo) GetAddress

func (x *WalletInfo) GetAddress() string

func (*WalletInfo) GetAddressType

func (x *WalletInfo) GetAddressType() uint32

func (*WalletInfo) GetPublicKey

func (x *WalletInfo) GetPublicKey() string

func (*WalletInfo) GetUpdateTime

func (x *WalletInfo) GetUpdateTime() uint64

func (*WalletInfo) GetUserId

func (x *WalletInfo) GetUserId() uint64

func (*WalletInfo) ProtoMessage

func (*WalletInfo) ProtoMessage()

func (*WalletInfo) ProtoReflect

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

func (*WalletInfo) Reset

func (x *WalletInfo) Reset()

func (*WalletInfo) String

func (x *WalletInfo) String() string

type WalletServer

type WalletServer interface {
	// 批量生成地址
	BatchCreateWallet(context.Context, *BatchCreateWalletReq) (*emptypb.Empty, error)
	// 通过私钥生成地址信息
	//
	//	rpc CreateAddressByPrivateKey(CreateAddressByPrivateKeyReq) returns (google.protobuf.Empty);
	//
	// 将公钥转换为地址信息
	//
	//	rpc GetAddressByPublicKey(GetAddressByPublicKeyReq) returns(google.protobuf.Empty);
	//
	// 为新用户分配地址
	UpdateWalletUser(context.Context, *UpdateWalletUserReq) (*WalletInfo, error)
	// 通过用户ID查询地址地址信息
	GetAddressByUserId(context.Context, *GetAddressByUserIdReq) (*WalletInfo, error)
	// 通过用户地址信息查询地址地址信息
	GetAddress(context.Context, *GetAddressReq) (*WalletInfo, 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