chat

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package chat is a generated protocol buffer package.

It is generated from these files:

chat/chat.proto

It has these top-level messages:

Chat
Message

Index

Constants

View Source
const (
	DEBUG   string = "DEBUG"
	INFO    string = "INFO"
	WARNING string = "WARN"
	ERROR   string = "ERROR"
	FATAL   string = "FATAL"
)

Log levels

Variables

This section is empty.

Functions

func Routes

func Routes(router *httprouter.Router, ds *store.InMemory)

Routes defines the Chat and Chat Message API routes

Types

type Chat

type Chat struct {
	CreationTime *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=creation_time" json:"creation_time,omitempty"`
	UpdatedTime  *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=updated_time,json=update_time" json:"updated_time,omitempty"`
	Open         bool                       `protobuf:"varint,3,opt,name=open" json:"open,omitempty"`
	Uid          string                     `protobuf:"bytes,4,opt,name=uid,json=id" json:"uid,omitempty"`
	Client       *client.Client             `protobuf:"bytes,5,opt,name=client" json:"client,omitempty"`
}

func Create

func Create(cl *client.Client) *Chat

Create builds a new `Chat` session

func (*Chat) Descriptor

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

func (*Chat) GetClient

func (m *Chat) GetClient() *client.Client

func (*Chat) GetCreationTime

func (m *Chat) GetCreationTime() *google_protobuf.Timestamp

func (*Chat) GetOpen

func (m *Chat) GetOpen() bool

func (*Chat) GetUid

func (m *Chat) GetUid() string

func (*Chat) GetUpdatedTime

func (m *Chat) GetUpdatedTime() *google_protobuf.Timestamp

func (Chat) MarshalJSON

func (c Chat) MarshalJSON() ([]byte, error)

func (*Chat) ProtoMessage

func (*Chat) ProtoMessage()

func (*Chat) Reset

func (m *Chat) Reset()

func (Chat) StoreKey

func (c Chat) StoreKey() string

func (*Chat) String

func (m *Chat) String() string

func (*Chat) UnmarshaJSON

func (c *Chat) UnmarshaJSON(data []byte) error

type Message

type Message struct {
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Content   string                     `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
	Author    string                     `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"`
	Chat      string                     `protobuf:"bytes,4,opt,name=chat" json:"chat,omitempty"`
}

func CreateMessage

func CreateMessage() *Message

CreateMessage constructs a new `Message` with a default timestamp of now

func (*Message) Descriptor

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

func (*Message) GetAuthor

func (m *Message) GetAuthor() string

func (*Message) GetChat

func (m *Message) GetChat() string

func (*Message) GetContent

func (m *Message) GetContent() string

func (*Message) GetTimestamp

func (m *Message) GetTimestamp() *google_protobuf.Timestamp

func (Message) MarshalJSON

func (m Message) MarshalJSON() ([]byte, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (Message) StoreKey

func (m Message) StoreKey() string

func (*Message) String

func (m *Message) String() string

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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