messaging

package
v0.0.0-...-500edce Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	ListAllMessages(userID, conversationID, beforeInSequence, limit int, mType core.MessageType) ([]interface{}, error)
	ListProgrammingLanguages() ([]core.ProgrammingLanguage, error)
	GetMediaObject(userCtx, conversationID int, fileName, pathPrefix string) (core.MediaObject, *os.File, error)
	GetMessage(userCtx, conversationID, messageID int) (interface{}, error)
	GetCodeOfMessage(userCtx, conversationID, messageID int) (string, error)
	BroadcastUserIsTyping(userCtx, conversationID int, pusher core.Pusher, ctx context.Context) error

	// Mutations
	SendMessage(target, userID int, message json.RawMessage, pusher core.Pusher, ctx context.Context) (interface{}, error)
	ReadMessages(userID int, message json.RawMessage) error
	EditMessage(userCtx, conversationID int, message json.RawMessage, pusher core.Pusher, ctx context.Context) (int, error)
	LiveEditMessage(userCtx, conversationID int, message json.RawMessage, pusher core.Pusher, ctx context.Context) (int, error)
	ToggleLiveSession(userCtx, conversationID int, state bool, message json.RawMessage, pusher core.Pusher, ctx context.Context) (int, error)
	CompleteMessage(id int, err error) error

	// AddFileToMessage adds a media object to a media message.
	AddFileToMessage(userCtx, conversationID, messageID int, fileBuffer []byte, pathPrefix, fileName, fileType string) error
}

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service, verbose bool) Service

func NewService

func NewService(messageRepo core.MessageRepo, conversationRepo core.ConversationRepo) Service

Jump to

Keyboard shortcuts

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