object_inventory_format

package
v0.0.0-...-32d88a2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyFormatV5Metadata               = "Metadatei"
	KeyFormatV5MetadataWithoutTai     = "MetadateiSansTai"
	KeyFormatV5MetadataObjectIdParent = "MetadateiKennungMutter"
	KeyFormatV6Metadata               = "Metadata"
	KeyFormatV6MetadataWithoutTai     = "MetadataWithoutTai"
	KeyFormatV6MetadataObjectIdParent = "MetadataObjectIdParent"
)

Variables

View Source
var ErrEmptyTai = errors.New("empty tai")
View Source
var (
	ErrV4ExpectedSpaceSeparatedKey = errors.New("expected space separated key")
)
View Source
var Formats formats

Functions

func GetShasForMetadata

func GetShasForMetadata(m *Metadata) (shas map[string]*sha.Sha, err error)

func WriteMetadataKeyTo

func WriteMetadataKeyTo(
	w io.Writer,
	c FormatterContext,
	key *catgut.String,
) (n int64, err error)

Types

type Format

type Format interface {
	Formatter
	Parser
}

func Default

func Default() Format

func FormatForVersion

func FormatForVersion(sv interfaces.StoreVersion) Format

func FormatForVersions

func FormatForVersions(write, read interfaces.StoreVersion) Format

func MakeBespoke

func MakeBespoke(f Formatter, p Parser) Format

type FormatGeneric

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

func FormatForKey

func FormatForKey(k string) FormatGeneric

func FormatForKeyError

func FormatForKeyError(k string) (fo FormatGeneric, err error)

func (FormatGeneric) WriteMetadataTo

func (f FormatGeneric) WriteMetadataTo(
	w io.Writer,
	c FormatterContext,
) (n int64, err error)

type Formatter

type Formatter interface {
	FormatPersistentMetadata(
		io.Writer,
		FormatterContext,
		Options,
	) (int64, error)
}

type FormatterContext

type FormatterContext interface {
	object_metadata.PersistentFormatterContext
	GetObjectId() *ids.ObjectId
}

type Metadata

type Metadata = object_metadata.Metadata

type Options

type Options struct {
	Tai           bool
	ExcludeMutter bool
	Verzeichnisse bool
	PrintFinalSha bool
}

func (Options) SansVerzeichnisse

func (o Options) SansVerzeichnisse() Options

type Parser

type Parser interface {
	ParsePersistentMetadata(
		*catgut.RingBuffer,
		ParserContext,
		Options,
	) (int64, error)
}

type ParserContext

type ParserContext interface {
	object_metadata.PersistentParserContext
	SetObjectIdLike(ids.IdLike) error
}

type Sha

type Sha = sha.Sha

func GetShaForContext

func GetShaForContext(f FormatGeneric, c FormatterContext) (sh *Sha, err error)

func GetShaForContextDebug

func GetShaForContextDebug(
	f FormatGeneric,
	c FormatterContext,
) (sh *Sha, err error)

func GetShaForMetadata

func GetShaForMetadata(f FormatGeneric, m *Metadata) (sh *Sha, err error)

func WriteMetadata

func WriteMetadata(w io.Writer, f FormatGeneric, c FormatterContext) (sh *Sha, err error)

Jump to

Keyboard shortcuts

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