header

package
v0.4.22-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: ISC Imports: 5 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          [32]byte
	Version          string
	CreationTime     time.Time
	CreationDuration time.Duration
	PublicKey        string
	Tags             []string

	Hostname        string
	Username        string
	OperatingSystem string
	Architecture    string
	NumCPU          int
	MachineID       string
	ProcessID       int
	Client          string
	CommandLine     string

	ScanSize          uint64
	ScanProcessedSize uint64

	Root       [32]byte
	Metadata   [32]byte
	Statistics [32]byte

	ScannedDirectories []string

	FilesCount       uint64
	DirectoriesCount 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 [32]byte) *Header

func (*Header) GetIndexID

func (h *Header) GetIndexID() [32]byte

func (*Header) GetIndexShortID

func (h *Header) GetIndexShortID() []byte

func (*Header) GetRoot

func (h *Header) GetRoot() [32]byte

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