Documentation
¶
Index ¶
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthReq
- func (*AuthReq) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReq) GetDeviceInf() string
- func (x *AuthReq) GetLogin() string
- func (x *AuthReq) GetPassword() string
- func (*AuthReq) ProtoMessage()
- func (x *AuthReq) ProtoReflect() protoreflect.Message
- func (x *AuthReq) Reset()
- func (x *AuthReq) String() string
- type AuthResp
- type AuthServer
- type CheckAuthReq
- type CheckAuthResp
- func (*CheckAuthResp) Descriptor() ([]byte, []int)deprecated
- func (x *CheckAuthResp) GetErrCode() int32
- func (x *CheckAuthResp) GetErrMsg() string
- func (x *CheckAuthResp) GetUserid() string
- func (*CheckAuthResp) ProtoMessage()
- func (x *CheckAuthResp) ProtoReflect() protoreflect.Message
- func (x *CheckAuthResp) Reset()
- func (x *CheckAuthResp) String() string
- type ErrResp
- type RegReq
- func (*RegReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegReq) GetLogin() string
- func (x *RegReq) GetName() string
- func (x *RegReq) GetPassword() string
- func (*RegReq) ProtoMessage()
- func (x *RegReq) ProtoReflect() protoreflect.Message
- func (x *RegReq) Reset()
- func (x *RegReq) String() string
- type UnimplementedAuthServer
- type UnsafeAuthServer
Constants ¶
This section is empty.
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Reg", Handler: _Auth_Reg_Handler, }, { MethodName: "Auth", Handler: _Auth_Auth_Handler, }, { MethodName: "CheckAuth", Handler: _Auth_CheckAuth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/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_proto_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Sends a greeting Reg(ctx context.Context, in *RegReq, opts ...grpc.CallOption) (*ErrResp, error) Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthResp, error) CheckAuth(ctx context.Context, in *CheckAuthReq, opts ...grpc.CallOption) (*CheckAuthResp, 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 AuthReq ¶
type AuthReq struct { Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` DeviceInf string `protobuf:"bytes,4,opt,name=deviceInf,proto3" json:"deviceInf,omitempty"` // contains filtered or unexported fields }
func (*AuthReq) Descriptor
deprecated
func (*AuthReq) GetDeviceInf ¶
func (*AuthReq) GetPassword ¶
func (*AuthReq) ProtoMessage ¶
func (*AuthReq) ProtoMessage()
func (*AuthReq) ProtoReflect ¶
func (x *AuthReq) ProtoReflect() protoreflect.Message
type AuthResp ¶
type AuthResp struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*AuthResp) Descriptor
deprecated
func (*AuthResp) ProtoMessage ¶
func (*AuthResp) ProtoMessage()
func (*AuthResp) ProtoReflect ¶
func (x *AuthResp) ProtoReflect() protoreflect.Message
type AuthServer ¶
type AuthServer interface { // Sends a greeting Reg(context.Context, *RegReq) (*ErrResp, error) Auth(context.Context, *AuthReq) (*AuthResp, error) CheckAuth(context.Context, *CheckAuthReq) (*CheckAuthResp, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type CheckAuthReq ¶
type CheckAuthReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*CheckAuthReq) Descriptor
deprecated
func (*CheckAuthReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckAuthReq.ProtoReflect.Descriptor instead.
func (*CheckAuthReq) GetToken ¶
func (x *CheckAuthReq) GetToken() string
func (*CheckAuthReq) ProtoMessage ¶
func (*CheckAuthReq) ProtoMessage()
func (*CheckAuthReq) ProtoReflect ¶
func (x *CheckAuthReq) ProtoReflect() protoreflect.Message
func (*CheckAuthReq) Reset ¶
func (x *CheckAuthReq) Reset()
func (*CheckAuthReq) String ¶
func (x *CheckAuthReq) String() string
type CheckAuthResp ¶
type CheckAuthResp struct { Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` ErrCode int32 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode,omitempty"` ErrMsg string `protobuf:"bytes,3,opt,name=errMsg,proto3" json:"errMsg,omitempty"` // contains filtered or unexported fields }
func (*CheckAuthResp) Descriptor
deprecated
func (*CheckAuthResp) Descriptor() ([]byte, []int)
Deprecated: Use CheckAuthResp.ProtoReflect.Descriptor instead.
func (*CheckAuthResp) GetErrCode ¶
func (x *CheckAuthResp) GetErrCode() int32
func (*CheckAuthResp) GetErrMsg ¶
func (x *CheckAuthResp) GetErrMsg() string
func (*CheckAuthResp) GetUserid ¶
func (x *CheckAuthResp) GetUserid() string
func (*CheckAuthResp) ProtoMessage ¶
func (*CheckAuthResp) ProtoMessage()
func (*CheckAuthResp) ProtoReflect ¶
func (x *CheckAuthResp) ProtoReflect() protoreflect.Message
func (*CheckAuthResp) Reset ¶
func (x *CheckAuthResp) Reset()
func (*CheckAuthResp) String ¶
func (x *CheckAuthResp) String() string
type ErrResp ¶
type ErrResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"` // contains filtered or unexported fields }
func (*ErrResp) Descriptor
deprecated
func (*ErrResp) GetErrCode ¶
func (*ErrResp) ProtoMessage ¶
func (*ErrResp) ProtoMessage()
func (*ErrResp) ProtoReflect ¶
func (x *ErrResp) ProtoReflect() protoreflect.Message
type RegReq ¶
type RegReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*RegReq) Descriptor
deprecated
func (*RegReq) GetPassword ¶
func (*RegReq) ProtoMessage ¶
func (*RegReq) ProtoMessage()
func (*RegReq) ProtoReflect ¶
func (x *RegReq) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) CheckAuth ¶
func (UnimplementedAuthServer) CheckAuth(context.Context, *CheckAuthReq) (*CheckAuthResp, 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.