Documentation ¶
Index ¶
- Variables
- func MakeFrontendHTTPHandler(s FrontendService, logger log.Logger) http.Handler
- func MakeGetDeployment(s FrontendService) endpoint.Endpoint
- func MakeGetDistribution(s FrontendService) endpoint.Endpoint
- func MakeGetUpload(s FrontendService) endpoint.Endpoint
- func MakePostDeployment(s FrontendService) endpoint.Endpoint
- func MakePostDistribution(s FrontendService) endpoint.Endpoint
- func MakePostUpload(s FrontendService) endpoint.Endpoint
- type Endpoints
- type FrontendService
- type Middleware
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFrontendUpload = errors.New("Frontend: image upload failed") ErrFrontendDistribution = errors.New("Frontend: distribution set failed") ErrFrontendDeployment = errors.New("Frontend: deployment set failed") ErrFrontendBadRequest = errors.New("Frontend: bad request") )
View Source
var ( // ErrBadRouting is returned when an expected path variable is missing. // It always indicates programmer error. ErrBadRouting = errors.New("inconsistent mapping between route and handler (programmer error)") )
Functions ¶
func MakeFrontendHTTPHandler ¶
func MakeFrontendHTTPHandler(s FrontendService, logger log.Logger) http.Handler
func MakeGetDeployment ¶
func MakeGetDeployment(s FrontendService) endpoint.Endpoint
func MakeGetDistribution ¶
func MakeGetDistribution(s FrontendService) endpoint.Endpoint
func MakeGetUpload ¶
func MakeGetUpload(s FrontendService) endpoint.Endpoint
func MakePostDeployment ¶
func MakePostDeployment(s FrontendService) endpoint.Endpoint
func MakePostDistribution ¶
func MakePostDistribution(s FrontendService) endpoint.Endpoint
func MakePostUpload ¶
func MakePostUpload(s FrontendService) endpoint.Endpoint
Types ¶
type Endpoints ¶
type Endpoints struct { PostUpload endpoint.Endpoint GetUpload endpoint.Endpoint PostDistribution endpoint.Endpoint GetDistribution endpoint.Endpoint PostDeployment endpoint.Endpoint GetDeployment endpoint.Endpoint }
func MakeFrontendServerEndpoints ¶
func MakeFrontendServerEndpoints(s FrontendService) Endpoints
type FrontendService ¶
type FrontendService interface { PostUpload(ctx context.Context, n string, v string, f string) error GetUpload(ctx context.Context, n string) (deployment.Upload, error) // DeleteUpload(ctx context.Context, n string) error PostDistribution(ctx context.Context, n string, v string, u string) error GetDistribution(ctx context.Context, n string) (deployment.Distribution, error) // DeleteDistribution(ctx context.Context, n string) error PostDeployment(ctx context.Context, t string, d string) error GetDeployment(ctx context.Context, t string) (deployment.Deployment, error) }
func NewHawkbitFrontendService ¶
func NewHawkbitFrontendService() FrontendService
type Middleware ¶
type Middleware func(FrontendService) FrontendService
Middleware describes a service (as opposed to endpoint) middleware.
func LoggingFrontendMiddleware ¶
func LoggingFrontendMiddleware(logger log.Logger) Middleware
Click to show internal directories.
Click to hide internal directories.