Documentation ¶
Index ¶
- Constants
- type ResolvedHubResource
- 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, params []pipelinev1.Param) (framework.ResolvedResource, error)
- func (r *Resolver) ValidateParams(ctx context.Context, params []pipelinev1.Param) error
Constants ¶
const ( // LabelValueHubResolverType is the value to use for the // resolution.tekton.dev/type label on resource requests LabelValueHubResolverType string = "hub" // ArtifactHubType is the value to use setting the type field to artifact ArtifactHubType string = "artifact" // TektonHubType is the value to use setting the type field to tekton TektonHubType string = "tekton" )
const ArtifactHubListTasksEndpoint = "api/v1/packages/tekton-%s/%s/%s"
ArtifactHubListTasksEndpoint
const ArtifactHubYamlEndpoint = "api/v1/packages/tekton-%s/%s/%s/%s"
ArtifactHubYamlEndpoint is the suffix for a private custom Artifact hub instance
const ConfigArtifactHubPipelineCatalog = "default-artifact-hub-pipeline-catalog"
ConfigArtifactHubPipelineCatalog is the configuration field name for controlling the Artifact Hub Pipeline catalog to fetch the remote resource from.
const ConfigArtifactHubTaskCatalog = "default-artifact-hub-task-catalog"
ConfigArtifactHubTaskCatalog is the configuration field name for controlling the Artifact Hub Task catalog to fetch the remote resource from.
const ConfigKind = "default-kind"
ConfigKind is the configuration field name for controlling what the layer name in the hub image is.
const ConfigTektonHubCatalog = "default-tekton-hub-catalog"
ConfigTektonHubCatalog is the configuration field name for controlling the Tekton Hub catalog to fetch the remote resource from.
const ConfigType = "default-type"
ConfigType is the configuration field name for controlling the hub type to pull the resource from.
const DefaultArtifactHubURL = "https://artifacthub.io"
DefaultArtifactHubURL is the default url for the Artifact hub api
const ParamCatalog = "catalog"
ParamCatalog is the parameter defining what the catalog in the bundle image is.
const ParamKind = "kind"
ParamKind is the parameter defining what the layer kind in the bundle image is.
const ParamName = "name"
ParamName is the parameter defining what the layer name in the bundle image is.
const ParamType = "type"
ParamType is the parameter defining what the hub type to pull the resource from.
const ParamVersion = "version"
ParamVersion is the parameter defining what the layer version in the bundle image is.
const TektonHubListTasksEndpoint = "v1/resource/%s/%s/%s"
DefaultTektonHubListTasksEndpoint
const TektonHubYamlEndpoint = "v1/resource/%s/%s/%s/%s/yaml"
TektonHubYamlEndpoint is the suffix for a private custom Tekton hub instance
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResolvedHubResource ¶
ResolvedHubResource wraps the data we want to return to Pipelines
func (*ResolvedHubResource) Annotations ¶
func (*ResolvedHubResource) Annotations() map[string]string
Annotations returns any metadata needed alongside the data. None atm.
func (*ResolvedHubResource) Data ¶
func (rr *ResolvedHubResource) Data() []byte
Data returns the bytes of our hard-coded Pipeline
func (*ResolvedHubResource) RefSource ¶ added in v0.47.0
func (rr *ResolvedHubResource) RefSource() *pipelinev1.RefSource
RefSource is the source reference of the remote data that records where the remote file came from including the url, digest and the entrypoint.
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, params []pipelinev1.Param) (framework.ResolvedResource, error)
Resolve uses the given params to resolve the requested file or resource.
func (*Resolver) ValidateParams ¶
ValidateParams ensures parameters from a request are as expected.