header

package
v0.4.18-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	Type     string
	Version  string
	Checksum [32]byte
	Size     uint64
}
type Header struct {
	IndexID          uuid.UUID
	Version          string
	CreationTime     time.Time
	CreationDuration time.Duration
	PublicKey        string
	Tags             []string

	Hostname        string
	Username        string
	OperatingSystem string
	MachineID       string
	ProcessID       int
	CommandLine     string

	ScanSize          uint64
	ScanProcessedSize uint64

	ScannedDirectories []string

	Index    Blob
	VFS      Blob
	Metadata Blob

	ChunksCount  uint64
	ChunksSize   uint64
	ObjectsCount uint64

	FilesCount       uint64
	DirectoriesCount uint64
	NonRegularCount  uint64
	PathnamesCount   uint64

	ObjectsTransferCount uint64
	ObjectsTransferSize  uint64

	ChunksTransferCount uint64
	ChunksTransferSize  uint64

	FileKind      map[string]uint64
	FileType      map[string]uint64
	FileExtension map[string]uint64

	FilePercentKind      map[string]float64
	FilePercentType      map[string]float64
	FilePercentExtension map[string]float64
}

func NewFromBytes

func NewFromBytes(serialized []byte) (*Header, error)

func NewHeader

func NewHeader(indexID uuid.UUID) *Header

func (*Header) GetIndexID

func (h *Header) GetIndexID() uuid.UUID

func (*Header) GetIndexShortID

func (h *Header) GetIndexShortID() string

func (*Header) Serialize

func (h *Header) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

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