varda

package module
v0.0.0-...-df3f4e6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Varda

varda is a simple photo album manager.

varda-logo

Installation

$> go install sbinet.org/x/varda/cmd/varda

Notes

Noteworthy projects

Documentation

Index

Constants

View Source
const (
	MaxRefLen = 56 // length of string representation sha224
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name string    `json:"name"`
	Data io.Reader `json:"-"`
	Size int64     `json:"size"`
	Time time.Time `json:"time"`
}

type Meta

type Meta struct {
	ID     string
	Name   string
	MIME   string
	Size   int64
	Width  int64
	Height int64
	Lat    float64
	Lon    float64
	Tags   []string
	Time   time.Time
	Ops    []byte
}

Meta holds metadata about a Varda resource

func MetaFrom

func MetaFrom(fname string) (Meta, error)

func MetaFromReaderAt

func MetaFromReaderAt(fname string, f io.ReaderAt, size int64) (Meta, error)

func (Meta) IsAudio

func (m Meta) IsAudio() bool

func (Meta) IsImage

func (m Meta) IsImage() bool

func (Meta) IsVideo

func (m Meta) IsVideo() bool

type Ref

type Ref struct {
	SHA   string
	Path  string
	Thumb []byte
	Meta  Meta
}

Ref is a reference to a Varda resource: a photo or video.

func (Ref) Hash

func (r Ref) Hash() hash.Hash

type Repository

type Repository interface {
	NumRef(ctx context.Context) (int64, error)
	IterRef(ctx context.Context, f func(v Ref) error) error
	FindRef(ctx context.Context, sha string) (Ref, error)
	Fetch(ctx context.Context, v Ref) (io.ReadCloser, error)
	Upload(ctx context.Context, f File) (Ref, error)

	io.Closer
}

Directories

Path Synopsis
Package auth provides means for authentication and authorization of user requests.
Package auth provides means for authentication and authorization of user requests.
Package client provides tools to interact with a varda server.
Package client provides tools to interact with a varda server.
cmd
vrd
Command vrd provides a command-line interface to a varda server.
Command vrd provides a command-line interface to a varda server.
vrd-mgr
Command vrd-mgr manages a varda server.
Command vrd-mgr manages a varda server.
Package config provides tools to store and retrieve varda configuration state.
Package config provides tools to store and retrieve varda configuration state.
internal
assets
Package assets embeds varda assets.
Package assets embeds varda assets.
mdt
Package mdt provides tools to extract metadata from resources.
Package mdt provides tools to extract metadata from resources.
strbin
Package strbin provides a simple encoding/decoding of []string.
Package strbin provides a simple encoding/decoding of []string.
thumbs
Package thumbs provides tools to create thumbnail images from resources.
Package thumbs provides tools to create thumbnail images from resources.
vql
Package vql provides means to parse a simple query language for Varda resources.
Package vql provides means to parse a simple query language for Varda resources.
vql/ast
Package ast provides means to represent an AST of a vql expression.
Package ast provides means to represent an AST of a vql expression.
vql/lexer
Package lexer provides means to tokenize a vql expression.
Package lexer provides means to tokenize a vql expression.
vql/token
Package token models the various tokens of the Varda query language.
Package token models the various tokens of the Varda query language.
vrdop
Package vrdop provides tools to efficiently represent image operations.
Package vrdop provides tools to efficiently represent image operations.
Package search provides tools to query varda resources.
Package search provides tools to query varda resources.
Package server provides tools to create a Varda server.
Package server provides tools to create a Varda server.
Package srvinit bootstraps a varda server.
Package srvinit bootstraps a varda server.
Package store exposes means to register and open varda stores.
Package store exposes means to register and open varda stores.
sqlite
Package sqlite implements a varda store backed by a SQLite database.
Package sqlite implements a varda store backed by a SQLite database.

Jump to

Keyboard shortcuts

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