extensions

package
v0.18.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DependenciesKey    = "io.cnab.dependencies"
	DependenciesSchema = "https://cnab.io/specs/v1/dependencies.schema.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	// Requires is a list of bundles required by this bundle
	Requires map[string]Dependency `json:"requires,omitempty" mapstructure:"requires"`
}

Dependencies describes the set of custom extension metadata associated with the dependencies spec https://github.com/deislabs/cnab-spec/blob/master/500-CNAB-dependencies.md

func ReadDependencies

func ReadDependencies(bun *bundle.Bundle) (*Dependencies, error)

type Dependency

type Dependency struct {
	// Bundle is the location of the bundle in a registry, for example REGISTRY/NAME:TAG
	Bundle string `json:"bundle" mapstructure:"bundle"`

	// Version is a set of allowed versions
	Version *DependencyVersion `json:"version,omitempty" mapstructure:"version"`
}

Dependency describes a dependency on another bundle

type DependencyLock

type DependencyLock struct {
	Alias string
	Tag   string
}

type DependencySolver

type DependencySolver struct {
}

func (*DependencySolver) ResolveDependencies

func (s *DependencySolver) ResolveDependencies(bun *bundle.Bundle) ([]DependencyLock, error)

func (*DependencySolver) ResolveVersion

func (s *DependencySolver) ResolveVersion(alias string, dep Dependency) (string, error)

type DependencyVersion

type DependencyVersion struct {
	// Ranges of semantic versions, with or without the leading v prefix, allowed by the dependency
	Ranges []string `json:"ranges,omitempty" mapstructure:"ranges"`

	// AllowPrereleases specifies if prerelease versions can satisfy the dependency
	AllowPrereleases bool `json:"prereleases" mapstructure:"prereleases"`
}

DependencyVersion is a set of allowed versions for a dependency

Jump to

Keyboard shortcuts

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