Documentation ¶
Overview ¶
Package api defines the interface to a build service
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidRequest signals the request could not be processed // due to erroneous parameters ErrInvalidRequest = errors.New("invalid request") // ErrRequestFailed signals the request failed, probably due to a network error ErrRequestFailed = errors.New("request failed") // ErrBuildFailed signals the build process failed ErrBuildFailed = errors.New("build failed") )
Functions ¶
This section is empty.
Types ¶
type BuildRequest ¶
type BuildRequest struct { K6Constrains string `json:"k6,omitempty"` Dependencies []k6build.Dependency `json:"dependencies,omitempty"` Platform string `json:"platform,omitempty"` }
BuildRequest defines a request to the build service
func (BuildRequest) String ¶
func (r BuildRequest) String() string
String returns a text serialization of the BuildRequest
type BuildResponse ¶
type BuildResponse struct { // If not empty an error occurred processing the request // This Error can be compared to the errors defined in this package using errors.Is // to know the type of error, and use Unwrap to obtain its cause if available. Error *k6build.WrappedError `json:"error,omitempty"` // Artifact metadata. If an error occurred, content is undefined Artifact k6build.Artifact `json:"artifact,omitempty"` }
BuildResponse defines the response for a BuildRequest
Click to show internal directories.
Click to hide internal directories.