record

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRec   = errors.New("record cannot be empty")
	ErrNoStat  = errors.New("stat cannot be empty")
	ErrColVals = errors.New("each database value must have a matching table column")
)

Functions

func Skip

func Skip(s stat.Proof, r Record, hide bool) (skip bool, err error)

Skip checks if the file of the proof exists.

func UpdateZipContent

func UpdateZipContent(id, filename, content string, items int) error

UpdateZipContent sets the file_zip_content column to match content and platform to "image".

Types

type Record

type Record struct {
	ID   string // MySQL auto increment Id.
	UUID string // Unique Id.
	File string // Absolute path to file.
	Name string // Filename.
}

Record of a file item.

func New

func New(values []sql.RawBytes, path string) Record

New returns a file record using values from the database.

func (Record) Approve

func (r Record) Approve() error

Approve sets the record to be publically viewable.

func (Record) Iterate

func (r Record) Iterate(s stat.Proof) error

Iterate through each stat value.

func (Record) Prefix

func (r Record) Prefix(s *stat.Proof)

Prefix prints the stat count and record Id to stdout.

func (Record) Zip

func (r Record) Zip(col sql.RawBytes, s *stat.Proof) error

Zip reads an archive and saves the content to the database.

Jump to

Keyboard shortcuts

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