hub

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const ConfigCatalog = "default-catalog"

ConfigCatalog is the configuration field name for controlling the 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 DefaultHubURL = "https://api.hub.tekton.dev/v1/resource/%s/%s/%s/%s/yaml"

DefaultHubURL is de default url for the Tekton hub api

View Source
const (
	// LabelValueHubResolverType is the value to use for the
	// resolution.tekton.dev/type label on resource requests
	LabelValueHubResolverType string = "hub"
)
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 ParamVersion = "version"

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

View Source
const YamlEndpoint = "v1/resource/%s/%s/%s/%s/yaml"

YamlEndpoint is the suffix for a private custom hub instance

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolvedHubResource

type ResolvedHubResource struct {
	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

type Resolver

type Resolver struct {
	// HubURL is the URL for hub resolver
	HubURL 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 map[string]string) (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 map[string]string) 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