Documentation ¶
Index ¶
- Variables
- type Brand
- type BrandsHandler
- func (h *BrandsHandler) Checker() (string, error)
- func (h *BrandsHandler) GTG() gtg.Status
- func (h *BrandsHandler) GetBrand(w http.ResponseWriter, r *http.Request)
- func (h *BrandsHandler) HealthCheck() fthealth.Check
- func (h *BrandsHandler) MethodNotAllowedHandler(w http.ResponseWriter, r *http.Request)
- func (h *BrandsHandler) RegisterHandlers(router *mux.Router)
- type Concept
- type ConceptApiResponse
- type NeoBrand
- type NeoThing
- type RelatedConcept
- type Thing
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheControlHeader string
CacheControlHeader is the value to set on http header
Functions ¶
This section is empty.
Types ¶
type Brand ¶
type Brand struct { Thing DescriptionXML string `json:"descriptionXML,omitempty"` Strapline string `json:"strapline,omitempty"` ImageURL string `json:"_imageUrl,omitempty"` // NB Temp hack Parent *Thing `json:"parentBrand,omitempty"` Children []Thing `json:"childBrands,omitempty"` }
Brand represent a brand owned by an organisation, current only used is relation to FT brands
type BrandsHandler ¶
type BrandsHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(client httpClient, conceptsURL string) BrandsHandler
func (*BrandsHandler) Checker ¶
func (h *BrandsHandler) Checker() (string, error)
func (*BrandsHandler) GTG ¶
func (h *BrandsHandler) GTG() gtg.Status
GoodToGo returns a 503 if the healthcheck fails - suitable for use from varnish to check availability of a node
func (*BrandsHandler) GetBrand ¶
func (h *BrandsHandler) GetBrand(w http.ResponseWriter, r *http.Request)
GetBrand is the public API
func (*BrandsHandler) HealthCheck ¶
func (h *BrandsHandler) HealthCheck() fthealth.Check
func (*BrandsHandler) MethodNotAllowedHandler ¶
func (h *BrandsHandler) MethodNotAllowedHandler(w http.ResponseWriter, r *http.Request)
MethodNotAllowedHandler does stuff
func (*BrandsHandler) RegisterHandlers ¶
func (h *BrandsHandler) RegisterHandlers(router *mux.Router)
type ConceptApiResponse ¶
type ConceptApiResponse struct { Concept ImageURL string `json:"imageUrl,omitempty"` DescriptionXML string `json:"descriptionXML,omitempty"` Strapline string `json:"strapline,omitempty"` Broader []RelatedConcept `json:"broaderConcepts,omitempty"` Narrower []RelatedConcept `json:"narrowerConcepts,omitempty"` }
type NeoBrand ¶
type NeoBrand struct { NeoThing DescriptionXML string `json:"descriptionXML,omitempty"` Strapline string `json:"strapline,omitempty"` ImageURL string `json:"imageUrl,omitempty"` // NB Temp hack Parent NeoThing `json:"parent,omitempty"` Children []NeoThing `json:"children,omitempty"` Authority string `json:"authority,omitempty"` }
NeoBrand is the same as Brand, but it receives an extra field and multiple parents.
type RelatedConcept ¶
type RelatedConcept struct {
Concept Concept `json:concept,omitempty`
}
type Thing ¶
type Thing struct { ID string `json:"id,omitempty"` APIURL string `json:"apiUrl,omitempty"` Types []string `json:"types,omitempty"` DirectType string `json:"directType,omitempty"` PrefLabel string `json:"prefLabel,omitempty"` IsDeprecated bool `json:"isDeprecated,omitempty"` }
Thing is the base entity, all Public APIs should have these properties
Click to show internal directories.
Click to hide internal directories.