views

package
v0.0.0-...-520f1c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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",
		},
	}
	// ResourceVersionMap is a map of attribute names in result type
	// ResourceVersion indexed by view name.
	ResourceVersionMap = map[string][]string{
		"default": []string{
			"data",
		},
	}
	// ResourceMap is a map of attribute names in result type Resource indexed by
	// view name.
	ResourceMap = 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 ValidateResource

func ValidateResource(result *Resource) (err error)

ValidateResource runs the validations defined on the viewed result type Resource.

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 ValidateResourceVersion

func ValidateResourceVersion(result *ResourceVersion) (err error)

ValidateResourceVersion runs the validations defined on the viewed result type ResourceVersion.

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 ValidateResourceVersionView

func ValidateResourceVersionView(result *ResourceVersionView) (err error)

ValidateResourceVersionView runs the validations defined on ResourceVersionView using the "default" 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 ValidateResourceView

func ValidateResourceView(result *ResourceView) (err error)

ValidateResourceView runs the validations defined on ResourceView using the "default" view.

func ValidateResources

func ValidateResources(result *Resources) (err error)

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

func ValidateTagView(result *TagView) (err error)

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 Resource

type Resource struct {
	// Type to project
	Projected *ResourceView
	// View to render
	View string
}

Resource is the viewed result type that is projected based on a view.

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 ResourceVersion

type ResourceVersion struct {
	// Type to project
	Projected *ResourceVersionView
	// View to render
	View string
}

ResourceVersion is the viewed result type that is projected based on a view.

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 ResourceVersionView

type ResourceVersionView struct {
	Data *ResourceVersionDataView
}

ResourceVersionView 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 ResourceView

type ResourceView struct {
	Data *ResourceDataView
}

ResourceView 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 TagView

type TagView struct {
	// ID is the unique id of tag
	ID *uint
	// Name of tag
	Name *string
}

TagView 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL