Documentation ¶
Index ¶
- Constants
- Variables
- func MakeInternalError(err error) *goa.ServiceError
- func MakeInvalidKind(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func NewByCatalogKindNameEndpoint(s Service) goa.Endpoint
- func NewByCatalogKindNameVersionEndpoint(s Service) goa.Endpoint
- func NewByIDEndpoint(s Service) goa.Endpoint
- func NewByVersionIDEndpoint(s Service) goa.Endpoint
- func NewListEndpoint(s Service) goa.Endpoint
- func NewQueryEndpoint(s Service) goa.Endpoint
- func NewVersionsByIDEndpoint(s Service) goa.Endpoint
- func NewViewedResource(res *Resource, view string) *resourceviews.Resource
- func NewViewedResourceVersion(res *ResourceVersion, view string) *resourceviews.ResourceVersion
- func NewViewedResourceVersions(res *ResourceVersions, view string) *resourceviews.ResourceVersions
- func NewViewedResources(res *Resources, view string) *resourceviews.Resources
- type ByCatalogKindNamePayload
- type ByCatalogKindNameVersionPayload
- type ByIDPayload
- type ByVersionIDPayload
- type Catalog
- type Category
- type Client
- func (c *Client) ByCatalogKindName(ctx context.Context, p *ByCatalogKindNamePayload) (res *Resource, err error)
- func (c *Client) ByCatalogKindNameVersion(ctx context.Context, p *ByCatalogKindNameVersionPayload) (res *ResourceVersion, err error)
- func (c *Client) ByID(ctx context.Context, p *ByIDPayload) (res *Resource, err error)
- func (c *Client) ByVersionID(ctx context.Context, p *ByVersionIDPayload) (res *ResourceVersion, err error)
- func (c *Client) List(ctx context.Context, p *ListPayload) (res *Resources, err error)
- func (c *Client) Query(ctx context.Context, p *QueryPayload) (res *Resources, err error)
- func (c *Client) VersionsByID(ctx context.Context, p *VersionsByIDPayload) (res *ResourceVersions, err error)
- type Endpoints
- type ListPayload
- type Platform
- type QueryPayload
- type Resource
- type ResourceData
- type ResourceDataCollection
- type ResourceVersion
- type ResourceVersionData
- type ResourceVersions
- type Resources
- type Service
- type Tag
- type Versions
- type VersionsByIDPayload
Constants ¶
const ServiceName = "resource"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [7]string{"Query", "List", "VersionsByID", "ByCatalogKindNameVersion", "ByVersionId", "ByCatalogKindName", "ById"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeInternalError ¶
func MakeInternalError(err error) *goa.ServiceError
MakeInternalError builds a goa.ServiceError from an error.
func MakeInvalidKind ¶
func MakeInvalidKind(err error) *goa.ServiceError
MakeInvalidKind builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func NewByCatalogKindNameEndpoint ¶
NewByCatalogKindNameEndpoint returns an endpoint function that calls the method "ByCatalogKindName" of service "resource".
func NewByCatalogKindNameVersionEndpoint ¶
NewByCatalogKindNameVersionEndpoint returns an endpoint function that calls the method "ByCatalogKindNameVersion" of service "resource".
func NewByIDEndpoint ¶
NewByIDEndpoint returns an endpoint function that calls the method "ById" of service "resource".
func NewByVersionIDEndpoint ¶
NewByVersionIDEndpoint returns an endpoint function that calls the method "ByVersionId" of service "resource".
func NewListEndpoint ¶
NewListEndpoint returns an endpoint function that calls the method "List" of service "resource".
func NewQueryEndpoint ¶
NewQueryEndpoint returns an endpoint function that calls the method "Query" of service "resource".
func NewVersionsByIDEndpoint ¶
NewVersionsByIDEndpoint returns an endpoint function that calls the method "VersionsByID" of service "resource".
func NewViewedResource ¶
func NewViewedResource(res *Resource, view string) *resourceviews.Resource
NewViewedResource initializes viewed result type Resource from result type Resource using the given view.
func NewViewedResourceVersion ¶
func NewViewedResourceVersion(res *ResourceVersion, view string) *resourceviews.ResourceVersion
NewViewedResourceVersion initializes viewed result type ResourceVersion from result type ResourceVersion using the given view.
func NewViewedResourceVersions ¶
func NewViewedResourceVersions(res *ResourceVersions, view string) *resourceviews.ResourceVersions
NewViewedResourceVersions initializes viewed result type ResourceVersions from result type ResourceVersions using the given view.
func NewViewedResources ¶
func NewViewedResources(res *Resources, view string) *resourceviews.Resources
NewViewedResources initializes viewed result type Resources from result type Resources using the given view.
Types ¶
type ByCatalogKindNamePayload ¶
type ByCatalogKindNamePayload struct { // name of catalog Catalog string // kind of resource Kind string // Name of resource Name string // To find resource compatible with a Tekton pipelines version, use this param Pipelinesversion *string }
ByCatalogKindNamePayload is the payload type of the resource service ByCatalogKindName method.
type ByCatalogKindNameVersionPayload ¶
type ByCatalogKindNameVersionPayload struct { // name of catalog Catalog string // kind of resource Kind string // name of resource Name string // version of resource Version string }
ByCatalogKindNameVersionPayload is the payload type of the resource service ByCatalogKindNameVersion method.
type ByIDPayload ¶
type ByIDPayload struct { // ID of a resource ID uint }
ByIDPayload is the payload type of the resource service ById method.
type ByVersionIDPayload ¶
type ByVersionIDPayload struct { // Version ID of a resource's version VersionID uint }
ByVersionIDPayload is the payload type of the resource service ByVersionId method.
type Client ¶
type Client struct { QueryEndpoint goa.Endpoint ListEndpoint goa.Endpoint VersionsByIDEndpoint goa.Endpoint ByCatalogKindNameVersionEndpoint goa.Endpoint ByVersionIDEndpoint goa.Endpoint ByCatalogKindNameEndpoint goa.Endpoint ByIDEndpoint goa.Endpoint }
Client is the "resource" service client.
func NewClient ¶
func NewClient(query, list, versionsByID, byCatalogKindNameVersion, byVersionID, byCatalogKindName, byID goa.Endpoint) *Client
NewClient initializes a "resource" service client given the endpoints.
func (*Client) ByCatalogKindName ¶
func (c *Client) ByCatalogKindName(ctx context.Context, p *ByCatalogKindNamePayload) (res *Resource, err error)
ByCatalogKindName calls the "ByCatalogKindName" endpoint of the "resource" service.
func (*Client) ByCatalogKindNameVersion ¶
func (c *Client) ByCatalogKindNameVersion(ctx context.Context, p *ByCatalogKindNameVersionPayload) (res *ResourceVersion, err error)
ByCatalogKindNameVersion calls the "ByCatalogKindNameVersion" endpoint of the "resource" service.
func (*Client) ByVersionID ¶
func (c *Client) ByVersionID(ctx context.Context, p *ByVersionIDPayload) (res *ResourceVersion, err error)
ByVersionID calls the "ByVersionId" endpoint of the "resource" service.
func (*Client) VersionsByID ¶
func (c *Client) VersionsByID(ctx context.Context, p *VersionsByIDPayload) (res *ResourceVersions, err error)
VersionsByID calls the "VersionsByID" endpoint of the "resource" service.
type Endpoints ¶
type Endpoints struct { Query goa.Endpoint List goa.Endpoint VersionsByID goa.Endpoint ByCatalogKindNameVersion goa.Endpoint ByVersionID goa.Endpoint ByCatalogKindName goa.Endpoint ByID goa.Endpoint }
Endpoints wraps the "resource" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "resource" service with endpoints.
type ListPayload ¶
type ListPayload struct { // Maximum number of resources to be returned Limit uint }
ListPayload is the payload type of the resource service List method.
type QueryPayload ¶
type QueryPayload struct { // Name of resource Name string // Catalogs of resource to filter by Catalogs []string // Kinds of resource to filter by Kinds []string // Category associated with a resource to filter by Categories []string // Tags associated with a resource to filter by Tags []string // Platforms associated with a resource to filter by Platforms []string // Maximum number of resources to be returned Limit uint // Strategy used to find matching resources Match string }
QueryPayload is the payload type of the resource service Query method.
type Resource ¶
type Resource struct {
Data *ResourceData
}
Resource is the result type of the resource service ByCatalogKindName method.
func NewResource ¶
func NewResource(vres *resourceviews.Resource) *Resource
NewResource initializes result type Resource from viewed result type Resource.
type ResourceData ¶
type ResourceData struct { // ID is the unique id of the resource ID uint // Name of resource Name string // Type of catalog to which resource belongs Catalog *Catalog // Categories related to resource Categories []*Category // Kind of resource Kind string // Url path of the resource in hub HubURLPath string // Latest version of resource LatestVersion *ResourceVersionData // Tags related to resource Tags []*Tag // Platforms related to resource Platforms []*Platform // Rating of resource Rating float64 // List of all versions of a resource Versions []*ResourceVersionData }
The resource type describes resource information.
type ResourceDataCollection ¶
type ResourceDataCollection []*ResourceData
type ResourceVersion ¶
type ResourceVersion struct {
Data *ResourceVersionData
}
ResourceVersion is the result type of the resource service ByCatalogKindNameVersion method.
func NewResourceVersion ¶
func NewResourceVersion(vres *resourceviews.ResourceVersion) *ResourceVersion
NewResourceVersion initializes result type ResourceVersion from viewed result type ResourceVersion.
type ResourceVersionData ¶
type ResourceVersionData struct { // ID is the unique id of resource's version ID uint // Version of resource Version string // Display name of version DisplayName string // Deprecation status of a version Deprecated *bool // Description of version Description string // Minimum pipelines version the resource's version is compatible with MinPipelinesVersion string // Raw URL of resource's yaml file of the version RawURL string // Web URL of resource's yaml file of the version WebURL string // Timestamp when version was last updated UpdatedAt string // Platforms related to resource version Platforms []*Platform // Url path of the resource in hub HubURLPath string // Resource to which the version belongs Resource *ResourceData }
The Version result type describes resource's version information.
type ResourceVersions ¶
type ResourceVersions struct {
Data *Versions
}
ResourceVersions is the result type of the resource service VersionsByID method.
func NewResourceVersions ¶
func NewResourceVersions(vres *resourceviews.ResourceVersions) *ResourceVersions
NewResourceVersions initializes result type ResourceVersions from viewed result type ResourceVersions.
type Resources ¶
type Resources struct {
Data ResourceDataCollection
}
Resources is the result type of the resource service Query method.
func NewResources ¶
func NewResources(vres *resourceviews.Resources) *Resources
NewResources initializes result type Resources from viewed result type Resources.
type Service ¶
type Service interface { // Find resources by a combination of name, kind, catalog, categories, // platforms, and tags Query(context.Context, *QueryPayload) (res *Resources, err error) // List all resources sorted by rating and name List(context.Context, *ListPayload) (res *Resources, err error) // Find all versions of a resource by its id VersionsByID(context.Context, *VersionsByIDPayload) (res *ResourceVersions, err error) // Find resource using name of catalog & name, kind and version of resource ByCatalogKindNameVersion(context.Context, *ByCatalogKindNameVersionPayload) (res *ResourceVersion, err error) // Find a resource using its version's id ByVersionID(context.Context, *ByVersionIDPayload) (res *ResourceVersion, err error) // Find resources using name of catalog, resource name and kind of resource ByCatalogKindName(context.Context, *ByCatalogKindNamePayload) (res *Resource, err error) // Find a resource using it's id ByID(context.Context, *ByIDPayload) (res *Resource, err error) }
The resource service provides details about all kind of resources
type Versions ¶
type Versions struct { // Latest Version of resource Latest *ResourceVersionData // List of all versions of resource Versions []*ResourceVersionData }
The Versions type describes response for versions by resource id API.
type VersionsByIDPayload ¶
type VersionsByIDPayload struct { // ID of a resource ID uint }
VersionsByIDPayload is the payload type of the resource service VersionsByID method.