messages

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messages

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

func NewMessages

func NewMessages(ma MessagesArgs) *Messages

func (*Messages) DeleteList

func (m *Messages) DeleteList(topic string, toDel *types.DelMessage) (err error)

DeleteList marks messages as deleted.

Soft or Hard is defined by forUser value: forUser.IsZero == true is hard.

func (*Messages) GetAll

func (m *Messages) GetAll(topic string, forUser types.Uid, opts *types.QueryOpt) ([]types.Message, error)

GetAll() returns messages matching the query

func (*Messages) GetDeleted

func (m *Messages) GetDeleted(topic string, forUser types.Uid, opts *types.QueryOpt) ([]types.DelMessage, error)

Get ranges of deleted messages

func (*Messages) Save

func (m *Messages) Save(msg *types.Message) error

type MessagesArgs

type MessagesArgs struct {
	DB     *pgxpool.Pool
	Utils  *utils.Utils
	Cfg    *config.StorePostgresConfig
	Shared *shared.Shared
	UGen   *types.UidGenerator
}

Jump to

Keyboard shortcuts

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