config

package
v0.0.0-...-3532737 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeOmit         = "-"
	TypeAuto         = "a"
	TypeAutoRel      = "ar"
	TypeDirectory    = "d"
	TypeRecursive    = "R"
	TypeRecursiveRel = "Rr"
	TypeRegular      = "f"
	TypeRegularRel   = "fr"
	TypeGlob         = "r"
	TypeGlobRel      = "rr"
	TypeSymlink      = "l"
	TypeCreate       = "c"
	TypeCreateNoEndl = "cl"
	TypeLinked       = "L"
	TypeLinkedGlob   = "rL"
	TypeLinkedAbs    = "LA"
	TypeLibrary      = "i"
	TypePath         = "p"
	TypeBase64       = "b64"
	TypeVariable     = "$"
)

Variables

View Source
var Opt struct {
	Warn struct {
		EmptyGlob bool `desc:"Glob types don't return any matches"`
		Replace   bool `desc:"Entry is replaced"`
	}
	ELF struct {
		Expand       bool `desc:"Resolve all ELF source symlinks"`
		Fallback     bool `desc:"Fallback to adding a file on ELF format errors"`
		Once         bool `desc:"Only add ELFs once"`
		Concurrent   bool `desc:"Load ELFs concurrently, results are added to the end of the archive"`
		NumGoroutine int  `desc:"Number of goroutines resolving ELFs"`
	}
	Glob struct {
		Expand bool `desc:"Resolve all symlinks for globs"`
	}
	File struct {
		Expand bool `desc:"Resolve all symlinks for relative files"`
	}
	Path PathVar `desc:"Search path"`
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Resolver *elf.Resolver
	Prefix   string
	Vars     []string
}

func (*Config) FromFiles

func (c *Config) FromFiles(files ...string) (*Map, error)

func (*Config) FromReader

func (c *Config) FromReader(r io.Reader) (*Map, error)

type Entry

type Entry struct {
	Src, Dst    string
	User, Group int
	Mode        int
	Type        string
	Heredoc     string
	Time        int64
	Line        int
	Data        []byte
	LibraryPath []string
}

TODO: uint32 uid, gid <-> syscall.Stat_t

func (Entry) Base64

func (e Entry) Base64() Entry

func (Entry) Format

func (e Entry) Format() string

type Map

type Map struct {
	// overlapping entries will be
	// replaced by subsequent entries.
	A []Entry
	// contains filtered or unexported fields
}

func (*Map) Add

func (m *Map) Add(e Entry)

func (*Map) Merge

func (m *Map) Merge(t *Map) error

type PathVar

type PathVar []string

func (*PathVar) Set

func (p *PathVar) Set(v string) error

func (*PathVar) String

func (p *PathVar) String() string

Jump to

Keyboard shortcuts

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