repository

package
v0.0.0-...-b9e25f6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitialMigrationName = "0000-00-00-00-00-00-initial.sql"
	MigrationTableName   = "assets_migration"
)
View Source
const (
	SqliteMigrationsDir = "migrations/sqlite3"
)

Variables

View Source
var (
	ErrNotFound = errors.New("row not found")
)

Functions

func NewSqlite

func NewSqlite(db *sql.DB, migrations fs.ReadDirFS) *sqlite

Types

type Repository

type Repository interface {
	Migrate() (err error)
	GetByAssetKey(assetKey string) (asset *types.Asset, err error)
	GetByOriginalUrl(originalUrl string, allowError bool) (asset *types.Asset, err error)
	Insert(asset *types.Asset) (err error)
	Update(asset *types.Asset) (err error)
}

Jump to

Keyboard shortcuts

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