pg

package
v0.0.1-101123-c741ed7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(ctx context.Context, dbs string) (*Repository, error)

func (*Repository) Close

func (r *Repository) Close(ctx context.Context) error

func (*Repository) CreateMessage

func (r *Repository) CreateMessage(ctx context.Context, msg *models.Message) error

func (*Repository) GetMessage

func (r *Repository) GetMessage(ctx context.Context, id string) (*models.Message, error)

func (*Repository) GetUser

func (r *Repository) GetUser(ctx context.Context, username string) (*models.User, error)

func (*Repository) ListMessages

func (r *Repository) ListMessages(ctx context.Context, ownerID string, from, to time.Time) ([]*models.Message, error)

func (*Repository) UpsertUser

func (r *Repository) UpsertUser(ctx context.Context, user *models.User) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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