Documentation
¶
Overview ¶
Package tests holds the HTTP handlers of the test definitions of an app: they parse the request, call the test service and write the answer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves the test definition routes of an app.
func (*Handler) Register ¶
func (h *Handler) Register(appAPI *gin.RouterGroup)
Register adds the routes to the group of an app, which must run the ResolveProject and ResolveApp middlewares.
type Service ¶
type Service interface {
List(ctx context.Context, sc service.Scope) ([]service.ListEntry, error)
Get(ctx context.Context, ref service.TestRef) (*models.Test, error)
Create(ctx context.Context, sc service.Scope, in service.NewTest) (*models.Test, error)
Update(ctx context.Context, ref service.TestRef, in service.Edit) (*models.Test, error)
}
Service is what the handlers need from the test service.