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 ValidateResourceVersions(result *ResourceVersions) (err error)
- func ValidateResourceVersionsView(result *ResourceVersionsView) (err error)
- func ValidateResources(result *Resources) (err error)
- func ValidateResourcesView(result *ResourcesView) (err error)
- func ValidateTagView(result *TagView) (err error)
- func ValidateVersionsView(result *VersionsView) (err error)
- type CatalogView
- type CategoryView
- type PlatformView
- type ResourceDataCollectionView
- type ResourceDataView
- type ResourceVersionDataView
- type ResourceVersions
- type ResourceVersionsView
- type Resources
- type ResourcesView
- type TagView
- type VersionsView
Constants ¶
This section is empty.
Variables ¶
var ( // ResourcesMap is a map of attribute names in result type Resources indexed by // view name. ResourcesMap = map[string][]string{ "default": []string{ "data", }, } // ResourceVersionsMap is a map of attribute names in result type // ResourceVersions indexed by view name. ResourceVersionsMap = map[string][]string{ "default": []string{ "data", }, } // ResourceDataCollectionMap is a map of attribute names in result type // ResourceDataCollection indexed by view name. ResourceDataCollectionMap = map[string][]string{ "info": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "tags", "platforms", "rating", }, "withoutVersion": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "latestVersion", "tags", "platforms", "rating", }, "default": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "latestVersion", "tags", "platforms", "rating", "versions", }, } // ResourceDataMap is a map of attribute names in result type ResourceData // indexed by view name. ResourceDataMap = map[string][]string{ "info": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "tags", "platforms", "rating", }, "withoutVersion": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "latestVersion", "tags", "platforms", "rating", }, "default": []string{ "id", "name", "catalog", "categories", "kind", "hubURLPath", "latestVersion", "tags", "platforms", "rating", "versions", }, } // CatalogMap is a map of attribute names in result type Catalog indexed by // view name. CatalogMap = map[string][]string{ "min": []string{ "id", "name", "type", }, "default": []string{ "id", "name", "type", "url", "provider", }, } // ResourceVersionDataMap is a map of attribute names in result type // ResourceVersionData indexed by view name. ResourceVersionDataMap = map[string][]string{ "tiny": []string{ "id", "version", }, "min": []string{ "id", "version", "rawURL", "webURL", "hubURLPath", "platforms", }, "withoutResource": []string{ "id", "version", "displayName", "deprecated", "description", "minPipelinesVersion", "rawURL", "webURL", "hubURLPath", "updatedAt", "platforms", }, "default": []string{ "id", "version", "displayName", "deprecated", "description", "minPipelinesVersion", "rawURL", "webURL", "hubURLPath", "updatedAt", "resource", "platforms", }, } // VersionsMap is a map of attribute names in result type Versions indexed by // view name. VersionsMap = map[string][]string{ "default": []string{ "latest", "versions", }, } )
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 ValidateResourceVersions ¶
func ValidateResourceVersions(result *ResourceVersions) (err error)
ValidateResourceVersions runs the validations defined on the viewed result type ResourceVersions.
func ValidateResourceVersionsView ¶
func ValidateResourceVersionsView(result *ResourceVersionsView) (err error)
ValidateResourceVersionsView runs the validations defined on ResourceVersionsView using the "default" 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.
func ValidateVersionsView ¶
func ValidateVersionsView(result *VersionsView) (err error)
ValidateVersionsView runs the validations defined on VersionsView using the "default" view.
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
// 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
// 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 ResourceVersions ¶
type ResourceVersions struct {
// Type to project
Projected *ResourceVersionsView
// View to render
View string
}
ResourceVersions is the viewed result type that is projected based on a view.
type ResourceVersionsView ¶
type ResourceVersionsView struct {
Data *VersionsView
}
ResourceVersionsView 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.
type VersionsView ¶
type VersionsView struct {
// Latest Version of resource
Latest *ResourceVersionDataView
// List of all versions of resource
Versions []*ResourceVersionDataView
}
VersionsView is a type that runs validations on a projected type.