Initial lookbook implementation
Pinterest-style visual bookmarking app with: - URL metadata extraction (OG/Twitter meta, oEmbed fallback) - Image caching in Postgres with 480px thumbnails - Multi-tag filtering with Ctrl/Cmd for OR mode - Fuzzy tag suggestions and inline tag editing - Browser console auth() with first-use password setup - Brutalist UI with Commit Mono font and Pico CSS - Light/dark mode via browser preference
This commit is contained in:
commit
fc625fb9cf
486 changed files with 195373 additions and 0 deletions
32
vendor/github.com/pressly/goose/v3/lock/locker.go
generated
vendored
Normal file
32
vendor/github.com/pressly/goose/v3/lock/locker.go
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// Package lock defines the Locker interface and implements the locking logic.
|
||||
package lock
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrLockNotImplemented is returned when the database does not support locking.
|
||||
ErrLockNotImplemented = errors.New("lock not implemented")
|
||||
// ErrUnlockNotImplemented is returned when the database does not support unlocking.
|
||||
ErrUnlockNotImplemented = errors.New("unlock not implemented")
|
||||
)
|
||||
|
||||
// SessionLocker is the interface to lock and unlock the database for the duration of a session. The
|
||||
// session is defined as the duration of a single connection and both methods must be called on the
|
||||
// same connection.
|
||||
type SessionLocker interface {
|
||||
SessionLock(ctx context.Context, conn *sql.Conn) error
|
||||
SessionUnlock(ctx context.Context, conn *sql.Conn) error
|
||||
}
|
||||
|
||||
// Locker is the interface to lock and unlock the database.
|
||||
//
|
||||
// Unlike [SessionLocker], the Lock and Unlock methods are called on a [*sql.DB] and do not require
|
||||
// the same connection to be used for both methods.
|
||||
type Locker interface {
|
||||
Lock(ctx context.Context, db *sql.DB) error
|
||||
Unlock(ctx context.Context, db *sql.DB) error
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue