__

package
v0.0.0-...-f348597 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AuthReq.ProtoReflect.Descriptor instead.

func (*AuthReq) GetDeviceInf

func (x *AuthReq) GetDeviceInf() string

func (*AuthReq) GetLogin

func (x *AuthReq) GetLogin() string

func (*AuthReq) GetPassword

func (x *AuthReq) GetPassword() string

func (*AuthReq) ProtoMessage

func (*AuthReq) ProtoMessage()

func (*AuthReq) ProtoReflect

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

func (*AuthReq) Reset

func (x *AuthReq) Reset()

func (*AuthReq) String

func (x *AuthReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use AuthResp.ProtoReflect.Descriptor instead.

func (*AuthResp) GetToken

func (x *AuthResp) GetToken() string

func (*AuthResp) ProtoMessage

func (*AuthResp) ProtoMessage()

func (*AuthResp) ProtoReflect

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

func (*AuthResp) Reset

func (x *AuthResp) Reset()

func (*AuthResp) String

func (x *AuthResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ErrResp.ProtoReflect.Descriptor instead.

func (*ErrResp) GetErrCode

func (x *ErrResp) GetErrCode() int32

func (*ErrResp) GetErrMsg

func (x *ErrResp) GetErrMsg() string

func (*ErrResp) ProtoMessage

func (*ErrResp) ProtoMessage()

func (*ErrResp) ProtoReflect

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

func (*ErrResp) Reset

func (x *ErrResp) Reset()

func (*ErrResp) String

func (x *ErrResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use RegReq.ProtoReflect.Descriptor instead.

func (*RegReq) GetLogin

func (x *RegReq) GetLogin() string

func (*RegReq) GetName

func (x *RegReq) GetName() string

func (*RegReq) GetPassword

func (x *RegReq) GetPassword() string

func (*RegReq) ProtoMessage

func (*RegReq) ProtoMessage()

func (*RegReq) ProtoReflect

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

func (*RegReq) Reset

func (x *RegReq) Reset()

func (*RegReq) String

func (x *RegReq) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Auth

func (UnimplementedAuthServer) CheckAuth

func (UnimplementedAuthServer) Reg

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.

Jump to

Keyboard shortcuts

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