proto

package
v0.0.0-...-3b47941 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChatAuth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.ChatAuth",
	HandlerType: (*ChatAuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RPCLogin",
			Handler:    _ChatAuth_RPCLogin_Handler,
		},
		{
			MethodName: "RPCRegister",
			Handler:    _ChatAuth_RPCRegister_Handler,
		},
		{
			MethodName: "RPCLogout",
			Handler:    _ChatAuth_RPCLogout_Handler,
		},
		{
			MethodName: "RPCCheckToken",
			Handler:    _ChatAuth_RPCCheckToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/auth.proto",
}

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

Functions

func RegisterChatAuthServer

func RegisterChatAuthServer(s grpc.ServiceRegistrar, srv ChatAuthServer)

Types

type AuthResponse

type AuthResponse struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg                  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Token                string   `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthResponse) Descriptor

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

func (*AuthResponse) GetCode

func (m *AuthResponse) GetCode() int32

func (*AuthResponse) GetMsg

func (m *AuthResponse) GetMsg() string

func (*AuthResponse) GetToken

func (m *AuthResponse) GetToken() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) Reset

func (m *AuthResponse) Reset()

func (*AuthResponse) String

func (m *AuthResponse) String() string

func (*AuthResponse) XXX_DiscardUnknown

func (m *AuthResponse) XXX_DiscardUnknown()

func (*AuthResponse) XXX_Marshal

func (m *AuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthResponse) XXX_Merge

func (m *AuthResponse) XXX_Merge(src proto.Message)

func (*AuthResponse) XXX_Size

func (m *AuthResponse) XXX_Size() int

func (*AuthResponse) XXX_Unmarshal

func (m *AuthResponse) XXX_Unmarshal(b []byte) error

type ChatAuthClient

type ChatAuthClient interface {
	RPCLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	RPCRegister(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	RPCLogout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	RPCCheckToken(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}

ChatAuthClient is the client API for ChatAuth 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 NewChatAuthClient

func NewChatAuthClient(cc grpc.ClientConnInterface) ChatAuthClient

type ChatAuthServer

type ChatAuthServer interface {
	RPCLogin(context.Context, *LoginRequest) (*AuthResponse, error)
	RPCRegister(context.Context, *RegisterRequest) (*AuthResponse, error)
	RPCLogout(context.Context, *LogoutRequest) (*AuthResponse, error)
	RPCCheckToken(context.Context, *LogoutRequest) (*AuthResponse, error)
	// contains filtered or unexported methods
}

ChatAuthServer is the server API for ChatAuth service. All implementations must embed UnimplementedChatAuthServer for forward compatibility

type LoginRequest

type LoginRequest struct {
	UserName             string   `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"`
	PassWord             string   `protobuf:"bytes,2,opt,name=passWord,proto3" json:"passWord,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoginRequest) Descriptor

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

func (*LoginRequest) GetPassWord

func (m *LoginRequest) GetPassWord() string

func (*LoginRequest) GetUserName

func (m *LoginRequest) GetUserName() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) Reset

func (m *LoginRequest) Reset()

func (*LoginRequest) String

func (m *LoginRequest) String() string

func (*LoginRequest) XXX_DiscardUnknown

func (m *LoginRequest) XXX_DiscardUnknown()

func (*LoginRequest) XXX_Marshal

func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoginRequest) XXX_Merge

func (m *LoginRequest) XXX_Merge(src proto.Message)

func (*LoginRequest) XXX_Size

func (m *LoginRequest) XXX_Size() int

func (*LoginRequest) XXX_Unmarshal

func (m *LoginRequest) XXX_Unmarshal(b []byte) error

type LogoutRequest

type LogoutRequest struct {
	Uid                  int32    `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Token                string   `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogoutRequest) Descriptor

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

func (*LogoutRequest) GetToken

func (m *LogoutRequest) GetToken() string

func (*LogoutRequest) GetUid

func (m *LogoutRequest) GetUid() int32

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) Reset

func (m *LogoutRequest) Reset()

func (*LogoutRequest) String

func (m *LogoutRequest) String() string

func (*LogoutRequest) XXX_DiscardUnknown

func (m *LogoutRequest) XXX_DiscardUnknown()

func (*LogoutRequest) XXX_Marshal

func (m *LogoutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogoutRequest) XXX_Merge

func (m *LogoutRequest) XXX_Merge(src proto.Message)

func (*LogoutRequest) XXX_Size

func (m *LogoutRequest) XXX_Size() int

func (*LogoutRequest) XXX_Unmarshal

func (m *LogoutRequest) XXX_Unmarshal(b []byte) error

type RegisterRequest

type RegisterRequest struct {
	UserName             string   `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"`
	PassWord             string   `protobuf:"bytes,2,opt,name=passWord,proto3" json:"passWord,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterRequest) Descriptor

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

func (*RegisterRequest) GetPassWord

func (m *RegisterRequest) GetPassWord() string

func (*RegisterRequest) GetUserName

func (m *RegisterRequest) GetUserName() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) Reset

func (m *RegisterRequest) Reset()

func (*RegisterRequest) String

func (m *RegisterRequest) String() string

func (*RegisterRequest) XXX_DiscardUnknown

func (m *RegisterRequest) XXX_DiscardUnknown()

func (*RegisterRequest) XXX_Marshal

func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterRequest) XXX_Merge

func (m *RegisterRequest) XXX_Merge(src proto.Message)

func (*RegisterRequest) XXX_Size

func (m *RegisterRequest) XXX_Size() int

func (*RegisterRequest) XXX_Unmarshal

func (m *RegisterRequest) XXX_Unmarshal(b []byte) error

type UnimplementedChatAuthServer

type UnimplementedChatAuthServer struct {
}

UnimplementedChatAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedChatAuthServer) RPCCheckToken

func (UnimplementedChatAuthServer) RPCLogin

func (UnimplementedChatAuthServer) RPCLogout

func (UnimplementedChatAuthServer) RPCRegister

type UnsafeChatAuthServer

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

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

Jump to

Keyboard shortcuts

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