lib

package
v0.40.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chmod

func Chmod(mode, destpath string) error

Chmod changes file permissions

func Chown

func Chown(owner, destpath string) error

Chown changes file ownership

func CopyThing

func CopyThing(srcpath, destpath string) error

CopyThing copies either a dir or file to the target.

func DirCopy

func DirCopy(dest string, source string) error

DirCopy copies a whole directory recursively

func FileCopy

func FileCopy(dest string, source string, mode *fs.FileMode, uid, gid int) error

func FindFiles

func FindFiles(base, pattern string) ([]string, error)

FindFiles searches for paths matching a particular regex under a given folder

func HashFile

func HashFile(path string, includeMode bool) (string, error)

func ImageCopy

func ImageCopy(opts ImageCopyOpts) error
func IsSymlink(p string) bool

func RegisterURLScheme

func RegisterURLScheme(scheme string, f func(string) (types.ImageReference, error))

Types

type Graph

type Graph interface {
	// AddVertex creates a new vertex in the graph with the specified key and stores
	// value provided in the vertex. It returns an error if the vertex specified by
	// the key already exists.
	AddVertex(Key, Value) error

	// RemoveVertex removes the vertex specified by the key. It returns an error
	// if the vertex corresponding to the key is not present in the graph.
	RemoveVertex(Key) error

	// AddDependencies creates a dependency between a given vertex and the provided
	// list of dependency vertices. This returns an error if either the vertex or the
	// dependency is not present in the graph or a make a node depends on itself.
	// Adding an dependency that creates a cycle in the graph is not allowed.
	AddDependencies(Key, ...Key) error

	// GetValue returns the value of the vertex specified by the key. It returns nil if the
	// vertex is not present in the graph.
	GetValue(Key) Value

	// SetValue sets the value of the vertex specified by the key. It returns an error if
	// the vertex is not present in the graph
	SetValue(Key, Value) error

	// Sort returns all the vertex entries in the dependency order. Vertices are ordered in
	// such a way that a vertex's dependencies will always preseed itself.
	Sort() []Vertex
}

Graph is collection of vertices and edges between them. In dag, sort implement a topological sort for the graph.

func NewDAG

func NewDAG() Graph

NewDAG creates a new DAG.

type ImageCopyOpts

type ImageCopyOpts struct {
	Src               string
	SrcUsername       string
	SrcPassword       string
	Dest              string
	DestUsername      string
	DestPassword      string
	ForceManifestType string
	SrcSkipTLS        bool
	DestSkipTLS       bool
	Progress          io.Writer
	Context           context.Context
}

type Key

type Key interface{}

Key for a component

type Value

type Value interface{}

Value is the actual component object

type Vertex

type Vertex struct {
	Key   Key
	Value Value
}

Vertex in the graph has the entry of <key, value> for a component

Directories

Path Synopsis
containers/image/storage has a dependency on libdevmapper.so; having this in its own package allows downstream users to import it if they want to use it, but means they can also avoid importing it if they don't want to add this dependency.
containers/image/storage has a dependency on libdevmapper.so; having this in its own package allows downstream users to import it if they want to use it, but means they can also avoid importing it if they don't want to add this dependency.

Jump to

Keyboard shortcuts

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