homepage

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 12 Imported by: 0

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(rend RenderClient, zcli ZebedeeClient, bcli BabbageClient, icli ImageClient) 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)
}

BabbageClient is an interface with methods required for a babbage client

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)
}

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)
}

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)
}

ZebedeeClient is an interface with methods required for a zebedee client

Jump to

Keyboard shortcuts

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