chatterbox

package module
v0.0.0-...-93328a8 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 10 Imported by: 0

README

ChatterBox

An IRC-like Service Written using gRPC.

Documentation

Index

Constants

View Source
const MetaDataNickname = "x-ChatterBox-Nickname"
View Source
const MetaDataProtocolVersion = "x-ChatterBox-ProtocolVersion"
View Source
const ProtocolVersion = "0.0.1"

Variables

View Source
var File_chatterbox_proto protoreflect.FileDescriptor

Functions

func RegisterChatterboxServer

func RegisterChatterboxServer(s *grpc.Server, srv ChatterboxServer)

Types

type ChatterboxClient

type ChatterboxClient interface {
	Stream(ctx context.Context, opts ...grpc.CallOption) (Chatterbox_StreamClient, error)
}

ChatterboxClient is the client API for Chatterbox service.

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

func NewChatterboxClient

func NewChatterboxClient(cc grpc.ClientConnInterface) ChatterboxClient

type ChatterboxServer

type ChatterboxServer interface {
	Stream(Chatterbox_StreamServer) error
}

ChatterboxServer is the server API for Chatterbox service.

type Chatterbox_StreamClient

type Chatterbox_StreamClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type Chatterbox_StreamServer

type Chatterbox_StreamServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type Request

