v1

package
v0.0.0-...-d470ab9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_Register_FullMethodName = "/smart.v1.UserService/Register"
	UserService_Login_FullMethodName    = "/smart.v1.UserService/Login"
)
View Source
const OperationUserServiceLogin = "/smart.v1.UserService/Login"
View Source
const OperationUserServiceRegister = "/smart.v1.UserService/Register"

Variables

View Source
var File_smart_v1_model_proto protoreflect.FileDescriptor
View Source
var File_smart_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "smart.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _UserService_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _UserService_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "smart/v1/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 RegisterUserServiceHTTPServer

func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

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 UserLoginRequest

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

func (*UserLoginRequest) Descriptor deprecated

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

Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.

func (*UserLoginRequest) GetEmail

func (x *UserLoginRequest) GetEmail() string

func (*UserLoginRequest) GetPassword

func (x *UserLoginRequest) GetPassword() string

func (*UserLoginRequest) GetUserName

func (x *UserLoginRequest) GetUserName() string

func (*UserLoginRequest) ProtoMessage

func (*UserLoginRequest) ProtoMessage()

func (*UserLoginRequest) ProtoReflect

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

func (*UserLoginRequest) Reset

func (x *UserLoginRequest) Reset()

func (*UserLoginRequest) String

func (x *UserLoginRequest) String() string

type UserLoginResponse

type UserLoginResponse struct {
	Code       string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message    string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	MessageKey string `protobuf:"bytes,3,opt,name=message_key,json=messageKey,proto3" json:"message_key,omitempty"`
	Token      string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	UserName   string `protobuf:"bytes,5,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	// contains filtered or unexported fields
}

func (*UserLoginResponse) Descriptor deprecated

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

Deprecated: Use UserLoginResponse.ProtoReflect.Descriptor instead.

func (*UserLoginResponse) GetCode

func (x *UserLoginResponse) GetCode() string

func (*UserLoginResponse) GetMessage

func (x *UserLoginResponse) GetMessage() string

func (*UserLoginResponse) GetMessageKey

func (x *UserLoginResponse) GetMessageKey() string

func (*UserLoginResponse) GetToken

func (x *UserLoginResponse) GetToken() string

func (*UserLoginResponse) GetUserName

func (x *UserLoginResponse) GetUserName() string

func (*UserLoginResponse) ProtoMessage

func (*UserLoginResponse) ProtoMessage()

func (*UserLoginResponse) ProtoReflect

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

func (*UserLoginResponse) Reset

func (x *UserLoginResponse) Reset()

func (*UserLoginResponse) String

func (x *UserLoginResponse) String() string

type UserRegisterRequest

type UserRegisterRequest 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"`
	UserName    string `protobuf:"bytes,3,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

keep simple, user oder require update remaining info, ex: phone, address, ....

func (*UserRegisterRequest) Descriptor deprecated

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

Deprecated: Use UserRegisterRequest.ProtoReflect.Descriptor instead.

func (*UserRegisterRequest) GetEmail

func (x *UserRegisterRequest) GetEmail() string

func (*UserRegisterRequest) GetPassword

func (x *UserRegisterRequest) GetPassword() string

func (*UserRegisterRequest) GetPhoneNumber

func (x *UserRegisterRequest) GetPhoneNumber() string

func (*UserRegisterRequest) GetUserName

func (x *UserRegisterRequest) GetUserName() string

func (*UserRegisterRequest) ProtoMessage

func (*UserRegisterRequest) ProtoMessage()

func (*UserRegisterRequest) ProtoReflect

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

func (*UserRegisterRequest) Reset

func (x *UserRegisterRequest) Reset()

func (*UserRegisterRequest) String

func (x *UserRegisterRequest) String() string

type UserRegisterResponse

type UserRegisterResponse struct {
	Code       string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message    string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	MessageKey string `protobuf:"bytes,3,opt,name=message_key,json=messageKey,proto3" json:"message_key,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRegisterResponse) Descriptor deprecated

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

Deprecated: Use UserRegisterResponse.ProtoReflect.Descriptor instead.

func (*UserRegisterResponse) GetCode

func (x *UserRegisterResponse) GetCode() string

func (*UserRegisterResponse) GetMessage

func (x *UserRegisterResponse) GetMessage() string

func (*UserRegisterResponse) GetMessageKey

func (x *UserRegisterResponse) GetMessageKey() string

func (*UserRegisterResponse) ProtoMessage

func (*UserRegisterResponse) ProtoMessage()

func (*UserRegisterResponse) ProtoReflect

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

func (*UserRegisterResponse) Reset

func (x *UserRegisterResponse) Reset()

func (*UserRegisterResponse) String

func (x *UserRegisterResponse) String() string

type UserServiceClient

type UserServiceClient interface {
	Register(ctx context.Context, in *UserRegisterRequest, opts ...grpc.CallOption) (*UserRegisterResponse, error)
	Login(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginResponse, 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 UserServiceHTTPClient

type UserServiceHTTPClient interface {
	Login(ctx context.Context, req *UserLoginRequest, opts ...http.CallOption) (rsp *UserLoginResponse, err error)
	Register(ctx context.Context, req *UserRegisterRequest, opts ...http.CallOption) (rsp *UserRegisterResponse, err error)
}

func NewUserServiceHTTPClient

func NewUserServiceHTTPClient(client *http.Client) UserServiceHTTPClient

type UserServiceHTTPClientImpl

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

func (*UserServiceHTTPClientImpl) Login

func (*UserServiceHTTPClientImpl) Register

type UserServiceServer

type UserServiceServer interface {
	Register(context.Context, *UserRegisterRequest) (*UserRegisterResponse, error)
	Login(context.Context, *UserLoginRequest) (*UserLoginResponse, 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