Documentation ¶
Index ¶
- func NewCreateApplicationCommand(cfg Config, p Printer) *cobra.Command
- func NewCreateScenarioCommand(cfg Config, p Printer) *cobra.Command
- func NewCreateTrialCommand(cfg Config, p Printer) *cobra.Command
- func NewDeleteApplicationsCommand(cfg Config, p Printer) *cobra.Command
- func NewDeleteClustersCommand(cfg Config, p Printer) *cobra.Command
- func NewDeleteExperimentsCommand(cfg Config, p Printer) *cobra.Command
- func NewDeleteScenariosCommand(cfg Config, p Printer) *cobra.Command
- func NewDeleteTrialsCommand(cfg Config, p Printer) *cobra.Command
- func NewDisableApplicationRecommendationsCommand(cfg Config, p Printer) *cobra.Command
- func NewEditApplicationCommand(cfg Config, p Printer) *cobra.Command
- func NewEditClusterCommand(cfg Config, p Printer) *cobra.Command
- func NewEditExperimentCommand(cfg Config, p Printer) *cobra.Command
- func NewEditScenarioCommand(cfg Config, p Printer) *cobra.Command
- func NewEditTrialCommand(cfg Config, p Printer) *cobra.Command
- func NewEnableApplicationRecommendationsCommand(cfg Config, p Printer) *cobra.Command
- func NewGetActivityCommand(cfg Config, p Printer) *cobra.Command
- func NewGetApplicationsCommand(cfg Config, p Printer) *cobra.Command
- func NewGetClustersCommand(cfg Config, p Printer) *cobra.Command
- func NewGetExperimentsCommand(cfg Config, p Printer) *cobra.Command
- func NewGetRecommendationsCommand(cfg Config, p Printer) *cobra.Command
- func NewGetScenariosCommand(cfg Config, p Printer) *cobra.Command
- func NewGetTrialsCommand(cfg Config, p Printer) *cobra.Command
- func NewWatchActivityCommand(cfg Config) *cobra.Command
- func NewWhoAmICommand(cfg Config) *cobra.Command
- func SortBy(o Output, name string) error
- func SortByKey(key string) string
- type ActivityOutput
- type ActivityRow
- type ApplicationOutput
- type ApplicationRow
- func (r *ApplicationRow) Lookup(key string) (interface{}, bool)
- func (r *ApplicationRow) SetBackfillProgress(progress *applications.BackfillProgress)
- func (r *ApplicationRow) SetRecommendationsConfiguration(config []applications.Configuration)
- func (r *ApplicationRow) SetRecommendationsDeployConfig(deploy *applications.DeployConfiguration)
- type ClusterOutput
- type ClusterRow
- type Config
- type ExperimentOutput
- type ExperimentRow
- type Output
- type Printer
- type RecommendationOutput
- type RecommendationRow
- type Row
- type ScenarioOutput
- type ScenarioRow
- type TrialOutput
- type TrialRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateApplicationCommand ¶
NewCreateApplicationCommand returns a command for creating applications.
func NewCreateScenarioCommand ¶
NewCreateScenarioCommand returns a command for creating scenarios.
func NewCreateTrialCommand ¶
NewCreateTrialCommand returns a command for creating a trial.
func NewDeleteApplicationsCommand ¶
NewDeleteApplicationsCommand returns a command for deleting applications.
func NewDeleteClustersCommand ¶
NewDeleteClustersCommand returns a command for deleting clusters.
func NewDeleteExperimentsCommand ¶
NewDeleteExperimentsCommand returns a command for deleting experiments.
func NewDeleteScenariosCommand ¶
NewDeleteScenariosCommand returns a command for deleting scenarios.
func NewDeleteTrialsCommand ¶
NewDeleteTrialsCommand returns a command for deleting ("abandoning") trials.
func NewDisableApplicationRecommendationsCommand ¶ added in v0.1.2
NewDisableApplicationRecommendationsCommand returns a new command for disabling recommendations.
func NewEditApplicationCommand ¶
NewEditApplicationCommand returns a command for editing an application.
func NewEditClusterCommand ¶
NewEditClusterCommand returns a command for editing a cluster.
func NewEditExperimentCommand ¶
NewEditExperimentCommand returns a command for editing an experiment.
func NewEditScenarioCommand ¶
NewEditScenarioCommand returns a command for editing a scenario.
func NewEditTrialCommand ¶
NewEditTrialCommand returns a command for editing a trial.
func NewEnableApplicationRecommendationsCommand ¶ added in v0.1.2
NewEnableApplicationRecommendationsCommand returns a new command for enabling recommendations.
func NewGetActivityCommand ¶ added in v0.0.27
NewGetActivityCommand returns a command for getting activity feed items.
func NewGetApplicationsCommand ¶
NewGetApplicationsCommand returns a command for getting applications.
func NewGetClustersCommand ¶
NewGetClustersCommand returns a command for getting clusters.
func NewGetExperimentsCommand ¶
NewGetExperimentsCommand returns a command for getting experiments.
func NewGetRecommendationsCommand ¶
NewGetRecommendationsCommand returns a command for getting recommendations.
func NewGetScenariosCommand ¶
NewGetScenariosCommand returns a command for getting scenarios.
func NewGetTrialsCommand ¶
NewGetTrialsCommand returns a command for getting trials.
func NewWatchActivityCommand ¶
NewWatchActivityCommand returns a command for watching the activity feed.
func NewWhoAmICommand ¶ added in v0.1.0
NewWhoAmICommand returns a command for determining the current identity associated with the configuration.
Types ¶
type ActivityOutput ¶ added in v0.0.27
type ActivityOutput struct { Items []ActivityRow `json:"-"` applications.ActivityFeed }
func (*ActivityOutput) Add ¶ added in v0.0.27
func (o *ActivityOutput) Add(item *applications.ActivityItem)
type ActivityRow ¶ added in v0.0.27
type ActivityRow struct { ID string `table:"id" csv:"id" json:"-"` Title string `table:"title" csv:"title" json:"-"` Tags string `table:"tags" csv:"tags" json:"-"` ExternalURL string `table:"reference" csv:"external_url" json:"-"` URL string `table:"url,wide" csv:"url" json:"-"` FailureReason string `table:"reason,wide" csv:"failure_reason" json:"-"` PublishedHuman string `table:"published" csv:"-" json:"-"` PublishedMachine string `table:"-" csv:"published" json:"-"` applications.ActivityItem `table:"-" csv:"-"` }
func NewActivityRow ¶ added in v0.1.4
func NewActivityRow(item *applications.ActivityItem) *ActivityRow
type ApplicationOutput ¶
type ApplicationOutput struct {
Items []ApplicationRow `json:"items"`
}
ApplicationOutput wraps an application list for output.
func (*ApplicationOutput) Add ¶
func (o *ApplicationOutput) Add(item *applications.ApplicationItem) error
Add an application item to the output.
func (*ApplicationOutput) Item ¶ added in v0.1.5
func (o *ApplicationOutput) Item(i int) Row
Item returns the specified row value.
func (*ApplicationOutput) Len ¶ added in v0.1.5
func (o *ApplicationOutput) Len() int
Len returns the number of items being output.
func (*ApplicationOutput) SortBy ¶ added in v0.1.5
func (o *ApplicationOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*ApplicationOutput) Swap ¶ added in v0.1.5
func (o *ApplicationOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type ApplicationRow ¶
type ApplicationRow struct { Name string `table:"name" csv:"name" json:"-"` Title string `table:"title" csv:"title" json:"title,omitempty"` ScenarioCount int `table:"scenarios" csv:"scenario_count" json:"-"` RecommendationMode string `table:"recommendations" csv:"recommendations" json:"-"` DeployInterval string `table:"deploy_interval,wide" csv:"deploy_interval" json:"-"` LastDeployedMachine string `table:"-" csv:"last_deployed" json:"-"` LastDeployedHuman string `table:"last_deployed,wide" csv:"-" json:"-"` Age string `table:"age,wide" csv:"-" json:"-"` applications.ApplicationItem `table:"-" csv:"-"` RecommendationsDeployConfig *applications.DeployConfiguration `table:"-" csv:"-" json:"recommendationsDeployConfig,omitempty"` RecommendationsConfiguration []applications.Configuration `table:"-" csv:"-" json:"recommendationsConfiguration,omitempty"` RecommendationsBackfillProgress *applications.BackfillProgress `table:"-" csv:"-" json:"recommendationsBackfillProgress,omitempty"` }
ApplicationRow is a table row representation of an application.
func NewApplicationRow ¶ added in v0.1.4
func NewApplicationRow(item *applications.ApplicationItem) *ApplicationRow
func (*ApplicationRow) Lookup ¶ added in v0.1.5
func (r *ApplicationRow) Lookup(key string) (interface{}, bool)
func (*ApplicationRow) SetBackfillProgress ¶ added in v0.1.5
func (r *ApplicationRow) SetBackfillProgress(progress *applications.BackfillProgress)
func (*ApplicationRow) SetRecommendationsConfiguration ¶ added in v0.1.2
func (r *ApplicationRow) SetRecommendationsConfiguration(config []applications.Configuration)
func (*ApplicationRow) SetRecommendationsDeployConfig ¶ added in v0.1.2
func (r *ApplicationRow) SetRecommendationsDeployConfig(deploy *applications.DeployConfiguration)
type ClusterOutput ¶
type ClusterOutput struct {
Items []ClusterRow `json:"items"`
}
ClusterOutput wraps a cluster list for output.
func (*ClusterOutput) Add ¶
func (o *ClusterOutput) Add(item *applications.ClusterItem) error
Add a cluster item to the output.
func (*ClusterOutput) Item ¶ added in v0.1.5
func (o *ClusterOutput) Item(i int) Row
Item returns the specified row value.
func (*ClusterOutput) Len ¶ added in v0.1.5
func (o *ClusterOutput) Len() int
Len returns the number of items being output.
func (*ClusterOutput) SortBy ¶ added in v0.1.5
func (o *ClusterOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*ClusterOutput) Swap ¶ added in v0.1.5
func (o *ClusterOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type ClusterRow ¶
type ClusterRow struct { Name string `table:"name" csv:"name" json:"-"` DisplayName string `table:"title" csv:"title" json:"title,omitempty"` OptimizeProVersion string `table:"optimize_pro" csv:"optimize_pro_version" json:"-"` OptimizeLiveVersion string `table:"optimize_live" csv:"optimize_live_version" json:"-"` PerformanceTestVersion string `table:"performance_test,wide" csv:"performance_test_version" json:"-"` KubernetesVersion string `table:"kubernetes,wide" csv:"kubernetes_version" json:"-"` LastSeenMachine string `table:"-" csv:"last_seen" json:"-"` LastSeenHuman string `table:"last_seen" csv:"-" json:"-"` Age string `table:"age,wide" csv:"-" json:"-"` applications.ClusterItem `table:"-" csv:"-"` }
ClusterRow is a table row representation of a cluster.
func NewClusterRow ¶ added in v0.1.4
func NewClusterRow(item *applications.ClusterItem) *ClusterRow
func (*ClusterRow) Lookup ¶ added in v0.1.5
func (r *ClusterRow) Lookup(key string) (interface{}, bool)
type Config ¶
type Config interface { // Address returns the base address for the API endpoints. Address() string }
Config represents the configuration necessary to run a command.
type ExperimentOutput ¶
type ExperimentOutput struct {
Items []ExperimentRow `json:"items"`
}
ExperimentOutput wraps an experiment list for output.
func (*ExperimentOutput) Add ¶
func (o *ExperimentOutput) Add(item *experiments.ExperimentItem) error
Add an experiment item to the output.
func (*ExperimentOutput) Item ¶ added in v0.1.5
func (o *ExperimentOutput) Item(i int) Row
Item returns the specified row value.
func (*ExperimentOutput) Len ¶ added in v0.1.5
func (o *ExperimentOutput) Len() int
Len returns the number of items being output.
func (*ExperimentOutput) SortBy ¶ added in v0.1.5
func (o *ExperimentOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*ExperimentOutput) Swap ¶ added in v0.1.5
func (o *ExperimentOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type ExperimentRow ¶
type ExperimentRow struct { Name string `table:"name" csv:"name" json:"-"` DisplayName string `table:"Name,custom" json:"-"` Observations int64 `table:"observations,wide" csv:"observations" json:"-"` Labels map[string]string `table:"labels,labels" csv:"label_,labels,flatten" json:"-"` experiments.ExperimentItem `table:"-" csv:"-"` }
ExperimentRow is a table row representation of an experiment.
func NewExperimentRow ¶ added in v0.1.4
func NewExperimentRow(item *experiments.ExperimentItem) *ExperimentRow
func (*ExperimentRow) Lookup ¶ added in v0.1.5
func (r *ExperimentRow) Lookup(key string) (interface{}, bool)
type Output ¶ added in v0.1.5
type Output interface { // Len returns the number of items in the output. Len() int // Swap exchanges the items at the specified indices. Swap(int, int) // Item returns the complete row. Item(int) Row }
Output represents an output list.
type Printer ¶
type Printer interface { // Fprint renders an object (which may represent a list) to the supplied writer. Fprint(out io.Writer, obj interface{}) error }
Printer is the interface required to render results.
type RecommendationOutput ¶
type RecommendationOutput struct {
Items []RecommendationRow `json:"items"`
}
RecommendationOutput wraps a recommendation list for output.
func (*RecommendationOutput) Add ¶
func (o *RecommendationOutput) Add(item *applications.RecommendationItem) error
Add a recommendation item to the output.
func (*RecommendationOutput) Item ¶ added in v0.1.5
func (o *RecommendationOutput) Item(i int) Row
Item returns the specified row value.
func (*RecommendationOutput) Len ¶ added in v0.1.5
func (o *RecommendationOutput) Len() int
Len returns the number of items being output.
func (*RecommendationOutput) SortBy ¶ added in v0.1.5
func (o *RecommendationOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*RecommendationOutput) Swap ¶ added in v0.1.5
func (o *RecommendationOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type RecommendationRow ¶
type RecommendationRow struct { Name string `table:"name" csv:"name" json:"-"` DeployedAtMachine string `table:"-" csv:"last_deployed" json:"-"` DeployedAtHuman string `table:"last_deployed" csv:"-" json:"-"` applications.RecommendationItem `table:"-" csv:"-"` }
RecommendationRow is a table row representation of a recommendation.
func NewRecommendationRow ¶ added in v0.1.4
func NewRecommendationRow(item *applications.RecommendationItem) *RecommendationRow
func (*RecommendationRow) Lookup ¶ added in v0.1.5
func (r *RecommendationRow) Lookup(key string) (interface{}, bool)
type Row ¶ added in v0.1.5
type Row interface { // Lookup returns a named value on the row. Lookup(string) (interface{}, bool) }
Row represents a single row in the output.
type ScenarioOutput ¶
type ScenarioOutput struct {
Items []ScenarioRow `json:"items"`
}
ScenarioOutput wraps a scenario list for output.
func (*ScenarioOutput) Add ¶
func (o *ScenarioOutput) Add(item *applications.ScenarioItem) error
Add a scenario item to the output.
func (*ScenarioOutput) Item ¶ added in v0.1.5
func (o *ScenarioOutput) Item(i int) Row
Item returns the specified row value.
func (*ScenarioOutput) Len ¶ added in v0.1.5
func (o *ScenarioOutput) Len() int
Len returns the number of items being output.
func (*ScenarioOutput) SortBy ¶ added in v0.1.5
func (o *ScenarioOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*ScenarioOutput) Swap ¶ added in v0.1.5
func (o *ScenarioOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type ScenarioRow ¶
type ScenarioRow struct { Name string `table:"name" csv:"name" json:"-"` applications.ScenarioItem `table:"-" csv:"-"` }
ScenarioRow is a table row representation of a scenario.
func NewScenarioRow ¶ added in v0.1.4
func NewScenarioRow(item *applications.ScenarioItem) *ScenarioRow
func (*ScenarioRow) Lookup ¶ added in v0.1.5
func (r *ScenarioRow) Lookup(key string) (interface{}, bool)
type TrialOutput ¶
type TrialOutput struct {
Items []TrialRow `json:"items"`
}
TrialOutput wraps a trial list for output.
func (*TrialOutput) Add ¶
func (o *TrialOutput) Add(item *experiments.TrialItem) error
Add a trial item to the output.
func (*TrialOutput) Item ¶ added in v0.1.5
func (o *TrialOutput) Item(i int) Row
Item returns the specified row value.
func (*TrialOutput) Len ¶ added in v0.1.5
func (o *TrialOutput) Len() int
Len returns the number of items being output.
func (*TrialOutput) SortBy ¶ added in v0.1.5
func (o *TrialOutput) SortBy(key string) error
SortBy sorts the output by the named value.
func (*TrialOutput) Swap ¶ added in v0.1.5
func (o *TrialOutput) Swap(i, j int)
Swap exchanges the order of the two specified items.
type TrialRow ¶
type TrialRow struct { Experiment string `table:"experiment,custom" csv:"experiment" json:"-"` Name string `table:"name" json:"-"` Number int64 `table:"number,custom" csv:"number" json:"-"` Status string `table:"status" csv:"status" json:"-"` Assignments map[string]string `csv:"parameter_,flatten" json:"-"` Values map[string]string `csv:"metric_,flatten" json:"-"` FailureReason string `table:"failure_reason,wide" csv:"failure_reason" json:"-"` FailureMessage string `table:"failure_message,wide" csv:"failure_message" json:"-"` Labels map[string]string `table:"labels,labels" csv:"label_,labels,flatten" json:"-"` experiments.TrialItem `table:"-" csv:"-"` }
TrialRow is a table row representation of a trial.
func NewTrialRow ¶ added in v0.1.4
func NewTrialRow(item *experiments.TrialItem) *TrialRow