message

package
v0.0.0-...-8aaaf38 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Communication

func Communication(w http.ResponseWriter, r *http.Request)

func DispatchToProvider

func DispatchToProvider(pt ProviderType, p Payload)

func GetMessageList

func GetMessageList(w http.ResponseWriter, r *http.Request)

Types

type Message

type Message struct {
	ID        primitive.ObjectID `bson:"_id" json:"id"`
	Author    string             `bson:"author" json:"author"`
	Message   string             `bson:"message" json:"message"`
	Timestamp time.Time          `bson:"timestamp" json:"timestamp"`
}

func GetMessages

func GetMessages(page int64, pageSize int64) []*Message

func InsertMessage

func InsertMessage(m *Message) *Message

func (*Message) New

func (t *Message) New() *Message

type Payload

type Payload struct {
	KeyWords []string
}

type ProviderType

type ProviderType int
const (
	AutoMessage ProviderType = iota
)

func (ProviderType) String

func (p ProviderType) String() string

Jump to

Keyboard shortcuts

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