testing

package
v0.0.0-...-b9bb202 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleDir

type BundleDir struct {
	Path string
	// contains filtered or unexported fields
}

BundleDir defines a bundle from a given directory.

func ReadBundleDir

func ReadBundleDir(path string) (dir *BundleDir, err error)

ReadBundleDir returns a BundleDir representing an expanded bundle directory. It does not verify the bundle data.

func (*BundleDir) ArchiveTo

func (dir *BundleDir) ArchiveTo(w io.Writer) error

func (*BundleDir) BundleBytes

func (dir *BundleDir) BundleBytes() []byte

BundleBytes implements Bundle.BundleBytes

func (*BundleDir) ContainsOverlays

func (dir *BundleDir) ContainsOverlays() bool

ContainsOverlays returns true if the bundle contains any overlays.

func (*BundleDir) Data

func (dir *BundleDir) Data() *charm.BundleData

Data returns the contents of the bundle's bundle.yaml file.

func (*BundleDir) ReadMe

func (dir *BundleDir) ReadMe() string

ReadMe returns the contents of the bundle's README.md file.

type CharmDir

type CharmDir struct {
	Path string
	// contains filtered or unexported fields
}

CharmDir encapsulates access to data and operations on a charm directory.

func ReadCharmDir

func ReadCharmDir(path string) (*CharmDir, error)

ReadCharmDir returns a CharmDir representing an expanded charm directory.

func (*CharmDir) Actions

func (dir *CharmDir) Actions() *charm.Actions

Actions returns the Actions representing the actions.yaml file for the charm expanded in dir.

func (*CharmDir) ArchiveTo

func (dir *CharmDir) ArchiveTo(w io.Writer) error

ArchiveTo creates a charm file from the charm expanded in dir. By convention a charm archive should have a ".charm" suffix.

func (*CharmDir) ArchiveToPath

func (dir *CharmDir) ArchiveToPath(path string) error

func (*CharmDir) Config

func (dir *CharmDir) Config() *charm.Config

Config returns the Config representing the config.yaml file for the charm expanded in dir.

func (*CharmDir) LXDProfile

func (dir *CharmDir) LXDProfile() *charm.LXDProfile

LXDProfile returns the LXDProfile representing the lxd-profile.yaml file for the charm expanded in dir.

func (*CharmDir) Manifest

func (dir *CharmDir) Manifest() *charm.Manifest

Manifest returns the Manifest representing the manifest.yaml file for the charm expanded in dir.

func (*CharmDir) Meta

func (dir *CharmDir) Meta() *charm.Meta

Meta returns the Meta representing the metadata.yaml file for the charm expanded in dir.

func (*CharmDir) Revision

func (dir *CharmDir) Revision() int

Revision returns the revision number for the charm expanded in dir.

func (*CharmDir) Version

func (dir *CharmDir) Version() string

Version returns the VCS version representing the version file from archive.

Jump to

Keyboard shortcuts

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