Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrInvalidHierarchyAPIResponse ¶
NewErrInvalidHierarchyAPIResponse construct a new ErrInvalidHierarchyAPIResponse from the values provided.
Types ¶
type Breadcrumb ¶
type Breadcrumb struct { Label string `json:"label"` NumberofChildren int `json:"no_of_children,omitempty"` HasData bool `json:"has_data"` Links Links `json:"links"` }
Breadcrumb represents a breadcrumb item in the hierarchy model
type Child ¶
type Child struct { Label string `json:"label"` NumberofChildren int `json:"no_of_children,omitempty"` Order *int `json:"order,omitempty"` HasData bool `json:"has_data"` Links Links `json:"links"` }
Child represents a child item in the hierarchy model
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a hierarchy api client which can be used to make requests to the server
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check client.
func (*Client) Checker ¶
Checker calls hierarchy api health endpoint and returns a check object to the caller.
type ErrInvalidHierarchyAPIResponse ¶
type ErrInvalidHierarchyAPIResponse struct {
// contains filtered or unexported fields
}
ErrInvalidHierarchyAPIResponse is returned when the hierarchy api does not respond with a valid status
func (ErrInvalidHierarchyAPIResponse) Code ¶
func (e ErrInvalidHierarchyAPIResponse) Code() int
Code returns the status code received from hierarchy api if an error is returned
func (ErrInvalidHierarchyAPIResponse) Error ¶
func (e ErrInvalidHierarchyAPIResponse) Error() string
Error should be called by the user to print out the stringified version of the error
type Model ¶
type Model struct { Label string `json:"label"` Links Links `json:"links"` HasData bool `json:"has_data"` NumberofChildren int `json:"number_of_children,omitempty"` Order *int `json:"order,omitempty"` Children []Child `json:"children,omitempty"` Breadcrumbs []Breadcrumb `json:"breadcrumbs,omitempty"` }
Model represents the model returned by the heirarchy api