gallerydb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gallerydb provides the database access layer for the application. It uses sqlc to generate type-safe Go code from SQL queries. This package includes the generated code, custom queries, and data models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchLoadTarget added in v0.3.0

type BatchLoadTarget struct {
	Path     string
	Htmx     string
	HxTarget string
	Encoding string
}

BatchLoadTarget represents a single cache warm target from GetBatchLoadTargets.

type Config

type Config struct {
	Key             string
	Value           string
	CreatedAt       interface{}
	UpdatedAt       interface{}
	Type            sql.NullString
	Category        sql.NullString
	RequiresRestart int64
	Description     sql.NullString
	DefaultValue    sql.NullString
	HelpText        sql.NullString
	ExampleValue    sql.NullString
}

type CustomQuerier added in v0.3.0

type CustomQuerier interface {
	Querier
	GetBatchLoadTargets(ctx context.Context) ([]BatchLoadTarget, error)
	GetFileViewRowsByFolderID(ctx context.Context, folderID int64) (*sql.Rows, error)
	GetFileViewRowsByFolderPath(ctx context.Context, folderPath string) (*sql.Rows, error)
	GetFolderViewThumbnailBlobDataByPath(ctx context.Context, path string) ([]byte, error)
	GetPreloadRoutesByFolderID(ctx context.Context, parent_id sql.NullInt64) (*sql.Rows, error)
	GetThumbnailBlobDataByID(ctx context.Context, thumbnailID int64) ([]byte, error)
	UpsertThumbnailBlob(ctx context.Context, arg UpsertThumbnailBlobParams) error
}

CustomQuerier extends the sqlc-generated Querier interface with custom hand-written query methods.

type CustomQueries

type CustomQueries struct {
	*Queries
	// contains filtered or unexported fields
}

CustomQueries embeds the sqlc-generated Queries struct and adds methods for custom, hand-written queries. All custom queries are prepared statements for consistency and performance.

func NewCustomQueries

func NewCustomQueries(db DBTX) *CustomQueries

NewCustomQueries creates a new CustomQueries instance without preparing statements. Use PrepareCustomQueries for statement preparation.

func PrepareCustomQueries

func PrepareCustomQueries(ctx context.Context, db DBTX) (*CustomQueries, error)

PrepareCustomQueries prepares both the sqlc-generated statements and custom statements, returning a fully initialized CustomQueries object. It also attaches the thumbnail blob database for multi-database transaction consistency.

func (*CustomQueries) Close added in v0.3.0

func (cq *CustomQueries) Close() error

Close closes all prepared custom statements and delegates to the embedded Queries.Close().

func (*CustomQueries) GetBatchLoadTargets added in v0.3.0

func (cq *CustomQueries) GetBatchLoadTargets(ctx context.Context) ([]BatchLoadTarget, error)

GetBatchLoadTargets returns all cache warm targets (gallery, info/folder, info/image, lightbox) in folders-first order for batch load.

func (*CustomQueries) GetFileViewRowsByFolderID

func (cq *CustomQueries) GetFileViewRowsByFolderID(ctx context.Context, folderID int64) (*sql.Rows, error)

GetFileViewRowsByFolderID retrieves all files in a folder by folder ID.

func (*CustomQueries) GetFileViewRowsByFolderPath

func (cq *CustomQueries) GetFileViewRowsByFolderPath(ctx context.Context, folderPath string) (*sql.Rows, error)

GetFileViewRowsByFolderPath retrieves all files in a folder by folder path.

func (*CustomQueries) GetFolderViewThumbnailBlobDataByPath

func (cq *CustomQueries) GetFolderViewThumbnailBlobDataByPath(ctx context.Context, path string) ([]byte, error)

GetFolderViewThumbnailBlobDataByPath retrieves the thumbnail blob for a folder's tile image directly via the folder path. This query joins the main DB with the thumbnail blob store.

func (*CustomQueries) GetPreloadRoutesByFolderID

func (cq *CustomQueries) GetPreloadRoutesByFolderID(ctx context.Context, parent_id sql.NullInt64) (*sql.Rows, error)

