views

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 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 indexing the attribute names of Resources by view name.
	ResourcesMap = map[string][]string{
		"default": {
			"data",
		},
	}
	// ResourceVersionsMap is a map indexing the attribute names of
	// ResourceVersions by view name.
	ResourceVersionsMap = map[string][]string{
		"default": {
			"data",
		},
	}
	// ResourceVersionMap is a map indexing the attribute names of ResourceVersion
	// by view name.
	ResourceVersionMap = map[string][]string{
		"default": {
			"data",
		},
	}
	// ResourceVersionReadmeMap is a map indexing the attribute names of
	// ResourceVersionReadme by view name.
	ResourceVersionReadmeMap = map[string][]string{
		"default": {
			"data",
		},
	}
	// ResourceVersionYamlMap is a map indexing the attribute names of
	// ResourceVersionYaml by view name.
	ResourceVersionYamlMap = map[string][]string{
		"default": {
			"data",
		},
	}
	// ResourceMap is a map indexing the attribute names of Resource by view name.
	ResourceMap = 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",
			"latestVersion",
			"tags",
			"platforms",
			"rating",
		},
		"default": {
			"id",
			"name",
			"catalog",
			"categories",
			"kind",
			"hubURLPath",
			"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",
			"latestVersion",
			"tags",
			"platforms",
			"rating",
		},
		"default": {
			"id",
			"name",
			"catalog",
			"categories",
			"kind",
			"hubURLPath",
			"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",
			"hubURLPath",
			"platforms",
		},
		"withoutResource": {
			"id",
			"version",
			"displayName",
			"deprecated",
			"description",
			"minPipelinesVersion",
			"rawURL",
			"webURL",
			"hubURLPath",
			"updatedAt",
			"platforms",
		},
		"default": {
			"id",
			"version",
			"displayName",
			"deprecated",
			"description",
			"minPipelinesVersion",
			"rawURL",
			"webURL",
			"hubURLPath",
			"updatedAt",
			"resource",
			"platforms",
		},
	}
	// VersionsMap is a map indexing the attribute names of Versions by view name.
	VersionsMap = map[string][]string{
		"default": {
			"latest",
			"versions",
		},
	}
	// ResourceContentMap is a map indexing the attribute names of ResourceContent
	// by view name.
	ResourceContentMap = map[string][]string{
		"readme": {
			"readme",
		},
		"yaml": {
			"yaml",
		},
		"default": {
			"readme",
			"yaml",
		},
	}
)

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 ValidateResourceContentView

func ValidateResourceContentView(result *ResourceContentView) (err error)

ValidateResourceContentView runs the validations defined on ResourceContentView using the "default" view.

func ValidateResourceContentViewReadme

func ValidateResourceContentViewReadme(result *ResourceContentView) (err error)

ValidateResourceContentViewReadme runs the validations defined on ResourceContentView using the "readme" view.

func ValidateResourceContentViewYaml

func ValidateResourceContentViewYaml(result *ResourceContentView) (err error)

ValidateResourceContentViewYaml runs the validations defined on ResourceContentView using the "yaml" view.

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 ValidateResourceVersionReadme

func ValidateResourceVersionReadme(result *ResourceVersionReadme) (err error)

ValidateResourceVersionReadme runs the validations defined on the viewed result type ResourceVersionReadme.

func ValidateResourceVersionReadmeView

func ValidateResourceVersionReadmeView(result *ResourceVersionReadmeView) (err error)

ValidateResourceVersionReadmeView runs the validations defined on ResourceVersionReadmeView using the "default" view.

func ValidateResourceVersionView

func ValidateResourceVersionView(result *ResourceVersionView) (err error)

ValidateResourceVersionView runs the validations defined on ResourceVersionView using the "default" view.

func ValidateResourceVersionYaml

func ValidateResourceVersionYaml(result *ResourceVersionYaml) (err error)

ValidateResourceVersionYaml runs the validations defined on the viewed result type ResourceVersionYaml.

func ValidateResourceVersionYamlView

func ValidateResourceVersionYamlView(result *ResourceVersionYamlView) (err error)

ValidateResourceVersionYamlView runs the validations defined on ResourceVersionYamlView 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 ResourceContentView

type ResourceContentView struct {
	// Readme
	Readme *string
	// Yaml
	Yaml *string
}

ResourceContentView 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 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 ResourceVersionReadme

type ResourceVersionReadme struct {
	// Type to project
	Projected *ResourceVersionReadmeView
	// View to render
	View string
}

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

type ResourceVersionReadmeView

type ResourceVersionReadmeView struct {
	Data *ResourceContentView
}

ResourceVersionReadmeView 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 ResourceVersionYaml

type ResourceVersionYaml struct {
	// Type to project
	Projected *ResourceVersionYamlView
	// View to render
	View string
}

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

type ResourceVersionYamlView

type ResourceVersionYamlView struct {
	Data *ResourceContentView
}

ResourceVersionYamlView 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