chat

package
v0.0.0-...-bc9d676 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	// contains filtered or unexported fields
}

func NewChat

func NewChat() (*Chat, error)

func (*Chat) All

func (c *Chat) All() ([]*Message, error)

func (*Chat) Create

func (c *Chat) Create(mess *Message) (*Message, error)

func (*Chat) Delete

func (c *Chat) Delete(ID int64) error

func (*Chat) Item

func (c *Chat) Item(ID int64) (*Message, error)

func (*Chat) Update

func (c *Chat) Update(mess *Message) error

type Message

type Message struct {
	Id       int64     `json:"id,omitempty"`
	Sender   string    `json:"sender,omitempty"`
	SentTime time.Time `json:"sentTime,omitempty"`
	Text     string    `json:"text,omitempty"`
}

func (*Message) ID

func (mess *Message) ID() int64

Jump to

Keyboard shortcuts

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