toc

package
v0.0.0-...-1b96e9a Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

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

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) Descriptor() ([]byte, []int)

func (*Entry) GetEtype

func (m *Entry) GetEtype() isEntry_Etype

func (*Entry) GetFile

func (m *Entry) GetFile() *File

func (*Entry) GetName

func (m *Entry) GetName() string
func (m *Entry) GetSymlink() *SymLink

func (*Entry) GetTree

func (m *Entry) GetTree() *Tree

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Validate

func (e *Entry) Validate(caseSafe bool, depth int) error

func (*Entry) XXX_OneofFuncs

func (*Entry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

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) Descriptor() ([]byte, []int)

func (*File) GetCommonMode

func (m *File) GetCommonMode() *CommonMode

func (*File) GetPosixMode

func (m *File) GetPosixMode() *PosixMode

func (*File) GetSize

func (m *File) GetSize() uint64

func (*File) GetWinMode

func (m *File) GetWinMode() *WinMode

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) String

func (m *File) String() string

func (*File) Validate

func (f *File) Validate() error

type PosixMode

type PosixMode struct {
	Executable bool `protobuf:"varint,1,opt,name=executable" json:"executable,omitempty"`
}

func (*PosixMode) Descriptor

func (*PosixMode) Descriptor() ([]byte, []int)

func (*PosixMode) GetExecutable

func (m *PosixMode) GetExecutable() bool

func (*PosixMode) ProtoMessage

func (*PosixMode) ProtoMessage()

func (*PosixMode) Reset

func (m *PosixMode) Reset()

func (*PosixMode) String

func (m *PosixMode) String() string
type SymLink struct {
	Target []string `protobuf:"bytes,1,rep,name=target" json:"target,omitempty"`
}

func (*SymLink) Descriptor

func (*SymLink) Descriptor() ([]byte, []int)

func (*SymLink) GetTarget

func (m *SymLink) GetTarget() []string

func (*SymLink) ProtoMessage

func (*SymLink) ProtoMessage()

func (*SymLink) Reset

func (m *SymLink) Reset()

func (*SymLink) String

func (m *SymLink) String() string

func (*SymLink) Validate

func (s *SymLink) Validate(depth int) error

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) Descriptor() ([]byte, []int)

func (*TOC) GetCaseSafe

func (m *TOC) GetCaseSafe() bool

func (*TOC) GetRoot

func (m *TOC) GetRoot() *Tree

func (*TOC) LoopItems

func (t *TOC) LoopItems(cb func(path []string, ent *Entry) error) error

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()

func (*TOC) Reset

func (m *TOC) Reset()

func (*TOC) String

func (m *TOC) String() string

func (*TOC) Validate

func (t *TOC) Validate() error

type Tree

type Tree struct {
	Entries []*Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

func (*Tree) Descriptor

func (*Tree) Descriptor() ([]byte, []int)

func (*Tree) GetEntries

func (m *Tree) GetEntries() []*Entry

func (*Tree) ProtoMessage

func (*Tree) ProtoMessage()

func (*Tree) Reset

func (m *Tree) Reset()

func (*Tree) String

func (m *Tree) String() string

func (*Tree) Validate

func (t *Tree) Validate(caseSafe bool, depth int) error

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) Descriptor() ([]byte, []int)

func (*WinMode) GetHidden

func (m *WinMode) GetHidden() bool

func (*WinMode) GetSystem

func (m *WinMode) GetSystem() bool

func (*WinMode) ProtoMessage

func (*WinMode) ProtoMessage()

func (*WinMode) Reset

func (m *WinMode) Reset()

func (*WinMode) String

func (m *WinMode) String() string

Jump to

Keyboard shortcuts

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