GetPreloadRoutesByFolderID retrieves all preload routes for subfolders and files under the specified folder ID.

func (*CustomQueries) GetThumbnailBlobDataByID added in v0.3.0

func (cq *CustomQueries) GetThumbnailBlobDataByID(ctx context.Context, thumbnailID int64) ([]byte, error)

GetThumbnailBlobDataByID retrieves thumbnail blob data by thumbnail ID. This method is now on CustomQueries to support the separate blob database.

func (*CustomQueries) UpsertThumbnailBlob added in v0.3.0

func (cq *CustomQueries) UpsertThumbnailBlob(ctx context.Context, arg UpsertThumbnailBlobParams) error

UpsertThumbnailBlob inserts or updates thumbnail blob data by thumbnail ID. This method is now on CustomQueries to support the separate blob database.

func (*CustomQueries) WithTx

func (cq *CustomQueries) WithTx(tx *sql.Tx) *CustomQueries

WithTx returns a new CustomQueries instance with the provided transaction, allowing custom queries to be executed within a transaction. All prepared statements are propagated to the transactional instance.

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ExifMetadatum

type ExifMetadatum struct {
	FileID       int64
	CameraMake   sql.NullString
	CameraModel  sql.NullString
	LensModel    sql.NullString
	FocalLength  sql.NullString
	Aperture     sql.NullString
	ShutterSpeed sql.NullString
	Iso          sql.NullInt64
	Orientation  sql.NullInt64
	Latitude     sql.NullFloat64
	Longitude    sql.NullFloat64
	Altitude     sql.NullFloat64
	CaptureDate  sql.NullInt64
	Software     sql.NullString
}

type File

type File struct {
	ID        int64
	FolderID  sql.NullInt64
	PathID    int64
	Filename  string
	SizeBytes sql.NullInt64
	Mtime     sql.NullInt64
	Md5       sql.NullString
	Phash     sql.NullInt64
	MimeType  sql.NullString
	Width     sql.NullInt64
	Height    sql.NullInt64
	CreatedAt interface{}
	UpdatedAt interface{}
}

type FilePath

type FilePath struct {
	ID   int64
	Path string
}

type FileView

type FileView struct {
	ID         int64
	FolderID   sql.NullInt64
	FolderPath sql.NullString
	Path       string
	Filename   string
	SizeBytes  sql.NullInt64
	Mtime      sql.NullInt64
	Md5        sql.NullString
	Phash      sql.NullInt64
	MimeType   sql.NullString
	Width      sql.NullInt64
	Height     sql.NullInt64
	CreatedAt  interface{}
	UpdatedAt  interface{}
}

type Folder

type Folder struct {
	ID        int64
	ParentID  sql.NullInt64
	PathID    int64
	Name      string
	Mtime     sql.NullInt64
	TileID    sql.NullInt64
	CreatedAt interface{}
	UpdatedAt interface{}
}

type FolderPath

type FolderPath struct {
	ID   int64
	Path string
}

type FolderTileExistsView

type FolderTileExistsView struct {
	Path  string
	ID    int64
	Found bool
}

type FolderView

type FolderView struct {
	ID        int64
	ParentID  sql.NullInt64
	Path      string
	Name      string
	Mtime     sql.NullInt64
	CreatedAt interface{}
	UpdatedAt interface{}
}

type GetGalleryStatisticsRow

type GetGalleryStatisticsRow struct {
	CtFolders    int64
	CtFiles      int64
	SzFiles      sql.NullFloat64
	MinCreatedAt interface{}
	MaxUpdatedAt interface{}
}

type GetHttpCacheOldestCreatedRow

type GetHttpCacheOldestCreatedRow struct {
	ID            int64
	CreatedAt     int64
	ContentLength sql.NullInt64
}

type HttpCache

type HttpCache struct {
	ID              int64
	Key             string
	Method          string
	Path            string
	QueryString     sql.NullString
	Encoding        string
	Status          int64
	ContentType     sql.NullString
	CacheControl    sql.NullString
	Etag            sql.NullString
	LastModified    sql.NullString
	Vary            sql.NullString
	Body            []byte
	ContentLength   sql.NullInt64
	CreatedAt       int64
	ExpiresAt       sql.NullInt64
	ContentEncoding sql.NullString
}

