v3

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package v3 contains API Schema definitions for the v3 API group. +kubebuilder:object:generate=true +groupName=pdok.nl

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "pdok.nl", Version: "v3"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func GetBaseURL

func GetBaseURL() string

func GetBlobEndpoint

func GetBlobEndpoint() string

func SetBaseURL

func SetBaseURL(atomBaseURL string)

func SetBlobEndpoint

func SetBlobEndpoint(atomBlobEndpoint string)

func ValidateAtom

func ValidateAtom(atom *Atom, warnings *[]string, allErrs *field.ErrorList)

func ValidateOwnerInfo added in v0.0.6

func ValidateOwnerInfo(c client.Client, atom *Atom, allErrs *field.ErrorList)

Types

type Atom

type Atom struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AtomSpec                            `json:"spec"`
	Status *smoothoperatormodel.OperatorStatus `json:"status,omitempty"`
}

Atom is the Schema for the atoms API.

func (*Atom) DeepCopy

func (in *Atom) DeepCopy() *Atom

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Atom.

func (*Atom) DeepCopyInto

func (in *Atom) DeepCopyInto(out *Atom)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Atom) DeepCopyObject

func (in *Atom) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (r *Atom) GetDownloadLinks() (downloadLinks []DownloadLink)

func (*Atom) Hub

func (*Atom) Hub()

Hub marks this type as a conversion hub.

func (*Atom) ValidateCreate

func (atom *Atom) ValidateCreate(c client.Client) ([]string, error)

func (*Atom) ValidateUpdate

func (atom *Atom) ValidateUpdate(c client.Client, atomOld *Atom) ([]string, error)

type AtomList

type AtomList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Atom `json:"items"`
}

AtomList contains a list of Atom.

func (*AtomList) DeepCopy

func (in *AtomList) DeepCopy() *AtomList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtomList.

func (*AtomList) DeepCopyInto

func (in *AtomList) DeepCopyInto(out *AtomList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtomList) DeepCopyObject

