Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
Term string `xml:"term,attr" yaml:"term"`
Label string `xml:"label,attr" yaml:"label"`
}
Category struct
type Entry ¶
type Entry struct {
ID string `xml:"id" yaml:"id"`
Title string `xml:"title,omitempty" yaml:"title,omitempty"`
Content string `xml:"content,omitempty" yaml:"content,omitempty"`
Summary string `xml:"summary,omitempty" yaml:"summary,omitempty"`
Link []Link `xml:"link" yaml:"link"`
Rights string `xml:"rights,omitempty" yaml:"rights,omitempty"`
Updated *string `xml:"updated" yaml:"updated,omitempty"`
Polygon string `xml:"georss:polygon,omitempty" yaml:"polygon,omitempty"`
Category []Category `xml:"category" yaml:"category"`
SpatialDatasetIdentifierCode *string `xml:"inspire_dls:spatial_dataset_identifier_code,omitempty" yaml:"spatial_dataset_identifier_code,omitempty"`
SpatialDatasetIdentifierNamespace *string `xml:"inspire_dls:spatial_dataset_identifier_namespace,omitempty" yaml:"spatial_dataset_identifier_namespace,omitempty"`
}
Entry struct
type Feed ¶
type Feed struct {
XMLName xml.Name `xml:"feed"`
XMLStylesheet *string `yaml:"stylesheet"`
Xmlns string `xml:"xmlns,attr" yaml:"xmlns"` //"http://www.w3.org/2005/Atom"
Georss string `xml:"xmlns:georss,attr,omitempty" yaml:"georss,omitempty"` //"http://www.georss.org/georss"
InspireDls string `xml:"xmlns:inspire_dls,attr,omitempty" yaml:"inspire_dls,omitempty"` //"http://inspire.ec.europa.eu/schemas/inspire_dls/1.0"
Lang *string `xml:"xml:lang,attr,omitempty" yaml:"lang,omitempty"`
ID string `xml:"id" yaml:"id"`
Title string `xml:"title" yaml:"title"`
Subtitle string `xml:"subtitle" yaml:"subtitle"`
// Placeholder Links, need to be moved to []Link and deleted
Self *Link `xml:"self,omitempty" yaml:"self,omitempty"`
Describedby *Link `xml:"describedby,omitempty" yaml:"describedby,omitempty"`
Search *Link `xml:"search,omitempty" yaml:"search,omitempty"`
Up *Link `xml:"up,omitempty" yaml:"up,omitempty"`
Link []Link `xml:"link" yaml:"link"`
Rights string `xml:"rights" yaml:"rights"`
Updated *string `xml:"updated" yaml:"updated,omitempty"`
Author Author `xml:"author" yaml:"author"`
Entry []Entry `xml:"entry" yaml:"entry"`
}
Feed struct
func GetDefaultFeedProperties ¶
func GetDefaultFeedProperties() Feed
GetDefaultFeedProperties returns mandatory/static ServiceFeed properties
func (*Feed) GenerateATOM ¶
GenerateATOM function build a ATOM feed from the configuration
func (*Feed) GetFileName ¶
GetFileName function extracts a filename based on the ID element of the Feed struct TG Requirement 9 - Technical Guidance Download Services v3.1 The 'id' element of a feed shall contain an HTTP URI which dereferences to the feed
func (*Feed) StyleSheet ¶
StyleSheet function returns a xml-stylesheet header if available
type Link ¶
type Link struct {
Href string `xml:"href,attr" yaml:"href"`
Data *string `xml:"data,attr,omitempty" yaml:"data,omitempty"`
Rel string `xml:"rel,attr,omitempty" yaml:"rel,omitempty"`
Type string `xml:"type,attr,omitempty" yaml:"type,omitempty"`
Hreflang *string `xml:"hreflang,attr,omitempty" yaml:"hreflang,omitempty"`
Length string `xml:"length,attr,omitempty" yaml:"length,omitempty"`
Title string `xml:"title,attr,omitempty" yaml:"title,omitempty"`
Version *string `xml:"version,attr,omitempty" yaml:"version,omitempty"`
Time *string `xml:"time,attr,omitempty" yaml:"time,omitempty"`
Bbox *string `xml:"bbox,attr,omitempty" yaml:"bbox,omitempty"`
}
Link struct
func DescribedBy ¶
DescribedBy returns a Link containing a mandatory DescribedBy element TG Requirement 6 - Technical Guidance Download Services v3.1
func Search ¶
Search returns a Link containing a Search element (which is mandatory for Service Feeds) TG Requirement 8 - Technical Guidance Download Services v3.1
func Self ¶
Self returns a Link containing a mandatory Self element TG Requirement 7 - Technical Guidance Download Services v3.1
func Up ¶
Up returns a Link containing a Up element (which is recommended) TG Recommendation 9 - Technical Guidance Download Services v3.1
func (*Link) SetHrefLang ¶
SetHrefLang function assigns a default Lang is none is given