postgres

package
v0.0.0-...-3ee0b18 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dumper

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

func NewDumper

func NewDumper(pool *pgxpool.Pool, threadsTableName string) *Dumper

func (*Dumper) Close

func (r *Dumper) Close() (err error)

func (*Dumper) Open

func (r *Dumper) Open(ctx context.Context) (ch chan *api.ThreadsSnapshot, err error)

func (*Dumper) Restore

func (r *Dumper) Restore(ctx context.Context, snapshot *api.ThreadsSnapshot) (err error)

type ThreadsRepository

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

func NewThreadsRepository

func NewThreadsRepository(pool *pgxpool.Pool, tableName string) *ThreadsRepository

func (*ThreadsRepository) AppendThread

func (r *ThreadsRepository) AppendThread(ctx context.Context, id, userID, parentID, nextID, prevID int64, name, description, title string, private bool, createdAt, updatedAt string) (err error)

func (*ThreadsRepository) CountMessages

func (r *ThreadsRepository) CountMessages(ctx context.Context, id, userID int64, privateMessage *bool) (total int32, err error)

func (*ThreadsRepository) CountThreads

func (r *ThreadsRepository) CountThreads(ctx context.Context, id, userID int64) (total int32, err error)

func (*ThreadsRepository) DeleteThread

func (r *ThreadsRepository) DeleteThread(ctx context.Context, id, userID int64) (err error)

func (*ThreadsRepository) ListMessages

func (r *ThreadsRepository) ListMessages(ctx context.Context, userID, parentID int64, limit, offset int32, asc bool, privateMessage *bool) (list []*model.Thread, isLastPage bool, err error)

func (*ThreadsRepository) ListThreads

func (r *ThreadsRepository) ListThreads(ctx context.Context, userID, parentID int64, limit, offset int32, asc bool) (list []*model.Thread, isLastPage bool, err error)

func (*ThreadsRepository) PrivateMessages

func (r *ThreadsRepository) PrivateMessages(ctx context.Context, ids []int64, userID int64) (err error)

func (*ThreadsRepository) PrivateThread

func (r *ThreadsRepository) PrivateThread(ctx context.Context, id, userID int64, updatedAt string) (err error)

func (*ThreadsRepository) PublishMessages

func (r *ThreadsRepository) PublishMessages(ctx context.Context, ids []int64, userID int64) (err error)

func (*ThreadsRepository) PublishThread

func (r *ThreadsRepository) PublishThread(ctx context.Context, id, userID int64, updatedAt string) (err error)

func (*ThreadsRepository) ReadThreadByID

func (r *ThreadsRepository) ReadThreadByID(ctx context.Context, id, userID int64) (thread *model.Thread, err error)

func (*ThreadsRepository) ReadThreadByName

func (r *ThreadsRepository) ReadThreadByName(ctx context.Context, name string, userID int64) (thread *model.Thread, err error)

func (*ThreadsRepository) ReorderThread

func (r *ThreadsRepository) ReorderThread(ctx context.Context, id, userID, parentID, nextID, prevID int64, updatedAt string) (err error)

func (*ThreadsRepository) ResolveThread

func (r *ThreadsRepository) ResolveThread(ctx context.Context, id, userID int64) (path []*api.PathStep, err error)

func (*ThreadsRepository) UpdateThread

func (r *ThreadsRepository) UpdateThread(ctx context.Context, id, userID int64, name, description, title *string, updatedAt string) (err error)

Jump to

Keyboard shortcuts

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