Documentation ¶
Overview ¶
Backend utilities.
Index ¶
- func GenerateId() string
- func NewDummyConversations(messages backend.MessagesBackend) backend.ConversationsBackend
- func NewEchoSend(target backend.MessagesBackend) backend.SendBackend
- func NewNoopSend() backend.SendBackend
- type DummyConversations
- func (b *DummyConversations) CountConversations(user string) ([]*backend.MessagesCount, error)
- func (b *DummyConversations) DeleteConversation(user, id string) error
- func (b *DummyConversations) GetConversation(user, id string) (*backend.Conversation, error)
- func (b *DummyConversations) GetMessage(user, id string) (*backend.Message, error)
- func (b *DummyConversations) InsertMessage(user string, msg *backend.Message) (*backend.Message, error)
- func (b *DummyConversations) ListConversationMessages(user, id string) ([]*backend.Message, error)
- func (b *DummyConversations) ListConversations(user string, filter *backend.MessagesFilter) ([]*backend.Conversation, int, error)
- func (b *DummyConversations) ListMessages(user string, filter *backend.MessagesFilter) ([]*backend.Message, int, error)
- func (b *DummyConversations) UpdateMessage(user string, update *backend.MessageUpdate) (*backend.Message, error)
- type EchoSend
- type NoopSend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDummyConversations ¶
func NewDummyConversations(messages backend.MessagesBackend) backend.ConversationsBackend
func NewEchoSend ¶
func NewEchoSend(target backend.MessagesBackend) backend.SendBackend
func NewNoopSend ¶
func NewNoopSend() backend.SendBackend
Types ¶
type DummyConversations ¶
type DummyConversations struct {
backend.MessagesBackend
}
A conversations backend that builds one conversation per message (no threads).
func (*DummyConversations) CountConversations ¶
func (b *DummyConversations) CountConversations(user string) ([]*backend.MessagesCount, error)
func (*DummyConversations) DeleteConversation ¶
func (b *DummyConversations) DeleteConversation(user, id string) error
func (*DummyConversations) GetConversation ¶
func (b *DummyConversations) GetConversation(user, id string) (*backend.Conversation, error)
func (*DummyConversations) GetMessage ¶
func (b *DummyConversations) GetMessage(user, id string) (*backend.Message, error)
func (*DummyConversations) InsertMessage ¶
func (*DummyConversations) ListConversationMessages ¶
func (b *DummyConversations) ListConversationMessages(user, id string) ([]*backend.Message, error)
func (*DummyConversations) ListConversations ¶
func (b *DummyConversations) ListConversations(user string, filter *backend.MessagesFilter) ([]*backend.Conversation, int, error)
func (*DummyConversations) ListMessages ¶
func (b *DummyConversations) ListMessages(user string, filter *backend.MessagesFilter) ([]*backend.Message, int, error)
func (*DummyConversations) UpdateMessage ¶
func (b *DummyConversations) UpdateMessage(user string, update *backend.MessageUpdate) (*backend.Message, error)
type EchoSend ¶
type EchoSend struct {
// contains filtered or unexported fields
}
A SendBackend that forwards all sent messages to a MessagesBackend.
func (*EchoSend) SendMessage ¶
func (b *EchoSend) SendMessage(user string, msg *backend.OutgoingMessage) error
type NoopSend ¶
type NoopSend struct{}
A SendBackend that does nothing.
func (*NoopSend) SendMessage ¶
func (b *NoopSend) SendMessage(user string, msg *backend.OutgoingMessage) error
Directories ¶
Path | Synopsis |
---|---|
Provides utilities to parse and format messages.
|
Provides utilities to parse and format messages. |
chunksplit
Provides a chunk splitter.
|
Provides a chunk splitter. |
Click to show internal directories.
Click to hide internal directories.