sqlite

package
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: 26 Imported by: 0

Documentation

Overview

Package sqlite implements a varda store backed by a SQLite database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(root string) (varda.Repository, error)

Register registers the sqlite backend.

func SchemaVersion

func SchemaVersion() int

Types

type Store

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

func Create

func Create(root string) (*Store, error)

Create creates a new sqlite repository under root.

func Open

func Open(root string) (*Store, error)

Open opens the named sqlite repository.

func (*Store) Close

func (store *Store) Close() error

func (*Store) Fetch

func (store *Store) Fetch(ctx context.Context, v varda.Ref) (io.ReadCloser, error)

func (*Store) FindRef

func (store *Store) FindRef(ctx context.Context, sha string) (ref varda.Ref, err error)

func (*Store) IterRef

func (store *Store) IterRef(ctx context.Context, f func(v varda.Ref) error) error

func (*Store) NumRef

func (store *Store) NumRef(ctx context.Context) (n int64, err error)

func (*Store) Search

func (store *Store) Search(ctx context.Context, q search.Query, f func(v varda.Ref) error) error

func (*Store) Upload

func (store *Store) Upload(ctx context.Context, f varda.File) (href varda.Ref, err error)

Jump to

Keyboard shortcuts

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