chittychat

package
v0.0.0-...-d77c9bb Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_chittychat_chittychat_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chittychat.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ChatService",
			Handler:       _Service_ChatService_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "chittychat/chittychat.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Broadcast

type Broadcast struct {
	User    string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Time    string `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Broadcast) Descriptor deprecated

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

Deprecated: Use Broadcast.ProtoReflect.Descriptor instead.

func (*Broadcast) GetMessage

func (x *Broadcast) GetMessage() string

func (*Broadcast) GetTime

func (x *Broadcast) GetTime() string

func (*Broadcast) GetUser

func (x *Broadcast) GetUser() string

func (*Broadcast) ProtoMessage

func (*Broadcast) ProtoMessage()

func (*Broadcast) ProtoReflect

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

func (*Broadcast) Reset

func (x *Broadcast) Reset()

func (*Broadcast) String

func (x *Broadcast) String() string

type ChatServer

type ChatServer struct {
}

func (*ChatServer) ChatService

func (is *ChatServer) ChatService(csi serviceChatServiceServer) error

type Publish

type Publish struct {
	User    string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Time    string `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Publish) Descriptor deprecated

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

Deprecated: Use Publish.ProtoReflect.Descriptor instead.

func (*Publish) GetMessage

func (x *Publish) GetMessage() string

func (*Publish) GetTime

func (x *Publish) GetTime() string

func (*Publish) GetUser

func (x *Publish) GetUser() string

func (*Publish) ProtoMessage

func (*Publish) ProtoMessage()

func (*Publish) ProtoReflect

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

func (*Publish) Reset

func (x *Publish) Reset()

func (*Publish) String

func (x *Publish) String() string

type ServiceClient

type ServiceClient interface {
	ChatService(ctx context.Context, opts ...grpc.CallOption) (Service_ChatServiceClient, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	ChatService(Service_ChatServiceServer) error
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Service_ChatServiceClient

type Service_ChatServiceClient interface {
	Send(*Publish) error
	Recv() (*Broadcast, error)
	grpc.ClientStream
}

type Service_ChatServiceServer

type Service_ChatServiceServer interface {
	Send(*Broadcast) error
	Recv() (*Publish, error)
	grpc.ServerStream
}

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) ChatService

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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