func (in *AtomList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AtomSpec

type AtomSpec struct {
	// Optional lifecycle settings
	Lifecycle *smoothoperatormodel.Lifecycle `json:"lifecycle,omitempty"`

	// Optional list of URLs where the service can be reached
	// By default only the spec.service.baseUrl is used
	IngressRouteURLs smoothoperatormodel.IngressRouteURLs `json:"ingressRouteUrls,omitempty"`

	// Service specification
	Service Service `json:"service"`
}

AtomSpec defines the desired state of Atom. +kubebuilder:validation:XValidation:rule="!has(self.ingressRouteUrls) || self.ingressRouteUrls.exists_one(x, x.url == self.service.baseUrl)",messageExpression="'ingressRouteUrls should include service.baseUrl '+self.service.baseUrl"

func (*AtomSpec) DeepCopy

func (in *AtomSpec) DeepCopy() *AtomSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtomSpec.

func (*AtomSpec) DeepCopyInto

func (in *AtomSpec) DeepCopyInto(out *AtomSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatasetFeed

type DatasetFeed struct {
	// TechnicalName of the feed. Can be seen as an identifier for the feed.
	// +kubebuilder:validation:MinLength:=1
	TechnicalName string `json:"technicalName"`

	// Title of the feed
	// +kubebuilder:validation:MinLength:=1
	Title string `json:"title"`

	// Subtitle of the feed
	// +kubebuilder:validation:MinLength:=1
	Subtitle string `json:"subtitle"`

	// Optional links to metadata of the dataset
	DatasetMetadataLinks *MetadataLink `json:"datasetMetadataLinks,omitempty"`

	// Optional additional links
	// +kubebuilder:validation:MinItems:=1
	Links []Link `json:"links,omitempty"`

	// Author of the dataset, note that this is not the same as the author of the service.
	Author smoothoperatormodel.Author `json:"author"`

	// SpatialDatasetIdentifierCode
	// +kubebuilder:validation:Pattern:=`^[0-9a-zA-Z]{8}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{12}$`
	SpatialDatasetIdentifierCode *string `json:"spatialDatasetIdentifierCode,omitempty"`

	// TODO user URL type
	// SpatialDatasetIdentifierNamespace
	// +kubebuilder:validation:Format:=uri
	SpatialDatasetIdentifierNamespace *string `json:"spatialDatasetIdentifierNamespace,omitempty"`

	// List of entries for this dataset feed, typically used for downloads
	// +kubebuilder:validation:MinItems:=1
	Entries []Entry `json:"entries"`
}

DatasetFeed represents individual dataset feeds within the Atom service

func (*DatasetFeed) DeepCopy

func (in *DatasetFeed) DeepCopy() *DatasetFeed

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatasetFeed.

func (*DatasetFeed) DeepCopyInto

func (in *DatasetFeed) DeepCopyInto(out *DatasetFeed)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DownloadLink struct {
	// URL to the data
	// +kubebuilder:validation:Pattern:=^[^\/]+\/.+\/.+
	Data string `json:"data"`

	// Optional relation if the link, for example: describedby, self or alternate
	// +kubebuilder:validation:MinLength:=1
	Rel *string `json:"rel,omitempty"`

	// Optional. Datetime the data in the dataset applies to, for use in historical datasets
	// +kubebuilder:validation:Format:=date-time
	Time *string `json:"time,omitempty"`

	// Optional boundingbox of the data. If omitted the bounding box of the parent entry is used
	BBox *smoothoperatormodel.BBox `json:"bbox,omitempty"`
}

DownloadLink specifies download information for entries

func (*DownloadLink) DeepCopy

func (in *DownloadLink) DeepCopy() *DownloadLink

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadLink.

func (*DownloadLink) DeepCopyInto

func (in *DownloadLink) DeepCopyInto(out *DownloadLink)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DownloadLink) GetBlobName

func (dl *DownloadLink) GetBlobName() string

func (*DownloadLink) GetBlobPrefix

func (dl *DownloadLink) GetBlobPrefix() string

type Entry

type Entry struct {
	// TechnicalName of the Entry, used as the ID
	// +kubebuilder:validation:MinLength:=1
	TechnicalName string `json:"technicalName"`

	// Optional title of the Entry
	// +kubebuilder:validation:MinLength:=1
	Title *string `json:"title,omitempty"`

	// Optional content description of the links. Required when more than 1 link is given
	// +kubebuilder:validation:MinLength:=1
	Content *string `json:"content,omitempty"`

	// List of download links within this entry
	// +kubebuilder:validation:MinItems:=1
	DownloadLinks []DownloadLink `json:"downloadlinks"`

	// Last updated timestamp
	// +kubebuilder:validation:Format:=date-time
	Updated metav1.Time `json:"updated"`

	// Bounding box of the entry
	Polygon Polygon `json:"polygon"`

	// Spatial Reference System
	SRS SRS `json:"srs"`
}

Entry represents an entry within a dataset feed, typically for downloads +kubebuilder:validation:XValidation:message="Content field is required when 2 or more download links are given.",rule="self.downloadlinks.size() == 1 || (has(self.content) && self.content.size() > 0)"

func (*Entry) DeepCopy

func (in *Entry) DeepCopy() *Entry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Entry.

func (*Entry) DeepCopyInto

func (in *Entry) DeepCopyInto(out *Entry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Link struct {
	// Actual href of the link
	Href smoothoperatormodel.URL `json:"href"`

	// Relation (type) of the link, for example: describedby, self or alternate
	// +kubebuilder:validation:MinLength:=1
	Rel string `json:"rel"`

	// ContentType of the link, for example: application/pdf or text/plain
	// +kubebuilder:validation:Pattern:=`^[a-z]+\/[a-z]+(?:\+[a-z]+)?$`
	Type string `json:"type"`

	// Optional language of the link. If omitted the language of the service is used
	// +kubebuilder:validation:MinLength:=2
	Hreflang *string `json:"hreflang,omitempty"`

	// Optional title of the link
	// +kubebuilder:validation:MinLength:=1
	Title *string `json:"title,omitempty"`
}

Link represents a link in the service or dataset feed

func (*Link) DeepCopy

func (in *Link) DeepCopy() *Link

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.

func (*Link) DeepCopyInto

func (in *Link) DeepCopyInto(out *Link)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetadataLink struct {
	// UUID of the metadata record
	// +kubebuilder:validation:Pattern:=`^[0-9a-zA-Z]{8}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{12}$`
	MetadataIdentifier string `json:"metadataIdentifier"`

	// Metadata templates to use
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:validation:items:Enum:=csw;opensearch;html
	Templates []string `json:"templates"`
}

MetadataLink represents a link in the service or dataset feed

func (*MetadataLink) DeepCopy

func (in *MetadataLink) DeepCopy() *MetadataLink

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataLink.

func (*MetadataLink) DeepCopyInto

func (in *MetadataLink) DeepCopyInto(out *MetadataLink)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Polygon

type Polygon struct {
	BBox smoothoperatormodel.BBox `json:"bbox"`
}

Polygon describes the bounding box of an entry or download

func (*Polygon) DeepCopy

func (in *Polygon) DeepCopy() *Polygon

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Polygon.

func (*Polygon) DeepCopyInto

func (in *Polygon) DeepCopyInto(out *Polygon)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SRS

type SRS struct {
	// URI of the SRS
	URI smoothoperatormodel.URL `json:"uri"`

	// Name of the SRS
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
}

SRS describes the Spatial Reference System for an entry

func (*SRS) DeepCopy

func (in *SRS) DeepCopy() *SRS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SRS.

func (*SRS) DeepCopyInto

func (in *SRS) DeepCopyInto(out *SRS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Service

type Service struct {
	// BaseURL of the Atom service. Will be suffixed with index.xml for the index.
	BaseURL smoothoperatormodel.URL `json:"baseUrl"`

	// Language of the service
	// +kubebuilder:default:="nl"
	// +kubebuilder:validation:MinLength:=2
	Lang string `json:"lang,omitempty"`

	// Optional link to a stylesheet used in pages generated by the service.
	Stylesheet *smoothoperatormodel.URL `json:"stylesheet,omitempty"`

	// Title of the service
	// +kubebuilder:validation:MinLength:=1
	Title string `json:"title"`

	// Subtitle of the service
	// +kubebuilder:validation:MinLength:=1
	Subtitle string `json:"subtitle"`

	// Reference to a CR of Kind OwnerInfo
	OwnerInfoRef string `json:"ownerInfoRef"`

	// Optional links to metadata of the service
	ServiceMetadataLinks *MetadataLink `json:"serviceMetadataLinks,omitempty"`

	// Additional links
	// +kubebuilder:validation:MinItems:=1
	Links []Link `json:"links,omitempty"`

	// License used
	// +kubebuilder:validation:MinLength:=1
	Rights string `json:"rights"`

	// DatasetFeeds in this service
	// +kubebuilder:validation:MinItems:=1
	DatasetFeeds []DatasetFeed `json:"datasetFeeds"`
}

Service defines the service configuration for the Atom feed

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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