protos

package
v0.0.0-...-4579623 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chat_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chat.Chat",
	HandlerType: (*ChatServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Chat_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _Chat_Logout_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Chat_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protos/chat.proto",
}

Chat_ServiceDesc is the grpc.ServiceDesc for Chat 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_protos_chat_proto protoreflect.FileDescriptor

Functions

func RegisterChatServer

func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer)

Types

type ChatClient

type ChatClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (Chat_StreamClient, error)
}

ChatClient is the client API for Chat 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 NewChatClient

func NewChatClient(cc grpc.ClientConnInterface) ChatClient

type ChatServer

type ChatServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	Stream(Chat_StreamServer) error
	// contains filtered or unexported methods
}

ChatServer is the server API for Chat service. All implementations must embed UnimplementedChatServer for forward compatibility

type Chat_StreamClient

type Chat_StreamClient interface {
	Send(*StreamRequest) error
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type Chat_StreamServer

type Chat_StreamServer interface {
	Send(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type LoginRequest

type LoginRequest struct {
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetName

func (x *LoginRequest) GetName() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

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

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type LogoutRequest

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

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) GetToken

func (x *LogoutRequest) GetToken() string

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

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

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

type LogoutResponse

type LogoutResponse struct {
	// contains filtered or unexported fields
}

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

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

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type StreamRequest

type StreamRequest struct {
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

func (*StreamRequest) GetMessage

func (x *StreamRequest) GetMessage() string

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) ProtoReflect

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

func (*StreamRequest) Reset

func (x *StreamRequest) Reset()

func (*StreamRequest) String

func (x *StreamRequest) String() string

type StreamResponse

type StreamResponse struct {
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Types that are assignable to Event:
	//
	//	*StreamResponse_ClientLogin
	//	*StreamResponse_ClientLogout
	//	*StreamResponse_ClientMessage
	//	*StreamResponse_ServerShutdown
	Event isStreamResponse_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

func (*StreamResponse) Descriptor deprecated

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

Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.

func (*StreamResponse) GetClientLogin

func (x *StreamResponse) GetClientLogin() *StreamResponse_Login

func (*StreamResponse) GetClientLogout

func (x *StreamResponse) GetClientLogout() *StreamResponse_Logout

func (*StreamResponse) GetClientMessage

func (x *StreamResponse) GetClientMessage() *StreamResponse_Message

func (*StreamResponse) GetEvent

func (m *StreamResponse) GetEvent() isStreamResponse_Event

func (*StreamResponse) GetServerShutdown

func (x *StreamResponse) GetServerShutdown() *StreamResponse_Shutdown

func (*StreamResponse) GetTimestamp

func (x *StreamResponse) GetTimestamp() *timestamppb.Timestamp

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) ProtoReflect

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

func (*StreamResponse) Reset

func (x *StreamResponse) Reset()

func (*StreamResponse) String

func (x *StreamResponse) String() string

type StreamResponse_ClientLogin

type StreamResponse_ClientLogin struct {
	ClientLogin *StreamResponse_Login `protobuf:"bytes,2,opt,name=client_login,json=clientLogin,proto3,oneof"`
}

type StreamResponse_ClientLogout

type StreamResponse_ClientLogout struct {
	ClientLogout *StreamResponse_Logout `protobuf:"bytes,3,opt,name=client_logout,json=clientLogout,proto3,oneof"`
}

type StreamResponse_ClientMessage

type StreamResponse_ClientMessage struct {
	ClientMessage *StreamResponse_Message `protobuf:"bytes,4,opt,name=client_message,json=clientMessage,proto3,oneof"`
}

type StreamResponse_Login

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

func (*StreamResponse_Login) Descriptor deprecated

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

Deprecated: Use StreamResponse_Login.ProtoReflect.Descriptor instead.

func (*StreamResponse_Login) GetName

func (x *StreamResponse_Login) GetName() string

func (*StreamResponse_Login) ProtoMessage

func (*StreamResponse_Login) ProtoMessage()

func (*StreamResponse_Login) ProtoReflect

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

func (*StreamResponse_Login) Reset

func (x *StreamResponse_Login) Reset()

func (*StreamResponse_Login) String

func (x *StreamResponse_Login) String() string

type StreamResponse_Logout

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

func (*StreamResponse_Logout) Descriptor deprecated

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

Deprecated: Use StreamResponse_Logout.ProtoReflect.Descriptor instead.

func (*StreamResponse_Logout) GetName

func (x *StreamResponse_Logout) GetName() string

func (*StreamResponse_Logout) ProtoMessage

func (*StreamResponse_Logout) ProtoMessage()

func (*StreamResponse_Logout) ProtoReflect

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

func (*StreamResponse_Logout) Reset

func (x *StreamResponse_Logout) Reset()

func (*StreamResponse_Logout) String

func (x *StreamResponse_Logout) String() string

type StreamResponse_Message

type StreamResponse_Message struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResponse_Message) Descriptor deprecated

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

Deprecated: Use StreamResponse_Message.ProtoReflect.Descriptor instead.

func (*StreamResponse_Message) GetMessage

func (x *StreamResponse_Message) GetMessage() string

func (*StreamResponse_Message) GetName

func (x *StreamResponse_Message) GetName() string

func (*StreamResponse_Message) ProtoMessage

func (*StreamResponse_Message) ProtoMessage()

func (*StreamResponse_Message) ProtoReflect

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

func (*StreamResponse_Message) Reset

func (x *StreamResponse_Message) Reset()

func (*StreamResponse_Message) String

func (x *StreamResponse_Message) String() string

type StreamResponse_ServerShutdown

type StreamResponse_ServerShutdown struct {
	ServerShutdown *StreamResponse_Shutdown `protobuf:"bytes,5,opt,name=server_shutdown,json=serverShutdown,proto3,oneof"`
}

type StreamResponse_Shutdown

type StreamResponse_Shutdown struct {
	// contains filtered or unexported fields
}

func (*StreamResponse_Shutdown) Descriptor deprecated

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

Deprecated: Use StreamResponse_Shutdown.ProtoReflect.Descriptor instead.

func (*StreamResponse_Shutdown) ProtoMessage

func (*StreamResponse_Shutdown) ProtoMessage()

func (*StreamResponse_Shutdown) ProtoReflect

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

func (*StreamResponse_Shutdown) Reset

func (x *StreamResponse_Shutdown) Reset()

func (*StreamResponse_Shutdown) String

func (x *StreamResponse_Shutdown) String() string

type UnimplementedChatServer

type UnimplementedChatServer struct {
}

UnimplementedChatServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServer) Login

func (UnimplementedChatServer) Logout

func (UnimplementedChatServer) Stream

type UnsafeChatServer

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

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

Jump to

Keyboard shortcuts

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