cargopackage

package
v0.45.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDummyIndex

func CreateDummyIndex() (string, error)

func GetMockClient added in v0.44.0

func GetMockClient(baseUrl string, mockedToken string, mockedBody string, mockedHTTPStatusCode int, mockedHeaderFormat string) *httpclient.MockClient

Types

type CargoPackage

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

CargoPackage defines a resource of type "cargopackage"

func New

func New(spec interface{}, isSCM bool) (*CargoPackage, error)

New returns a reference to a newly initialized CargoPackage object from a cargopackage.Spec or an error if the provided Spec triggers a validation error.

func (*CargoPackage) Changelog

func (cp *CargoPackage) Changelog() string

Changelog returns the changelog for this resource, or an empty string if not supported

func (*CargoPackage) Condition

func (cp *CargoPackage) Condition(source string) (bool, error)

Condition checks that a git tag exists

func (*CargoPackage) ConditionFromSCM

func (cp *CargoPackage) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)

ConditionFromSCM test if a tag exists from a git repository specific from SCM

func (CargoPackage) Source

func (cp CargoPackage) Source(workingDir string) (string, error)

Source returns the latest npm package version

func (*CargoPackage) Target

func (cp *CargoPackage) Target(source string, dryRun bool) (bool, error)

func (*CargoPackage) TargetFromSCM

func (cp *CargoPackage) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (bool, []string, string, error)

type PackageCrate

type PackageCrate struct {
	Name string `json:"name"`
}

type PackageData

type PackageData struct {
	Crate    PackageCrate     `json:"crate"`
	Versions []PackageVersion `json:"versions"`
}

type PackageVersion

type PackageVersion struct {
	Num     string `json:"num,omitempty"`
	Version string `json:"vers,omitempty"`
	Yanked  bool   `json:"yanked"`
}

type Spec

type Spec struct {
	// !deprecated, please use Registry.URL
	IndexUrl string `yaml:",omitempty" jsonschema:"-"`
	// [S][C] Registry specifies the registry to use
	Registry cargo.Registry `yaml:",omitempty"`
	// [S][C] Package specifies the name of the package
	Package string `yaml:",omitempty" jsonschema:"required"`
	// [C] Defines a specific package version
	Version string `yaml:",omitempty"`
	// [S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
}

Spec defines a specification for a "dockerimage" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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