subhub/handlers/webfinder/models.go
2019-09-07 17:54:53 +03:00

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
}