index

package
v0.0.0-...-799e77a Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: BSD-3-Clause Imports: 5 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("Content not found")

ErrNotFound signals content not found

Functions

This section is empty.

Types

type Content

type Content struct {
	ID            string `json:"id"`
	EncryptionKey []byte `json:"-"`
	Location      string `json:"location"`
	Length        int64  `json:"length"` //not exported in license spec?
	Sha256        string `json:"sha256"` //not exported in license spec?
	Type          string `json:"type"`
}

Content represents an encrypted resource

type Index

type Index interface {
	Get(id string) (Content, error)
	Add(c Content) error
	Update(c Content) error
	Delete(id string) error
	List() func() (Content, error)
}

Index is an interface

func Open

func Open(db *sql.DB) (i Index, err error)

Open opens an SQL database and prepare db statements

Jump to

Keyboard shortcuts

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