tbbs

package
v2.0.0-...-0b83eb9 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	Duration  int64                             `json:"duration,omitempty"`
	Width     int64                             `json:"width,omitempty"`
	Height    int64                             `json:"height,omitempty"`
	Errors    map[string]string                 `json:"errors,omitempty"`
	Mimetype  string                            `json:"mimetype,omitempty"`
	NSRL      []indexer.ActionNSRLMeta          `json:"nsrl,omitempty"`
	Identify  map[string]interface{}            `json:"identify,omitempty"`
	FFProbe   ffmpeg_models.Metadata            `json:"ffprobe,omitempty"`
	Siegfried []siegfried_pronom.Identification `json:"siegfried,omitempty"`
	Tika      []map[string]interface{}          `json:"tika,omitempty"`
	Exif      map[string]interface{}            `json:"exif,omitempty"`
	Clamav    map[string]string                 `json:"clamav,omitempty"`
}

type Ingest

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

func NewIngest

func NewIngest(tempDir, keyDir, initLocName, reportDir string, db *sql.DB, dbschema string, privateKeys []string, logger *logging.Logger) (*Ingest, error)

func (*Ingest) BagitLoadAll

func (i *Ingest) BagitLoadAll(fn func(bagit *IngestBagit) error) error

func (*Ingest) BagitNew

func (i *Ingest) BagitNew(name string, size int64, sha512, sha512_aes, report, creator, baginfo string, creationtime time.Time) (*IngestBagit, error)

func (*Ingest) Check

func (i *Ingest) Check() error

func (*Ingest) Ingest

func (i *Ingest) Ingest() error

func (*Ingest) IngestBagitLocationNew

func (i *Ingest) IngestBagitLocationNew(bagit *IngestBagit, loc *IngestLocation) (*IngestBagitLocation, error)

func (*Ingest) IngestBagitTestLocationNew

func (i *Ingest) IngestBagitTestLocationNew(ingestBagit *IngestBagit, loc *IngestLocation, test *IngestTest) (*IngestBagitTestLocation, error)

func (*Ingest) Init

func (i *Ingest) Init() error

func (*Ingest) Report

func (i *Ingest) Report() error

func (*Ingest) ReportBagit

func (i *Ingest) ReportBagit(bagit *IngestBagit, t *template.Template, reportWriter io.Writer) error

func (*Ingest) ReportBagits

func (i *Ingest) ReportBagits(reportBagits, reportSHA512 *template.Template, reportWriter, checksumWriter io.Writer) error

func (*Ingest) ReportIndex

func (i *Ingest) ReportIndex(t *template.Template, wr io.Writer) error

func (*Ingest) ReportKeys

func (i *Ingest) ReportKeys(t *template.Template, wr io.Writer) error

func (*Ingest) TestLoadAll

func (i *Ingest) TestLoadAll() (map[string]*IngestTest, error)

func (*Ingest) Transfer

func (i *Ingest) Transfer() error

type IngestBagit

type IngestBagit struct {
	Id           int64
	Name         string
	Size         int64
	SHA512       string
	SHA512_aes   string
	Report       string
	Creator      string
	Creationdate time.Time
	Baginfo      string
	// contains filtered or unexported fields
}

IngestBagit

func (*IngestBagit) AddContent

func (bagit *IngestBagit) AddContent(zippath, diskpath string, filesize int64, checksums map[string]string, mimetype string, width, height, duration int64, indexer string) error

func (*IngestBagit) Check

func (bagit *IngestBagit) Check(location *IngestLocation, checkInterval time.Duration) (bool, error)

func (*IngestBagit) ContentLoadAll

func (bagit *IngestBagit) ContentLoadAll(fn func(content *IngestBagitContent) error) error

func (*IngestBagit) ExistsAt

func (bagit *IngestBagit) ExistsAt(location *IngestLocation) (bool, error)

func (*IngestBagit) GetIV

func (bagit *IngestBagit) GetIV() []byte

func (*IngestBagit) GetKey

func (bagit *IngestBagit) GetKey() []byte

func (*IngestBagit) SetIV

func (bagit *IngestBagit) SetIV(iv []byte) error

func (*IngestBagit) SetKey

func (bagit *IngestBagit) SetKey(key []byte) error

func (*IngestBagit) Store

func (bagit *IngestBagit) Store() error

func (*IngestBagit) TestLoadAll

func (bagit *IngestBagit) TestLoadAll(loc *IngestLocation, fn func(test *IngestBagitTestLocation) error) error

type IngestBagitContent

type IngestBagitContent struct {
	ZipPath, DiskPath       string
	Filesize                int64
	Checksums               map[string]string
	Mimetype                string
	Width, Height, Duration int64
	Indexer                 string
	// contains filtered or unexported fields
}

func (*IngestBagitContent) Store

func (ibc *IngestBagitContent) Store() error

type IngestBagitLocation

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

func NewIngestBagitLocation

func NewIngestBagitLocation(ingest *Ingest, bagit *IngestBagit, location *IngestLocation) (*IngestBagitLocation, error)

