27 lines
707 B
Go
27 lines
707 B
Go
package webfinder
|
|
|
|
type Resource struct {
|
|
Subject string `json:"subject,omitempty"`
|
|
Aliases []string `json:"aliases,omitempty"`
|
|
Properties map[string]string `json:"properties,omitempty"`
|
|
Links []Link `json:"links"`
|
|
}
|
|
|
|
type Link struct {
|
|
HRef string `json:"href"`
|
|
Type string `json:"type,omitempty"`
|
|
Rel string `json:"rel"`
|
|
Properties map[string]*string `json:"properties,omitempty"`
|
|
Titles map[string]string `json:"titles,omitempty"`
|
|
}
|
|
|
|
type Rel string
|
|
|
|
type badAddressError struct {
|
|
address string
|
|
}
|
|
|
|
func (e *badAddressError) Error() string {
|
|
return "badly formatted address: " + e.address
|
|
}
|