Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateChanges(actual, expectedChanges contract.DiffMap) []error
- func ValidateOperation(actualOperation, expectedOperation contract.Operation) error
- func ValidatePackageMap(actual, expectedChanges contract.PackageMap) []error
- func ValidatePkgVersion(actualVersion, expectedVersion contract.PkgVersion) error
- func ValidatePkgWrapper(actualPackage, expectedPackage contract.PkgWrapper) error
- func ValidateSemver(actual, expected *contract.Semver) error
- type TestPkgWrapper
- func (w *TestPkgWrapper) GetLink() string
- func (w *TestPkgWrapper) GetName() string
- func (w *TestPkgWrapper) GetVersion() contract.PkgVersion
- func (w *TestPkgWrapper) IsAbandoned() bool
- func (w *TestPkgWrapper) IsDevOnly() bool
- func (w *TestPkgWrapper) IsRootDevRequirement() bool
- func (w *TestPkgWrapper) IsRootRequirement() bool
Constants ¶
View Source
const InvalidOperationName contract.OperationName = "ARGH"
Variables ¶
View Source
var ( AdditionOp = contract.Operation{Name: contract.AdditionOperation, SemverType: contract.SemverNoUpdate} RemovalOp = contract.Operation{Name: contract.RemovalOperation, SemverType: contract.SemverNoUpdate} SameOp = contract.Operation{Name: contract.NoChangeOperation, SemverType: contract.SemverNoUpdate} UpgradeMajorOp = contract.Operation{Name: contract.UpgradeOperation, SemverType: contract.SemverMajorUpdate} UpgradeMinorOp = contract.Operation{Name: contract.UpgradeOperation, SemverType: contract.SemverMinorUpdate} UpgradePatchOp = contract.Operation{Name: contract.UpgradeOperation, SemverType: contract.SemverPatchUpdate} DowngradeMajorOp = contract.Operation{Name: contract.DowngradeOperation, SemverType: contract.SemverMajorUpdate} DowngradeMinorOp = contract.Operation{Name: contract.DowngradeOperation, SemverType: contract.SemverMinorUpdate} DowngradePatchOp = contract.Operation{Name: contract.DowngradeOperation, SemverType: contract.SemverPatchUpdate} UnknownUpdateOp = contract.Operation{Name: contract.UnknownUpdateOperation, SemverType: contract.SemverUnknownUpdate} SemverExtraUpdateOp = contract.Operation{Name: contract.UnknownUpdateOperation, SemverType: contract.SemverExtraUpdate} // InvalidOp is purely fictional operation (exists only for test purpose). InvalidOp = contract.Operation{Name: InvalidOperationName, SemverType: contract.SemverNoUpdate} // InvalidDowngradeOp is not expected to exist (downgrade + semver no update). InvalidDowngradeOp = contract.Operation{Name: contract.DowngradeOperation, SemverType: contract.SemverNoUpdate} // InvalidUpgradeOp is not expected to exist (upgrade + semver no update). InvalidUpgradeOp = contract.Operation{Name: contract.UpgradeOperation, SemverType: contract.SemverNoUpdate} )
Functions ¶
func ValidateChanges ¶
func ValidateOperation ¶
func ValidatePackageMap ¶
func ValidatePackageMap(actual, expectedChanges contract.PackageMap) []error
func ValidatePkgVersion ¶
func ValidatePkgVersion(actualVersion, expectedVersion contract.PkgVersion) error
func ValidatePkgWrapper ¶
func ValidatePkgWrapper(actualPackage, expectedPackage contract.PkgWrapper) error
func ValidateSemver ¶
Types ¶
type TestPkgWrapper ¶
type TestPkgWrapper struct {
Name string
Abandoned bool
Version contract.PkgVersion
Link string
DevOnly bool // true if only in lock file "packages-dev" section (dev-only dependency)
RootRequirement bool // true if exists in requirement file "require" section
RootDevRequirement bool // true if exists in requirement file "require-dev" section
}
func GetDummyPackage ¶
func GetDummyPackage() *TestPkgWrapper
func (*TestPkgWrapper) GetLink ¶
func (w *TestPkgWrapper) GetLink() string
func (*TestPkgWrapper) GetName ¶
func (w *TestPkgWrapper) GetName() string
func (*TestPkgWrapper) GetVersion ¶
func (w *TestPkgWrapper) GetVersion() contract.PkgVersion
func (*TestPkgWrapper) IsAbandoned ¶
func (w *TestPkgWrapper) IsAbandoned() bool
func (*TestPkgWrapper) IsDevOnly ¶
func (w *TestPkgWrapper) IsDevOnly() bool
func (*TestPkgWrapper) IsRootDevRequirement ¶
func (w *TestPkgWrapper) IsRootDevRequirement() bool
func (*TestPkgWrapper) IsRootRequirement ¶
func (w *TestPkgWrapper) IsRootRequirement() bool
Click to show internal directories.
Click to hide internal directories.