Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HomepagePath is the string value which contains the URI to get the homepage's data.json HomepagePath = "/" // ImageVariant is the image variant to use for the homepage ImageVariant = "original" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(homepageClient HomepageClienter) http.HandlerFunc
Handler handles requests to homepage endpoint
Types ¶
type BabbageClient ¶ added in v1.3.0
type BabbageClient interface { GetReleaseCalendar(ctx context.Context, userAccessToken, fromDay, fromMonth, fromYear string) (m release_calendar.ReleaseCalendar, err error) Checker(ctx context.Context, check *health.CheckState) error }
BabbageClient is an interface with methods required for a babbage client
type Clients ¶ added in v1.11.0
type Clients struct { Renderer RenderClient Zebedee ZebedeeClient Babbage BabbageClient ImageAPI ImageClient }
Clients contains all the required Clients for frontend homepage controller
type HomepageClienter ¶ added in v1.11.0
type HomepageClienter interface { GetHomePage(ctx context.Context, userAccessToken, collectionID, lang string) (string, error) Close() StartBackgroundUpdate(ctx context.Context, errorChannel chan error) }
func NewHomePagePublishingClient ¶ added in v1.11.0
func NewHomePagePublishingClient(clients *Clients) HomepageClienter
func NewHomePageWebClient ¶ added in v1.11.0
func NewHomePageWebClient(clients *Clients, updateInterval time.Duration, languages []string) HomepageClienter
type HomepagePublishingClient ¶ added in v1.11.0
type HomepagePublishingClient struct {
HomepageUpdater
}
func (*HomepagePublishingClient) Close ¶ added in v1.11.0
func (hpc *HomepagePublishingClient) Close()
func (*HomepagePublishingClient) GetHomePage ¶ added in v1.11.0
func (*HomepagePublishingClient) StartBackgroundUpdate ¶ added in v1.11.0
func (hpc *HomepagePublishingClient) StartBackgroundUpdate(ctx context.Context, errorChannel chan error)
type HomepageUpdater ¶ added in v1.11.0
type HomepageUpdater struct {
// contains filtered or unexported fields
}
func (*HomepageUpdater) GetHomePageUpdateFor ¶ added in v1.11.0
type HomepageWebClient ¶ added in v1.11.0
type HomepageWebClient struct { HomepageUpdater // contains filtered or unexported fields }
func (*HomepageWebClient) Close ¶ added in v1.11.0
func (hwc *HomepageWebClient) Close()
func (*HomepageWebClient) GetHomePage ¶ added in v1.11.0
func (*HomepageWebClient) StartBackgroundUpdate ¶ added in v1.11.0
func (hwc *HomepageWebClient) StartBackgroundUpdate(ctx context.Context, errorChannel chan error)
type ImageClient ¶ added in v1.6.0
type ImageClient interface { GetDownloadVariant(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, imageID, variant string) (m image.ImageDownload, err error) Checker(ctx context.Context, check *health.CheckState) error }
ImageClient is an interface with methods required for the Image API service client
type MainFigure ¶ added in v1.1.0
type MainFigure struct {
// contains filtered or unexported fields
}
type RenderClient ¶ added in v1.1.0
type RenderClient interface { Do(string, []byte) ([]byte, error) Checker(ctx context.Context, check *health.CheckState) error }
RenderClient is an interface with methods required for rendering a template
type ZebedeeClient ¶ added in v1.1.0
type ZebedeeClient interface { GetTimeseriesMainFigure(ctx context.Context, userAuthToken, collectionID, lang, uri string) (m zebedee.TimeseriesMainFigure, err error) GetHomepageContent(ctx context.Context, userAccessToken, collectionID, lang, path string) (m zebedee.HomepageContent, err error) Checker(ctx context.Context, check *health.CheckState) error }
ZebedeeClient is an interface with methods required for a zebedee client
Click to show internal directories.
Click to hide internal directories.