Documentation
¶
Overview ¶
Package described declares the types of the registry tests of api.Descriptions. Their comments are what the tests read with descriptions.Read and expect in the documents, so change both together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ArchiveRequest ¶
type ArchiveRequest struct {
requests.NoRules
Scope
// Reason says why the runs are archived.
Reason string `json:"reason"`
}
ArchiveRequest archives the runs of a project. Only a hidden operation takes it.
type CreateRequest ¶
type CreateRequest struct {
requests.NoRules
Scope
// Limit caps the steps of the run.
Limit int `json:"-" query:"limit" minimum:"1"`
// Trace follows the request across services.
Trace string `json:"-" header:"x-trace"`
// Name is what the new run is called.
Name string `json:"name" required:"true" minLength:"1"`
// Owner starts the new run.
Owner *Owner `json:"owner,omitempty"`
}
CreateRequest starts a run.
type ListRequest ¶
ListRequest lists the runs of a project.
type Owner ¶
type Owner struct {
Email string `json:"email"` // Email reaches the owner.
}
Owner is the person who started a run.
type Page ¶
type Page[T any] struct { // Items are the entries of the page. Items []T `json:"items"` }
Page is one page of a list.
type Record ¶
type Record struct {
// ID identifies the record.
ID string `json:"id"`
}
Record holds what every stored record has.
type Run ¶
type Run struct {
Record
*Audit
// Name is what the user calls the run.
Name string `json:"name"`
// Label has a comment its doc tag replaces.
Label string `json:"label" doc:"Label from the tag."`
// Note has a comment its empty doc tag hides.
Note string `json:"note" doc:""`
// Owner started the run.
Owner Owner `json:"owner"`
// Status tells where the run is.
Status Status `json:"status"`
Plain string `json:"plain"`
}
Run is one execution of a job.
type Scope ¶
type Scope struct {
// Project is the project the run belongs to.
Project string `json:"-" path:"project"`
}
Scope names the project of a request.
type Stamp ¶
type Stamp struct {
// At is when it happened.
At string `json:"at,omitempty"`
}
Stamp says when something happened.
type UploadRequest ¶
type UploadRequest struct {
requests.NoRules
Scope
// Log is the file to attach.
Log *multipart.FileHeader `json:"-" form:"log" required:"true"`
// Extras are more files to attach.
Extras []*multipart.FileHeader `json:"-" form:"extras"`
// Comment says what the log shows.
Comment string `json:"comment"`
}
UploadRequest attaches a log to a run.
type UploadResponse ¶
type UploadResponse struct {
// Size is the size of the log in bytes.
Size int64 `json:"size"`
}
UploadResponse tells what was attached.
func Archive ¶
func Archive(ctx context.Context, req *ArchiveRequest) (UploadResponse, error)
Archive handles ArchiveRequest.
func Upload ¶
func Upload(ctx context.Context, req *UploadRequest) (UploadResponse, error)
Upload handles UploadRequest.