subhub/handlers/webfinder/models.go

27 lines
707 B
Go
Raw Normal View History

2019-09-07 14:54:53 +00:00
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
}