Documentation ¶
Index ¶
- Constants
- Variables
- type APIV2Adapter
- type Adapter
- type ChartVersion
- type ChartVersions
- type Configuration
- type DockerHubAdapter
- type DockerHubImage
- type DockerHubImageResponse
- type GalaxyAdapter
- type GalaxyRole
- type GalaxyRoleMetadata
- type GalaxyRoleNamespace
- type GalaxyRoleResponse
- type GalaxyRoleSummary
- type GalaxySearchResponse
- type HelmAdapter
- type IndexFile
- type LocalOpenShiftAdapter
- type Maintainer
- type MockAdapter
- type OpenShiftAdapter
- type PartnerRhccAdapter
- type QuayAdapter
- type RHCCAdapter
- type RHCCImage
- type RHCCImageResponse
- type RegistryProxyAdapter
Constants ¶
const BundleSpecLabel = "com.redhat.apb.spec"
BundleSpecLabel - label on the image that we should use to pull out the abp spec.
Variables ¶
var MockFile = "/etc/automationbroker/bundle-lib/mock-registry-data.yaml"
MockFile - Mock file contains fake registry data
Functions ¶
This section is empty.
Types ¶
type APIV2Adapter ¶
type APIV2Adapter struct {
// contains filtered or unexported fields
}
APIV2Adapter - API V2 Adapter
func NewAPIV2Adapter ¶
func NewAPIV2Adapter(config Configuration) (APIV2Adapter, error)
NewAPIV2Adapter - creates and returns a APIV2Adapter ready to use.
func (APIV2Adapter) FetchSpecs ¶
func (r APIV2Adapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (APIV2Adapter) GetImageNames ¶
func (r APIV2Adapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (APIV2Adapter) RegistryName ¶
func (r APIV2Adapter) RegistryName() string
RegistryName - Retrieve the registry name
type Adapter ¶
type Adapter interface { // RegistryName will return the registry prefix for the adapter. // Example is docker.io for the dockerhub adapter. RegistryName() string // GetImageNames will return all the image names for the adapter configuration. GetImageNames() ([]string, error) // FetchSpecs will retrieve all the specs for the list of images names. FetchSpecs([]string) ([]*bundle.Spec, error) }
Adapter - Adapter will wrap the methods that a registry needs to fully manage images.
type ChartVersion ¶
type ChartVersion struct { // The name of the chart Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // The URL to a relevant project page, git repo, or contact person Home string `protobuf:"bytes,2,opt,name=home" json:"home,omitempty"` // Source is the URL to the source code of this chart Sources []string `protobuf:"bytes,3,rep,name=sources" json:"sources,omitempty"` // A SemVer 2 conformant version string of the chart Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` // A one-sentence description of the chart Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` // A list of string keywords Keywords []string `protobuf:"bytes,6,rep,name=keywords" json:"keywords,omitempty"` // A list of name and URL/email address combinations for the maintainer(s) Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers" json:"maintainers,omitempty"` // The name of the template engine to use. Defaults to 'gotpl'. Engine string `protobuf:"bytes,8,opt,name=engine" json:"engine,omitempty"` // The URL to an icon file. Icon string `protobuf:"bytes,9,opt,name=icon" json:"icon,omitempty"` // The API Version of this chart. APIVersion string `protobuf:"bytes,10,opt,name=apiVersion" json:"apiVersion,omitempty"` // The condition to check to enable chart Condition string `protobuf:"bytes,11,opt,name=condition" json:"condition,omitempty"` // The tags to check to enable chart Tags string `protobuf:"bytes,12,opt,name=tags" json:"tags,omitempty"` // The version of the application enclosed inside of this chart. AppVersion string `protobuf:"bytes,13,opt,name=appVersion" json:"appVersion,omitempty"` // Whether or not this chart is deprecated Deprecated bool `protobuf:"varint,14,opt,name=deprecated" json:"deprecated,omitempty"` // TillerVersion is a SemVer constraints on what version of Tiller is required. // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion" json:"tillerVersion,omitempty"` // Annotations are additional mappings uninterpreted by Tiller, // made available for inspection by other applications. Annotations map[string]string `` /* 143-byte string literal not displayed */ // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion" json:"kubeVersion,omitempty"` URLs []string `json:"urls"` Created time.Time `json:"created,omitempty"` Removed bool `json:"removed,omitempty"` Digest string `json:"digest,omitempty"` }
ChartVersion represents a chart entry in the IndexFile https://github.com/kubernetes/helm/blob/48e703997016f3edeb4f0b90e6cfdb3456ce3db0/pkg/repo/index.go#L216 https://github.com/kubernetes/helm/blob/48e703997016f3edeb4f0b90e6cfdb3456ce3db0/pkg/proto/hapi/chart/metadata.pb.go#L75
type ChartVersions ¶
type ChartVersions []*ChartVersion
ChartVersions is a list of versioned chart references. Implements a sorter on Version.
func (ChartVersions) Len ¶
func (c ChartVersions) Len() int
Len returns the length of the list of versioned chart references.
func (ChartVersions) Less ¶
func (c ChartVersions) Less(a, b int) bool
Less returns true if the version of entry a is less than the version of entry b.
func (ChartVersions) Swap ¶
func (c ChartVersions) Swap(i, j int)
Swap swaps the position of two items in the versions slice.
type Configuration ¶
type Configuration struct { URL *url.URL User string Pass string Token string Org string Runner string Images []string Namespaces []string Tag string SkipVerifyTLS bool AdapterName string }
Configuration - Adapter configuration. Contains the info that the adapter would need to complete its request to the images.
type DockerHubAdapter ¶
type DockerHubAdapter struct {
Config Configuration
}
DockerHubAdapter - Docker Hub Adapter
func (DockerHubAdapter) FetchSpecs ¶
func (r DockerHubAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (DockerHubAdapter) GetImageNames ¶
func (r DockerHubAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (DockerHubAdapter) RegistryName ¶
func (r DockerHubAdapter) RegistryName() string
RegistryName - Retrieve the registry name
type DockerHubImage ¶
DockerHubImage - Image from a dockerhub registry.
type DockerHubImageResponse ¶
type DockerHubImageResponse struct { Count int `json:"count"` Results []*DockerHubImage `json:"results"` Next string `json:"next"` }
DockerHubImageResponse - Image response for dockerhub.
type GalaxyAdapter ¶
type GalaxyAdapter struct {
Config Configuration
}
GalaxyAdapter - Galaxy Adapter
func (GalaxyAdapter) FetchSpecs ¶
func (r GalaxyAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (*GalaxyAdapter) GetImageNames ¶
func (r *GalaxyAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (GalaxyAdapter) RegistryName ¶
func (r GalaxyAdapter) RegistryName() string
RegistryName - Retrieve the registry name
type GalaxyRole ¶
type GalaxyRole struct { Name string `json:"name"` RoleID int `json:"id"` Summary GalaxyRoleSummary `json:"summary_fields"` }
GalaxyRole - Role from Ansible Galaxy.
type GalaxyRoleMetadata ¶
GalaxyRoleMetadata - Role Metadata obtained from Role Response.
type GalaxyRoleNamespace ¶
type GalaxyRoleNamespace struct {
Name string `json:"name"`
}
GalaxyRoleNamespace - Role Namespace obtained from Role Response Summary.
type GalaxyRoleResponse ¶
type GalaxyRoleResponse struct { Name string `json:"name"` Metadata GalaxyRoleMetadata `json:"metadata"` Summary GalaxyRoleSummary `json:"summary_fields"` }
GalaxyRoleResponse - Role Response from Ansible Galaxy.
type GalaxyRoleSummary ¶
type GalaxyRoleSummary struct {
Namespace GalaxyRoleNamespace `json:"namespace"`
}
GalaxyRoleSummary - Role Summary obtained from Role Response.
type GalaxySearchResponse ¶
type GalaxySearchResponse struct { Count int `json:"count"` Results []*GalaxyRole `json:"results"` Next string `json:"next"` }
GalaxySearchResponse - Search response for Galaxy.
type HelmAdapter ¶
type HelmAdapter struct { Config Configuration Charts map[string]ChartVersions }
HelmAdapter - Helm Registry Adapter
func (*HelmAdapter) FetchSpecs ¶
func (r *HelmAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (*HelmAdapter) GetImageNames ¶
func (r *HelmAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (*HelmAdapter) RegistryName ¶
func (r *HelmAdapter) RegistryName() string
RegistryName - Retrieve the registry name
type IndexFile ¶
type IndexFile struct { APIVersion string `json:"apiVersion"` Generated time.Time `json:"generated"` Entries map[string]ChartVersions `json:"entries"` PublicKeys []string `json:"publicKeys,omitempty"` }
IndexFile represents the index file in a chart repository https://github.com/kubernetes/helm/blob/48e703997016f3edeb4f0b90e6cfdb3456ce3db0/pkg/repo/index.go#L78
type LocalOpenShiftAdapter ¶
type LocalOpenShiftAdapter struct {
Config Configuration
}
LocalOpenShiftAdapter - Docker Hub Adapter
func (LocalOpenShiftAdapter) FetchSpecs ¶
func (r LocalOpenShiftAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (LocalOpenShiftAdapter) GetImageNames ¶
func (r LocalOpenShiftAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (LocalOpenShiftAdapter) RegistryName ¶
func (r LocalOpenShiftAdapter) RegistryName() string
RegistryName - Retrieve the registry name
type Maintainer ¶
type Maintainer struct { // Name is a user name or organization name Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Email is an optional email address to contact the named maintainer Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` // Url is an optional URL to an address for the named maintainer URL string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` }
Maintainer describes a Chart maintainer. https://github.com/kubernetes/helm/blob/48e703997016f3edeb4f0b90e6cfdb3456ce3db0/pkg/proto/hapi/chart/metadata.pb.go#L37
type MockAdapter ¶
type MockAdapter struct { Config Configuration // contains filtered or unexported fields }
MockAdapter - a adapter that is for mocking data
func (MockAdapter) FetchSpecs ¶
func (r MockAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - fetch the specs that were retrieved in the get images from the mock registry.
func (*MockAdapter) GetImageNames ¶
func (r *MockAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the image names
func (MockAdapter) RegistryName ¶
func (r MockAdapter) RegistryName() string
RegistryName - retrieve the registry name
type OpenShiftAdapter ¶
type OpenShiftAdapter struct {
APIV2Adapter
}
OpenShiftAdapter - OpenShift Adapter
func NewOpenShiftAdapter ¶
func NewOpenShiftAdapter(config Configuration) (OpenShiftAdapter, error)
NewOpenShiftAdapter - creates a new OpenShift Adapter
type PartnerRhccAdapter ¶
type PartnerRhccAdapter struct {
APIV2Adapter
}
PartnerRhccAdapter - Partner RHCC Adapter
func NewPartnerRhccAdapter ¶
func NewPartnerRhccAdapter(config Configuration) (PartnerRhccAdapter, error)
NewPartnerRhccAdapter - creates a new Partner RHCC Adapter
type QuayAdapter ¶
type QuayAdapter struct {
// contains filtered or unexported fields
}
QuayAdapter - Quay Adapter
func NewQuayAdapter ¶
func NewQuayAdapter(config Configuration) QuayAdapter
NewQuayAdapter - creates and returns a QuayAdapter ready to use.
func (QuayAdapter) FetchSpecs ¶
func (r QuayAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec for the image names.
func (QuayAdapter) GetImageNames ¶
func (r QuayAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images
func (QuayAdapter) RegistryName ¶
func (r QuayAdapter) RegistryName() string
RegistryName - Retrieve the registry name
type RHCCAdapter ¶
type RHCCAdapter struct { Config Configuration // contains filtered or unexported fields }
RHCCAdapter - Red Hat Container Catalog Registry
func NewRHCCAdapter ¶
func NewRHCCAdapter(config Configuration) *RHCCAdapter
NewRHCCAdapter - creates and returns a *RHCCAdapter ready to use.
func (RHCCAdapter) FetchSpecs ¶
func (r RHCCAdapter) FetchSpecs(imageNames []string) ([]*bundle.Spec, error)
FetchSpecs - retrieve the spec from the image names
func (RHCCAdapter) GetImageNames ¶
func (r RHCCAdapter) GetImageNames() ([]string, error)
GetImageNames - retrieve the images from the registry
func (RHCCAdapter) RegistryName ¶
func (r RHCCAdapter) RegistryName() string
RegistryName - retrieve the registry prefix
type RHCCImage ¶
type RHCCImage struct { Description string `json:"description"` IsOfficial bool `json:"is_official"` IsTrusted bool `json:"is_trusted"` Name string `json:"name"` ShouldFilter bool `json:"should_filter"` StarCount int `json:"star_count"` }
RHCCImage - RHCC Registry Image that is returned from the RHCC Catalog api.
type RHCCImageResponse ¶
type RHCCImageResponse struct { NumResults int `json:"num_results"` Query string `json:"query"` Results []*RHCCImage `json:"results"` }
RHCCImageResponse - RHCC Registry Image Response returned for the RHCC Catalog api
type RegistryProxyAdapter ¶
type RegistryProxyAdapter struct {
APIV2Adapter
}
RegistryProxyAdapter - Registry Proxy Adapter
func NewRegistryProxyAdapter ¶
func NewRegistryProxyAdapter(config Configuration) (RegistryProxyAdapter, error)
NewRegistryProxyAdapter - create a new Registry Proxy Adapter