Documentation ¶
Index ¶
- func Generate(cfg GenerateConfig) *models.DeploymentGetResponse
- func NewPlanStep(name, status string) *models.ClusterPlanStepInfo
- func NewPlanStepLog(l ...*models.ClusterPlanStepInfo) []*models.ClusterPlanStepInfo
- func NewPlanStepWithDetailsAndError(name string, details []*models.ClusterPlanStepLogMessageInfo) *models.ClusterPlanStepInfo
- type GenerateConfig
- type GeneratedResourceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(cfg GenerateConfig) *models.DeploymentGetResponse
Generate creates a DeploymentGetResponse to mock the plan tracker. See the configuration options in the GenerateConfig struct.
func NewPlanStep ¶
func NewPlanStep(name, status string) *models.ClusterPlanStepInfo
NewPlanStep creates a new plan step with the specified fields.
func NewPlanStepLog ¶
func NewPlanStepLog(l ...*models.ClusterPlanStepInfo) []*models.ClusterPlanStepInfo
NewPlanStepLog combines a list of models.ClusterPlanStepInfo into a slice.
func NewPlanStepWithDetailsAndError ¶
func NewPlanStepWithDetailsAndError(name string, details []*models.ClusterPlanStepLogMessageInfo) *models.ClusterPlanStepInfo
NewPlanStepWithDetailsAndError creates a new plan step with the specified fields with an error status.
Types ¶
type GenerateConfig ¶
type GenerateConfig struct { // If omitted, a random ID will be auto-generated. ID string Elasticsearch []GeneratedResourceConfig EnterpriseSearch []GeneratedResourceConfig Kibana []GeneratedResourceConfig Apm []GeneratedResourceConfig Appsearch []GeneratedResourceConfig }
GenerateConfig is a helper used to create a DeploymentGetResponse to be used for tests. It provides a generic implementation so all deployment resoource types can be generated a plan log and tracked.
type GeneratedResourceConfig ¶
type GeneratedResourceConfig struct { // If omitted, a random ID will be auto-generated. ID string // If omitted, it'll default to "main-<kind>" RefID string // Current plan logs. CurrentLog []*models.ClusterPlanStepInfo // Pending plan logs. PendingLog []*models.ClusterPlanStepInfo // Histoory plan logs. HistoryLog []*models.ClusterPlanStepInfo }
GeneratedResourceConfig is used to construct a deployment resource plan with the plan log steps specified.