Documentation ¶
Index ¶
- func CreateDummyIndex() (string, error)
- func GetMockClient(baseUrl string, mockedToken string, mockedBody string, ...) *httpclient.MockClient
- type CargoPackage
- func (cp *CargoPackage) Changelog() string
- func (cp *CargoPackage) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (cp CargoPackage) Source(workingDir string, resultSource *result.Source) error
- func (cp *CargoPackage) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error
- type PackageCrate
- type PackageData
- type PackageVersion
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDummyIndex ¶
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, scm scm.ScmHandler) (pass bool, message string, err error)
Condition checks if a cargo package with a specific version is published We assume that if we can't find the package version in the index, then it means it doesn't exist.
func (CargoPackage) Source ¶
func (cp CargoPackage) Source(workingDir string, resultSource *result.Source) error
Source returns the latest npm package version
func (*CargoPackage) Target ¶
func (cp *CargoPackage) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) 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 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 "cargopackage" resource parsed from an updatecli manifest file
Click to show internal directories.
Click to hide internal directories.