Documentation
¶
Index ¶
- Constants
- func ParseFileInfoSortKeys(sortKeysStr string) ([]string, error)
- func SortFileInfos(infos []FileInfo, sortKeys []string) error
- type Chunk
- type FileInfo
- func (f FileInfo) Dev() uint64
- func (fileinfo *FileInfo) Equal(fi *FileInfo) bool
- func (f FileInfo) Gid() uint64
- func (f FileInfo) Groupname() string
- func (fileinfo *FileInfo) HumanSize() string
- func (f FileInfo) Ino() uint64
- func (f FileInfo) IsDir() bool
- func (f FileInfo) ModTime() time.Time
- func (f FileInfo) Mode() os.FileMode
- func (f FileInfo) Name() string
- func (f FileInfo) Nlink() uint16
- func (f FileInfo) Size() int64
- func (f FileInfo) Sys() any
- func (fileinfo *FileInfo) Type() string
- func (f FileInfo) Uid() uint64
- func (f FileInfo) Username() string
- type MAC
- type Object
Constants ¶
View Source
const CHUNK_VERSION = "1.0.0"
View Source
const OBJECT_VERSION = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
func ParseFileInfoSortKeys ¶
func SortFileInfos ¶
Types ¶
type Chunk ¶
type Chunk struct { Version versioning.Version `msgpack:"version" json:"version"` MAC MAC `msgpack:"MAC" json:"MAC"` Length uint32 `msgpack:"length" json:"length"` Entropy float64 `msgpack:"entropy" json:"entropy"` Flags uint32 `msgpack:"flags" json:"flags"` }
func NewChunkFromBytes ¶
func (*Chunk) MarshalJSON ¶
type FileInfo ¶
type FileInfo struct { Lname string `json:"name" msgpack:"name"` Lsize int64 `json:"size" msgpack:"size"` Lmode fs.FileMode `json:"mode" msgpack:"mode"` LmodTime time.Time `json:"mod_time" msgpack:"mod_time"` Ldev uint64 `json:"dev" msgpack:"dev"` Lino uint64 `json:"ino" msgpack:"ino"` Luid uint64 `json:"uid" msgpack:"uid"` Lgid uint64 `json:"gid" msgpack:"gid"` Lnlink uint16 `json:"nlink" msgpack:"nlink"` Lusername string `json:"username" msgpack:"username"` // local addition Lgroupname string `json:"groupname" msgpack:"groupname"` // local addition // Just in case we need something special to handle special // OSes. Flags uint32 `json:"flags" msgpack:"flags"` }
func FileInfoFromStat ¶
func NewFileInfo ¶
type Object ¶
type Object struct { Version versioning.Version `msgpack:"version" json:"version"` MAC MAC `msgpack:"MAC" json:"MAC"` Chunks []Chunk `msgpack:"chunks" json:"chunks"` ContentType string `msgpack:"content_type,omitempty" json:"content_type"` Entropy float64 `msgpack:"entropy,omitempty" json:"entropy"` Flags uint32 `msgpack:"flags" json:"flags"` }
func NewObjectFromBytes ¶
func (*Object) MarshalJSON ¶
Return empty lists for nil slices.
Click to show internal directories.
Click to hide internal directories.