entity

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	ID   string `json:"id"`
	Data []byte `json:"data"` // 实际的数据
}

Chunk 描述了文件分块

type File

type File struct {
	ID      string   `json:"id"`      // Hash
	Path    string   `json:"path"`    // 文件路径
	Size    int64    `json:"size"`    // 文件大小
	Updated int64    `json:"updated"` // 最后更新时间
	Chunks  []string `json:"chunks"`  // 文件分块列表
}

File 描述了文件。

func NewFile

func NewFile(path string, size int64, updated int64) (ret *File)

type Index

type Index struct {
	ID      string   `json:"id"`      // Hash
	Parent  string   `json:"parent"`  // 指向上一个索引
	Memo    string   `json:"memo"`    // 索引备注
	Created int64    `json:"created"` // 索引时间
	Files   []string `json:"files"`   // 文件列表
	Count   int      `json:"count"`   // 文件总数
	Size    int64    `json:"size"`    // 文件总大小
}

Index 描述了快照索引。

Jump to

Keyboard shortcuts

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