handler

package
v0.0.0-...-0064678 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAuth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "handler.UserAuth",
	HandlerType: (*UserAuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _UserAuth_Login_Handler,
		},
		{
			MethodName: "SignUp",
			Handler:    _UserAuth_SignUp_Handler,
		},
		{
			MethodName: "Check",
			Handler:    _UserAuth_Check_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

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

Functions

func RegisterUserAuthServer

func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)

Types

type CheckReq

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

func (*CheckReq) Descriptor deprecated

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

Deprecated: Use CheckReq.ProtoReflect.Descriptor instead.

func (*CheckReq) GetToken

func (x *CheckReq) GetToken() string

func (*CheckReq) ProtoMessage

func (*CheckReq) ProtoMessage()

func (*CheckReq) ProtoReflect

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

func (*CheckReq) Reset

func (x *CheckReq) Reset()

func (*CheckReq) String

func (x *CheckReq) String() string

type CheckRes

type CheckRes struct {
	NewToken string `protobuf:"bytes,1,opt,name=newToken,proto3" json:"newToken,omitempty"`
	UserID   string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	Code     bool   `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckRes) Descriptor deprecated

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

Deprecated: Use CheckRes.ProtoReflect.Descriptor instead.

func (*CheckRes) GetCode

func (x *CheckRes) GetCode() bool

func (*CheckRes) GetNewToken

func (x *CheckRes) GetNewToken() string

func (*CheckRes) GetUserID

func (x *CheckRes) GetUserID() string

func (*CheckRes) ProtoMessage

func (*CheckRes) ProtoMessage()

func (*CheckRes) ProtoReflect

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

func (*CheckRes) Reset

func (x *CheckRes) Reset()

func (*CheckRes) String

func (x *CheckRes) String() string

type LoginReq

type LoginReq struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Pwd   string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,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) GetPwd

func (x *LoginReq) GetPwd() 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 LoginRes

type LoginRes struct {
	Token  string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRes) Descriptor deprecated

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

Deprecated: Use LoginRes.ProtoReflect.Descriptor instead.

func (*LoginRes) GetToken

func (x *LoginRes) GetToken() string

func (*LoginRes) GetUserID

func (x *LoginRes) GetUserID() string

func (*LoginRes) ProtoMessage

func (*LoginRes) ProtoMessage()

func (*LoginRes) ProtoReflect

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

func (*LoginRes) Reset

func (x *LoginRes) Reset()

func (*LoginRes) String

func (x *LoginRes) String() string

type SignUpReq

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

func (*SignUpReq) Descriptor deprecated

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

Deprecated: Use SignUpReq.ProtoReflect.Descriptor instead.

func (*SignUpReq) GetEmail

func (x *SignUpReq) GetEmail() string

func (*SignUpReq) GetPwd

func (x *SignUpReq) GetPwd() string

func (*SignUpReq) ProtoMessage

func (*SignUpReq) ProtoMessage()

func (*SignUpReq) ProtoReflect

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

func (*SignUpReq) Reset

func (x *SignUpReq) Reset()

func (*SignUpReq) String

func (x *SignUpReq) String() string

type SignUpRes

type SignUpRes struct {
	Token  string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUpRes) Descriptor deprecated

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

Deprecated: Use SignUpRes.ProtoReflect.Descriptor instead.

func (*SignUpRes) GetToken

func (x *SignUpRes) GetToken() string

func (*SignUpRes) GetUserID

func (x *SignUpRes) GetUserID() string

func (*SignUpRes) ProtoMessage

func (*SignUpRes) ProtoMessage()

func (*SignUpRes) ProtoReflect

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

func (*SignUpRes) Reset

func (x *SignUpRes) Reset()

func (*SignUpRes) String

func (x *SignUpRes) String() string

type UnimplementedUserAuthServer

type UnimplementedUserAuthServer struct {
}

UnimplementedUserAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedUserAuthServer) Check

func (UnimplementedUserAuthServer) Login

func (UnimplementedUserAuthServer) SignUp

type UnsafeUserAuthServer

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

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

type UserAuthClient

type UserAuthClient interface {
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error)
	SignUp(ctx context.Context, in *SignUpReq, opts ...grpc.CallOption) (*SignUpRes, error)
	Check(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*CheckRes, error)
}

UserAuthClient is the client API for UserAuth 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 NewUserAuthClient

func NewUserAuthClient(cc grpc.ClientConnInterface) UserAuthClient

type UserAuthServer

type UserAuthServer interface {
	Login(context.Context, *LoginReq) (*LoginRes, error)
	SignUp(context.Context, *SignUpReq) (*SignUpRes, error)
	Check(context.Context, *CheckReq) (*CheckRes, error)
	// contains filtered or unexported methods
}

UserAuthServer is the server API for UserAuth service. All implementations must embed UnimplementedUserAuthServer for forward compatibility

Jump to

Keyboard shortcuts

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