Documentation
¶
Index ¶
- Constants
- Variables
- func ReadCustom(fileName string, attrName string, data proto.Message) error
- func SyncOperations(op Op) (func(string) Data, func())
- func WriteCustom(fileName string, attrName string, data proto.Message) error
- type Async
- type Attr
- type Attributes
- func (*Attributes) Descriptor() ([]byte, []int)deprecated
- func (x *Attributes) GetHash() []byte
- func (x *Attributes) GetSize() int64
- func (x *Attributes) GetTimeNs() int64
- func (*Attributes) ProtoMessage()
- func (x *Attributes) ProtoReflect() protoreflect.Message
- func (x *Attributes) Reset()
- func (x *Attributes) String() string
- func (attr *Attributes) Time() time.Time
- type Data
- type FetchFunc
- type FileWriter
- type HashKey
- type Op
Constants ¶
View Source
const HashSize = blake2b.Size256
Variables ¶
View Source
var File_filemeta_proto protoreflect.FileDescriptor
Functions ¶
func SyncOperations ¶
Types ¶
type Attributes ¶ added in v0.1.1
type Attributes struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` TimeNs int64 `protobuf:"fixed64,2,opt,name=timeNs,proto3" json:"timeNs,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*Attributes) Descriptor
deprecated
added in
v0.1.1
func (*Attributes) Descriptor() ([]byte, []int)
Deprecated: Use Attributes.ProtoReflect.Descriptor instead.
func (*Attributes) GetHash ¶ added in v0.1.1
func (x *Attributes) GetHash() []byte
func (*Attributes) GetSize ¶ added in v0.1.1
func (x *Attributes) GetSize() int64
func (*Attributes) GetTimeNs ¶ added in v0.1.1
func (x *Attributes) GetTimeNs() int64
func (*Attributes) ProtoMessage ¶ added in v0.1.1
func (*Attributes) ProtoMessage()
func (*Attributes) ProtoReflect ¶ added in v0.1.1
func (x *Attributes) ProtoReflect() protoreflect.Message
func (*Attributes) Reset ¶ added in v0.1.1
func (x *Attributes) Reset()
func (*Attributes) String ¶ added in v0.1.1
func (x *Attributes) String() string
func (*Attributes) Time ¶ added in v0.1.1
func (attr *Attributes) Time() time.Time
type Data ¶
type Data struct { sys.FileInfo Hash []byte Error error Operation Op Hashed bool // the file has just been hashed Changed bool // the file had attributes, but they are no longer valid VerifyFailed bool // contains filtered or unexported fields }
func (*Data) GetModTime ¶
type FileWriter ¶
type FileWriter struct { Open func(fileName string, fileFlags int, filePerm os.FileMode) error Write func([]byte) error Close func(fileTimeNs int64) (Attr, error) }
func NewFileWriter ¶
func NewFileWriter() FileWriter
Click to show internal directories.
Click to hide internal directories.