Documentation ¶
Overview ¶
Package toc defines the Table of Contents format for SARchives (as proto).
Package toc is a generated protocol buffer package.
It is generated from these files:
github.com/riannucci/sarchive/sar/sardata/toc/toc.proto
It has these top-level messages:
CommonMode PosixMode WinMode File SymLink Entry Tree TOC
Index ¶
- type CommonMode
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetEtype() isEntry_Etype
- func (m *Entry) GetFile() *File
- func (m *Entry) GetName() string
- func (m *Entry) GetSymlink() *SymLink
- func (m *Entry) GetTree() *Tree
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (m *Entry) String() string
- func (e *Entry) Validate(caseSafe bool, depth int) error
- func (*Entry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Entry_File
- type Entry_Symlink
- type Entry_Tree
- type File
- func (*File) Descriptor() ([]byte, []int)
- func (m *File) GetCommonMode() *CommonMode
- func (m *File) GetPosixMode() *PosixMode
- func (m *File) GetSize() uint64
- func (m *File) GetWinMode() *WinMode
- func (*File) ProtoMessage()
- func (m *File) Reset()
- func (m *File) String() string
- func (f *File) Validate() error
- type PosixMode
- type SymLink
- type TOC
- type Tree
- type WinMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonMode ¶
type CommonMode struct {
Readonly bool `protobuf:"varint,1,opt,name=readonly" json:"readonly,omitempty"`
}
func (*CommonMode) Descriptor ¶
func (*CommonMode) Descriptor() ([]byte, []int)
func (*CommonMode) GetReadonly ¶
func (m *CommonMode) GetReadonly() bool
func (*CommonMode) ProtoMessage ¶
func (*CommonMode) ProtoMessage()
func (*CommonMode) Reset ¶
func (m *CommonMode) Reset()
func (*CommonMode) String ¶
func (m *CommonMode) String() string
type Entry ¶
type Entry struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Types that are valid to be assigned to Etype: // *Entry_File // *Entry_Symlink // *Entry_Tree Etype isEntry_Etype `protobuf_oneof:"etype"` }
func (*Entry) Descriptor ¶
func (*Entry) GetSymlink ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
type Entry_File ¶
type Entry_File struct {
File *File `protobuf:"bytes,2,opt,name=file,oneof"`
}
type Entry_Symlink ¶
type Entry_Symlink struct {
Symlink *SymLink `protobuf:"bytes,3,opt,name=symlink,oneof"`
}
type Entry_Tree ¶
type Entry_Tree struct {
Tree *Tree `protobuf:"bytes,4,opt,name=tree,oneof"`
}
type File ¶
type File struct { // the size of the File's data in the decompressed bytestream. The depth-first // order of all Files in the TOC is the order of files in the archive_data // section. Size uint64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` CommonMode *CommonMode `protobuf:"bytes,2,opt,name=common_mode,json=commonMode" json:"common_mode,omitempty"` PosixMode *PosixMode `protobuf:"bytes,3,opt,name=posix_mode,json=posixMode" json:"posix_mode,omitempty"` WinMode *WinMode `protobuf:"bytes,4,opt,name=win_mode,json=winMode" json:"win_mode,omitempty"` }
func (*File) Descriptor ¶
func (*File) GetCommonMode ¶
func (m *File) GetCommonMode() *CommonMode
func (*File) GetPosixMode ¶
func (*File) GetWinMode ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type PosixMode ¶
type PosixMode struct {
Executable bool `protobuf:"varint,1,opt,name=executable" json:"executable,omitempty"`
}
func (*PosixMode) Descriptor ¶
func (*PosixMode) GetExecutable ¶
func (*PosixMode) ProtoMessage ¶
func (*PosixMode) ProtoMessage()
type SymLink ¶
type SymLink struct {
Target []string `protobuf:"bytes,1,rep,name=target" json:"target,omitempty"`
}
func (*SymLink) Descriptor ¶
func (*SymLink) ProtoMessage ¶
func (*SymLink) ProtoMessage()
type TOC ¶
type TOC struct { // Set to true if this archive can safely be unpacked on a case insensitive // filesystem. CaseSafe bool `protobuf:"varint,1,opt,name=case_safe,json=caseSafe" json:"case_safe,omitempty"` // root contains the file/link paths, metadata and data offsets in the solid // archive body. Root *Tree `protobuf:"bytes,2,opt,name=root" json:"root,omitempty"` }
func (*TOC) Descriptor ¶
func (*TOC) GetCaseSafe ¶
func (*TOC) LoopItems ¶
LoopItems does a depth-first traversal of the TOC, invoking cb for every Entry encountered.
This uses a stack-based (non-recursive) implementation.
LoopItems never returns an error by itself, but will forward the error returned by `cb` (if any). Returning an error from cb immediately stops the loop.
If cb needs to retain the path slice, it should make a copy. Modifying the path slice is undefined.
func (*TOC) ProtoMessage ¶
func (*TOC) ProtoMessage()
type Tree ¶
type Tree struct {
Entries []*Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}
func (*Tree) Descriptor ¶
func (*Tree) GetEntries ¶
func (*Tree) ProtoMessage ¶
func (*Tree) ProtoMessage()
type WinMode ¶
type WinMode struct { System bool `protobuf:"varint,1,opt,name=system" json:"system,omitempty"` Hidden bool `protobuf:"varint,2,opt,name=hidden" json:"hidden,omitempty"` }
func (*WinMode) Descriptor ¶
func (*WinMode) ProtoMessage ¶
func (*WinMode) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.