common

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: cluster_waiter.go

Generated by this command:

mockgen -source=cluster_waiter.go -package=common -destination=mock_clusterwait.go

Package common is a generated GoMock package.

Index

Constants

View Source
const (
	AssertionErrorSummaryMessage          = "Attribute value cannot be changed"
	AssertionErrorDetailsMessage          = "Attribute %s, cannot be changed from %v to %v"
	ValueCannotBeChangedStringDescription = "After the creation of the resource, it is not possible to update the attribute value."
)

Variables

This section is empty.

Functions

func BoolWithFalseDefault added in v1.4.0

func BoolWithFalseDefault(tfVal types.Bool) bool

func BoolWithTrueDefault added in v1.6.0

func BoolWithTrueDefault(tfVal types.Bool) bool

func ConvertStringMapToMapType added in v1.4.0

func ConvertStringMapToMapType(stringMap map[string]string) (types.Map, error)

func EmptiableStringToStringType added in v1.5.0

func EmptiableStringToStringType(s string) types.String

func HandleErr

func HandleErr(res *ocmerrors.Error, err error) error

func HasValue added in v1.4.0

func HasValue(val attr.Value) bool

HasValue checks if the given terraform value is set.

func IsGreaterThanOrEqual

func IsGreaterThanOrEqual(version1, version2 string) (bool, error)

func IsStringAttributeKnownAndEmpty added in v1.4.2

func IsStringAttributeKnownAndEmpty(param types.String) bool

func IsStringAttributeUnknownOrEmpty added in v1.4.2

func IsStringAttributeUnknownOrEmpty(param types.String) bool

func IsValidDomain

func IsValidDomain(candidate string) bool

func OptionalInt64 added in v1.3.0

func OptionalInt64(tfVal types.Int64) *int64

func OptionalList added in v1.3.0

func OptionalList(tfVal types.List) []string

func OptionalMap added in v1.3.0

func OptionalMap(ctx context.Context, tfVal types.Map) (map[string]string, error)

func OptionalString added in v1.3.0

func OptionalString(tfVal types.String) *string

func ShouldPatchBool

func ShouldPatchBool(state, plan types.Bool) (value bool, ok bool)

ShouldPatchBool changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it return the value to add to the patch.

func ShouldPatchInt

func ShouldPatchInt(state, plan types.Int64) (value int64, ok bool)

shouldPatchInt changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it returns the value to add to the patch.

func ShouldPatchList added in v1.6.0

func ShouldPatchList(state, plan types.List) (types.List, bool)

ShouldPatchList changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it return the value to add to the patch.

func ShouldPatchMap

func ShouldPatchMap(state, plan types.Map) (types.Map, bool)

ShouldPatchMap changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it return the value to add to the patch.

func ShouldPatchString

func ShouldPatchString(state, plan types.String) (value string, ok bool)

shouldPatchString changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it returns the value to add to the patch.

func StringArrayToList

func StringArrayToList(stringList []string) (types.List, error)

func StringListToArray

func StringListToArray(ctx context.Context, tfVal types.List) ([]string, error)

func ValidateHTPasswdPassword added in v1.4.0

func ValidateHTPasswdPassword(password string) error

func ValidateHTPasswdUsername added in v1.4.0

func ValidateHTPasswdUsername(username string) error

func ValidateStateAndPlanEquals added in v1.5.0

func ValidateStateAndPlanEquals(stateAttr attr.Value, planAttr attr.Value, attrName string, diags *diag.Diagnostics)

ValidateStateAndPlanEquals checks if given two attributes are equal, if not add error to diagnostic

Types

type ClusterWait added in v1.5.0

type ClusterWait interface {
	WaitForClusterToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*cmv1.Cluster, error)
	WaitForStdComputeNodesToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*cmv1.Cluster, error)
}

func NewClusterWait added in v1.5.0

func NewClusterWait(collection *cmv1.ClustersClient) ClusterWait

type DefaultClusterWait added in v1.5.0

type DefaultClusterWait struct {
	// contains filtered or unexported fields
}

func (*DefaultClusterWait) WaitForClusterToBeReady added in v1.5.0

func (dw *DefaultClusterWait) WaitForClusterToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*cmv1.Cluster, error)

func (*DefaultClusterWait) WaitForStdComputeNodesToBeReady added in v1.6.0

func (dw *DefaultClusterWait) WaitForStdComputeNodesToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*cmv1.Cluster, error)

type DefaultHttpClient added in v1.4.0

type DefaultHttpClient struct {
}

func (DefaultHttpClient) Get added in v1.4.0

func (c DefaultHttpClient) Get(url string) (resp *http.Response, err error)

type HttpClient added in v1.4.0

type HttpClient interface {
	Get(url string) (resp *http.Response, err error)
}

type MockClusterWait added in v1.5.0

type MockClusterWait struct {
	// contains filtered or unexported fields
}

MockClusterWait is a mock of ClusterWait interface.

func NewMockClusterWait added in v1.5.0

func NewMockClusterWait(ctrl *gomock.Controller) *MockClusterWait

NewMockClusterWait creates a new mock instance.

func (*MockClusterWait) EXPECT added in v1.5.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClusterWait) WaitForClusterToBeReady added in v1.5.0

func (m *MockClusterWait) WaitForClusterToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*v1.Cluster, error)

WaitForClusterToBeReady mocks base method.

func (*MockClusterWait) WaitForStdComputeNodesToBeReady added in v1.6.0

func (m *MockClusterWait) WaitForStdComputeNodesToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*v1.Cluster, error)

WaitForStdComputeNodesToBeReady mocks base method.

type MockClusterWaitMockRecorder added in v1.5.0

type MockClusterWaitMockRecorder struct {
	// contains filtered or unexported fields
}

MockClusterWaitMockRecorder is the mock recorder for MockClusterWait.

func (*MockClusterWaitMockRecorder) WaitForClusterToBeReady added in v1.5.0

func (mr *MockClusterWaitMockRecorder) WaitForClusterToBeReady(ctx, clusterId, waitTimeoutMin any) *gomock.Call

WaitForClusterToBeReady indicates an expected call of WaitForClusterToBeReady.

func (*MockClusterWaitMockRecorder) WaitForStdComputeNodesToBeReady added in v1.6.0

func (mr *MockClusterWaitMockRecorder) WaitForStdComputeNodesToBeReady(ctx, clusterId, waitTimeoutMin any) *gomock.Call

WaitForStdComputeNodesToBeReady indicates an expected call of WaitForStdComputeNodesToBeReady.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL