chat

package
v0.0.0-...-6b7787b Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package chat is a generated protocol buffer package.

It is generated from these files:

chat.proto

It has these top-level messages:

Message
MessageResponse
SearchMessagesRequest
MessagesResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterChatServer

func RegisterChatServer(s *grpc.Server, srv ChatServer)

Types

type ChatClient

type ChatClient interface {
	AddMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*MessageResponse, error)
	SearchMessages(ctx context.Context, in *SearchMessagesRequest, opts ...grpc.CallOption) (*MessagesResponse, error)
}

func NewChatClient

func NewChatClient(cc *grpc.ClientConn) ChatClient

type ChatServer

type ChatServer interface {
	AddMessage(context.Context, *Message) (*MessageResponse, error)
	SearchMessages(context.Context, *SearchMessagesRequest) (*MessagesResponse, error)
}

type Message

type Message struct {
	Body      string `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
	User      string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
	Timestamp int64  `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"`
}

func (*Message) Descriptor

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

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type MessageResponse

type MessageResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*MessageResponse) Descriptor

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

func (*MessageResponse) ProtoMessage

func (*MessageResponse) ProtoMessage()

func (*MessageResponse) Reset

func (m *MessageResponse) Reset()

func (*MessageResponse) String

func (m *MessageResponse) String() string

type MessagesResponse

type MessagesResponse struct {
}

func (*MessagesResponse) Descriptor

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

func (*MessagesResponse) ProtoMessage

func (*MessagesResponse) ProtoMessage()

func (*MessagesResponse) Reset

func (m *MessagesResponse) Reset()

func (*MessagesResponse) String

func (m *MessagesResponse) String() string

type SearchMessagesRequest

type SearchMessagesRequest struct {
	User string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
}

func (*SearchMessagesRequest) Descriptor

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

func (*SearchMessagesRequest) ProtoMessage

func (*SearchMessagesRequest) ProtoMessage()

func (*SearchMessagesRequest) Reset

func (m *SearchMessagesRequest) Reset()

func (*SearchMessagesRequest) String

func (m *SearchMessagesRequest) String() string

Jump to

Keyboard shortcuts

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