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 map[string]string) (framework.ResolvedResource, error)
- func (r *Resolver) ValidateParams(ctx context.Context, params map[string]string) error
Constants ¶
const ConfigCatalog = "default-catalog"
ConfigCatalog is the configuration field name for controlling the 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 DefaultHubURL = "https://api.hub.tekton.dev/v1/resource/%s/%s/%s/%s/yaml"
DefaultHubURL is de default url for the Tekton hub api
const ( // LabelValueHubResolverType is the value to use for the // resolution.tekton.dev/type label on resource requests LabelValueHubResolverType string = "hub" )
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 ParamVersion = "version"
ParamVersion is the parameter defining what the layer version in the bundle image is.
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 ¶
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.