Documentation
¶
Index ¶
- func NewClient() *client
- func URL() string
- type CatalogData
- type CatalogResult
- type Client
- type ResVersions
- type ResourceData
- type ResourceOption
- type ResourceResult
- type ResourceVersionOptions
- type ResourceVersionResult
- type ResourceWithVersionData
- type SearchOption
- type SearchResponse
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CatalogData ¶
type CatalogData = cclient.ListResponseBody
type CatalogResult ¶
type CatalogResult struct { Catalog CatalogData // contains filtered or unexported fields }
func (*CatalogResult) Type ¶
func (cr *CatalogResult) Type() (CatalogData, error)
Typed returns unmarshalled API response as CatalogResponse
type Client ¶
type Client interface { SetURL(u string) error Get(endpoint string) ([]byte, int, error) GetCatalogsList() ([]string, error) Search(opt SearchOption) SearchResult GetResource(opt ResourceOption) ResourceResult GetResourcesList(opt SearchOption) ([]string, error) GetResourceVersions(opt ResourceOption) ResourceVersionResult GetResourceVersionslist(opt ResourceOption) ([]string, error) }
type ResVersions ¶
type ResVersions = rclient.VersionsResponseBody
ResVersions is the data in API response consisting of list of versions
type ResourceData ¶
type ResourceData = rclient.ResourceDataResponseBody
ResourceData is the response of API when finding a resource
type ResourceOption ¶
type ResourceOption struct { Name string Catalog string Version string Kind string PipelineVersion string }
ResourceOption defines option associated with API to fetch a particular resource
func (ResourceOption) Endpoint ¶
func (opt ResourceOption) Endpoint() string
Endpoint computes the endpoint url using input provided
type ResourceResult ¶
type ResourceResult struct {
// contains filtered or unexported fields
}
ResourceResult defines API response
func (*ResourceResult) Manifest ¶
func (rr *ResourceResult) Manifest() ([]byte, error)
Manifest gets the resource from catalog
func (*ResourceResult) MinPipelinesVersion ¶
func (rr *ResourceResult) MinPipelinesVersion() (string, error)
MinPipelinesVersion returns the minimum pipeline version the resource is compatible
func (*ResourceResult) RawURL ¶
func (rr *ResourceResult) RawURL() (string, error)
RawURL returns the raw url of the resource yaml file
func (*ResourceResult) Resource ¶
func (rr *ResourceResult) Resource() (interface{}, error)
Resource returns the resource found
func (*ResourceResult) ResourceVersion ¶
func (rr *ResourceResult) ResourceVersion() (string, error)
ResourceVersion returns the resource version found
type ResourceVersionOptions ¶
type ResourceVersionOptions struct {
// contains filtered or unexported fields
}
type ResourceVersionResult ¶
type ResourceVersionResult struct {
// contains filtered or unexported fields
}
ResourceVersionResult defines API response
func (*ResourceVersionResult) ResourceVersions ¶
func (rvr *ResourceVersionResult) ResourceVersions() (*ResVersions, error)
ResourceVersions returns list of all versions of the resource
func (*ResourceVersionResult) VersionManifest ¶
func (rvr *ResourceVersionResult) VersionManifest(version string) ([]byte, error)
VersionManifest gets the resource from catalog for the resource's version passed
type ResourceWithVersionData ¶
type ResourceWithVersionData = rclient.ResourceVersionDataResponseBody
ResourceWithVersionData is the response of API when finding a resource with a specific version
type SearchOption ¶
type SearchOption struct { Name string Kinds []string Tags []string Categories []string Platforms []string Match string Limit uint Catalog string }
SearchOption defines option associated with query API
func (SearchOption) Endpoint ¶
func (so SearchOption) Endpoint() string
Endpoint computes the endpoint url using input provided
type SearchResponse ¶
type SearchResponse = rclient.ResourceDataCollectionResponseBody
SearchResponse is the data object which is the search result
type SearchResult ¶
type SearchResult struct {
// contains filtered or unexported fields
}
SearchResult defines API raw response, unmarshalled reponse, and error
func (*SearchResult) Raw ¶
func (sr *SearchResult) Raw() ([]byte, error)
Raw returns API response as byte array
func (*SearchResult) Typed ¶
func (sr *SearchResult) Typed() (SearchResponse, error)
Typed returns unmarshalled API response as SearchResponse