store

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	DBInstance *sql.DB
}

func New

func New(db *sql.DB) *Store

New creates a new Store instance with the given database connection. If db is nil, it opens a SQLite database at the default path "db.sqlite". Deprecated: Use NewWithPath to specify a custom database path.

func NewWithPath added in v0.2.3

func NewWithPath(path string) (*Store, error)

NewWithPath creates a new Store instance with a database at the specified path. If path is empty, it defaults to "db.sqlite".

func (*Store) Close added in v0.1.6

func (s *Store) Close() error

func (*Store) HasItem

func (s *Store) HasItem(magnet string) bool

func (*Store) HasMagnetByXt added in v0.1.7

func (s *Store) HasMagnetByXt(magnet string) bool

@TODO 替换 HasItem. 注意目前 magnet 存的长度是 VARCHAR(255)。有tracker的长URI会存不了.

func (*Store) SaveMagnetItems

func (s *Store) SaveMagnetItems(items []rsssite.MagnetItem) error

Jump to

Keyboard shortcuts

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