type Request struct {

	// Types that are assignable to Event:
	//	*Request_ClientJoin
	//	*Request_ClientMessage
	//	*Request_ClientPart
	//	*Request_ClientPing
	Event isRequest_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetClientJoin

func (x *Request) GetClientJoin() *Request_Join

func (*Request) GetClientMessage

func (x *Request) GetClientMessage() *Request_Message

func (*Request) GetClientPart

func (x *Request) GetClientPart() *Request_Part

func (*Request) GetClientPing

func (x *Request) GetClientPing() *Request_Ping

func (*Request) GetEvent

func (m *Request) GetEvent() isRequest_Event

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Request_ClientJoin

type Request_ClientJoin struct {
	ClientJoin *Request_Join `protobuf:"bytes,1,opt,name=client_join,json=clientJoin,proto3,oneof"`
}

type Request_ClientMessage

type Request_ClientMessage struct {
	ClientMessage *Request_Message `protobuf:"bytes,2,opt,name=client_message,json=clientMessage,proto3,oneof"`
}

type Request_ClientPart

type Request_ClientPart struct {
	ClientPart *Request_Part `protobuf:"bytes,3,opt,name=client_part,json=clientPart,proto3,oneof"`
}

type Request_ClientPing

type Request_ClientPing struct {
	ClientPing *Request_Ping `protobuf:"bytes,4,opt,name=client_ping,json=clientPing,proto3,oneof"`
}

type Request_Join

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

func (*Request_Join) Descriptor deprecated

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

Deprecated: Use Request_Join.ProtoReflect.Descriptor instead.

func (*Request_Join) GetTopic

func (x *Request_Join) GetTopic() string

func (*Request_Join) ProtoMessage

func (*Request_Join) ProtoMessage()

func (*Request_Join) ProtoReflect

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

func (*Request_Join) Reset

func (x *Request_Join) Reset()

func (*Request_Join) String

func (x *Request_Join) String() string

type Request_Message

type Request_Message struct {
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Text  string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_Message) Descriptor deprecated

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

Deprecated: Use Request_Message.ProtoReflect.Descriptor instead.

func (*Request_Message) GetText

func (x *Request_Message) GetText() string

func (*Request_Message) GetTopic

func (x *Request_Message) GetTopic() string

func (*Request_Message) ProtoMessage

func (*Request_Message) ProtoMessage()

func (*Request_Message) ProtoReflect

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

func (*Request_Message) Reset

func (x *Request_Message) Reset()

func (*Request_Message) String

func (x *Request_Message) String() string

type Request_Part

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

func (*Request_Part) Descriptor deprecated

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

Deprecated: Use Request_Part.ProtoReflect.Descriptor instead.

func (*Request_Part) GetTopic

func (x *Request_Part) GetTopic() string

func (*Request_Part) ProtoMessage

func (*Request_Part) ProtoMessage()

func (*Request_Part) ProtoReflect

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

func (*Request_Part) Reset

func (x *Request_Part) Reset()

func (*Request_Part) String

func (x *Request_Part) String() string

type Request_Ping

type Request_Ping struct {
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_Ping) Descriptor deprecated

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

Deprecated: Use Request_Ping.ProtoReflect.Descriptor instead.

func (*Request_Ping) GetTimestamp

func (x *Request_Ping) GetTimestamp() *timestamp.Timestamp

func (*Request_Ping) ProtoMessage

func (*Request_Ping) ProtoMessage()

func (*Request_Ping) ProtoReflect

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

func (*Request_Ping) Reset

func (x *Request_Ping) Reset()

func (*Request_Ping) String

func (x *Request_Ping) String() string

type Response

type Response struct {
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Types that are assignable to Event:
	//	*Response_ClientMessage
	//	*Response_ClientJoin
	//	*Response_ClientPart
	//	*Response_ClientPong
	Event isResponse_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetClientJoin

func (x *Response) GetClientJoin() *Response_Join

func (*Response) GetClientMessage

func (x *Response) GetClientMessage() *Response_Message

func (*Response) GetClientPart

func (x *Response) GetClientPart() *Response_Part

func (*Response) GetClientPong

func (x *Response) GetClientPong() *Response_Pong

func (*Response) GetEvent

func (m *Response) GetEvent() isResponse_Event

func (*Response) GetTimestamp

func (x *Response) GetTimestamp() *timestamp.Timestamp

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_ClientJoin

type Response_ClientJoin struct {
	ClientJoin *Response_Join `protobuf:"bytes,3,opt,name=client_join,json=clientJoin,proto3,oneof"`
}

type Response_ClientMessage

type Response_ClientMessage struct {
	ClientMessage *Response_Message `protobuf:"bytes,2,opt,name=client_message,json=clientMessage,proto3,oneof"`
}

type Response_ClientPart

type Response_ClientPart struct {
	ClientPart *Response_Part `protobuf:"bytes,4,opt,name=client_part,json=clientPart,proto3,oneof"`
}

type Response_ClientPong

type Response_ClientPong struct {
	ClientPong *Response_Pong `protobuf:"bytes,5,opt,name=client_pong,json=clientPong,proto3,oneof"`
}

type Response_Join

type Response_Join struct {
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Nick  string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	// contains filtered or unexported fields
}

func (*Response_Join) Descriptor deprecated

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

Deprecated: Use Response_Join.ProtoReflect.Descriptor instead.

func (*Response_Join) GetNick

func (x *Response_Join) GetNick() string

func (*Response_Join) GetTopic

func (x *Response_Join) GetTopic() string

func (*Response_Join) ProtoMessage

func (*Response_Join) ProtoMessage()

func (*Response_Join) ProtoReflect

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

func (*Response_Join) Reset

func (x *Response_Join) Reset()

func (*Response_Join) String

func (x *Response_Join) String() string

type Response_Login

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

func (*Response_Login) Descriptor deprecated

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

Deprecated: Use Response_Login.ProtoReflect.Descriptor instead.

func (*Response_Login) GetNick

func (x *Response_Login) GetNick() string

func (*Response_Login) ProtoMessage

func (*Response_Login) ProtoMessage()

func (*Response_Login) ProtoReflect

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

func (*Response_Login) Reset

func (x *Response_Login) Reset()

func (*Response_Login) String

func (x *Response_Login) String() string

type Response_Logout

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

func (*Response_Logout) Descriptor deprecated

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

Deprecated: Use Response_Logout.ProtoReflect.Descriptor instead.

func (*Response_Logout) GetNick

func (x *Response_Logout) GetNick() string

func (*Response_Logout) ProtoMessage

func (*Response_Logout) ProtoMessage()

func (*Response_Logout) ProtoReflect

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

func (*Response_Logout) Reset

func (x *Response_Logout) Reset()

func (*Response_Logout) String

func (x *Response_Logout) String() string

type Response_Message

type Response_Message struct {
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Nick  string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	Text  string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Response_Message) Descriptor deprecated

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

Deprecated: Use Response_Message.ProtoReflect.Descriptor instead.

func (*Response_Message) GetNick

func (x *Response_Message) GetNick() string

func (*Response_Message) GetText

func (x *Response_Message) GetText() string

func (*Response_Message) GetTopic

func (x *Response_Message) GetTopic() string

func (*Response_Message) ProtoMessage

func (*Response_Message) ProtoMessage()

func (*Response_Message) ProtoReflect

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

func (*Response_Message) Reset

func (x *Response_Message) Reset()

func (*Response_Message) String

func (x *Response_Message) String() string

type Response_Part

type Response_Part struct {
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Nick  string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"`
	// contains filtered or unexported fields
}

func (*Response_Part) Descriptor deprecated

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

Deprecated: Use Response_Part.ProtoReflect.Descriptor instead.

func (*Response_Part) GetNick

func (x *Response_Part) GetNick() string

func (*Response_Part) GetTopic

func (x *Response_Part) GetTopic() string

func (*Response_Part) ProtoMessage

func (*Response_Part) ProtoMessage()

func (*Response_Part) ProtoReflect

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

func (*Response_Part) Reset

func (x *Response_Part) Reset()

func (*Response_Part) String

func (x *Response_Part) String() string

type Response_Pong

type Response_Pong struct {
	SentAt     *timestamp.Timestamp `protobuf:"bytes,1,opt,name=sentAt,proto3" json:"sentAt,omitempty"`
	ReceivedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=receivedAt,proto3" json:"receivedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*Response_Pong) Descriptor deprecated

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

Deprecated: Use Response_Pong.ProtoReflect.Descriptor instead.

func (*Response_Pong) GetReceivedAt

func (x *Response_Pong) GetReceivedAt() *timestamp.Timestamp

func (*Response_Pong) GetSentAt

func (x *Response_Pong) GetSentAt() *timestamp.Timestamp

func (*Response_Pong) ProtoMessage

func (*Response_Pong) ProtoMessage()

func (*Response_Pong) ProtoReflect

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

func (*Response_Pong) Reset

func (x *Response_Pong) Reset()

func (*Response_Pong) String

func (x *Response_Pong) String() string

type Session

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

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetToken

func (x *Session) GetToken() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedChatterboxServer

type UnimplementedChatterboxServer struct {
}

UnimplementedChatterboxServer can be embedded to have forward compatible implementations.

func (*UnimplementedChatterboxServer) Stream

Directories

Path Synopsis
cmd
client command
server command

Jump to

Keyboard shortcuts

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