func (*IngestBagitLocation) Exists

func (ibl *IngestBagitLocation) Exists() (bool, error)

func (*IngestBagitLocation) SetData

func (ibl *IngestBagitLocation) SetData(status, message string, start, end time.Time) error

func (*IngestBagitLocation) Store

func (ibl *IngestBagitLocation) Store() error

func (*IngestBagitLocation) Transfer

func (ibl *IngestBagitLocation) Transfer(source *IngestBagitLocation) error

type IngestBagitTestLocation

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

func NewIngestBagitTestLocation

func NewIngestBagitTestLocation(ingest *Ingest, bagit *IngestBagit, test *IngestTest, location *IngestLocation) (*IngestBagitTestLocation, error)

func (*IngestBagitTestLocation) Last

func (ibl *IngestBagitTestLocation) Last() error

func (*IngestBagitTestLocation) SetData

func (ibl *IngestBagitTestLocation) SetData(status, message, data string, start, end time.Time) error

func (*IngestBagitTestLocation) Store

func (ibl *IngestBagitTestLocation) Store() error

func (*IngestBagitTestLocation) Test

func (ibl *IngestBagitTestLocation) Test() error

type IngestLocation

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

func (*IngestLocation) GetPath

func (loc *IngestLocation) GetPath() *url.URL

func (*IngestLocation) HasBagit

func (loc *IngestLocation) HasBagit(bagit *IngestBagit) (bool, error)

func (*IngestLocation) IsEncrypted

func (loc *IngestLocation) IsEncrypted() bool

func (*IngestLocation) LoadTransfer

func (loc *IngestLocation) LoadTransfer(bagit *IngestBagit) (*Transfer, error)

func (*IngestLocation) Store

func (loc *IngestLocation) Store() error

type IngestTest

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

type RSTTable

type RSTTable struct {
	Data []RSTTableRow
}

func (RSTTable) ColWidth

func (t RSTTable) ColWidth(col string, maxWidth int) int

func (RSTTable) Cols

func (t RSTTable) Cols() []string

func (RSTTable) DrawTable

func (t RSTTable) DrawTable() string

func (RSTTable) DrawTableList

func (t RSTTable) DrawTableList() string

func (RSTTable) NumLines

func (t RSTTable) NumLines() int

func (RSTTable) RowHeight

func (t RSTTable) RowHeight(line int, widths map[string]int) int

type RSTTableRow

type RSTTableRow interface {
	Cols() []string
	FieldSize(col string, maxWdith int) (int, int)
	Data(col string, maxWidth int) []string
	Title(col string) string
}

type TplBagitContent

type TplBagitContent struct {
	OrigPath            string
	Mimetype, Dimension string
	Filesize            string
}

func (TplBagitContent) Cols

func (tbc TplBagitContent) Cols() []string

func (TplBagitContent) Data

func (tbc TplBagitContent) Data(col string, maxWidth int) []string

func (TplBagitContent) FieldSize

func (tbc TplBagitContent) FieldSize(col string, maxWidth int) (w int, h int)

func (TplBagitContent) Title

func (tbc TplBagitContent) Title(col string) string

type TplBagitEntry

type TplBagitEntry struct {
	Name         string
	Size         string
	Ingested     string
	TestsMessage string
	Price        string
	Quality      string
}

func (TplBagitEntry) Cols

func (tbe TplBagitEntry) Cols() []string

func (TplBagitEntry) Data

func (tbe TplBagitEntry) Data(col string, maxWidth int) []string

func (TplBagitEntry) FieldSize

func (tbe TplBagitEntry) FieldSize(col string, maxWidth int) (w int, h int)

func (TplBagitEntry) Title

func (tbe TplBagitEntry) Title(col string) string

type TplBagitEntryTest

type TplBagitEntryTest struct {
	Location string
	Date     time.Time
	Status   string
}

type TplBagitKeyVal

type TplBagitKeyVal struct {
	Key, Value string
}

func (TplBagitKeyVal) Cols

func (tbkv TplBagitKeyVal) Cols() []string

func (TplBagitKeyVal) Data

func (tbkv TplBagitKeyVal) Data(col string, maxWidth int) []string

func (TplBagitKeyVal) FieldSize

func (tbkv TplBagitKeyVal) FieldSize(col string, maxWidth int) (w int, h int)

func (TplBagitKeyVal) Title

func (tbkv TplBagitKeyVal) Title(col string) string

type TplBagitTest

type TplBagitTest struct {
	End, Status, Test, Message string
}

func (TplBagitTest) Cols

func (tbt TplBagitTest) Cols() []string

func (TplBagitTest) Data

func (tbt TplBagitTest) Data(col string, maxWidth int) []string

func (TplBagitTest) FieldSize

func (tbt TplBagitTest) FieldSize(col string, maxWidth int) (w int, h int)

func (TplBagitTest) Title

func (tbt TplBagitTest) Title(col string) string

type Transfer

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

func (*Transfer) Store

func (trans *Transfer) Store() error

Jump to

Keyboard shortcuts

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