Documentation
¶
Index ¶
- Constants
- type Resolver
- func (r *Resolver) GetConfigName(_ context.Context) string
- func (r *Resolver) GetName(_ context.Context) string
- func (r *Resolver) GetSelector(_ context.Context) map[string]string
- func (r *Resolver) Initialize(_ context.Context) error
- func (r *Resolver) Resolve(ctx context.Context, req *v1beta1.ResolutionRequestSpec) (resolutionframework.ResolvedResource, error)
- func (r *Resolver) Validate(ctx context.Context, req *v1beta1.ResolutionRequestSpec) error
Constants ¶
const ( // LabelValueHubResolverType is the value to use for the // resolution.tekton.dev/type label on resource requests LabelValueHubResolverType = "hub" // ArtifactHubType is the value to use setting the type field to artifact ArtifactHubType = "artifact" // TektonHubType is the value to use setting the type field to tekton TektonHubType = "tekton" )
const ConfigArtifactHubURLs = "artifact-hub-urls"
ConfigArtifactHubURLs is the configuration field name for controlling the Artifact Hub API URLs to fetch remote resources from. Value is a YAML list of URLs, tried in order; first success wins.
const ConfigTektonHubURLs = "tekton-hub-urls"
ConfigTektonHubURLs is the configuration field name for controlling the Tekton Hub API URLs to fetch remote resources from. Value is a YAML list of URLs, tried in order; first success wins.
const ParamURL = resource.ParamURL
ParamURL is the parameter defining a custom hub API endpoint to use instead of the cluster-configured default. When specified, it overrides the ARTIFACT_HUB_API or TEKTON_HUB_API environment variable based on the resolution type.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// TektonHubURL is the URL for hub resolver with type tekton
TektonHubURL string
// ArtifactHubURL is the URL for hub resolver with type artifact
ArtifactHubURL string
}
Resolver implements a framework.Resolver that can fetch files from OCI bundles.
func (*Resolver) GetConfigName ¶
GetConfigName returns the name of the bundle resolver's configmap.
func (*Resolver) GetSelector ¶
GetSelector returns a map of labels to match requests to this resolver.
func (*Resolver) Initialize ¶
Initialize sets up any dependencies needed by the resolver. None atm.
func (*Resolver) Resolve ¶
func (r *Resolver) Resolve(ctx context.Context, req *v1beta1.ResolutionRequestSpec) (resolutionframework.ResolvedResource, error)
Resolve uses the given params to resolve the requested file or resource.