cache

package
v0.0.0-...-a508f9c Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(db *sql.DB) error

func Open

func Open(dbFilename string) (*sql.DB, error)

Types

type Cache

type Cache interface {
	UpsertGooglephoto(p *GooglephotoData) error
	GetGooglephoto(baseUrl string) (*GooglephotoData, error)
	UpsertNixplay(n *NixplayData) error

	Status() (StatusResponse, error)
}

func New

func New(reg prometheus.Registerer, filename string) (Cache, error)

type GooglephotoData

type GooglephotoData struct {
	Id             int64
	BaseUrl        string
	Sha256         string
	Md5            string
	GooglephotosId string
	Width          int64
	Height         int64
	LastUpdated    time.Time
	LastUsed       time.Time
}

type NixplayData

type NixplayData struct {
	Id          int64
	URL         string
	Filename    string
	SortDate    string
	Md5         string
	NixplayId   int
	LastUpdated time.Time
	LastUsed    time.Time
}

type StatusResponse

type StatusResponse struct {
	GooglePhotosValidRows int64
	NixplayValidRows      int64
}

Jump to

Keyboard shortcuts

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