Documentation ¶
Index ¶
- Constants
- Variables
- func CheckEncodingString(input string, check []string) bool
- func CheckIANAEncoding(enc string) bool
- func CheckISOLanguage(lang string) bool
- func CheckOGDTextStringForSaneCharacters(str string) (ok bool, _ error)
- func GetIDFromMetaDataStructField(val reflect.StructField) int
- func OGDVersionfromString(match string) (version string)
- type Beschreibung
- type CheckInfo
- type CheckMessage
- type Cycle
- type Extras
- type ISO6392Lang
- type Identifier
- type Kategorie
- type MetaDataKategorie
- type MetaDataLinkage
- type Metadater
- type MinimalMetaData
- type OGDSet
- type Occurrence
- type ResourceSpecifier
- type Tags
- type Time
- type Url
Constants ¶
const ( Info = 1 << iota Warning = 1 << iota Error = 1 << iota )
const ( FetchSuccess = 0x1000 FetchableUrl = 0x2000 NoDataatUrlError = 0x4000 StructuralError = 0x8000 EmptyData = 0x16000 )
const CustomTimeSpecifier1 = "2006-01-02T15:04:05" // RFC 3339 = ISO 8601 ohne Zeitzone
const CustomTimeSpecifier2 = "2006-01-02" // RFC 3339 = ISO 8601 ohne Zeitzone
Variables ¶
var ( Arbeit = Kategorie{NumID: 1, ID: "arbeit", PrettyName: "Arbeit", RDFProperty: ""} Bevoelkerung = Kategorie{NumID: 2, ID: "bevölkerung", PrettyName: "Bevölkerung", RDFProperty: ""} BildungForschung = Kategorie{NumID: 3, ID: "bildung-und-forschung", PrettyName: "Bildung und Forschung", RDFProperty: ""} FinanzRW = Kategorie{NumID: 4, ID: "finanzen-und-rechnungswesen", PrettyName: "Finanzen und Rechnungswesen", RDFProperty: ""} GeographPlanung = Kategorie{NumID: 5, ID: "geographie-und-planung", PrettyName: "Geographie und Planung", RDFProperty: ""} GesellSoziales = Kategorie{NumID: 6, ID: "gesellschaft-und-soziales", PrettyName: "Gesellschaft und Soziales", RDFProperty: ""} Gesundheit = Kategorie{NumID: 7, ID: "gesundheit", PrettyName: "Gesundheit", RDFProperty: ""} KunstKultur = Kategorie{NumID: 8, ID: "kunst-und-kultur", PrettyName: "Kunst und Kultur", RDFProperty: ""} LandFW = Kategorie{NumID: 9, ID: "land-und-forstwirtschaft", PrettyName: "Land und Forstwirtschaft", RDFProperty: ""} SportFZ = Kategorie{NumID: 10, ID: "sport-und-freizeit", PrettyName: "Sport und Freizeit", RDFProperty: ""} Umwelt = Kategorie{NumID: 11, ID: "umwelt", PrettyName: "Umwelt", RDFProperty: ""} VerkehrTechnik = Kategorie{NumID: 12, ID: "verkehr-und-technik", PrettyName: "Verkehr und Technik", RDFProperty: ""} VerwaltPol = Kategorie{NumID: 13, ID: "verwaltung-und-politik", PrettyName: "Verwaltung und Politik", RDFProperty: ""} WirtTourism = Kategorie{NumID: 14, ID: "wirtschaft-und-tourismus", PrettyName: "Wirtschaft und Tourismus", RDFProperty: ""} )
var ( CycCont = Cycle{NumID: 1, DomainCode: "001", MD_MaintenanceFrequencyCode: "continual", Name_DE: "kontinuierlich"} CycDaily = Cycle{NumID: 2, DomainCode: "002", MD_MaintenanceFrequencyCode: "daily", Name_DE: "täglich"} CycWeekly = Cycle{NumID: 3, DomainCode: "003", MD_MaintenanceFrequencyCode: "weekly", Name_DE: "wöchentlich"} CycFortNly = Cycle{NumID: 4, DomainCode: "004", MD_MaintenanceFrequencyCode: "fortnightly", Name_DE: "14-tägig"} CycMonthly = Cycle{NumID: 5, DomainCode: "005", MD_MaintenanceFrequencyCode: "monthly", Name_DE: "monatlich"} CycQuart = Cycle{NumID: 6, DomainCode: "006", MD_MaintenanceFrequencyCode: "quarterly", Name_DE: "quartalsweise"} CycBiAnn = Cycle{NumID: 7, DomainCode: "007", MD_MaintenanceFrequencyCode: "biannually", Name_DE: "halbjährlich"} CycAnnually = Cycle{NumID: 8, DomainCode: "008", MD_MaintenanceFrequencyCode: "annually", Name_DE: "jährlich"} CycNeeded = Cycle{NumID: 9, DomainCode: "009", MD_MaintenanceFrequencyCode: "asNeeded", Name_DE: "nach Bedarf"} CycIrreg = Cycle{NumID: 10, DomainCode: "010", MD_MaintenanceFrequencyCode: "irregular", Name_DE: "unregelmäßig"} CycNP = Cycle{NumID: 11, DomainCode: "011", MD_MaintenanceFrequencyCode: "notPlanned", Name_DE: "nicht geplant"} CycUnknown = Cycle{NumID: 12, DomainCode: "012", MD_MaintenanceFrequencyCode: "unknown", Name_DE: "unbekannt"} )
var Categories = []Kategorie{ Arbeit, Bevoelkerung, BildungForschung, FinanzRW, GeographPlanung, GesellSoziales, Gesundheit, KunstKultur, LandFW, SportFZ, Umwelt, VerkehrTechnik, VerwaltPol, WirtTourism, }
var Categorymap = make(map[string]Kategorie)
var TimeFormat = []string{ time.RFC3339Nano, time.RFC3339, CustomTimeSpecifier1, CustomTimeSpecifier2, }
Functions ¶
func CheckEncodingString ¶
copmpare input against a slice of check strings. input will first be converted to lower-case, and any occurence of "-" is removed. The slice of checks will be iterated over, individual elements of check will not be converted or have their "-" removed.
func CheckIANAEncoding ¶
CheckIANAEncoding will try to match and input of enc against the specified encodings found at http://www.iana.org/assignments/character-sets/character-sets.xml The file at http://www.iana.org/assignments/character-sets/character-sets.xml is retrieved by a shell scripte, converted to all-lower case and sorted for unique entries. Thus the encoding enc against which will be checked, is converted to lower case and then compared to the IANA-encodings
func CheckISOLanguage ¶
func CheckOGDTextStringForSaneCharacters ¶
return values are: ok = false indicates sthg. was wrong in which case error will not be nil
error: if is of type CheckError: Status: 1 = Info, 2 = Warning, 3 = Error Position: beginning position of offending input message: An error message describing the problem
func GetIDFromMetaDataStructField ¶
func GetIDFromMetaDataStructField(val reflect.StructField) int
func OGDVersionfromString ¶
Types ¶
type Beschreibung ¶
type Beschreibung struct { ID int Bezeichner string OGD_Kurzname string CKAN_Feld string Anzahl string Definition_DE string Erlauterung string Beispiel string ONA2270 string ISO19115 string RDFProperty string Definition_EN string // contains filtered or unexported fields }
func NewBeschreibung ¶
func NewBeschreibung(ID int, occur Occurrence, ver string) *Beschreibung
func (*Beschreibung) IsRequired ¶
func (desc *Beschreibung) IsRequired() bool
func (*Beschreibung) Occurrence ¶
func (desc *Beschreibung) Occurrence() Occurrence
func (*Beschreibung) Version ¶
func (desc *Beschreibung) Version() string
type CheckInfo ¶
func CheckDataPortalUrl ¶
type CheckMessage ¶
type CheckMessage struct { Type int // 1 = Info, 2 = Warning, 4 = Error, ... Text string OGDID int Context string }
func AppendcheckerrorTocheckmessage ¶
func AppendcheckerrorTocheckmessage(msgs []CheckMessage, checkresults []CheckInfo, ID int, prepend string) []CheckMessage
type Cycle ¶
type Cycle struct { NumID int DomainCode string MD_MaintenanceFrequencyCode string Name_DE string Raw string }
func (*Cycle) UnmarshalJSON ¶
type Extras ¶
type Extras struct { Metadata_Identifier *string `json:"metadata_identifier"` Schema_Name *string `json:"schema_name"` Maintainer_Link *string `json:"maintainer_link"` Publisher *string `json:"publisher"` Geographic_BBox *string `json:"geographic_bbox"` Geographich_Toponym *string `json:"geographic_toponym"` Categorization *MetaDataKategorie `json:"categorization"` }
type ISO6392Lang ¶
type ISO6392Lang struct {
Code, Identifier string
}
type Identifier ¶
func (*Identifier) String ¶
func (id *Identifier) String() string
func (*Identifier) UnmarshalJSON ¶
func (id *Identifier) UnmarshalJSON(data []byte) error
type Kategorie ¶
type Kategorie struct { NumID int `json:"-"` ID string PrettyName string `json:"-"` RDFProperty string `json:"-"` }
func (*Kategorie) UnmarshalJSON ¶
type MetaDataKategorie ¶
func (*MetaDataKategorie) UnmarshalJSON ¶
func (kat *MetaDataKategorie) UnmarshalJSON(data []byte) error
type MetaDataLinkage ¶
func (*MetaDataLinkage) UnmarshalJSON ¶
func (u *MetaDataLinkage) UnmarshalJSON(data []byte) error
type Metadater ¶
type Metadater interface { Check(bool) ([]CheckMessage, error) MinimalMetadata() *MinimalMetaData }
type MinimalMetaData ¶
func MinimalMetaDataforJSONStream ¶
func MinimalMetaDataforJSONStream(jsondata io.Reader) (*MinimalMetaData, error)
type OGDSet ¶
type OGDSet struct { Label []string Beschreibung []*Beschreibung }
func GetOGDSetForVersion ¶
func Loadogdatspec ¶
func RegisterFromCSVFile ¶
func (*OGDSet) GetBeschreibungForID ¶
func (set *OGDSet) GetBeschreibungForID(id int) (*Beschreibung, string)
type ResourceSpecifier ¶
type ResourceSpecifier string
type Time ¶
func (*Time) UnmarshalJSON ¶
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
|
The uuid package generates and inspects UUIDs. |
_workspace/src/github.com/emicklei/go-restful
Package restful, a lean package for creating REST-style WebServices without magic.
|
Package restful, a lean package for creating REST-style WebServices without magic. |
_workspace/src/github.com/emicklei/go-restful/swagger
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification
|
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification |
_workspace/src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
|
Package redistest contains utilities for writing Redigo tests. |
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
|
Package redis is a client for the Redis database. |
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
|
Package pq is a pure Go Postgres driver for the database/sql package. |
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
|
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive. |
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
|
Package oid contains OID constants as defined by the Postgres server. |