type InsertIPTCKeywordParams

type InsertIPTCKeywordParams struct {
	ID      int64
	FileID  int64
	Keyword string
}

type InvalidFile

type InvalidFile struct {
	Path      string
	Mtime     int64
	Size      int64
	Reason    sql.NullString
	CreatedAt int64
	UpdatedAt int64
}

type IptcKeyword

type IptcKeyword struct {
	ID      int64
	FileID  int64
	Keyword string
}

type IptcMetadatum

type IptcMetadatum struct {
	FileID      int64
	Title       sql.NullString
	Description sql.NullString
	Keywords    sql.NullString
	Creator     sql.NullString
	Copyright   sql.NullString
	Credit      sql.NullString
	Source      sql.NullString
	CreatedDate sql.NullInt64
}

type LoginAttempt

type LoginAttempt struct {
	Username       string
	FailedAttempts int64
	LockedUntil    sql.NullInt64
	LastAttemptAt  int64
}

type ModuleState added in v0.3.0

type ModuleState struct {
	Name           string
	IsActive       int64
	LastStartedAt  sql.NullInt64
	LastFinishedAt sql.NullInt64
}

type QcFilePathSubsetFileName

type QcFilePathSubsetFileName struct {
	Filename string
	Path     string
}

type QcFolderPathSubsetFilePath

type QcFolderPathSubsetFilePath struct {
	FolderPath string
	FilePath   string
}

type Querier

