message

package
v0.0.0-...-bac0e4b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	CreateMessage(creatorId, roomId string, text string) error
	ListMessages(actorId, roomId string) ([]Message, error)
}

type Message

type Message struct {
	Text      string
	Author    string // account id
	Room      string // room id
	CreatedAt time.Time
}

type UseCases

type UseCases struct {
	MessageStorage message.Interface
}

func (*UseCases) CreateMessage

func (u *UseCases) CreateMessage(creatorId, roomId string, text string) error

func (*UseCases) ListMessages

func (u *UseCases) ListMessages(actorId, roomId string) ([]Message, error)

Jump to

Keyboard shortcuts

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