index

package
v0.0.0-...-da9a50a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

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
	List() func() (Content, error)
}

Index is an interface

func Open

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

Open opens an SQL database

Jump to

Keyboard shortcuts

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