Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( PackageFromFile = node.PackageFromFile NewConstraint = semver.NewConstraint )
Monkey patch functions to allow mocking during unit testing
Functions ¶
func GitReleaseSegments ¶ added in v0.30.0
GitReleaseSegments segments GitRelease into separate parts of org, repo and tag. Returns an error if GitRelease is malformed. The expected GitRelease format is "org/repo:tag".
Types ¶
type ExactStrategy ¶ added in v0.90.0
type ExactStrategy struct { }
ExactStrategy searches for the metadata of a framework by its exact version
func (ExactStrategy) Find ¶ added in v0.90.0
func (s ExactStrategy) Find(ctx context.Context, svc MetadataService, frameworkName string, frameworkVersion string) (Metadata, error)
type FrameworkUnavailableError ¶ added in v0.90.0
type FrameworkUnavailableError struct {}
FrameworkUnavailableError is an error type returned if the requested framework version is unavailable.
func (*FrameworkUnavailableError) Error ¶ added in v0.90.0
func (e *FrameworkUnavailableError) Error() string
Error returns the error string
type Metadata ¶ added in v0.30.0
type Metadata struct { FrameworkName string FrameworkVersion string Deprecated bool DockerImage string GitRelease string Platforms []Platform CloudRunnerVersion string }
Metadata represents test runner metadata.
type MetadataSearchStrategy ¶ added in v0.90.0
type MetadataSearchStrategy interface {
Find(ctx context.Context, svc MetadataService, frameworkName string, searchValue string) (Metadata, error)
}
MetadataSearchStrategy is a generic strategy for determining if the requested framework version is supported
func NewSearchStrategy ¶ added in v0.90.0
func NewSearchStrategy(version string, rootDir string) MetadataSearchStrategy
NewSearchStrategy returns a concrete MetadataSearchStrategy
type MetadataService ¶ added in v0.30.0
type MetadataService interface { Search(ctx context.Context, opts SearchOptions) (Metadata, error) Frameworks(ctx context.Context) ([]Framework, error) Versions(ctx context.Context, frameworkName string) ([]Metadata, error) }
MetadataService represents an interface for retrieving framework metadata.
type PackageStrategy ¶ added in v0.90.0
type PackageStrategy struct {
// contains filtered or unexported fields
}
PackageStrategy searches for metadata of a framework from a package.json file. If the requested version is a range (e.g. ~9.0.0), it matches the most recent version that satifies the constraint.
func (PackageStrategy) Find ¶ added in v0.90.0
func (s PackageStrategy) Find(ctx context.Context, svc MetadataService, frameworkName string, packageJsonPath string) (Metadata, error)
type SearchOptions ¶ added in v0.30.0
SearchOptions represents read query options for MetadataService.Search().