Documentation ¶
Overview ¶
Package jrd provides a simple JRD parser.
Following this JRD spec: http://tools.ietf.org/html/draft-ietf-appsawg-webfinger-14#section-4.4
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JRD ¶
type JRD struct { Subject string `json:"subject,omitempty"` Aliases []string `json:"aliases,omitempty"` Properties map[string]interface{} `json:"properties,omitempty"` Links []Link `json:"links,omitempty"` Expires string }
JRD is a JSON Resource Descriptor, specifying properties and related links for a resource.
func (*JRD) GetLinkByRel ¶
GetLinkByRel returns the first *Link with the specified rel value.
func (*JRD) GetProperty ¶
GetProperty Returns the property value as a string. Per spec a property value can be null, empty string is returned in this case.
type Link ¶
type Link struct { Rel string `json:"rel,omitempty"` Type string `json:"type,omitempty"` Href string `json:"href,omitempty"` Titles map[string]string `json:"titles,omitempty"` Properties map[string]interface{} `json:"properties,omitempty"` Template string }
Link is a link to a related resource.
func (*Link) GetProperty ¶
GetProperty Returns the property value as a string. Per spec a property value can be null, empty string is returned in this case.
Click to show internal directories.
Click to hide internal directories.