metav2

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package metav2 implements the functions, types, and interfaces for the module.

Index

Constants

View Source
const Version = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMetaV2

type FileMetaV2 struct {
	Version  int32  `msgpack:"v"` // Schema version, e.g., 1
	Name     string `msgpack:"n"` // File name
	Hash     string `msgpack:"h"` // Content hash
	Size     int64  `msgpack:"s"` // File size
	MimeType string `msgpack:"m"` // MIME type
	ModTime  int64  `msgpack:"t"` // Modify time

	// if version > 1, then we have the following fields:
	BlockSize   int32             `msgpack:"bs"` // New field
	BlockHashes []string          `msgpack:"bh"` // New field
	Extra       map[string]string `msgpack:"e"`  // extra data
}

func (FileMetaV2) CurrentVersion

func (f FileMetaV2) CurrentVersion() int32

Jump to

Keyboard shortcuts

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