postgresstore

package
v0.0.0-...-b28803a Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresMigration

func NewPostgresMigration(db *DB, migrationPath string) (*rf.Migration, error)

Types

type AuthStore

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

func NewAuthStore

func NewAuthStore(db *DB) *AuthStore

func (*AuthStore) CreateAuthAndUser

func (as *AuthStore) CreateAuthAndUser(ctx context.Context, auth *rf.Auth) error

func (*AuthStore) FindByEmail

func (as *AuthStore) FindByEmail(ctx context.Context, email string) (*rf.Auth, error)

type DB

type DB struct {
	DBURL string
	Now   func() time.Time
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dbURL string) *DB

func (*DB) BeginTx

func (db *DB) BeginTx(ctx context.Context, opts pgx.TxOptions) (*Tx, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Open

func (db *DB) Open() (err error)

type FeedStore

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

func NewFeedStore

func NewFeedStore(db *DB) *FeedStore

func (*FeedStore) CreateFeed

func (fs *FeedStore) CreateFeed(ctx context.Context, feed *rf.Feed) error

func (*FeedStore) CreateUserFeed

func (fs *FeedStore) CreateUserFeed(ctx context.Context, feed *rf.Feed) error

func (*FeedStore) DeleteFeed

func (fs *FeedStore) DeleteFeed(ctx context.Context, userID, feedID int64) error

func (*FeedStore) FindByURL

func (fs *FeedStore) FindByURL(ctx context.Context, url string) (*rf.Feed, error)

func (*FeedStore) FindUserFeedByID

func (fs *FeedStore) FindUserFeedByID(ctx context.Context, userID, feedID int64) (*rf.Feed, error)

func (*FeedStore) ListUserFeeds

func (fs *FeedStore) ListUserFeeds(ctx context.Context, userID int64) ([]rf.Feed, error)

type Tx

type Tx struct {
	pgx.Tx
	// contains filtered or unexported fields
}

type UserStore

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

func NewUserStore

func NewUserStore(db *DB) *UserStore

Jump to

Keyboard shortcuts

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