Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyManifest(root string, manifest *pb.Manifest) error
- func BuildManifest(ctx Context) (*pb.Manifest, error)
- func Getxattr(path, attr string) ([]byte, error)
- func Listxattr(path string) ([]string, error)
- func Setxattr(path, name string, data []byte) error
- type Context
- type Device
- type Directory
- type NamedPipe
- type RegularFile
- type Resource
- type SymLink
- type XAttrer
Constants ¶
View Source
const ( XATTR_NOFOLLOW = iota << 1 XATTR_CREATE XATTR_REPLACE )
Variables ¶
View Source
var (
ErrNotFound = fmt.Errorf("not found")
)
Functions ¶
func BuildManifest ¶
BuildManifest creates the manifest for the given context
Types ¶
type Context ¶
type Context interface { Apply(Resource) error Verify(Resource) error Resource(string, os.FileInfo) (Resource, error) Sanitize(string) (string, error) Walk(filepath.WalkFunc) error Digest(string) (digest.Digest, error) }
func NewContext ¶
NewContext returns a Context associated with root.
type NamedPipe ¶
type NamedPipe interface { Resource // Pipe is a no-op method to allow consistent resolution of NamedPipe // interface. Pipe() }
type RegularFile ¶
type RegularFile interface { Resource XAttrer // Paths returns all paths of the regular file, including the primary path // returned by Resource.Path. If len(Paths()) > 1, the resource is a hard // link. Paths() []string Size() int64 Digests() []digest.Digest }
func Merge ¶
func Merge(fs ...RegularFile) (RegularFile, error)
Merge two or more RegularFile fs into new file. Typically, this should be used to merge regular files as hardlinks. If the files are not identical, other than Paths and Digests, the merge will fail and an error will be returned.
type Resource ¶
type Resource interface { // Path provides the primary resource path relative to the bundle root. In // cases where resources have more than one path, such as with hard links, // this will return the primary path, which is often just the first entry. Path() string // Mode returns the Mode() os.FileMode UID() string GID() string }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package proto is a generated protocol buffer package.
|
Package proto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.