cli

package
v0.0.0-...-e0ee0a9 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const CustomSubcommandHelpTemplate = `` /* 574-byte string literal not displayed */

SubcommandHelpTemplate is the text template for the subcommand help topic. cli.go uses text/template to render templates. This template is used for sub-commands with one or more required flags present.

View Source
const LatestFormatVersion = 3

LatestFormatVersion is the latest version of the format, which is also what we default to.

Variables

Log is a global reference to our logger.

View Source
var Version = "unknown"

Version of the mender-artifact CLI tool

Functions

func Cat

func Cat(c *cli.Context) (err error)

func Copy

func Copy(c *cli.Context) (err error)

func CopyFromImage

func CopyFromImage(image VPImage, imageFile string, hostFile string) error

Shortcut to open a file in the image, read from it, and close it again.

func CopyIntoImage

func CopyIntoImage(hostFile string, image VPImage, imageFile string) error

Shortcut to open a file in the image, write into it, and close it again.

func DumpCommand

func DumpCommand(c *cli.Context) error

func Install

func Install(c *cli.Context) (err error)

Install installs a file from the host filesystem or directory onto either a mender artifact, or an sdimg.

func Remove

func Remove(c *cli.Context) (err error)

func Run

func Run(args []string) error

Types

type ModImageArtifact

type ModImageArtifact struct {
	ModImageBase
	// contains filtered or unexported fields
}

func (*ModImageArtifact) Close

func (i *ModImageArtifact) Close() error

Closes and repacks the artifact or sdimg.

func (*ModImageArtifact) Open

func (i *ModImageArtifact) Open(fpath string) (VPFile, error)

Opens a file inside the image(s) represented by the ModImageArtifact

func (*ModImageArtifact) OpenDir

func (i *ModImageArtifact) OpenDir(fpath string) (VPDir, error)

Opens a dir inside the image(s) represented by the ModImageArtifact

type ModImageBase

type ModImageBase struct {
	// contains filtered or unexported fields
}

type ModImageRaw

type ModImageRaw struct {
	ModImageBase
}

func (*ModImageRaw) Close

func (i *ModImageRaw) Close() error

func (*ModImageRaw) Open

func (i *ModImageRaw) Open(fpath string) (VPFile, error)

func (*ModImageRaw) OpenDir

func (i *ModImageRaw) OpenDir(fpath string) (VPDir, error)

type ModImageSdimg

type ModImageSdimg struct {
	ModImageBase
	// contains filtered or unexported fields
}

func (*ModImageSdimg) Close

func (i *ModImageSdimg) Close() error

func (*ModImageSdimg) Open

func (i *ModImageSdimg) Open(fpath string) (VPFile, error)

Opens a file inside the image(s) represented by the ModImageSdimg

func (*ModImageSdimg) OpenDir

func (i *ModImageSdimg) OpenDir(fpath string) (VPDir, error)

type SigningKey

type SigningKey interface {
	artifact.Signer
	artifact.Verifier
}

type VPDir

type VPDir interface {
	io.Closer
	Create() error
}

VPDir V(irtual)P(artition)Dir mimics a directory in an Artifact or on an sdimg.

type VPFile

type VPFile interface {
	io.ReadWriteCloser
	Delete(recursive bool) error
	CopyTo(hostFile string) error
	CopyFrom(hostFile string) error
}

V(irtual)P(artition)File mimicks a file in an Artifact or on an sdimg.

type VPImage

type VPImage interface {
	io.Closer
	Open(fpath string) (VPFile, error)
	OpenDir(fpath string) (VPDir, error)
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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