Documentation
¶
Index ¶
- Variables
- func ValidateCatalogView(result *CatalogView) (err error)
- func ValidateCatalogViewMin(result *CatalogView) (err error)
- func ValidateCategoryView(result *CategoryView) (err error)
- func ValidatePlatformView(result *PlatformView) (err error)
- func ValidateResourceDataCollectionView(result ResourceDataCollectionView) (err error)
- func ValidateResourceDataCollectionViewInfo(result ResourceDataCollectionView) (err error)
- func ValidateResourceDataCollectionViewWithoutVersion(result ResourceDataCollectionView) (err error)
- func ValidateResourceDataView(result *ResourceDataView) (err error)
- func ValidateResourceDataViewInfo(result *ResourceDataView) (err error)
- func ValidateResourceDataViewWithoutVersion(result *ResourceDataView) (err error)
- func ValidateResourceVersionDataView(result *ResourceVersionDataView) (err error)
- func ValidateResourceVersionDataViewMin(result *ResourceVersionDataView) (err error)
- func ValidateResourceVersionDataViewTiny(result *ResourceVersionDataView) (err error)
- func ValidateResourceVersionDataViewWithoutResource(result *ResourceVersionDataView) (err error)
- func ValidateResources(result *Resources) (err error)
- func ValidateResourcesView(result *ResourcesView) (err error)
- func ValidateTagView(result *TagView) (err error)
- type CatalogView
- type CategoryView
- type PlatformView
- type ResourceDataCollectionView
- type ResourceDataView
- type ResourceVersionDataView
- type Resources
- type ResourcesView
- type TagView
Constants ¶
This section is empty.
Variables ¶
var ( // ResourcesMap is a map indexing the attribute names of Resources by view name. ResourcesMap = map[string][]string{ "default": { "data", }, } // ResourceDataCollectionMap is a map indexing the attribute names of // ResourceDataCollection by view name. ResourceDataCollectionMap = map[string][]string{ "info": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "tags", "platforms", "rating", }, "withoutVersion": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "hubRawURLPath", "latestVersion", "tags", "platforms", "rating", }, "default": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "hubRawURLPath", "latestVersion", "tags", "platforms", "rating", "versions", }, } // ResourceDataMap is a map indexing the attribute names of ResourceData by // view name. ResourceDataMap = map[string][]string{ "info": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "tags", "platforms", "rating", }, "withoutVersion": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "hubRawURLPath", "latestVersion", "tags", "platforms", "rating", }, "default": { "id", "name", "catalog", "categories", "kind", "hubURLPath", "hubRawURLPath", "latestVersion", "tags", "platforms", "rating", "versions", }, } // CatalogMap is a map indexing the attribute names of Catalog by view name. CatalogMap = map[string][]string{ "min": { "id", "name", "type", }, "default": { "id", "name", "type", "url", "provider", }, } // ResourceVersionDataMap is a map indexing the attribute names of // ResourceVersionData by view name. ResourceVersionDataMap = map[string][]string{ "tiny": { "id", "version", }, "min": { "id", "version", "rawURL", "webURL", "hubRawURLPath", "hubURLPath", "platforms", }, "withoutResource": { "id", "version", "displayName", "deprecated", "description", "minPipelinesVersion", "rawURL", "webURL", "hubRawURLPath", "hubURLPath", "updatedAt", "platforms", }, "default": { "id", "version", "displayName", "deprecated", "description", "minPipelinesVersion", "rawURL", "webURL", "hubURLPath", "hubRawURLPath", "updatedAt", "resource", "platforms", }, } )
Functions ¶
func ValidateCatalogView ¶
func ValidateCatalogView(result *CatalogView) (err error)
ValidateCatalogView runs the validations defined on CatalogView using the "default" view.
func ValidateCatalogViewMin ¶
func ValidateCatalogViewMin(result *CatalogView) (err error)
ValidateCatalogViewMin runs the validations defined on CatalogView using the "min" view.
func ValidateCategoryView ¶
func ValidateCategoryView(result *CategoryView) (err error)
ValidateCategoryView runs the validations defined on CategoryView.
func ValidatePlatformView ¶
func ValidatePlatformView(result *PlatformView) (err error)
ValidatePlatformView runs the validations defined on PlatformView.
func ValidateResourceDataCollectionView ¶
func ValidateResourceDataCollectionView(result ResourceDataCollectionView) (err error)
ValidateResourceDataCollectionView runs the validations defined on ResourceDataCollectionView using the "default" view.
func ValidateResourceDataCollectionViewInfo ¶
func ValidateResourceDataCollectionViewInfo(result ResourceDataCollectionView) (err error)
ValidateResourceDataCollectionViewInfo runs the validations defined on ResourceDataCollectionView using the "info" view.
func ValidateResourceDataCollectionViewWithoutVersion ¶
func ValidateResourceDataCollectionViewWithoutVersion(result ResourceDataCollectionView) (err error)
ValidateResourceDataCollectionViewWithoutVersion runs the validations defined on ResourceDataCollectionView using the "withoutVersion" view.
func ValidateResourceDataView ¶
func ValidateResourceDataView(result *ResourceDataView) (err error)
ValidateResourceDataView runs the validations defined on ResourceDataView using the "default" view.
func ValidateResourceDataViewInfo ¶
func ValidateResourceDataViewInfo(result *ResourceDataView) (err error)
ValidateResourceDataViewInfo runs the validations defined on ResourceDataView using the "info" view.
func ValidateResourceDataViewWithoutVersion ¶
func ValidateResourceDataViewWithoutVersion(result *ResourceDataView) (err error)
ValidateResourceDataViewWithoutVersion runs the validations defined on ResourceDataView using the "withoutVersion" view.
func ValidateResourceVersionDataView ¶
func ValidateResourceVersionDataView(result *ResourceVersionDataView) (err error)
ValidateResourceVersionDataView runs the validations defined on ResourceVersionDataView using the "default" view.
func ValidateResourceVersionDataViewMin ¶
func ValidateResourceVersionDataViewMin(result *ResourceVersionDataView) (err error)
ValidateResourceVersionDataViewMin runs the validations defined on ResourceVersionDataView using the "min" view.
func ValidateResourceVersionDataViewTiny ¶
func ValidateResourceVersionDataViewTiny(result *ResourceVersionDataView) (err error)
ValidateResourceVersionDataViewTiny runs the validations defined on ResourceVersionDataView using the "tiny" view.
func ValidateResourceVersionDataViewWithoutResource ¶
func ValidateResourceVersionDataViewWithoutResource(result *ResourceVersionDataView) (err error)
ValidateResourceVersionDataViewWithoutResource runs the validations defined on ResourceVersionDataView using the "withoutResource" view.
func ValidateResources ¶
ValidateResources runs the validations defined on the viewed result type Resources.
func ValidateResourcesView ¶
func ValidateResourcesView(result *ResourcesView) (err error)
ValidateResourcesView runs the validations defined on ResourcesView using the "default" view.
func ValidateTagView ¶
ValidateTagView runs the validations defined on TagView.
Types ¶
type CatalogView ¶
type CatalogView struct {
// ID is the unique id of the catalog
ID *uint
// Name of catalog
Name *string
// Type of catalog
Type *string
// URL of catalog
URL *string
// Provider of catalog
Provider *string
}
CatalogView is a type that runs validations on a projected type.
type CategoryView ¶
type CategoryView struct {
// ID is the unique id of the category
ID *uint
// Name of category
Name *string
}
CategoryView is a type that runs validations on a projected type.
type PlatformView ¶
type PlatformView struct {
// ID is the unique id of platform
ID *uint
// Name of platform
Name *string
}
PlatformView is a type that runs validations on a projected type.
type ResourceDataCollectionView ¶
type ResourceDataCollectionView []*ResourceDataView
ResourceDataCollectionView is a type that runs validations on a projected type.
type ResourceDataView ¶
type ResourceDataView struct {
// ID is the unique id of the resource
ID *uint
// Name of resource
Name *string
// Type of catalog to which resource belongs
Catalog *CatalogView
// Categories related to resource
Categories []*CategoryView
// Kind of resource
Kind *string
// Url path of the resource in hub
HubURLPath *string
// Path of the api to get the raw yaml of resource from hub apiserver
HubRawURLPath *string
// Latest version of resource
LatestVersion *ResourceVersionDataView
// Tags related to resource
Tags []*TagView
// Platforms related to resource
Platforms []*PlatformView
// Rating of resource
Rating *float64
// List of all versions of a resource
Versions []*ResourceVersionDataView
}
ResourceDataView is a type that runs validations on a projected type.
type ResourceVersionDataView ¶
type ResourceVersionDataView 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
// Path of the api to get the raw yaml of resource from hub apiserver
HubRawURLPath *string
// Timestamp when version was last updated
UpdatedAt *string
// Platforms related to resource version
Platforms []*PlatformView
// Url path of the resource in hub
HubURLPath *string
// Resource to which the version belongs
Resource *ResourceDataView
}
ResourceVersionDataView is a type that runs validations on a projected type.
type Resources ¶
type Resources struct {
// Type to project
Projected *ResourcesView
// View to render
View string
}
Resources is the viewed result type that is projected based on a view.
type ResourcesView ¶
type ResourcesView struct {
Data ResourceDataCollectionView
}
ResourcesView is a type that runs validations on a projected type.