Documentation ¶
Index ¶
- Variables
- func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)
- type AccountClient
- type AccountServer
- type Account_ListClient
- type Account_ListServer
- type UnimplementedAccountServer
- func (UnimplementedAccountServer) Add(context.Context, *User) (*wrapperspb.StringValue, error)
- func (UnimplementedAccountServer) Del(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (UnimplementedAccountServer) Find(context.Context, *wrapperspb.StringValue) (*User, error)
- func (UnimplementedAccountServer) List(*emptypb.Empty, Account_ListServer) error
- type UnsafeAccountServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetNickName() string
- func (x *User) GetPhone() string
- func (x *User) GetRegisterTimestamp() string
- func (x *User) GetUuid() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var Account_ServiceDesc = grpc.ServiceDesc{ ServiceName: "account.Account", HandlerType: (*AccountServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _Account_Add_Handler, }, { MethodName: "Del", Handler: _Account_Del_Handler, }, { MethodName: "Find", Handler: _Account_Find_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", Handler: _Account_List_Handler, ServerStreams: true, }, }, Metadata: "user.proto", }
Account_ServiceDesc is the grpc.ServiceDesc for Account service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAccountServer ¶
func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)
Types ¶
type AccountClient ¶
type AccountClient interface { Add(ctx context.Context, in *User, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Del(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Account_ListClient, error) Find(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error) }
AccountClient is the client API for Account 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 NewAccountClient ¶
func NewAccountClient(cc grpc.ClientConnInterface) AccountClient
type AccountServer ¶
type AccountServer interface { Add(context.Context, *User) (*wrapperspb.StringValue, error) Del(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) List(*emptypb.Empty, Account_ListServer) error Find(context.Context, *wrapperspb.StringValue) (*User, error) // contains filtered or unexported methods }
AccountServer is the server API for Account service. All implementations must embed UnimplementedAccountServer for forward compatibility
type Account_ListClient ¶
type Account_ListClient interface { Recv() (*User, error) grpc.ClientStream }
type Account_ListServer ¶
type Account_ListServer interface { Send(*User) error grpc.ServerStream }
type UnimplementedAccountServer ¶
type UnimplementedAccountServer struct { }
UnimplementedAccountServer must be embedded to have forward compatible implementations.
func (UnimplementedAccountServer) Add ¶
func (UnimplementedAccountServer) Add(context.Context, *User) (*wrapperspb.StringValue, error)
func (UnimplementedAccountServer) Del ¶
func (UnimplementedAccountServer) Del(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
func (UnimplementedAccountServer) Find ¶
func (UnimplementedAccountServer) Find(context.Context, *wrapperspb.StringValue) (*User, error)
func (UnimplementedAccountServer) List ¶
func (UnimplementedAccountServer) List(*emptypb.Empty, Account_ListServer) error
type UnsafeAccountServer ¶
type UnsafeAccountServer interface {
// contains filtered or unexported methods
}
UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccountServer will result in compilation errors.
type User ¶
type User struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` NickName string `protobuf:"bytes,2,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` RegisterTimestamp string `protobuf:"bytes,5,opt,name=register_timestamp,json=registerTimestamp,proto3" json:"register_timestamp,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetNickName ¶
func (*User) GetRegisterTimestamp ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message