Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CodelistURL string
CodelistURL set by main() to make accessible to all models users
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct {
ID string `json:"-"`
Label string `json:"label"`
NoOfChildren int64 `json:"no_of_children,omitempty"`
Order *int64 `json:"order,omitempty"`
Links map[string]Link `json:"links,omitempty"`
HasData bool `json:"has_data"`
}
Element is a item in a list within a Response
func (*Element) AddRewrittenLinks ¶ added in v1.13.0
func (e *Element) AddRewrittenLinks(host, codeListURL, instanceID, dimensionName, codelistID string, withID bool)
AddRewrittenLinks adds self and codelist links for Elements when enableURLRewriting is true
type Link ¶
Link is a combination of ID and HRef for the object in question
func GetLink ¶
GetLink returns a Link{id,href} object for the given url/id (or just url if id is empty)
func GetLinkWithID ¶
GetLinkWithID returns a Link{id,href} object for the given url/id (or just url if id is empty)
type Response ¶
type Response struct {
ID string `json:"-"`
Label string `json:"label"`
Children []*Element `json:"children,omitempty"`
NoOfChildren int64 `json:"no_of_children,omitempty"`
Order *int64 `json:"order,omitempty"`
Links map[string]Link `json:"links,omitempty"`
HasData bool `json:"has_data"`
Breadcrumbs []*Element `json:"breadcrumbs,omitempty"`
}
Response models a node in the hierarchy
func (*Response) AddLinksWithRewriting ¶ added in v1.13.0
func (r *Response) AddLinksWithRewriting(host, codeListURL, instanceID, dimensionName, codelistID string, isRoot bool)
AddLinksWithRewriting adds links (self, codelist and populates children links) when enableURLRewriting is true
Click to show internal directories.
Click to hide internal directories.