Documentation
¶
Index ¶
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthServer
- type GetUserInfoReq
- type GetUserInfoRes
- func (*GetUserInfoRes) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoRes) GetLib() *v1.Lib
- func (x *GetUserInfoRes) GetUser() *pbentity.User
- func (*GetUserInfoRes) ProtoMessage()
- func (x *GetUserInfoRes) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoRes) Reset()
- func (x *GetUserInfoRes) String() string
- type LoginReq
- type LoginRes
- type UnimplementedAuthServer
- type UnsafeAuthServer
Constants ¶
This section is empty.
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.v1.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Auth_Login_Handler, }, { MethodName: "GetUserInfo", Handler: _Auth_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/v1/auth.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auth_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoRes, error) }
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { Login(context.Context, *LoginReq) (*LoginRes, error) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoRes, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type GetUserInfoReq ¶
type GetUserInfoReq struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty" v:"required"` // v: required // contains filtered or unexported fields }
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) GetToken ¶
func (x *GetUserInfoReq) GetToken() string
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
type GetUserInfoRes ¶
type GetUserInfoRes struct { User *pbentity.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Lib *v1.Lib `protobuf:"bytes,2,opt,name=lib,proto3" json:"lib,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoRes) Descriptor
deprecated
func (*GetUserInfoRes) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoRes.ProtoReflect.Descriptor instead.
func (*GetUserInfoRes) GetLib ¶
func (x *GetUserInfoRes) GetLib() *v1.Lib
func (*GetUserInfoRes) GetUser ¶
func (x *GetUserInfoRes) GetUser() *pbentity.User
func (*GetUserInfoRes) ProtoMessage ¶
func (*GetUserInfoRes) ProtoMessage()
func (*GetUserInfoRes) ProtoReflect ¶
func (x *GetUserInfoRes) ProtoReflect() protoreflect.Message
func (*GetUserInfoRes) Reset ¶
func (x *GetUserInfoRes) Reset()
func (*GetUserInfoRes) String ¶
func (x *GetUserInfoRes) String() string
type LoginReq ¶
type LoginReq struct { Username string `protobuf:"bytes,1,opt,name=Username,proto3" json:"Username,omitempty" v:"required|length: 1, 20"` // v: required|length: 1, 20 Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty" v:"required|length: 8, 30"` // v: required|length: 8, 30 // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) GetUsername ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginRes ¶
type LoginRes struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"` // contains filtered or unexported fields }
func (*LoginRes) Descriptor
deprecated
func (*LoginRes) ProtoMessage ¶
func (*LoginRes) ProtoMessage()
func (*LoginRes) ProtoReflect ¶
func (x *LoginRes) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) GetUserInfo ¶
func (UnimplementedAuthServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoRes, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.