repository

package
v0.0.0-...-ee7ed0d Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PastebinRepository

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

func NewPastebinRepository

func NewPastebinRepository(queries *db.Queries) *PastebinRepository

func (*PastebinRepository) CreatePaste

func (r *PastebinRepository) CreatePaste(ctx context.Context, paste *domain.Paste) error

func (*PastebinRepository) DeleteExpiredPastes

func (r *PastebinRepository) DeleteExpiredPastes(ctx context.Context) error

func (*PastebinRepository) DeletePaste

func (r *PastebinRepository) DeletePaste(ctx context.Context, id string) error

func (*PastebinRepository) GetPasteByID

func (r *PastebinRepository) GetPasteByID(ctx context.Context, id string) (*domain.Paste, error)

func (*PastebinRepository) ListRecentPastes

func (r *PastebinRepository) ListRecentPastes(ctx context.Context, limit int) ([]*domain.Paste, error)

type QRCodeRepository

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

func NewQRCodeRepository

func NewQRCodeRepository(queries *db.Queries) *QRCodeRepository

func (*QRCodeRepository) CreateQRCode

func (r *QRCodeRepository) CreateQRCode(ctx context.Context, qr *domain.QRCode) error

func (*QRCodeRepository) GetQRCodeByID

func (r *QRCodeRepository) GetQRCodeByID(ctx context.Context, id string) (*domain.QRCode, error)

type TodoRepository

type TodoRepository interface {
	Create(ctx context.Context, todo *domain.Todo) (*domain.Todo, error)
	GetByID(ctx context.Context, id, userID int64) (*domain.Todo, error)
	List(ctx context.Context, userID int64, limit, offset int32) ([]*domain.Todo, error)
	Update(ctx context.Context, todo *domain.Todo) (*domain.Todo, error)
	Delete(ctx context.Context, id, userID int64) error
	Count(ctx context.Context, userID int64) (int64, error)
}

func NewTodoRepository

func NewTodoRepository(queries *db.Queries) TodoRepository

type URLShortenerRepository

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

func NewURLShortenerRepository

func NewURLShortenerRepository(queries *db.Queries) *URLShortenerRepository

func (*URLShortenerRepository) CreateShortURL

func (r *URLShortenerRepository) CreateShortURL(ctx context.Context, shortURL *domain.ShortURL) error

func (*URLShortenerRepository) DeleteExpiredURLs

func (r *URLShortenerRepository) DeleteExpiredURLs(ctx context.Context) error

func (*URLShortenerRepository) GetShortURLByCode

func (r *URLShortenerRepository) GetShortURLByCode(ctx context.Context, code string) (*domain.ShortURL, error)

func (*URLShortenerRepository) IncrementClicks

func (r *URLShortenerRepository) IncrementClicks(ctx context.Context, id int64) error

func (*URLShortenerRepository) LogClick

func (r *URLShortenerRepository) LogClick(ctx context.Context, click *domain.URLClickLog) error

type UserRepository

type UserRepository interface {
	Create(ctx context.Context, user *domain.User) (*domain.User, error)
	GetByUsername(ctx context.Context, username string) (*domain.User, error)
	GetByID(ctx context.Context, id int64) (*domain.User, error)
}

func NewUserRepository

func NewUserRepository(queries *db.Queries) UserRepository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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