chitty_chat

package
v0.0.0-...-455a464 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChittyChatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chitty_chat.ChittyChatService",
	HandlerType: (*ChittyChatServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Leave",
			Handler:    _ChittyChatService_Leave_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Join",
			Handler:       _ChittyChatService_Join_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SendMessage",
			Handler:       _ChittyChatService_SendMessage_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "chitty_chat/chittyChatService.proto",
}

ChittyChatService_ServiceDesc is the grpc.ServiceDesc for ChittyChatService 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_chitty_chat_chittyChatService_proto protoreflect.FileDescriptor

Functions

func RegisterChittyChatServiceServer

func RegisterChittyChatServiceServer(s grpc.ServiceRegistrar, srv ChittyChatServiceServer)

Types

type ChittyChatServiceClient

type ChittyChatServiceClient interface {
	// Sends a stream of messages and gets a stream of messages in return
	Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (ChittyChatService_JoinClient, error)
	SendMessage(ctx context.Context, opts ...grpc.CallOption) (ChittyChatService_SendMessageClient, error)
	Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*ServerResponse, error)
}

ChittyChatServiceClient is the client API for ChittyChatService 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.

type ChittyChatServiceServer

type ChittyChatServiceServer interface {
	// Sends a stream of messages and gets a stream of messages in return
	Join(*JoinRequest, ChittyChatService_JoinServer) error
	SendMessage(ChittyChatService_SendMessageServer) error
	Leave(context.Context, *LeaveRequest) (*ServerResponse, error)
	// contains filtered or unexported methods
}

ChittyChatServiceServer is the server API for ChittyChatService service. All implementations must embed UnimplementedChittyChatServiceServer for forward compatibility

type ChittyChatService_JoinClient

type ChittyChatService_JoinClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type ChittyChatService_JoinServer

type ChittyChatService_JoinServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type ChittyChatService_SendMessageClient

type ChittyChatService_SendMessageClient interface {
	Send(*Message) error
	CloseAndRecv() (*ServerResponse, error)
	grpc.ClientStream
}

type ChittyChatService_SendMessageServer

type ChittyChatService_SendMessageServer interface {
	SendAndClose(*ServerResponse) error
	Recv() (*Message, error)
	grpc.ServerStream
}

type JoinRequest

type JoinRequest struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Time int32  `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinRequest) Descriptor deprecated

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

Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.

func (*JoinRequest) GetId

func (x *JoinRequest) GetId() string

func (*JoinRequest) GetTime

func (x *JoinRequest) GetTime() int32

func (*JoinRequest) ProtoMessage

func (*JoinRequest) ProtoMessage()

func (*JoinRequest) ProtoReflect

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

func (*JoinRequest) Reset

func (x *JoinRequest) Reset()

func (*JoinRequest) String

func (x *JoinRequest) String() string

type LeaveRequest

type LeaveRequest struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Time int32  `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaveRequest) Descriptor deprecated

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

Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead.

func (*LeaveRequest) GetId

func (x *LeaveRequest) GetId() string

func (*LeaveRequest) GetTime

func (x *LeaveRequest) GetTime() int32

func (*LeaveRequest) ProtoMessage

func (*LeaveRequest) ProtoMessage()

func (*LeaveRequest) ProtoReflect

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

func (*LeaveRequest) Reset

func (x *LeaveRequest) Reset()

func (*LeaveRequest) String

func (x *LeaveRequest) String() string

type Message

type Message struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Time    int32  `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
	Special bool   `protobuf:"varint,4,opt,name=special,proto3" json:"special,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's message

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetMessage

func (x *Message) GetMessage() string

func (*Message) GetSpecial

func (x *Message) GetSpecial() bool

func (*Message) GetTime

func (x *Message) GetTime() int32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type ServerResponse

type ServerResponse struct {
	HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	Time           int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerResponse) Descriptor deprecated

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

Deprecated: Use ServerResponse.ProtoReflect.Descriptor instead.

func (*ServerResponse) GetHttpStatusCode

func (x *ServerResponse) GetHttpStatusCode() int32

func (*ServerResponse) GetTime

func (x *ServerResponse) GetTime() int32

func (*ServerResponse) ProtoMessage

func (*ServerResponse) ProtoMessage()

func (*ServerResponse) ProtoReflect

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

func (*ServerResponse) Reset

func (x *ServerResponse) Reset()

func (*ServerResponse) String

func (x *ServerResponse) String() string

type UnimplementedChittyChatServiceServer

type UnimplementedChittyChatServiceServer struct {
}

UnimplementedChittyChatServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChittyChatServiceServer) Join

func (UnimplementedChittyChatServiceServer) Leave

func (UnimplementedChittyChatServiceServer) SendMessage

type UnsafeChittyChatServiceServer

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

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

Jump to

Keyboard shortcuts

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