chatpb

package
v0.0.0-...-d8755ba Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterChatServiceServer

func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)

Types

type ChatServiceClient

type ChatServiceClient interface {
	// Sends a message to the chat room
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Streams back all other messages from the chat room
	Receive(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ChatService_ReceiveClient, error)
}

ChatServiceClient is the client API for ChatService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChatServiceClient

func NewChatServiceClient(cc *grpc.ClientConn) ChatServiceClient

type ChatServiceServer

type ChatServiceServer interface {
	// Sends a message to the chat room
	Send(context.Context, *SendRequest) (*empty.Empty, error)
	// Streams back all other messages from the chat room
	Receive(*empty.Empty, ChatService_ReceiveServer) error
}

ChatServiceServer is the server API for ChatService service.

type ChatService_ReceiveClient

type ChatService_ReceiveClient interface {
	Recv() (*ReceiveResponse, error)
	grpc.ClientStream
}

type ChatService_ReceiveServer

type ChatService_ReceiveServer interface {
	Send(*ReceiveResponse) error
	grpc.ServerStream
}

type Message

type Message struct {
	Nickname             string   `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetMessage

func (m *Message) GetMessage() string

func (*Message) GetNickname

func (m *Message) GetNickname() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

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

func (*Message) XXX_Merge

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

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

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

type ReceiveResponse

type ReceiveResponse struct {
	Msg                  *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReceiveResponse) Descriptor

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

func (*ReceiveResponse) GetMsg

func (m *ReceiveResponse) GetMsg() *Message

func (*ReceiveResponse) ProtoMessage

func (*ReceiveResponse) ProtoMessage()

func (*ReceiveResponse) Reset

func (m *ReceiveResponse) Reset()

func (*ReceiveResponse) String

func (m *ReceiveResponse) String() string

func (*ReceiveResponse) XXX_DiscardUnknown

func (m *ReceiveResponse) XXX_DiscardUnknown()

func (*ReceiveResponse) XXX_Marshal

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

func (*ReceiveResponse) XXX_Merge

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

func (*ReceiveResponse) XXX_Size

func (m *ReceiveResponse) XXX_Size() int

func (*ReceiveResponse) XXX_Unmarshal

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

type SendRequest

type SendRequest struct {
	Msg                  *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendRequest) Descriptor

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

func (*SendRequest) GetMsg

func (m *SendRequest) GetMsg() *Message

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) Reset

func (m *SendRequest) Reset()

func (*SendRequest) String

func (m *SendRequest) String() string

func (*SendRequest) XXX_DiscardUnknown

func (m *SendRequest) XXX_DiscardUnknown()

func (*SendRequest) XXX_Marshal

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

func (*SendRequest) XXX_Merge

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

func (*SendRequest) XXX_Size

func (m *SendRequest) XXX_Size() int

func (*SendRequest) XXX_Unmarshal

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

type UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct {
}

UnimplementedChatServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedChatServiceServer) Receive

func (*UnimplementedChatServiceServer) Send

Jump to

Keyboard shortcuts

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