users

package
v0.0.0-...-5252a31 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _UserService_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _UserService_Login_Handler,
		},
		{
			MethodName: "GetUserByEmail",
			Handler:    _UserService_GetUserByEmail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type GetUserByEmailReq

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

func (*GetUserByEmailReq) Descriptor deprecated

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

Deprecated: Use GetUserByEmailReq.ProtoReflect.Descriptor instead.

func (*GetUserByEmailReq) GetEmail

func (x *GetUserByEmailReq) GetEmail() string

func (*GetUserByEmailReq) ProtoMessage

func (*GetUserByEmailReq) ProtoMessage()

func (*GetUserByEmailReq) ProtoReflect

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

func (*GetUserByEmailReq) Reset

func (x *GetUserByEmailReq) Reset()

func (*GetUserByEmailReq) String

func (x *GetUserByEmailReq) String() string

type GetUserByEmailResp

type GetUserByEmailResp struct {
	Email       string `protobuf:"bytes,1,opt,name=Email,proto3" json:"Email,omitempty"`
	NickName    string `protobuf:"bytes,2,opt,name=NickName,proto3" json:"NickName,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
	Avatar      string `protobuf:"bytes,4,opt,name=Avatar,proto3" json:"Avatar,omitempty"`
	BirthDay    int64  `protobuf:"varint,5,opt,name=BirthDay,proto3" json:"BirthDay,omitempty"`
	Address     string `protobuf:"bytes,6,opt,name=Address,proto3" json:"Address,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserByEmailResp) Descriptor deprecated

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

Deprecated: Use GetUserByEmailResp.ProtoReflect.Descriptor instead.

func (*GetUserByEmailResp) GetAddress

func (x *GetUserByEmailResp) GetAddress() string

func (*GetUserByEmailResp) GetAvatar

func (x *GetUserByEmailResp) GetAvatar() string

func (*GetUserByEmailResp) GetBirthDay

func (x *GetUserByEmailResp) GetBirthDay() int64

func (*GetUserByEmailResp) GetDescription

func (x *GetUserByEmailResp) GetDescription() string

func (*GetUserByEmailResp) GetEmail

func (x *GetUserByEmailResp) GetEmail() string

func (*GetUserByEmailResp) GetNickName

func (x *GetUserByEmailResp) GetNickName() string

func (*GetUserByEmailResp) ProtoMessage

func (*GetUserByEmailResp) ProtoMessage()

func (*GetUserByEmailResp) ProtoReflect

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

func (*GetUserByEmailResp) Reset

func (x *GetUserByEmailResp) Reset()

func (*GetUserByEmailResp) String

func (x *GetUserByEmailResp) String() string

type LoginReq

type LoginReq struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReq) Descriptor deprecated

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

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetEmail

func (x *LoginReq) GetEmail() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

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

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

type LoginResp

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

func (*LoginResp) Descriptor deprecated

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

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetUserId

func (x *LoginResp) GetUserId() int32

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

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

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

type RegisterReq

type RegisterReq struct {
	Email           string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password        string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	ConfirmPassword string `protobuf:"bytes,3,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetConfirmPassword

func (x *RegisterReq) GetConfirmPassword() string

func (*RegisterReq) GetEmail

func (x *RegisterReq) GetEmail() string

func (*RegisterReq) GetPassword

func (x *RegisterReq) GetPassword() string

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

type RegisterResp

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

func (*RegisterResp) Descriptor deprecated

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

Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.

func (*RegisterResp) GetUserId

func (x *RegisterResp) GetUserId() int32

func (*RegisterResp) ProtoMessage

func (*RegisterResp) ProtoMessage()

func (*RegisterResp) ProtoReflect

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

func (*RegisterResp) Reset

func (x *RegisterResp) Reset()

func (*RegisterResp) String

func (x *RegisterResp) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUserByEmail

func (UnimplementedUserServiceServer) Login

func (UnimplementedUserServiceServer) Register

type UnsafeUserServiceServer

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

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

type UserServiceClient

type UserServiceClient interface {
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error)
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
	GetUserByEmail(ctx context.Context, in *GetUserByEmailReq, opts ...grpc.CallOption) (*GetUserByEmailResp, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceServer

type UserServiceServer interface {
	Register(context.Context, *RegisterReq) (*RegisterResp, error)
	Login(context.Context, *LoginReq) (*LoginResp, error)
	GetUserByEmail(context.Context, *GetUserByEmailReq) (*GetUserByEmailResp, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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