Documentation ¶
Index ¶
- type Messages
- func (m *Messages) DeleteList(topic string, toDel *types.DelMessage) (err error)
- func (m *Messages) GetAll(topic string, forUser types.Uid, opts *types.QueryOpt) ([]types.Message, error)
- func (m *Messages) GetDeleted(topic string, forUser types.Uid, opts *types.QueryOpt) ([]types.DelMessage, error)
- func (m *Messages) Save(msg *types.Message) error
- type MessagesArgs
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
type MessagesArgs ¶
type MessagesArgs struct { DB *pgxpool.Pool Utils *utils.Utils Cfg *config.StorePostgresConfig UGen *types.UidGenerator }
Click to show internal directories.
Click to hide internal directories.