hub

package
v0.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
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"
)
View Source
const ArtifactHubListTasksEndpoint = "api/v1/packages/tekton-%s/%s/%s"

ArtifactHubListTasksEndpoint

View Source
const ArtifactHubYamlEndpoint = "api/v1/packages/tekton-%s/%s/%s/%s"

ArtifactHubYamlEndpoint is the suffix for a private custom Artifact hub instance

View Source
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.

View Source
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.

View Source
const ConfigKind = "default-kind"

ConfigKind is the configuration field name for controlling what the layer name in the hub image is.

View Source
const ConfigTektonHubCatalog = "default-tekton-hub-catalog"

ConfigTektonHubCatalog is the configuration field name for controlling the Tekton Hub catalog to fetch the remote resource from.

View Source
const ConfigType = "default-type"

ConfigType is the configuration field name for controlling the hub type to pull the resource from.

View Source
const DefaultArtifactHubURL = "https://artifacthub.io"

DefaultArtifactHubURL is the default url for the Artifact hub api

View Source
const ParamCatalog = "catalog"

ParamCatalog is the parameter defining what the catalog in the bundle image is.

View Source
const ParamKind = "kind"

ParamKind is the parameter defining what the layer kind in the bundle image is.

View Source
const ParamName = "name"

ParamName is the parameter defining what the layer name in the bundle image is.

View Source
const ParamType = "type"

ParamType is the parameter defining what the hub type to pull the resource from.

View Source
const ParamVersion = "version"

ParamVersion is the parameter defining what the layer version in the bundle image is.

View Source
const TektonHubListTasksEndpoint = "v1/resource/%s/%s/%s"

DefaultTektonHubListTasksEndpoint

View Source
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

type ResolvedHubResource struct {
	URL     string
	Content []byte
}

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

func (r *Resolver) GetConfigName(context.Context) string

GetConfigName returns the name of the bundle resolver's configmap.

func (*Resolver) GetName

func (r *Resolver) GetName(context.Context) string

GetName returns a string name to refer to this resolver by.

func (*Resolver) GetSelector

func (r *Resolver) GetSelector(context.Context) map[string]string

GetSelector returns a map of labels to match requests to this resolver.

func (*Resolver) Initialize

func (r *Resolver) Initialize(context.Context) error

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

func (r *Resolver) ValidateParams(ctx context.Context, params []pipelinev1.Param) error

ValidateParams ensures parameters from a request are as expected.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL