brands

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2017 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandHandler

type BrandHandler struct {
	// contains filtered or unexported fields
}

BrandHandler - struct for the handlers

func NewBrandHandler

func NewBrandHandler(service BrandService) BrandHandler

NewBrandHandler - Create a new BrandHandler

func (*BrandHandler) G2GCheck

func (h *BrandHandler) G2GCheck() gtg.Status

G2GCheck - Return FT standard good-to-go check

func (*BrandHandler) GetBrandByUUID

func (h *BrandHandler) GetBrandByUUID(writer http.ResponseWriter, req *http.Request)

GetBrandByUUID - Return the JSON for a single brand

func (*BrandHandler) GetBrandUUIDs

func (h *BrandHandler) GetBrandUUIDs(writer http.ResponseWriter, req *http.Request)

GetBrandUUIDs - Get a list of JSON objects (not a JSON list) giving each id.

func (*BrandHandler) GetBrands

func (h *BrandHandler) GetBrands(writer http.ResponseWriter, req *http.Request)

GetBrands - Return a JSON encoded list of all brands

func (*BrandHandler) GetCount

func (h *BrandHandler) GetCount(writer http.ResponseWriter, req *http.Request)

GetCount - Get a count of the number of available brands

func (*BrandHandler) HealthCheck

func (h *BrandHandler) HealthCheck() v1a.Check

HealthCheck - Return FT standard healthcheck

func (*BrandHandler) OnlyGetAllowed added in v1.1.0

func (h *BrandHandler) OnlyGetAllowed(writer http.ResponseWriter, req *http.Request)

OnlyGetAllowed - Used to tell the user the METHOD type is not GET.

func (*BrandHandler) OnlyPostAllowed added in v1.1.0

func (h *BrandHandler) OnlyPostAllowed(writer http.ResponseWriter, req *http.Request)

OnlyPostAllowed - Used to tell the user the METHOD type is not POST.

func (*BrandHandler) Reload

func (h *BrandHandler) Reload(writer http.ResponseWriter, req *http.Request)

Reload - Reload the cache with fresh information

type BrandService

type BrandService interface {
	Shutdown() error
	// contains filtered or unexported methods
}

BrandService - interface for retrieving v1 brands

func NewBrandService

func NewBrandService(repo tmereader.Repository,
	baseURL string,
	taxonomyName string,
	maxTmeRecords int,
	cacheFileName string,
	berthaURL string,
	httpClient httpClient) BrandService

NewBrandService - create a new BrandService

type BrandTransformer

type BrandTransformer struct {
}

BrandTransformer struct

func (*BrandTransformer) UnMarshallTaxonomy

func (*BrandTransformer) UnMarshallTaxonomy(contents []byte) ([]interface{}, error)

UnMarshallTaxonomy - unmarshal the XML of a taxonomy

func (*BrandTransformer) UnMarshallTerm

func (*BrandTransformer) UnMarshallTerm(content []byte) (interface{}, error)

UnMarshallTerm - unmarshal the XML of a TME term

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL