Documentation ¶
Index ¶
- Variables
- func FindMovies(idx *Index, re *regexp.Regexp) map[string][]string
- func FindTV(idx *Index, re *regexp.Regexp) map[string][]string
- func ReadProtoIndex(path string, data proto.Message) error
- func WriteProtoIndex(data proto.Message, path string) error
- type Blob
- type BlobIndex
- type File
- type Filesystem
- type Index
- func (*Index) Descriptor() ([]byte, []int)deprecated
- func (x *Index) GetBlobs() []*Blob
- func (i *Index) GetFilesystem(root string) *Filesystem
- func (x *Index) GetFilesystems() map[string]*Filesystem
- func (*Index) ProtoMessage()
- func (x *Index) ProtoReflect() protoreflect.Message
- func (x *Index) Reset()
- func (x *Index) String() string
- type Integrity
- type PathSummary
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_files_proto protoreflect.FileDescriptor
View Source
var File_proto_index_proto protoreflect.FileDescriptor
Functions ¶
func FindMovies ¶
FindMovies searches for a movies in the archive. Returns a map of Movie name to filesystems storing _some_ part of it.
Types ¶
type Blob ¶
type Blob struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Integrity *Integrity `protobuf:"bytes,3,opt,name=integrity,proto3" json:"integrity,omitempty"` // contains filtered or unexported fields }
Blob is an archived collection of bytes.
func (*Blob) Descriptor
deprecated
func (*Blob) GetIntegrity ¶
func (*Blob) ProtoMessage ¶
func (*Blob) ProtoMessage()
func (*Blob) ProtoReflect ¶
func (x *Blob) ProtoReflect() protoreflect.Message
type BlobIndex ¶
func NewBlobIndex ¶
type File ¶
type File struct { BlobId string `protobuf:"bytes,1,opt,name=blob_id,json=blobId,proto3" json:"blob_id,omitempty"` ModTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=mod_time,json=modTime,proto3" json:"mod_time,omitempty"` // contains filtered or unexported fields }
File is a Blob observed a particular time.
func (*File) Descriptor
deprecated
func (*File) GetModTime ¶
func (x *File) GetModTime() *timestamppb.Timestamp
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type Filesystem ¶
type Filesystem struct { Paths map[string]*File `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
Filesystem is an index of Files.
func (*Filesystem) Descriptor
deprecated
func (*Filesystem) Descriptor() ([]byte, []int)
Deprecated: Use Filesystem.ProtoReflect.Descriptor instead.
func (*Filesystem) GetPaths ¶
func (x *Filesystem) GetPaths() map[string]*File
func (*Filesystem) ProtoMessage ¶
func (*Filesystem) ProtoMessage()
func (*Filesystem) ProtoReflect ¶
func (x *Filesystem) ProtoReflect() protoreflect.Message
func (*Filesystem) Reset ¶
func (x *Filesystem) Reset()
func (*Filesystem) String ¶
func (x *Filesystem) String() string
type Index ¶
type Index struct { Blobs []*Blob `protobuf:"bytes,1,rep,name=blobs,proto3" json:"blobs,omitempty"` Filesystems map[string]*Filesystem `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
Index stores data for later retrieval.
func (*Index) Descriptor
deprecated
func (*Index) GetFilesystem ¶
func (i *Index) GetFilesystem(root string) *Filesystem
func (*Index) GetFilesystems ¶
func (x *Index) GetFilesystems() map[string]*Filesystem
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) ProtoReflect ¶
func (x *Index) ProtoReflect() protoreflect.Message
type Integrity ¶
type Integrity struct { Sha512 []byte `protobuf:"bytes,1,opt,name=sha512,proto3" json:"sha512,omitempty"` Blake2B512 []byte `protobuf:"bytes,2,opt,name=blake2b512,proto3" json:"blake2b512,omitempty"` // contains filtered or unexported fields }
Integrity are hashes of byte content.
func NewFileIntegrity ¶
NewFileIntegrity calculates hashes on a file path.
func NewIntegrity ¶
NewIntegrity consumes a Reader to hash data.
func (*Integrity) Descriptor
deprecated
func (*Integrity) GetBlake2B512 ¶
func (*Integrity) ProtoMessage ¶
func (*Integrity) ProtoMessage()
func (*Integrity) ProtoReflect ¶
func (x *Integrity) ProtoReflect() protoreflect.Message
type PathSummary ¶
func (PathSummary) String ¶
func (p PathSummary) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.