type Querier interface {
	ClearHttpCache(ctx context.Context) error
	ClearLoginAttempts(ctx context.Context, username string) error
	CountHttpCacheEntries(ctx context.Context) (int64, error)
	DeleteHttpCacheByID(ctx context.Context, id int64) error
	DeleteHttpCacheByKey(ctx context.Context, key string) error
	DeleteHttpCacheExpired(ctx context.Context) error
	DeleteIPTC(ctx context.Context, fileID int64) error
	DeleteIPTCKeyword(ctx context.Context, id int64) error
	DeleteInvalidFileByPath(ctx context.Context, path string) error
	DeleteXMPProperty(ctx context.Context, id int64) error
	DeleteXMPRaw(ctx context.Context, fileID int64) error
	GetConfigValueByKey(ctx context.Context, key string) (string, error)
	GetConfigs(ctx context.Context) ([]Config, error)
	GetExifByFile(ctx context.Context, fileID int64) (ExifMetadatum, error)
	GetFileByPath(ctx context.Context, path string) (File, error)
	GetFileViewByID(ctx context.Context, id int64) (FileView, error)
	GetFileViewsByFolderIDOrderByFileName(ctx context.Context, folderID sql.NullInt64) ([]FileView, error)
	// -- name: PopulateMissingTileID :exec
	// UPDATE folders
	//    SET tile_id = (
	//      SELECT tile_id
	//        FROM (
	//          SELECT f.id, p.id AS tile_id
	//               , DENSE_RANK() OVER (PARTITION BY f.id ORDER BY p.path) AS rnk
	//            FROM files f
	//                 INNER JOIN file_paths p
	//                   ON f.path_id = p.id
	//           WHERE f.tile_id IS NULL
	//        ) ranked
	//       WHERE ranked.id = folders.id
	//         AND ranked.rnk = 1
	//    )
	//  WHERE EXISTS (
	//      SELECT 1 FROM files f
	//      WHERE f.tile_id IS NULL AND folders.id = f.id
	//    );
	GetFolderByID(ctx context.Context, id int64) (Folder, error)
	GetFolderByPath(ctx context.Context, path string) (Folder, error)
	GetFolderIDByPath(ctx context.Context, path string) (int64, error)
	GetFolderTileExistsViewByPath(ctx context.Context, path string) (bool, error)
	GetFolderViewByID(ctx context.Context, id int64) (FolderView, error)
	GetFoldersViewsByParentIDOrderByName(ctx context.Context, parentID sql.NullInt64) ([]FolderView, error)
	GetGalleryStatistics(ctx context.Context) (GetGalleryStatisticsRow, error)
	// queries for HTTP cache table operations
	GetHttpCacheByKey(ctx context.Context, key string) (HttpCache, error)
	GetHttpCacheOldestCreated(ctx context.Context, limit int64) ([]GetHttpCacheOldestCreatedRow, error)
	GetHttpCacheSizeBytes(ctx context.Context) (interface{}, error)
	GetIPTCByFile(ctx context.Context, fileID int64) (IptcMetadatum, error)
	GetIPTCKeywords(ctx context.Context, fileID int64) ([]IptcKeyword, error)
	GetInvalidFileByPath(ctx context.Context, path string) (InvalidFile, error)
	GetLoginAttempt(ctx context.Context, username string) (LoginAttempt, error)
	GetModuleState(ctx context.Context, name string) (ModuleState, error)
	GetThumbnailExistsViewByID(ctx context.Context, id int64) (bool, error)
	GetThumbnailsByFileID(ctx context.Context, fileID int64) (Thumbnail, error)
	GetXMPPropertiesByFile(ctx context.Context, fileID int64) ([]XmpProperty, error)
	GetXMPRaw(ctx context.Context, fileID int64) (XmpRaw, error)
	HttpCacheExistsByKey(ctx context.Context, key string) (int64, error)
	InsertIPTCKeyword(ctx context.Context, arg InsertIPTCKeywordParams) error
	SetModuleState(ctx context.Context, arg SetModuleStateParams) error
	UnlockAccount(ctx context.Context, username string) error
	UpdateFolderTileId(ctx context.Context, arg UpdateFolderTileIdParams) error
	UpsertConfigValueOnly(ctx context.Context, arg UpsertConfigValueOnlyParams) error
	UpsertExif(ctx context.Context, arg UpsertExifParams) error
	UpsertFilePathReturningID(ctx context.Context, path string) (int64, error)
	UpsertFileReturningFile(ctx context.Context, arg UpsertFileReturningFileParams) (File, error)
	UpsertFolderPathReturningID(ctx context.Context, path string) (int64, error)
	UpsertFolderReturningFolder(ctx context.Context, arg UpsertFolderReturningFolderParams) (Folder, error)
	UpsertHttpCache(ctx context.Context, arg UpsertHttpCacheParams) error
	UpsertIPTC(ctx context.Context, arg UpsertIPTCParams) error
	UpsertInvalidFile(ctx context.Context, arg UpsertInvalidFileParams) error
	UpsertLoginAttempt(ctx context.Context, arg UpsertLoginAttemptParams) error
	UpsertThumbnailReturningID(ctx context.Context, arg UpsertThumbnailReturningIDParams) (int64, error)
	UpsertXMPProperty(ctx context.Context, arg UpsertXMPPropertyParams) error
	UpsertXMPRaw(ctx context.Context, arg UpsertXMPRawParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) ClearHttpCache

func (q *Queries) ClearHttpCache(ctx context.Context) error

func (*Queries) ClearLoginAttempts

func (q *Queries) ClearLoginAttempts(ctx context.Context, username string) error

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CountHttpCacheEntries

func (q *Queries) CountHttpCacheEntries(ctx context.Context) (int64, error)

func (*Queries) DeleteHttpCacheByID

func (q *Queries) DeleteHttpCacheByID(ctx context.Context, id int64) error

func (*Queries) DeleteHttpCacheByKey

func (q *Queries) DeleteHttpCacheByKey(ctx context.Context, key string) error

func (*Queries) DeleteHttpCacheExpired

func (q *Queries) DeleteHttpCacheExpired(ctx context.Context) error

func (*Queries) DeleteIPTC

func (q *Queries) DeleteIPTC(ctx context.Context, fileID int64) error

func (*Queries) DeleteIPTCKeyword

func (q *Queries) DeleteIPTCKeyword(ctx context.Context, id int64) error

func (*Queries) DeleteInvalidFileByPath

func (q *Queries) DeleteInvalidFileByPath(ctx context.Context, path string) error

func (*Queries) DeleteXMPProperty

func (q *Queries) DeleteXMPProperty(ctx context.Context, id int64) error

func (*Queries) DeleteXMPRaw

func (q *Queries) DeleteXMPRaw(ctx context.Context, fileID int64) error

func (*Queries) GetConfigValueByKey

func (q *Queries) GetConfigValueByKey(ctx context.Context, key string) (string, error)

func (*Queries) GetConfigs

func (q *Queries) GetConfigs(ctx context.Context) ([]Config, error)

func (*Queries) GetExifByFile

func (q *Queries) GetExifByFile(ctx context.Context, fileID int64) (ExifMetadatum, error)

func (*Queries) GetFileByPath

func (q *Queries) GetFileByPath(ctx context.Context, path string) (File, error)

func (*Queries) GetFileViewByID

func (q *Queries) GetFileViewByID(ctx context.Context, id int64) (FileView, error)

func (*Queries) GetFileViewsByFolderIDOrderByFileName

func (q *Queries) GetFileViewsByFolderIDOrderByFileName(ctx context.Context, folderID sql.NullInt64) ([]FileView, error)

func (*Queries) GetFolderByID

func (q *Queries) GetFolderByID(ctx context.Context, id int64) (Folder, error)

-- name: PopulateMissingTileID :exec UPDATE folders

  SET tile_id = (
    SELECT tile_id
      FROM (
        SELECT f.id, p.id AS tile_id
             , DENSE_RANK() OVER (PARTITION BY f.id ORDER BY p.path) AS rnk
          FROM files f
               INNER JOIN file_paths p
                 ON f.path_id = p.id
         WHERE f.tile_id IS NULL
      ) ranked
     WHERE ranked.id = folders.id
       AND ranked.rnk = 1
  )
WHERE EXISTS (
    SELECT 1 FROM files f
    WHERE f.tile_id IS NULL AND folders.id = f.id
  );

func (*Queries) GetFolderByPath

func (q *Queries) GetFolderByPath(ctx context.Context, path string) (Folder, error)

func (*Queries) GetFolderIDByPath

func (q *Queries) GetFolderIDByPath(ctx context.Context, path string) (int64, error)

func (*Queries) GetFolderTileExistsViewByPath

func (q *Queries) GetFolderTileExistsViewByPath(ctx context.Context, path string) (bool, error)

func (*Queries) GetFolderViewByID

func (q *Queries) GetFolderViewByID(ctx context.Context, id int64) (FolderView, error)

func (*Queries) GetFoldersViewsByParentIDOrderByName

func (q *Queries) GetFoldersViewsByParentIDOrderByName(ctx context.Context, parentID sql.NullInt64) ([]FolderView, error)

func (*Queries) GetGalleryStatistics

func (q *Queries) GetGalleryStatistics(ctx context.Context) (GetGalleryStatisticsRow, error)

func (*Queries) GetHttpCacheByKey

func (q *Queries) GetHttpCacheByKey(ctx context.Context, key string) (HttpCache, error)

queries for HTTP cache table operations

func (*Queries) GetHttpCacheOldestCreated

func (q *Queries) GetHttpCacheOldestCreated(ctx context.Context, limit int64) ([]GetHttpCacheOldestCreatedRow, error)

func (*Queries) GetHttpCacheSizeBytes

func (q *Queries) GetHttpCacheSizeBytes(ctx context.Context) (interface{}, error)

func (*Queries) GetIPTCByFile

func (q *Queries) GetIPTCByFile(ctx context.Context, fileID int64) (IptcMetadatum, error)

func (*Queries) GetIPTCKeywords

func (q *Queries) GetIPTCKeywords(ctx context.Context, fileID int64) ([]IptcKeyword, error)

func (*Queries) GetInvalidFileByPath

func (q *Queries) GetInvalidFileByPath(ctx context.Context, path string) (InvalidFile, error)

func (*Queries) GetLoginAttempt

func (q *Queries) GetLoginAttempt(ctx context.Context, username string) (LoginAttempt, error)

func (*Queries) GetModuleState added in v0.3.0

func (q *Queries) GetModuleState(ctx context.Context, name string) (ModuleState, error)

func (*Queries) GetThumbnailExistsViewByID

func (q *Queries) GetThumbnailExistsViewByID(ctx context.Context, id int64) (bool, error)

func (*Queries) GetThumbnailsByFileID

func (q *Queries) GetThumbnailsByFileID(ctx context.Context, fileID int64) (Thumbnail, error)

func (*Queries) GetXMPPropertiesByFile

func (q *Queries) GetXMPPropertiesByFile(ctx context.Context, fileID int64) ([]XmpProperty, error)

func (*Queries) GetXMPRaw

func (q *Queries) GetXMPRaw(ctx context.Context, fileID int64) (XmpRaw, error)

func (*Queries) HttpCacheExistsByKey

func (q *Queries) HttpCacheExistsByKey(ctx context.Context, key string) (int64, error)

func (*Queries) InsertIPTCKeyword

func (q *Queries) InsertIPTCKeyword(ctx context.Context, arg InsertIPTCKeywordParams) error

func (*Queries) SetModuleState added in v0.3.0

func (q *Queries) SetModuleState(ctx context.Context, arg SetModuleStateParams) error

func (*Queries) UnlockAccount

func (q *Queries) UnlockAccount(ctx context.Context, username string) error

func (*Queries) UpdateFolderTileId

func (q *Queries) UpdateFolderTileId(ctx context.Context, arg UpdateFolderTileIdParams) error

func (*Queries) UpsertConfigValueOnly

func (q *Queries) UpsertConfigValueOnly(ctx context.Context, arg UpsertConfigValueOnlyParams) error

func (*Queries) UpsertExif

func (q *Queries) UpsertExif(ctx context.Context, arg UpsertExifParams) error

func (*Queries) UpsertFilePathReturningID

func (q *Queries) UpsertFilePathReturningID(ctx context.Context, path string) (int64, error)

func (*Queries) UpsertFileReturningFile

func (q *Queries) UpsertFileReturningFile(ctx context.Context, arg UpsertFileReturningFileParams) (File, error)

func (*Queries) UpsertFolderPathReturningID

func (q *Queries) UpsertFolderPathReturningID(ctx context.Context, path string) (int64, error)

func (*Queries) UpsertFolderReturningFolder

func (q *Queries) UpsertFolderReturningFolder(ctx context.Context, arg UpsertFolderReturningFolderParams) (Folder, error)

func (*Queries) UpsertHttpCache

func (q *Queries) UpsertHttpCache(ctx context.Context, arg UpsertHttpCacheParams) error

func (*Queries) UpsertIPTC

func (q *Queries) UpsertIPTC(ctx context.Context, arg UpsertIPTCParams) error

func (*Queries) UpsertInvalidFile

func (q *Queries) UpsertInvalidFile(ctx context.Context, arg UpsertInvalidFileParams) error

func (*Queries) UpsertLoginAttempt

func (q *Queries) UpsertLoginAttempt(ctx context.Context, arg UpsertLoginAttemptParams) error

func (*Queries) UpsertThumbnailReturningID

func (q *Queries) UpsertThumbnailReturningID(ctx context.Context, arg UpsertThumbnailReturningIDParams) (int64, error)

func (*Queries) UpsertXMPProperty

func (q *Queries) UpsertXMPProperty(ctx context.Context, arg UpsertXMPPropertyParams) error

func (*Queries) UpsertXMPRaw

func (q *Queries) UpsertXMPRaw(ctx context.Context, arg UpsertXMPRawParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type SetModuleStateParams added in v0.3.0

type SetModuleStateParams struct {
	Name           string
	IsActive       int64
	LastStartedAt  sql.NullInt64
	LastFinishedAt sql.NullInt64
}

type Thumbnail

type Thumbnail struct {
	ID        int64
	FileID    int64
	SizeLabel string
	Width     int64
	Height    int64
	Format    string
	CreatedAt interface{}
	UpdatedAt interface{}
}

type ThumbnailExistsView

type ThumbnailExistsView struct {
	Path  string
	ID    int64
	Found bool
}

type UpdateFolderTileIdParams

type UpdateFolderTileIdParams struct {
	TileID sql.NullInt64
	ID     int64
}

type UpsertConfigValueOnlyParams

type UpsertConfigValueOnlyParams struct {
	Key       string
	Value     string
	CreatedAt interface{}
	UpdatedAt interface{}
}

type UpsertExifParams

type UpsertExifParams struct {
	FileID       int64
	CameraMake   sql.NullString
	CameraModel  sql.NullString
	LensModel    sql.NullString
	FocalLength  sql.NullString
	Aperture     sql.NullString
	ShutterSpeed sql.NullString
	Iso          sql.NullInt64
	Orientation  sql.NullInt64
	Latitude     sql.NullFloat64
	Longitude    sql.NullFloat64
	Altitude     sql.NullFloat64
	CaptureDate  sql.NullInt64
}

type UpsertFileReturningFileParams

type UpsertFileReturningFileParams struct {
	FolderID  sql.NullInt64
	PathID    int64
	Filename  string
	SizeBytes sql.NullInt64
	Mtime     sql.NullInt64
	Md5       sql.NullString
	Phash     sql.NullInt64
	MimeType  sql.NullString
	Width     sql.NullInt64
	Height    sql.NullInt64
	CreatedAt interface{}
	UpdatedAt interface{}
}

type UpsertFolderReturningFolderParams

type UpsertFolderReturningFolderParams struct {
	ParentID  sql.NullInt64
	PathID    int64
	Name      string
	Mtime     sql.NullInt64
	TileID    sql.NullInt64
	CreatedAt interface{}
	UpdatedAt interface{}
}

type UpsertHttpCacheParams

type UpsertHttpCacheParams struct {
	Key             string
	Method          string
	Path            string
	QueryString     sql.NullString
	Encoding        string
	Status          int64
	ContentType     sql.NullString
	ContentEncoding sql.NullString
	CacheControl    sql.NullString
	Etag            sql.NullString
	LastModified    sql.NullString
	Vary            sql.NullString
	Body            []byte
	ContentLength   sql.NullInt64
	CreatedAt       int64
	ExpiresAt       sql.NullInt64
}

type UpsertIPTCParams

type UpsertIPTCParams struct {
	FileID      int64
	Title       sql.NullString
	Description sql.NullString
	Keywords    sql.NullString
	Creator     sql.NullString
	Copyright   sql.NullString
	Credit      sql.NullString
	Source      sql.NullString
	CreatedDate sql.NullInt64
}

type UpsertInvalidFileParams

type UpsertInvalidFileParams struct {
	Path   string
	Mtime  int64
	Size   int64
	Reason sql.NullString
}

type UpsertLoginAttemptParams

type UpsertLoginAttemptParams struct {
	Username       string
	FailedAttempts int64
	LastAttemptAt  int64
	LockedUntil    sql.NullInt64
}

type UpsertThumbnailBlobParams

type UpsertThumbnailBlobParams struct {
	ThumbnailID int64
	Data        []byte
}

UpsertThumbnailBlobParams are the parameters for upserting a thumbnail blob.

type UpsertThumbnailReturningIDParams

type UpsertThumbnailReturningIDParams struct {
	FileID    int64
	SizeLabel string
	Width     int64
	Height    int64
	Format    string
	CreatedAt interface{}
	UpdatedAt interface{}
}

type UpsertXMPPropertyParams

type UpsertXMPPropertyParams struct {
	ID        int64
	FileID    int64
	Namespace string
	Property  string
	Value     sql.NullString
}

type UpsertXMPRawParams

type UpsertXMPRawParams struct {
	FileID int64
	RawXml sql.NullString
}

type XmpProperty

type XmpProperty struct {
	ID        int64
	FileID    int64
	Namespace string
	Property  string
	Value     sql.NullString
}

type XmpRaw

type XmpRaw struct {
	FileID int64
	RawXml sql.NullString
}

Jump to

Keyboard shortcuts

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