Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractRunsInto ¶
func ExtractRunsInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of runs. It accepts a ListOpts struct.
Types ¶
type CreateOpts ¶
type CreateOpts struct { AutomationID string `json:"automation_id" required:"true"` Selector string `json:"selector" required:"true"` }
CreateOpts represents the attributes used when creating a new run.
func (CreateOpts) ToRunCreateMap ¶
func (opts CreateOpts) ToRunCreateMap() (map[string]interface{}, error)
ToRunCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Run.
func Create ¶
func Create(ctx context.Context, c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create accepts a CreateOpts struct and creates a new run using the values provided.
func (CreateResult) Extract ¶
Extract is a function that accepts a result and extracts a run resource.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Run.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type ListOpts ¶
ListOpts allows the listing of paginated collections through the API. Page and PerPage are used for pagination.
func (ListOpts) ToRunListQuery ¶
ToRunListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Owner ¶
type Owner struct { ID string `json:"id"` Name string `json:"name"` DomainID string `json:"domain_id"` DomainName string `json:"domain_name"` }
Owner represents a Lyra Run Owner.
type Run ¶
type Run struct { ID string `json:"id"` AutomationID string `json:"automation_id"` AutomationName string `json:"automation_name"` Selector string `json:"selector"` RepositoryRevision string `json:"repository_revision"` AutomationAttributes interface{} `json:"automation_attributes"` // State could be: preparing, executing, failed, completed State string `json:"state"` Log string `json:"log"` Jobs []string `json:"jobs"` Owner Owner `json:"owner"` ProjectID string `json:"project_id"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` }
Run represents a Lyra Run.
func ExtractRuns ¶
func ExtractRuns(r pagination.Page) ([]Run, error)
ExtractRuns accepts a Page struct, specifically a RunPage struct, and extracts the elements into a slice of Run structs. In other words, a generic collection is mapped into a relevant slice.
func (*Run) UnmarshalJSON ¶
type RunPage ¶
type RunPage struct {
pagination.MarkerPageBase
}
RunPage is the page returned by a pager when traversing over a collection of runs.
func (RunPage) LastMarker ¶
LastMarker returns the next page in a ListResult.
func (RunPage) NextPageURL ¶
NextPageURL is invoked when a paginated collection of runs has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.