sqlite3

package
v0.0.0-...-63eaebe Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(ctx context.Context, db *sql.DB) error

Types

type CommentRepo

type CommentRepo struct {
	DB *sql.DB
}

func (*CommentRepo) Delete

func (repo *CommentRepo) Delete(ctx context.Context, id string) error

func (*CommentRepo) Get

func (repo *CommentRepo) Get(ctx context.Context, id string) (*blog.Comment, error)

func (*CommentRepo) Insert

func (repo *CommentRepo) Insert(ctx context.Context, comment *blog.Comment) error

func (*CommentRepo) List

func (repo *CommentRepo) List(
	ctx context.Context,
	params *blog.ListCommentsParams,
) ([]*blog.Comment, error)

func (*CommentRepo) Update

func (repo *CommentRepo) Update(ctx context.Context, comment *blog.Comment) error

type MediaItemRepo

type MediaItemRepo struct {
	DB *sql.DB
}

func (*MediaItemRepo) Delete

func (repo *MediaItemRepo) Delete(ctx context.Context, id string) error

func (*MediaItemRepo) ExistsByFilename

func (repo *MediaItemRepo) ExistsByFilename(ctx context.Context, filename string) (bool, error)

func (*MediaItemRepo) Get

func (repo *MediaItemRepo) Get(ctx context.Context, id string) (*media.Item, error)

func (*MediaItemRepo) Insert

func (repo *MediaItemRepo) Insert(ctx context.Context, item *media.Item) error

func (*MediaItemRepo) List

func (repo *MediaItemRepo) List(ctx context.Context) ([]*media.Item, error)

type PasswordResetTokenRepo

type PasswordResetTokenRepo struct {
	DB *sql.DB
}

func (*PasswordResetTokenRepo) Delete

func (repo *PasswordResetTokenRepo) Delete(ctx context.Context, tokenID string) error

func (*PasswordResetTokenRepo) GetByToken

func (repo *PasswordResetTokenRepo) GetByToken(
	ctx context.Context,
	tokenStr string,
) (*authentication.PasswordResetToken, error)

func (*PasswordResetTokenRepo) Insert

type PostRepo

type PostRepo struct {
	DB *sql.DB
}

func (*PostRepo) Count

func (repo *PostRepo) Count(ctx context.Context) (int, error)

func (*PostRepo) Delete

func (repo *PostRepo) Delete(ctx context.Context, id string) error

func (*PostRepo) Get

func (repo *PostRepo) Get(ctx context.Context, id string) (*blog.Post, error)

func (*PostRepo) GetBySlug

func (repo *PostRepo) GetBySlug(ctx context.Context, slug string) (*blog.Post, error)

func (*PostRepo) Insert

func (repo *PostRepo) Insert(ctx context.Context, post *blog.Post) error

func (*PostRepo) List

func (repo *PostRepo) List(ctx context.Context, params *blog.ListPostsParams) ([]*blog.Post, error)

func (*PostRepo) SlugExists

func (repo *PostRepo) SlugExists(ctx context.Context, slug string) (bool, error)

func (*PostRepo) Update

func (repo *PostRepo) Update(ctx context.Context, post *blog.Post) error

type SessionRepo

type SessionRepo struct {
	DB *sql.DB
}

func (*SessionRepo) Delete

func (repo *SessionRepo) Delete(ctx context.Context, id string) error

func (*SessionRepo) Get

func (repo *SessionRepo) Get(ctx context.Context, id string) (*authentication.Session, error)

func (*SessionRepo) Insert

func (repo *SessionRepo) Insert(ctx context.Context, session *authentication.Session) error

type UserRepo

type UserRepo struct {
	DB *sql.DB
}

func (*UserRepo) ExistsByEmailAddress

func (repo *UserRepo) ExistsByEmailAddress(
	ctx context.Context,
	emailAddress string,
) (bool, error)

func (*UserRepo) ExistsByUsername

func (repo *UserRepo) ExistsByUsername(ctx context.Context, username string) (bool, error)

func (*UserRepo) Get

func (repo *UserRepo) Get(ctx context.Context, id string) (*authentication.User, error)

func (*UserRepo) GetByEmailAddress

func (repo *UserRepo) GetByEmailAddress(
	ctx context.Context,
	emailAddress string,
) (*authentication.User, error)

func (*UserRepo) GetByUsername

func (repo *UserRepo) GetByUsername(ctx context.Context, username string) (*authentication.User, error)

func (*UserRepo) Insert

func (repo *UserRepo) Insert(ctx context.Context, user *authentication.User) error

func (*UserRepo) List

func (*UserRepo) Update

func (repo *UserRepo) Update(ctx context.Context, user *authentication.User) error

Jump to

Keyboard shortcuts

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