Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: cluster_client.go
Generated by this command:
mockgen -source=cluster_client.go -package=common -destination=mock_clusterclient.go
Package common is a generated GoMock package.
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
- func BoolWithFalseDefault(tfVal types.Bool) bool
- func BoolWithTrueDefault(tfVal types.Bool) bool
- func ConvertStringMapToMapType(stringMap map[string]string) (types.Map, error)
- func EmptiableStringToStringType(s string) types.String
- func HandleErr(res *ocmerrors.Error, err error) error
- func HasValue(val attr.Value) bool
- func IsGreaterThanOrEqual(version1, version2 string) (bool, error)
- func IsStringAttributeKnownAndEmpty(param types.String) bool
- func IsStringAttributeUnknownOrEmpty(param types.String) bool
- func IsValidDomain(candidate string) bool
- func NewMutexKV() *mutexKV
- func OptionalInt64(tfVal types.Int64) *int64
- func OptionalList(tfVal types.List) []string
- func OptionalMap(ctx context.Context, tfVal types.Map) (map[string]string, error)
- func OptionalString(tfVal types.String) *string
- func ShouldPatchBool(state, plan types.Bool) (value bool, ok bool)
- func ShouldPatchInt(state, plan types.Int64) (value int64, ok bool)
- func ShouldPatchList(state, plan types.List) (types.List, bool)
- func ShouldPatchMap(state, plan types.Map) (types.Map, bool)
- func ShouldPatchString(state, plan types.String) (value string, ok bool)
- func StringArrayToList(stringList []string) (types.List, error)
- func StringListToArray(ctx context.Context, tfVal types.List) ([]string, error)
- func ValidateHTPasswdPassword(password string) error
- func ValidateHTPasswdUsername(username string) error
- func ValidateStateAndPlanEquals(stateAttr attr.Value, planAttr attr.Value, attrName string, ...)
- type ClusterClient
- type ClusterWait
- type DefaultClusterClient
- type DefaultClusterWait
- type DefaultHttpClient
- type HttpClient
- type MockClusterClient
- type MockClusterClientMockRecorder
- type MockClusterWait
- func (m *MockClusterWait) EXPECT() *MockClusterWaitMockRecorder
- func (m *MockClusterWait) WaitForClusterToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*v1.Cluster, error)
- func (m *MockClusterWait) WaitForStdComputeNodesToBeReady(ctx context.Context, clusterId string, waitTimeoutMin int64) (*v1.Cluster, error)
- type MockClusterWaitMockRecorder
Constants ¶
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 BoolWithTrueDefault ¶ added in v1.6.0
func ConvertStringMapToMapType ¶ added in v1.4.0
func EmptiableStringToStringType ¶ added in v1.5.0
func IsGreaterThanOrEqual ¶
func IsStringAttributeKnownAndEmpty ¶ added in v1.4.2
func IsStringAttributeUnknownOrEmpty ¶ added in v1.4.2
func IsValidDomain ¶
func NewMutexKV ¶ added in v1.6.6
func NewMutexKV() *mutexKV
func OptionalInt64 ¶ added in v1.3.0
func OptionalList ¶ added in v1.3.0
func OptionalMap ¶ added in v1.3.0
func OptionalString ¶ added in v1.3.0
func ShouldPatchBool ¶
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 ¶
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
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 ¶
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 ¶
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 StringListToArray ¶
func ValidateHTPasswdPassword ¶ added in v1.4.0
func ValidateHTPasswdUsername ¶ added in v1.4.0
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 ClusterClient ¶ added in v1.6.3
type ClusterClient interface {
FetchCluster(ctx context.Context, clusterId string) (*cmv1.Cluster, error)
}
func NewClusterClient ¶ added in v1.6.3
func NewClusterClient(client *cmv1.ClustersClient) ClusterClient
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 DefaultClusterClient ¶ added in v1.6.3
type DefaultClusterClient struct {
// contains filtered or unexported fields
}
func (*DefaultClusterClient) FetchCluster ¶ added in v1.6.3
type DefaultClusterWait ¶ added in v1.5.0
type DefaultClusterWait struct {
// contains filtered or unexported fields
}
func (*DefaultClusterWait) WaitForClusterToBeReady ¶ added in v1.5.0
func (*DefaultClusterWait) WaitForStdComputeNodesToBeReady ¶ added in v1.6.0
type DefaultHttpClient ¶ added in v1.4.0
type DefaultHttpClient struct { }
type HttpClient ¶ added in v1.4.0
type MockClusterClient ¶ added in v1.6.3
type MockClusterClient struct {
// contains filtered or unexported fields
}
MockClusterClient is a mock of ClusterClient interface.
func NewMockClusterClient ¶ added in v1.6.3
func NewMockClusterClient(ctrl *gomock.Controller) *MockClusterClient
NewMockClusterClient creates a new mock instance.
func (*MockClusterClient) EXPECT ¶ added in v1.6.3
func (m *MockClusterClient) EXPECT() *MockClusterClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClusterClient) FetchCluster ¶ added in v1.6.3
func (m *MockClusterClient) FetchCluster(ctx context.Context, clusterId string) (*v1.Cluster, error)
FetchCluster mocks base method.
type MockClusterClientMockRecorder ¶ added in v1.6.3
type MockClusterClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClusterClientMockRecorder is the mock recorder for MockClusterClient.
func (*MockClusterClientMockRecorder) FetchCluster ¶ added in v1.6.3
func (mr *MockClusterClientMockRecorder) FetchCluster(ctx, clusterId any) *gomock.Call
FetchCluster indicates an expected call of FetchCluster.
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
func (m *MockClusterWait) EXPECT() *MockClusterWaitMockRecorder
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.