database

package
v0.0.0-...-5e9d01f Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Package database is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrAmbiguousResult = errors.New("ambiguous result")

ErrAmbiguousResult occurs when a database query intended to yield a single item unexpectedly yields multiple items.

View Source
var ErrItemNotFound = errors.New("item not found")

ErrItemNotFound occurs when the requested item ID was not found, such as in a DBTransactionResult.

View Source
var ErrWrongPartition = errors.New("wrong partition key for transaction")

ErrWrongPartition occurs in a DBTransaction create step when the document has a partition key that differs from the transaction's partition key.

Functions

func CosmosGenericToInternal

func CosmosGenericToInternal[InternalAPIType any](cosmosObj *GenericDocument[InternalAPIType]) (*InternalAPIType, error)

func CosmosToInternal

func CosmosToInternal[InternalAPIType, CosmosAPIType any](obj *CosmosAPIType) (*InternalAPIType, error)

func CosmosToInternalCluster

func CosmosToInternalCluster(cosmosObj *HCPCluster) (*api.HCPOpenShiftCluster, error)

func CosmosToInternalExternalAuth

func CosmosToInternalExternalAuth(cosmosObj *ExternalAuth) (*api.HCPOpenShiftClusterExternalAuth, error)

func CosmosToInternalNodePool

func CosmosToInternalNodePool(cosmosObj *NodePool) (*api.HCPOpenShiftClusterNodePool, error)

func Delay

func Delay(ctx context.Context, delay time.Duration) error

Copied from azcore/internal/shared/shared.go

func GetOrCreateServiceProviderCluster

func GetOrCreateServiceProviderCluster(
	ctx context.Context, dbClient DBClient, clusterResourceID *azcorearm.ResourceID,
) (*api.ServiceProviderCluster, error)

GetOrCreateServiceProviderCluster gets the singleton ServiceProviderCluster instance named `default` for the given cluster resource ID. If it doesn't exist, it creates a new one.

func GetOrCreateServiceProviderNodePool

func GetOrCreateServiceProviderNodePool(
	ctx context.Context, dbClient DBClient, nodePoolResourceID *azcorearm.ResourceID,
) (*api.ServiceProviderNodePool, error)

GetOrCreateServiceProviderNodePool gets the singleton ServiceProviderNodePool instance named `default` for the given node pool resource ID. If it doesn't exist, it creates a new one.

func InternalToCosmos

func InternalToCosmos[InternalAPIType, CosmosAPIType any](obj *InternalAPIType) (*CosmosAPIType, error)

func IsResponseError

func IsResponseError(err error, statusCode int) bool

func NewClusterResourceID

func NewClusterResourceID(subscriptionID, resourceGroupName, clusterName string) *azcorearm.ResourceID

func NewCosmosDatabaseClient

func NewCosmosDatabaseClient(url string, dbName string, clientOptions azcore.ClientOptions) (*azcosmos.DatabaseClient, error)

NewCosmosDatabaseClient instantiates a generic Cosmos database client.

func NewCosmosResourceCRUD

func NewCosmosResourceCRUD[InternalAPIType, CosmosAPIType any](
	containerClient *azcosmos.ContainerClient, parentResourceID *azcorearm.ResourceID, resourceType azcorearm.ResourceType) *nestedCosmosResourceCRUD[InternalAPIType, CosmosAPIType]

func NewNodePoolResourceID

func NewNodePoolResourceID(subscriptionID, resourceGroupName, clusterName, nodePoolName string) *azcorearm.ResourceID

func NewNotFoundError

func NewNotFoundError() *azcore.ResponseError

func NewOperation

func NewOperation(
	request OperationRequest,
	externalID *azcorearm.ResourceID,
	internalID ocm.InternalID,
	location, tenantID, clientID, notificationURI string,
	correlationData *arm.CorrelationData,
) *api.Operation

func NewPartitionKey

func NewPartitionKey(subscriptionID string) azcosmos.PartitionKey

NewPartitionKey creates a partition key from an Azure subscription ID.

func OldResourceIDToCosmosID

func OldResourceIDToCosmosID(resourceID *azcorearm.ResourceID) (string, error)

func PatchOperationDocument

func PatchOperationDocument(ctx context.Context, dbClient DBClient, oldOperation *api.Operation, newOperationStatus arm.ProvisioningState, newOperationError *arm.CloudErrorBody, postAsyncNotificationFn PostAsyncNotificationFunc) error

PatchOperationDocument patches the status and error fields of an OperationDocument.

func ToStatus

func ToStatus(doc *api.Operation) *arm.Operation

ToStatus converts an OperationDocument to the ARM operation status format.

func UpdateOperationStatus

func UpdateOperationStatus(ctx context.Context, cosmosClient DBClient, existingOperation *api.Operation, newOperationStatus arm.ProvisioningState, newOperationError *arm.CloudErrorBody, postAsyncNotificationFn PostAsyncNotificationFunc) error

UpdateOperationStatus updates Cosmos DB to reflect an updated resource status.

Types

type BaseDocument

type BaseDocument struct {
	ID string `json:"id,omitempty"`

	// https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/time-to-live
	TimeToLive int `json:"ttl,omitempty"`

	// System-defined properties generated by Cosmos DB
	CosmosResourceID  string      `json:"_rid,omitempty"`
	CosmosSelf        string      `json:"_self,omitempty"`
	CosmosETag        azcore.ETag `json:"_etag,omitempty"`
	CosmosAttachments string      `json:"_attachments,omitempty"`
	CosmosTimestamp   int         `json:"_ts,omitempty"`
}

BaseDocument includes fields common to all container items.

type BillingDocument

type BillingDocument struct {
	BaseDocument

	// The cluster creation time represents the time when the cluster was provisioned successfully
	CreationTime time.Time `json:"creationTime,omitempty"`
	// The cluster deletion time
	DeletionTime *time.Time `json:"deletionTime,omitempty"`

	// The location of the HCP cluster
	Location string `json:"location,omitempty"`
	// The tenant ID of the HCP cluster
	TenantID string `json:"tenantId,omitempty"`
	// The subscription ID of the HCP cluster (also the partition key)
	SubscriptionID string `json:"subscriptionId,omitempty"`
	// The HCP cluster ARM resource ID
	ResourceID *azcorearm.ResourceID `json:"resourceId,omitempty"`
	// The ARM resource ID of the managed resource group of the HCP cluster
	ManagedResourceGroup string `json:"managedResourceGroup,omitempty"`
}

BillingDocument records timestamps of Hosted Control Plane OpenShift cluster creation and deletion for the purpose of customer billing.

func NewBillingDocument

func NewBillingDocument(resourceID *azcorearm.ResourceID) *BillingDocument

type BillingDocumentPatchOperations

type BillingDocumentPatchOperations struct {
	azcosmos.PatchOperations
}

BillingDocumentPatchOperations represents a patch request for a BillingDocument.

func (*BillingDocumentPatchOperations) SetDeletionTime

func (p *BillingDocumentPatchOperations) SetDeletionTime(deletionTime time.Time)

SetDeletionTime appends a set operation for the DeletionTime field.

type ClusterInternalState

type ClusterInternalState struct {
	InternalAPI api.HCPOpenShiftCluster `json:"internalAPI"`
}

type ControllerContainer

type ControllerContainer interface {
	// TODO controllers are a concept that is at this scope and at lower scopes and sometimes you want to query all like it
	// TODO they look a lot like operations, though we can model them as a one-off to start.
	Controllers(hcpClusterID string) ResourceCRUD[api.Controller]
}

type CosmosDBTransactionDetails

type CosmosDBTransactionDetails struct {
	PartitionKey string                           `json:"partitionKey"`
	Steps        []CosmosDBTransactionStepDetails `json:"steps"`
}

type CosmosDBTransactionStep

type CosmosDBTransactionStep func(b *azcosmos.TransactionalBatch) (string, error)

type CosmosDBTransactionStepDetails

type CosmosDBTransactionStepDetails struct {
	ActionType string      `json:"actionType"`
	CosmosID   string      `json:"cosmosID"`
	ResourceID string      `json:"resourceID"`
	GoType     string      `json:"goType"`
	Etag       azcore.ETag `json:"etag"`
}

type DBClient

type DBClient interface {
	// GetLockClient returns a LockClient, or nil if the DBClient does not support a LockClient.
	GetLockClient() LockClientInterface

	// NewTransaction initiates a new transactional batch for the given partition key.
	NewTransaction(pk string) DBTransaction

	// CreateBillingDoc creates a new document in the "Billing" container.
	CreateBillingDoc(ctx context.Context, doc *BillingDocument) error

	// PatchBillingDoc patches a document in the "Billing" container by applying a sequence
	// of patch operations. The patch operations may include a precondition which, if not
	// satisfied, will cause the function to return an azcore.ResponseError with a StatusCode
	// of http.StatusPreconditionFailed.
	PatchBillingDoc(ctx context.Context, resourceID *azcorearm.ResourceID, ops BillingDocumentPatchOperations) error

	// UntypedCRUD provides access documents in the subscription
	UntypedCRUD(parentResourceID azcorearm.ResourceID) (UntypedResourceCRUD, error)

	// HCPClusters retrieves a CRUD interface for managing HCPCluster resources and their nested resources.
	HCPClusters(subscriptionID, resourceGroupName string) HCPClusterCRUD

	// Operations retrieves a CRUD interface for managing operations.  Remember that operations are not directly accessible
	// to end users via ARM.  They must also survive the thing they are deleting, so they live under a subscription directly.
	Operations(subscriptionID string) OperationCRUD

	Subscriptions() SubscriptionCRUD

	ServiceProviderClusters(subscriptionID, resourceGroupName, clusterName string) ServiceProviderClusterCRUD

	// GlobalListers returns interfaces for listing all resources of a particular
	// type across all partitions, intended for feeding SharedInformers.
	GlobalListers() GlobalListers

	ServiceProviderNodePools(subscriptionID, resourceGroupName, clusterName, nodePoolName string) ServiceProviderNodePoolCRUD

	ManagementClusterContents(subscriptionID, resourceGroupName, clusterName string) ManagementClusterContentCRUD
}

DBClient provides a customized interface to the Cosmos DB containers used by the ARO-HCP resource provider.

func NewDBClient

func NewDBClient(ctx context.Context, database *azcosmos.DatabaseClient) (DBClient, error)

NewDBClient instantiates a DBClient from a Cosmos DatabaseClient instance targeting the Frontends async database.

type DBClientIterator

type DBClientIterator[T any] interface {
	Items(ctx context.Context) DBClientIteratorItem[T]
	GetContinuationToken() string
	GetError() error
}

type DBClientIteratorItem

type DBClientIteratorItem[T any] iter.Seq2[string, *T]

type DBClientListActiveOperationDocsOptions

type DBClientListActiveOperationDocsOptions struct {
	// Request matches the type of asynchronous operation requested
	Request *OperationRequest
	// ExternalID matches (case-insensitively) the Azure resource ID of the cluster or node pool
	ExternalID *azcorearm.ResourceID
	// IncludeNestedResources includes nested resources under ExternalID
	IncludeNestedResources bool
}

DBClientListActiveOperationDocsOptions allows for limiting the results of DBClient.ListActiveOperationDocs.

type DBClientListResourceDocsOptions

type DBClientListResourceDocsOptions struct {
	// ResourceType matches (case-insensitively) the Azure resource type. If unspecified,
	// DBClient.ListResourceDocs will match resource documents for any resource type.
	ResourceType *azcorearm.ResourceType

	// PageSizeHint can limit the number of items returned at once. A negative value will cause
	// the returned iterator to yield all matching documents (same as leaving the option nil).
	// A positive value will cause the returned iterator to include a continuation token if
	// additional items are available.
	PageSizeHint *int32

	// ContinuationToken can be supplied when limiting the number of items returned at once
	// through PageSizeHint.
	ContinuationToken *string
}

DBClientListResourceDocsOptions allows for limiting the results of DBClient.ListResourceDocs.

type DBTransaction

type DBTransaction interface {
	// AddStep adds a transaction function to the list to perform
	AddStep(CosmosDBTransactionStepDetails, CosmosDBTransactionStep)

	// GetPartitionKey returns the transaction's partition key.
	GetPartitionKey() string

	// OnSuccess adds a function to call if the transaction executes successfully.
	OnSuccess(callback DBTransactionCallback)

	// Execute submits the prepared transaction.
	Execute(ctx context.Context, o *azcosmos.TransactionalBatchOptions) (DBTransactionResult, error)
}

type DBTransactionCallback

type DBTransactionCallback func(DBTransactionResult)

type DBTransactionResult

type DBTransactionResult interface {
	// GetItem returns the internal API representation for the cosmosUID.
	// That is consistent with other returns from our database layer.
	// The Item is only available if the transaction was
	// executed with the EnableContentResponseOnWrite option set, or
	// the document was requested with DBTransaction.ReadDoc.
	GetItem(cosmosUID string) (any, error)
}

type ExternalAuth

type ExternalAuth struct {
	TypedDocument `json:",inline"`

	ExternalAuthProperties `json:"properties"`
}

func InternalToCosmosExternalAuth

func InternalToCosmosExternalAuth(internalObj *api.HCPOpenShiftClusterExternalAuth) (*ExternalAuth, error)

func (*ExternalAuth) GetTypedDocument

func (o *ExternalAuth) GetTypedDocument() *TypedDocument

type ExternalAuthInternalState

type ExternalAuthInternalState struct {
	InternalAPI api.HCPOpenShiftClusterExternalAuth `json:"internalAPI"`
}

type ExternalAuthProperties

type ExternalAuthProperties struct {
	*ResourceDocument `json:",inline"`

	// when we switch to inlining the internalObj, this will be in the right spot.  We add it now so that we can switch our
	// queries to select on cosmosMetata.ResourceID instead of resourceId
	CosmosMetadata api.CosmosMetadata `json:"cosmosMetadata"`

	// IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly
	// embed the InternalAPIType which has colliding serialization fields.
	IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"`

	// TODO we may need look-aside data that we want to store in the same place.  Build the nesting to allow it
	InternalState ExternalAuthInternalState `json:"internalState"`
}

type GenericDocument

type GenericDocument[InternalAPIType any] struct {
	TypedDocument `json:",inline"`

	Content InternalAPIType `json:"properties"`
}

pointer of InternalAPIType needs to be arm.CosmosMetadataAccessor

func InternalToCosmosGeneric

func InternalToCosmosGeneric[InternalAPIType any](internalObj *InternalAPIType) (*GenericDocument[InternalAPIType], error)

type GlobalLister

type GlobalLister[T any] interface {
	List(ctx context.Context, options *DBClientListResourceDocsOptions) (DBClientIterator[T], error)
}

GlobalLister lists all resources of a particular type across all partitions.

type GlobalListers

type GlobalListers interface {
	Subscriptions() GlobalLister[arm.Subscription]
	Clusters() GlobalLister[api.HCPOpenShiftCluster]
	NodePools() GlobalLister[api.HCPOpenShiftClusterNodePool]
	ExternalAuths() GlobalLister[api.HCPOpenShiftClusterExternalAuth]
	ServiceProviderClusters() GlobalLister[api.ServiceProviderCluster]
	ServiceProviderNodePools() GlobalLister[api.ServiceProviderNodePool]
	Controllers() GlobalLister[api.Controller]
	ManagementClusterContents() GlobalLister[api.ManagementClusterContent]
	Operations() GlobalLister[api.Operation]
	ActiveOperations() GlobalLister[api.Operation]
}

GlobalListers provides access to global listers for each resource type. These are intended to feed SharedInformers via ListerWatchers.

func NewCosmosGlobalListers

func NewCosmosGlobalListers(resources *azcosmos.ContainerClient) GlobalListers

type HCPCluster

type HCPCluster struct {
	TypedDocument `json:",inline"`

	HCPClusterProperties `json:"properties"`
}

func InternalToCosmosCluster

func InternalToCosmosCluster(internalObj *api.HCPOpenShiftCluster) (*HCPCluster, error)

func (*HCPCluster) GetTypedDocument

func (o *HCPCluster) GetTypedDocument() *TypedDocument

type HCPClusterCRUD

type HCPClusterCRUD interface {
	ResourceCRUD[api.HCPOpenShiftCluster]
	ControllerContainer

	ExternalAuth(hcpClusterID string) ExternalAuthsCRUD
	NodePools(hcpClusterID string) NodePoolsCRUD
}

func NewHCPClusterCRUD

func NewHCPClusterCRUD(containerClient *azcosmos.ContainerClient, subscriptionID, resourceGroupName string) HCPClusterCRUD

type HCPClusterProperties

type HCPClusterProperties struct {
	*ResourceDocument `json:",inline"`

	// when we switch to inlining the internalObj, this will be in the right spot.  We add it now so that we can switch our
	// queries to select on cosmosMetata.ResourceID instead of resourceId
	CosmosMetadata api.CosmosMetadata `json:"cosmosMetadata"`

	// IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly
	// embed the InternalAPIType which has colliding serialization fields.
	IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"`

	// TODO we may need look-aside data that we want to store in the same place.  Build the nesting to allow it
	InternalState ClusterInternalState `json:"internalState"`
}

type LockClient

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

func NewLockClient

func NewLockClient(ctx context.Context, containerClient *azcosmos.ContainerClient) (*LockClient, error)

NewLockClient creates a LockClient around a ContainerClient. It attempts to read container properties to extract a default TTL. If this fails or if the container does not define a default TTL, the function returns an error.

func (*LockClient) AcquireLock

func (c *LockClient) AcquireLock(ctx context.Context, id string, timeout *time.Duration) (*azcosmos.ItemResponse, error)

AcquireLock persistently tries to acquire a lock for the given ID. If a timeout is provided, the function will cease after the timeout duration and return a context.DeadlineExceeded error.

func (*LockClient) GetDefaultTimeToLive

func (c *LockClient) GetDefaultTimeToLive() time.Duration

GetDefaultTimeToLive returns the default time-to-live value of the container as a time.Duration.

func (*LockClient) HoldLock

func (c *LockClient) HoldLock(ctx context.Context, item *azcosmos.ItemResponse) (cancelCtx context.Context, stop StopHoldLock)

HoldLock tries to hold an acquired lock by renewing it periodically from a goroutine until the returned stop function is called. The function also returns a new context which is cancelled if the lock is lost or some other error occurs. The stop function terminates the goroutine and returns the current lock, or nil if the lock was lost.

func (*LockClient) ReleaseLock

func (c *LockClient) ReleaseLock(ctx context.Context, item *azcosmos.ItemResponse) error

ReleaseLock attempts to release an acquired lock. Errors should be logged but not treated as fatal, since the container item's TTL value guarantees that it will be released eventually.

func (*LockClient) RenewLock

RenewLock attempts to renew an acquired lock. If successful it returns a new lock. If the lock was somehow lost, it returns a nil azcosmos.ItemResponse and no error.

func (*LockClient) SetName

func (c *LockClient) SetName(name string)

SetName overrides how a lock item identifies the owner. This is for informational purposes only. LockClient uses the hostname by default.

func (*LockClient) SetRetryAfterHeader

func (c *LockClient) SetRetryAfterHeader(header http.Header)

SetRetryAfterHeader sets a "Retry-After" header to the default TTL value.

func (*LockClient) TryAcquireLock

func (c *LockClient) TryAcquireLock(ctx context.Context, id string) (*azcosmos.ItemResponse, error)

TryAcquireLock tries once to acquire a lock for the given ID. If the lock is already taken, it returns a nil azcosmos.ItemResponse and no error.

type LockClientInterface

type LockClientInterface interface {
	GetDefaultTimeToLive() time.Duration
	SetRetryAfterHeader(header http.Header)
	AcquireLock(ctx context.Context, id string, timeout *time.Duration) (*azcosmos.ItemResponse, error)
	TryAcquireLock(ctx context.Context, id string) (*azcosmos.ItemResponse, error)
	HoldLock(ctx context.Context, item *azcosmos.ItemResponse) (context.Context, StopHoldLock)
	RenewLock(ctx context.Context, item *azcosmos.ItemResponse) (*azcosmos.ItemResponse, error)
	ReleaseLock(ctx context.Context, item *azcosmos.ItemResponse) error
}

type ManagementClusterContentCRUD

type ManagementClusterContentCRUD interface {
	ResourceCRUD[api.ManagementClusterContent]
}

type MockControllerContainer

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

MockControllerContainer is a mock of ControllerContainer interface.

func NewMockControllerContainer

func NewMockControllerContainer(ctrl *gomock.Controller) *MockControllerContainer

NewMockControllerContainer creates a new mock instance.

func (*MockControllerContainer) Controllers

func (m *MockControllerContainer) Controllers(hcpClusterID string) ResourceCRUD[api.Controller]

Controllers mocks base method.

func (*MockControllerContainer) EXPECT

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

type MockControllerContainerControllersCall

type MockControllerContainerControllersCall struct {
	*gomock.Call
}

MockControllerContainerControllersCall wrap *gomock.Call

func (*MockControllerContainerControllersCall) Do

Do rewrite *gomock.Call.Do

func (*MockControllerContainerControllersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockControllerContainerControllersCall) Return

Return rewrite *gomock.Call.Return

type MockControllerContainerMockRecorder

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

MockControllerContainerMockRecorder is the mock recorder for MockControllerContainer.

func (*MockControllerContainerMockRecorder) Controllers

Controllers indicates an expected call of Controllers.

type MockDBClient

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

MockDBClient is a mock of DBClient interface.

func NewMockDBClient

func NewMockDBClient(ctrl *gomock.Controller) *MockDBClient

NewMockDBClient creates a new mock instance.

func (*MockDBClient) CreateBillingDoc

func (m *MockDBClient) CreateBillingDoc(ctx context.Context, doc *BillingDocument) error

CreateBillingDoc mocks base method.

func (*MockDBClient) EXPECT

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

func (*MockDBClient) GetLockClient

func (m *MockDBClient) GetLockClient() LockClientInterface

GetLockClient mocks base method.

func (*MockDBClient) GlobalListers

func (m *MockDBClient) GlobalListers() GlobalListers

GlobalListers mocks base method.

func (*MockDBClient) HCPClusters

func (m *MockDBClient) HCPClusters(subscriptionID, resourceGroupName string) HCPClusterCRUD

HCPClusters mocks base method.

func (*MockDBClient) ManagementClusterContents

func (m *MockDBClient) ManagementClusterContents(subscriptionID, resourceGroupName, clusterName string) ManagementClusterContentCRUD

ManagementClusterContents mocks base method.

func (*MockDBClient) NewTransaction

func (m *MockDBClient) NewTransaction(pk string) DBTransaction

NewTransaction mocks base method.

func (*MockDBClient) Operations

func (m *MockDBClient) Operations(subscriptionID string) OperationCRUD

Operations mocks base method.

func (*MockDBClient) PatchBillingDoc

func (m *MockDBClient) PatchBillingDoc(ctx context.Context, resourceID *arm.ResourceID, ops BillingDocumentPatchOperations) error

PatchBillingDoc mocks base method.

func (*MockDBClient) ServiceProviderClusters

func (m *MockDBClient) ServiceProviderClusters(subscriptionID, resourceGroupName, clusterName string) ServiceProviderClusterCRUD

ServiceProviderClusters mocks base method.

func (*MockDBClient) ServiceProviderNodePools

func (m *MockDBClient) ServiceProviderNodePools(subscriptionID, resourceGroupName, clusterName, nodePoolName string) ServiceProviderNodePoolCRUD

ServiceProviderNodePools mocks base method.

func (*MockDBClient) Subscriptions

func (m *MockDBClient) Subscriptions() SubscriptionCRUD

Subscriptions mocks base method.

func (*MockDBClient) UntypedCRUD

func (m *MockDBClient) UntypedCRUD(parentResourceID arm.ResourceID) (UntypedResourceCRUD, error)

UntypedCRUD mocks base method.

type MockDBClientCreateBillingDocCall

type MockDBClientCreateBillingDocCall struct {
	*gomock.Call
}

MockDBClientCreateBillingDocCall wrap *gomock.Call

func (*MockDBClientCreateBillingDocCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientCreateBillingDocCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientCreateBillingDocCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientGetLockClientCall

type MockDBClientGetLockClientCall struct {
	*gomock.Call
}

MockDBClientGetLockClientCall wrap *gomock.Call

func (*MockDBClientGetLockClientCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientGetLockClientCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientGetLockClientCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientGlobalListersCall

type MockDBClientGlobalListersCall struct {
	*gomock.Call
}

MockDBClientGlobalListersCall wrap *gomock.Call

func (*MockDBClientGlobalListersCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientGlobalListersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientGlobalListersCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientHCPClustersCall

type MockDBClientHCPClustersCall struct {
	*gomock.Call
}

MockDBClientHCPClustersCall wrap *gomock.Call

func (*MockDBClientHCPClustersCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientHCPClustersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientHCPClustersCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientIterator

type MockDBClientIterator[T any] struct {
	// contains filtered or unexported fields
}

MockDBClientIterator is a mock of DBClientIterator interface.

func NewMockDBClientIterator

func NewMockDBClientIterator[T any](ctrl *gomock.Controller) *MockDBClientIterator[T]

NewMockDBClientIterator creates a new mock instance.

func (*MockDBClientIterator[T]) EXPECT

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

func (*MockDBClientIterator[T]) GetContinuationToken

func (m *MockDBClientIterator[T]) GetContinuationToken() string

GetContinuationToken mocks base method.

func (*MockDBClientIterator[T]) GetError

func (m *MockDBClientIterator[T]) GetError() error

GetError mocks base method.

func (*MockDBClientIterator[T]) Items

Items mocks base method.

type MockDBClientIteratorGetContinuationTokenCall

type MockDBClientIteratorGetContinuationTokenCall[T any] struct {
	*gomock.Call
}

MockDBClientIteratorGetContinuationTokenCall wrap *gomock.Call

func (*MockDBClientIteratorGetContinuationTokenCall[T]) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientIteratorGetContinuationTokenCall[T]) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientIteratorGetContinuationTokenCall[T]) Return

Return rewrite *gomock.Call.Return

type MockDBClientIteratorGetErrorCall

type MockDBClientIteratorGetErrorCall[T any] struct {
	*gomock.Call
}

MockDBClientIteratorGetErrorCall wrap *gomock.Call

func (*MockDBClientIteratorGetErrorCall[T]) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientIteratorGetErrorCall[T]) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientIteratorGetErrorCall[T]) Return

Return rewrite *gomock.Call.Return

type MockDBClientIteratorItemsCall

type MockDBClientIteratorItemsCall[T any] struct {
	*gomock.Call
}

MockDBClientIteratorItemsCall wrap *gomock.Call

func (*MockDBClientIteratorItemsCall[T]) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientIteratorItemsCall[T]) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientIteratorItemsCall[T]) Return

Return rewrite *gomock.Call.Return

type MockDBClientIteratorMockRecorder

type MockDBClientIteratorMockRecorder[T any] struct {
	// contains filtered or unexported fields
}

MockDBClientIteratorMockRecorder is the mock recorder for MockDBClientIterator.

func (*MockDBClientIteratorMockRecorder[T]) GetContinuationToken

GetContinuationToken indicates an expected call of GetContinuationToken.

func (*MockDBClientIteratorMockRecorder[T]) GetError

GetError indicates an expected call of GetError.

func (*MockDBClientIteratorMockRecorder[T]) Items

Items indicates an expected call of Items.

type MockDBClientManagementClusterContentsCall

type MockDBClientManagementClusterContentsCall struct {
	*gomock.Call
}

MockDBClientManagementClusterContentsCall wrap *gomock.Call

func (*MockDBClientManagementClusterContentsCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientManagementClusterContentsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientManagementClusterContentsCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientMockRecorder

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

MockDBClientMockRecorder is the mock recorder for MockDBClient.

func (*MockDBClientMockRecorder) CreateBillingDoc

func (mr *MockDBClientMockRecorder) CreateBillingDoc(ctx, doc any) *MockDBClientCreateBillingDocCall

CreateBillingDoc indicates an expected call of CreateBillingDoc.

func (*MockDBClientMockRecorder) GetLockClient

GetLockClient indicates an expected call of GetLockClient.

func (*MockDBClientMockRecorder) GlobalListers

GlobalListers indicates an expected call of GlobalListers.

func (*MockDBClientMockRecorder) HCPClusters

func (mr *MockDBClientMockRecorder) HCPClusters(subscriptionID, resourceGroupName any) *MockDBClientHCPClustersCall

HCPClusters indicates an expected call of HCPClusters.

func (*MockDBClientMockRecorder) ManagementClusterContents

func (mr *MockDBClientMockRecorder) ManagementClusterContents(subscriptionID, resourceGroupName, clusterName any) *MockDBClientManagementClusterContentsCall

ManagementClusterContents indicates an expected call of ManagementClusterContents.

func (*MockDBClientMockRecorder) NewTransaction

NewTransaction indicates an expected call of NewTransaction.

func (*MockDBClientMockRecorder) Operations

func (mr *MockDBClientMockRecorder) Operations(subscriptionID any) *MockDBClientOperationsCall

Operations indicates an expected call of Operations.

func (*MockDBClientMockRecorder) PatchBillingDoc

func (mr *MockDBClientMockRecorder) PatchBillingDoc(ctx, resourceID, ops any) *MockDBClientPatchBillingDocCall

PatchBillingDoc indicates an expected call of PatchBillingDoc.

func (*MockDBClientMockRecorder) ServiceProviderClusters

func (mr *MockDBClientMockRecorder) ServiceProviderClusters(subscriptionID, resourceGroupName, clusterName any) *MockDBClientServiceProviderClustersCall

ServiceProviderClusters indicates an expected call of ServiceProviderClusters.

func (*MockDBClientMockRecorder) ServiceProviderNodePools

func (mr *MockDBClientMockRecorder) ServiceProviderNodePools(subscriptionID, resourceGroupName, clusterName, nodePoolName any) *MockDBClientServiceProviderNodePoolsCall

ServiceProviderNodePools indicates an expected call of ServiceProviderNodePools.

func (*MockDBClientMockRecorder) Subscriptions

Subscriptions indicates an expected call of Subscriptions.

func (*MockDBClientMockRecorder) UntypedCRUD

func (mr *MockDBClientMockRecorder) UntypedCRUD(parentResourceID any) *MockDBClientUntypedCRUDCall

UntypedCRUD indicates an expected call of UntypedCRUD.

type MockDBClientNewTransactionCall

type MockDBClientNewTransactionCall struct {
	*gomock.Call
}

MockDBClientNewTransactionCall wrap *gomock.Call

func (*MockDBClientNewTransactionCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientNewTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientNewTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientOperationsCall

type MockDBClientOperationsCall struct {
	*gomock.Call
}

MockDBClientOperationsCall wrap *gomock.Call

func (*MockDBClientOperationsCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientOperationsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientOperationsCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientPatchBillingDocCall

type MockDBClientPatchBillingDocCall struct {
	*gomock.Call
}

MockDBClientPatchBillingDocCall wrap *gomock.Call

func (*MockDBClientPatchBillingDocCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientPatchBillingDocCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientPatchBillingDocCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientServiceProviderClustersCall

type MockDBClientServiceProviderClustersCall struct {
	*gomock.Call
}

MockDBClientServiceProviderClustersCall wrap *gomock.Call

func (*MockDBClientServiceProviderClustersCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientServiceProviderClustersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientServiceProviderClustersCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientServiceProviderNodePoolsCall

type MockDBClientServiceProviderNodePoolsCall struct {
	*gomock.Call
}

MockDBClientServiceProviderNodePoolsCall wrap *gomock.Call

func (*MockDBClientServiceProviderNodePoolsCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientServiceProviderNodePoolsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientServiceProviderNodePoolsCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientSubscriptionsCall

type MockDBClientSubscriptionsCall struct {
	*gomock.Call
}

MockDBClientSubscriptionsCall wrap *gomock.Call

func (*MockDBClientSubscriptionsCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientSubscriptionsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientSubscriptionsCall) Return

Return rewrite *gomock.Call.Return

type MockDBClientUntypedCRUDCall

type MockDBClientUntypedCRUDCall struct {
	*gomock.Call
}

MockDBClientUntypedCRUDCall wrap *gomock.Call

func (*MockDBClientUntypedCRUDCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBClientUntypedCRUDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBClientUntypedCRUDCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransaction

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

MockDBTransaction is a mock of DBTransaction interface.

func NewMockDBTransaction

func NewMockDBTransaction(ctrl *gomock.Controller) *MockDBTransaction

NewMockDBTransaction creates a new mock instance.

func (*MockDBTransaction) AddStep

AddStep mocks base method.

func (*MockDBTransaction) EXPECT

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

func (*MockDBTransaction) Execute

Execute mocks base method.

func (*MockDBTransaction) GetPartitionKey

func (m *MockDBTransaction) GetPartitionKey() string

GetPartitionKey mocks base method.

func (*MockDBTransaction) OnSuccess

func (m *MockDBTransaction) OnSuccess(callback DBTransactionCallback)

OnSuccess mocks base method.

type MockDBTransactionAddStepCall

type MockDBTransactionAddStepCall struct {
	*gomock.Call
}

MockDBTransactionAddStepCall wrap *gomock.Call

func (*MockDBTransactionAddStepCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBTransactionAddStepCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBTransactionAddStepCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransactionExecuteCall

type MockDBTransactionExecuteCall struct {
	*gomock.Call
}

MockDBTransactionExecuteCall wrap *gomock.Call

func (*MockDBTransactionExecuteCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBTransactionExecuteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBTransactionExecuteCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransactionGetPartitionKeyCall

type MockDBTransactionGetPartitionKeyCall struct {
	*gomock.Call
}

MockDBTransactionGetPartitionKeyCall wrap *gomock.Call

func (*MockDBTransactionGetPartitionKeyCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBTransactionGetPartitionKeyCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBTransactionGetPartitionKeyCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransactionMockRecorder

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

MockDBTransactionMockRecorder is the mock recorder for MockDBTransaction.

func (*MockDBTransactionMockRecorder) AddStep

AddStep indicates an expected call of AddStep.

func (*MockDBTransactionMockRecorder) Execute

Execute indicates an expected call of Execute.

func (*MockDBTransactionMockRecorder) GetPartitionKey

GetPartitionKey indicates an expected call of GetPartitionKey.

func (*MockDBTransactionMockRecorder) OnSuccess

OnSuccess indicates an expected call of OnSuccess.

type MockDBTransactionOnSuccessCall

type MockDBTransactionOnSuccessCall struct {
	*gomock.Call
}

MockDBTransactionOnSuccessCall wrap *gomock.Call

func (*MockDBTransactionOnSuccessCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBTransactionOnSuccessCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBTransactionOnSuccessCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransactionResult

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

MockDBTransactionResult is a mock of DBTransactionResult interface.

func NewMockDBTransactionResult

func NewMockDBTransactionResult(ctrl *gomock.Controller) *MockDBTransactionResult

NewMockDBTransactionResult creates a new mock instance.

func (*MockDBTransactionResult) EXPECT

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

func (*MockDBTransactionResult) GetItem

func (m *MockDBTransactionResult) GetItem(cosmosUID string) (any, error)

GetItem mocks base method.

type MockDBTransactionResultGetItemCall

type MockDBTransactionResultGetItemCall struct {
	*gomock.Call
}

MockDBTransactionResultGetItemCall wrap *gomock.Call

func (*MockDBTransactionResultGetItemCall) Do

Do rewrite *gomock.Call.Do

func (*MockDBTransactionResultGetItemCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockDBTransactionResultGetItemCall) Return

Return rewrite *gomock.Call.Return

type MockDBTransactionResultMockRecorder

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

MockDBTransactionResultMockRecorder is the mock recorder for MockDBTransactionResult.

func (*MockDBTransactionResultMockRecorder) GetItem

GetItem indicates an expected call of GetItem.

type MockExternalAuthsCRUD

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

MockExternalAuthsCRUD is a mock of ExternalAuthsCRUD interface.

func NewMockExternalAuthsCRUD

func NewMockExternalAuthsCRUD(ctrl *gomock.Controller) *MockExternalAuthsCRUD

NewMockExternalAuthsCRUD creates a new mock instance.

func (*MockExternalAuthsCRUD) AddCreateToTransaction

AddCreateToTransaction mocks base method.

func (*MockExternalAuthsCRUD) AddReplaceToTransaction

AddReplaceToTransaction mocks base method.

func (*MockExternalAuthsCRUD) Controllers

func (m *MockExternalAuthsCRUD) Controllers(hcpClusterID string) ResourceCRUD[api.Controller]

Controllers mocks base method.

func (*MockExternalAuthsCRUD) Create

Create mocks base method.

func (*MockExternalAuthsCRUD) Delete

func (m *MockExternalAuthsCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockExternalAuthsCRUD) EXPECT

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

func (*MockExternalAuthsCRUD) Get

Get mocks base method.

func (*MockExternalAuthsCRUD) GetByID

GetByID mocks base method.

func (*MockExternalAuthsCRUD) List

List mocks base method.

func (*MockExternalAuthsCRUD) Replace

Replace mocks base method.

type MockExternalAuthsCRUDAddCreateToTransactionCall

type MockExternalAuthsCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockExternalAuthsCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDAddReplaceToTransactionCall

type MockExternalAuthsCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockExternalAuthsCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDControllersCall

type MockExternalAuthsCRUDControllersCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDControllersCall wrap *gomock.Call

func (*MockExternalAuthsCRUDControllersCall) Do

Do rewrite *gomock.Call.Do

func (*MockExternalAuthsCRUDControllersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDControllersCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDCreateCall

type MockExternalAuthsCRUDCreateCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDCreateCall wrap *gomock.Call

func (*MockExternalAuthsCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDDeleteCall

type MockExternalAuthsCRUDDeleteCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDDeleteCall wrap *gomock.Call

func (*MockExternalAuthsCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockExternalAuthsCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDGetByIDCall

type MockExternalAuthsCRUDGetByIDCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDGetByIDCall wrap *gomock.Call

func (*MockExternalAuthsCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockExternalAuthsCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDGetCall

type MockExternalAuthsCRUDGetCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDGetCall wrap *gomock.Call

func (*MockExternalAuthsCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockExternalAuthsCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDListCall

type MockExternalAuthsCRUDListCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDListCall wrap *gomock.Call

func (*MockExternalAuthsCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockExternalAuthsCRUDMockRecorder

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

MockExternalAuthsCRUDMockRecorder is the mock recorder for MockExternalAuthsCRUD.

func (*MockExternalAuthsCRUDMockRecorder) AddCreateToTransaction

func (mr *MockExternalAuthsCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockExternalAuthsCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockExternalAuthsCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockExternalAuthsCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockExternalAuthsCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockExternalAuthsCRUDMockRecorder) Controllers

Controllers indicates an expected call of Controllers.

func (*MockExternalAuthsCRUDMockRecorder) Create

func (mr *MockExternalAuthsCRUDMockRecorder) Create(ctx, newObj, options any) *MockExternalAuthsCRUDCreateCall

Create indicates an expected call of Create.

func (*MockExternalAuthsCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockExternalAuthsCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockExternalAuthsCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockExternalAuthsCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockExternalAuthsCRUDMockRecorder) Replace

func (mr *MockExternalAuthsCRUDMockRecorder) Replace(ctx, newObj, options any) *MockExternalAuthsCRUDReplaceCall

Replace indicates an expected call of Replace.

type MockExternalAuthsCRUDReplaceCall

type MockExternalAuthsCRUDReplaceCall struct {
	*gomock.Call
}

MockExternalAuthsCRUDReplaceCall wrap *gomock.Call

func (*MockExternalAuthsCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExternalAuthsCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUD

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

MockHCPClusterCRUD is a mock of HCPClusterCRUD interface.

func NewMockHCPClusterCRUD

func NewMockHCPClusterCRUD(ctrl *gomock.Controller) *MockHCPClusterCRUD

NewMockHCPClusterCRUD creates a new mock instance.

func (*MockHCPClusterCRUD) AddCreateToTransaction

func (m *MockHCPClusterCRUD) AddCreateToTransaction(ctx context.Context, transaction DBTransaction, newObj *api.HCPOpenShiftCluster, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddCreateToTransaction mocks base method.

func (*MockHCPClusterCRUD) AddReplaceToTransaction

func (m *MockHCPClusterCRUD) AddReplaceToTransaction(ctx context.Context, transaction DBTransaction, newObj *api.HCPOpenShiftCluster, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddReplaceToTransaction mocks base method.

func (*MockHCPClusterCRUD) Controllers

func (m *MockHCPClusterCRUD) Controllers(hcpClusterID string) ResourceCRUD[api.Controller]

Controllers mocks base method.

func (*MockHCPClusterCRUD) Create

Create mocks base method.

func (*MockHCPClusterCRUD) Delete

func (m *MockHCPClusterCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockHCPClusterCRUD) EXPECT

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

func (*MockHCPClusterCRUD) ExternalAuth

func (m *MockHCPClusterCRUD) ExternalAuth(hcpClusterID string) ExternalAuthsCRUD

ExternalAuth mocks base method.

func (*MockHCPClusterCRUD) Get

Get mocks base method.

func (*MockHCPClusterCRUD) GetByID

func (m *MockHCPClusterCRUD) GetByID(ctx context.Context, cosmosID string) (*api.HCPOpenShiftCluster, error)

GetByID mocks base method.

func (*MockHCPClusterCRUD) List

List mocks base method.

func (*MockHCPClusterCRUD) NodePools

func (m *MockHCPClusterCRUD) NodePools(hcpClusterID string) NodePoolsCRUD

NodePools mocks base method.

func (*MockHCPClusterCRUD) Replace

Replace mocks base method.

type MockHCPClusterCRUDAddCreateToTransactionCall

type MockHCPClusterCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockHCPClusterCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockHCPClusterCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDAddReplaceToTransactionCall

type MockHCPClusterCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockHCPClusterCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockHCPClusterCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDControllersCall

type MockHCPClusterCRUDControllersCall struct {
	*gomock.Call
}

MockHCPClusterCRUDControllersCall wrap *gomock.Call

func (*MockHCPClusterCRUDControllersCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDControllersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDControllersCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDCreateCall

type MockHCPClusterCRUDCreateCall struct {
	*gomock.Call
}

MockHCPClusterCRUDCreateCall wrap *gomock.Call

func (*MockHCPClusterCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDDeleteCall

type MockHCPClusterCRUDDeleteCall struct {
	*gomock.Call
}

MockHCPClusterCRUDDeleteCall wrap *gomock.Call

func (*MockHCPClusterCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDExternalAuthCall

type MockHCPClusterCRUDExternalAuthCall struct {
	*gomock.Call
}

MockHCPClusterCRUDExternalAuthCall wrap *gomock.Call

func (*MockHCPClusterCRUDExternalAuthCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDExternalAuthCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDExternalAuthCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDGetByIDCall

type MockHCPClusterCRUDGetByIDCall struct {
	*gomock.Call
}

MockHCPClusterCRUDGetByIDCall wrap *gomock.Call

func (*MockHCPClusterCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDGetCall

type MockHCPClusterCRUDGetCall struct {
	*gomock.Call
}

MockHCPClusterCRUDGetCall wrap *gomock.Call

func (*MockHCPClusterCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDListCall

type MockHCPClusterCRUDListCall struct {
	*gomock.Call
}

MockHCPClusterCRUDListCall wrap *gomock.Call

func (*MockHCPClusterCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDMockRecorder

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

MockHCPClusterCRUDMockRecorder is the mock recorder for MockHCPClusterCRUD.

func (*MockHCPClusterCRUDMockRecorder) AddCreateToTransaction

func (mr *MockHCPClusterCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockHCPClusterCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockHCPClusterCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockHCPClusterCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockHCPClusterCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockHCPClusterCRUDMockRecorder) Controllers

Controllers indicates an expected call of Controllers.

func (*MockHCPClusterCRUDMockRecorder) Create

func (mr *MockHCPClusterCRUDMockRecorder) Create(ctx, newObj, options any) *MockHCPClusterCRUDCreateCall

Create indicates an expected call of Create.

func (*MockHCPClusterCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockHCPClusterCRUDMockRecorder) ExternalAuth

ExternalAuth indicates an expected call of ExternalAuth.

func (*MockHCPClusterCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockHCPClusterCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockHCPClusterCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockHCPClusterCRUDMockRecorder) NodePools

NodePools indicates an expected call of NodePools.

func (*MockHCPClusterCRUDMockRecorder) Replace

func (mr *MockHCPClusterCRUDMockRecorder) Replace(ctx, newObj, options any) *MockHCPClusterCRUDReplaceCall

Replace indicates an expected call of Replace.

type MockHCPClusterCRUDNodePoolsCall

type MockHCPClusterCRUDNodePoolsCall struct {
	*gomock.Call
}

MockHCPClusterCRUDNodePoolsCall wrap *gomock.Call

func (*MockHCPClusterCRUDNodePoolsCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDNodePoolsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDNodePoolsCall) Return

Return rewrite *gomock.Call.Return

type MockHCPClusterCRUDReplaceCall

type MockHCPClusterCRUDReplaceCall struct {
	*gomock.Call
}

MockHCPClusterCRUDReplaceCall wrap *gomock.Call

func (*MockHCPClusterCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockHCPClusterCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHCPClusterCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterface

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

MockLockClientInterface is a mock of LockClientInterface interface.

func NewMockLockClientInterface

func NewMockLockClientInterface(ctrl *gomock.Controller) *MockLockClientInterface

NewMockLockClientInterface creates a new mock instance.

func (*MockLockClientInterface) AcquireLock

func (m *MockLockClientInterface) AcquireLock(ctx context.Context, id string, timeout *time.Duration) (*azcosmos.ItemResponse, error)

AcquireLock mocks base method.

func (*MockLockClientInterface) EXPECT

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

func (*MockLockClientInterface) GetDefaultTimeToLive

func (m *MockLockClientInterface) GetDefaultTimeToLive() time.Duration

GetDefaultTimeToLive mocks base method.

func (*MockLockClientInterface) HoldLock

HoldLock mocks base method.

func (*MockLockClientInterface) ReleaseLock

ReleaseLock mocks base method.

func (*MockLockClientInterface) RenewLock

RenewLock mocks base method.

func (*MockLockClientInterface) SetRetryAfterHeader

func (m *MockLockClientInterface) SetRetryAfterHeader(header http.Header)

SetRetryAfterHeader mocks base method.

func (*MockLockClientInterface) TryAcquireLock

func (m *MockLockClientInterface) TryAcquireLock(ctx context.Context, id string) (*azcosmos.ItemResponse, error)

TryAcquireLock mocks base method.

type MockLockClientInterfaceAcquireLockCall

type MockLockClientInterfaceAcquireLockCall struct {
	*gomock.Call
}

MockLockClientInterfaceAcquireLockCall wrap *gomock.Call

func (*MockLockClientInterfaceAcquireLockCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceAcquireLockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceAcquireLockCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceGetDefaultTimeToLiveCall

type MockLockClientInterfaceGetDefaultTimeToLiveCall struct {
	*gomock.Call
}

MockLockClientInterfaceGetDefaultTimeToLiveCall wrap *gomock.Call

func (*MockLockClientInterfaceGetDefaultTimeToLiveCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceGetDefaultTimeToLiveCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceGetDefaultTimeToLiveCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceHoldLockCall

type MockLockClientInterfaceHoldLockCall struct {
	*gomock.Call
}

MockLockClientInterfaceHoldLockCall wrap *gomock.Call

func (*MockLockClientInterfaceHoldLockCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceHoldLockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceHoldLockCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceMockRecorder

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

MockLockClientInterfaceMockRecorder is the mock recorder for MockLockClientInterface.

func (*MockLockClientInterfaceMockRecorder) AcquireLock

AcquireLock indicates an expected call of AcquireLock.

func (*MockLockClientInterfaceMockRecorder) GetDefaultTimeToLive

GetDefaultTimeToLive indicates an expected call of GetDefaultTimeToLive.

func (*MockLockClientInterfaceMockRecorder) HoldLock

HoldLock indicates an expected call of HoldLock.

func (*MockLockClientInterfaceMockRecorder) ReleaseLock

ReleaseLock indicates an expected call of ReleaseLock.

func (*MockLockClientInterfaceMockRecorder) RenewLock

RenewLock indicates an expected call of RenewLock.

func (*MockLockClientInterfaceMockRecorder) SetRetryAfterHeader

SetRetryAfterHeader indicates an expected call of SetRetryAfterHeader.

func (*MockLockClientInterfaceMockRecorder) TryAcquireLock

TryAcquireLock indicates an expected call of TryAcquireLock.

type MockLockClientInterfaceReleaseLockCall

type MockLockClientInterfaceReleaseLockCall struct {
	*gomock.Call
}

MockLockClientInterfaceReleaseLockCall wrap *gomock.Call

func (*MockLockClientInterfaceReleaseLockCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceReleaseLockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceReleaseLockCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceRenewLockCall

type MockLockClientInterfaceRenewLockCall struct {
	*gomock.Call
}

MockLockClientInterfaceRenewLockCall wrap *gomock.Call

func (*MockLockClientInterfaceRenewLockCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceRenewLockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceRenewLockCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceSetRetryAfterHeaderCall

type MockLockClientInterfaceSetRetryAfterHeaderCall struct {
	*gomock.Call
}

MockLockClientInterfaceSetRetryAfterHeaderCall wrap *gomock.Call

func (*MockLockClientInterfaceSetRetryAfterHeaderCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceSetRetryAfterHeaderCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceSetRetryAfterHeaderCall) Return

Return rewrite *gomock.Call.Return

type MockLockClientInterfaceTryAcquireLockCall

type MockLockClientInterfaceTryAcquireLockCall struct {
	*gomock.Call
}

MockLockClientInterfaceTryAcquireLockCall wrap *gomock.Call

func (*MockLockClientInterfaceTryAcquireLockCall) Do

Do rewrite *gomock.Call.Do

func (*MockLockClientInterfaceTryAcquireLockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockLockClientInterfaceTryAcquireLockCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUD

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

MockManagementClusterContentCRUD is a mock of ManagementClusterContentCRUD interface.

func NewMockManagementClusterContentCRUD

func NewMockManagementClusterContentCRUD(ctrl *gomock.Controller) *MockManagementClusterContentCRUD

NewMockManagementClusterContentCRUD creates a new mock instance.

func (*MockManagementClusterContentCRUD) AddCreateToTransaction

AddCreateToTransaction mocks base method.

func (*MockManagementClusterContentCRUD) AddReplaceToTransaction

AddReplaceToTransaction mocks base method.

func (*MockManagementClusterContentCRUD) Create

Create mocks base method.

func (*MockManagementClusterContentCRUD) Delete

func (m *MockManagementClusterContentCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockManagementClusterContentCRUD) EXPECT

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

func (*MockManagementClusterContentCRUD) Get

Get mocks base method.

func (*MockManagementClusterContentCRUD) GetByID

GetByID mocks base method.

func (*MockManagementClusterContentCRUD) List

List mocks base method.

func (*MockManagementClusterContentCRUD) Replace

Replace mocks base method.

type MockManagementClusterContentCRUDAddCreateToTransactionCall

type MockManagementClusterContentCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDAddReplaceToTransactionCall

type MockManagementClusterContentCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDCreateCall

type MockManagementClusterContentCRUDCreateCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDCreateCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockManagementClusterContentCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDDeleteCall

type MockManagementClusterContentCRUDDeleteCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDDeleteCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockManagementClusterContentCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDGetByIDCall

type MockManagementClusterContentCRUDGetByIDCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDGetByIDCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockManagementClusterContentCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDGetCall

type MockManagementClusterContentCRUDGetCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDGetCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockManagementClusterContentCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDListCall

type MockManagementClusterContentCRUDListCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDListCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockManagementClusterContentCRUDMockRecorder

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

MockManagementClusterContentCRUDMockRecorder is the mock recorder for MockManagementClusterContentCRUD.

func (*MockManagementClusterContentCRUDMockRecorder) AddCreateToTransaction

func (mr *MockManagementClusterContentCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockManagementClusterContentCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockManagementClusterContentCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockManagementClusterContentCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockManagementClusterContentCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockManagementClusterContentCRUDMockRecorder) Create

Create indicates an expected call of Create.

func (*MockManagementClusterContentCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockManagementClusterContentCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockManagementClusterContentCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockManagementClusterContentCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockManagementClusterContentCRUDMockRecorder) Replace

Replace indicates an expected call of Replace.

type MockManagementClusterContentCRUDReplaceCall

type MockManagementClusterContentCRUDReplaceCall struct {
	*gomock.Call
}

MockManagementClusterContentCRUDReplaceCall wrap *gomock.Call

func (*MockManagementClusterContentCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockManagementClusterContentCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockManagementClusterContentCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUD

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

MockNodePoolsCRUD is a mock of NodePoolsCRUD interface.

func NewMockNodePoolsCRUD

func NewMockNodePoolsCRUD(ctrl *gomock.Controller) *MockNodePoolsCRUD

NewMockNodePoolsCRUD creates a new mock instance.

func (*MockNodePoolsCRUD) AddCreateToTransaction

AddCreateToTransaction mocks base method.

func (*MockNodePoolsCRUD) AddReplaceToTransaction

func (m *MockNodePoolsCRUD) AddReplaceToTransaction(ctx context.Context, transaction DBTransaction, newObj *api.HCPOpenShiftClusterNodePool, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddReplaceToTransaction mocks base method.

func (*MockNodePoolsCRUD) Controllers

func (m *MockNodePoolsCRUD) Controllers(hcpClusterID string) ResourceCRUD[api.Controller]

Controllers mocks base method.

func (*MockNodePoolsCRUD) Create

Create mocks base method.

func (*MockNodePoolsCRUD) Delete

func (m *MockNodePoolsCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockNodePoolsCRUD) EXPECT

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

func (*MockNodePoolsCRUD) Get

Get mocks base method.

func (*MockNodePoolsCRUD) GetByID

GetByID mocks base method.

func (*MockNodePoolsCRUD) List

List mocks base method.

func (*MockNodePoolsCRUD) Replace

Replace mocks base method.

type MockNodePoolsCRUDAddCreateToTransactionCall

type MockNodePoolsCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockNodePoolsCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockNodePoolsCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDAddReplaceToTransactionCall

type MockNodePoolsCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockNodePoolsCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockNodePoolsCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDControllersCall

type MockNodePoolsCRUDControllersCall struct {
	*gomock.Call
}

MockNodePoolsCRUDControllersCall wrap *gomock.Call

func (*MockNodePoolsCRUDControllersCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDControllersCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDControllersCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDCreateCall

type MockNodePoolsCRUDCreateCall struct {
	*gomock.Call
}

MockNodePoolsCRUDCreateCall wrap *gomock.Call

func (*MockNodePoolsCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDDeleteCall

type MockNodePoolsCRUDDeleteCall struct {
	*gomock.Call
}

MockNodePoolsCRUDDeleteCall wrap *gomock.Call

func (*MockNodePoolsCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDGetByIDCall

type MockNodePoolsCRUDGetByIDCall struct {
	*gomock.Call
}

MockNodePoolsCRUDGetByIDCall wrap *gomock.Call

func (*MockNodePoolsCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDGetCall

type MockNodePoolsCRUDGetCall struct {
	*gomock.Call
}

MockNodePoolsCRUDGetCall wrap *gomock.Call

func (*MockNodePoolsCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDListCall

type MockNodePoolsCRUDListCall struct {
	*gomock.Call
}

MockNodePoolsCRUDListCall wrap *gomock.Call

func (*MockNodePoolsCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockNodePoolsCRUDMockRecorder

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

MockNodePoolsCRUDMockRecorder is the mock recorder for MockNodePoolsCRUD.

func (*MockNodePoolsCRUDMockRecorder) AddCreateToTransaction

func (mr *MockNodePoolsCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockNodePoolsCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockNodePoolsCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockNodePoolsCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockNodePoolsCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockNodePoolsCRUDMockRecorder) Controllers

Controllers indicates an expected call of Controllers.

func (*MockNodePoolsCRUDMockRecorder) Create

func (mr *MockNodePoolsCRUDMockRecorder) Create(ctx, newObj, options any) *MockNodePoolsCRUDCreateCall

Create indicates an expected call of Create.

func (*MockNodePoolsCRUDMockRecorder) Delete

func (mr *MockNodePoolsCRUDMockRecorder) Delete(ctx, resourceID any) *MockNodePoolsCRUDDeleteCall

Delete indicates an expected call of Delete.

func (*MockNodePoolsCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockNodePoolsCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockNodePoolsCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockNodePoolsCRUDMockRecorder) Replace

func (mr *MockNodePoolsCRUDMockRecorder) Replace(ctx, newObj, options any) *MockNodePoolsCRUDReplaceCall

Replace indicates an expected call of Replace.

type MockNodePoolsCRUDReplaceCall

type MockNodePoolsCRUDReplaceCall struct {
	*gomock.Call
}

MockNodePoolsCRUDReplaceCall wrap *gomock.Call

func (*MockNodePoolsCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockNodePoolsCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockNodePoolsCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUD

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

MockOperationCRUD is a mock of OperationCRUD interface.

func NewMockOperationCRUD

func NewMockOperationCRUD(ctrl *gomock.Controller) *MockOperationCRUD

NewMockOperationCRUD creates a new mock instance.

func (*MockOperationCRUD) AddCreateToTransaction

func (m *MockOperationCRUD) AddCreateToTransaction(ctx context.Context, transaction DBTransaction, newObj *api.Operation, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddCreateToTransaction mocks base method.

func (*MockOperationCRUD) AddReplaceToTransaction

func (m *MockOperationCRUD) AddReplaceToTransaction(ctx context.Context, transaction DBTransaction, newObj *api.Operation, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddReplaceToTransaction mocks base method.

func (*MockOperationCRUD) Create

func (m *MockOperationCRUD) Create(ctx context.Context, newObj *api.Operation, options *azcosmos.ItemOptions) (*api.Operation, error)

Create mocks base method.

func (*MockOperationCRUD) Delete

func (m *MockOperationCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockOperationCRUD) EXPECT

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

func (*MockOperationCRUD) Get

func (m *MockOperationCRUD) Get(ctx context.Context, resourceID string) (*api.Operation, error)

Get mocks base method.

func (*MockOperationCRUD) GetByID

func (m *MockOperationCRUD) GetByID(ctx context.Context, cosmosID string) (*api.Operation, error)

GetByID mocks base method.

func (*MockOperationCRUD) List

List mocks base method.

func (*MockOperationCRUD) ListActiveOperations

ListActiveOperations mocks base method.

func (*MockOperationCRUD) Replace

func (m *MockOperationCRUD) Replace(ctx context.Context, newObj *api.Operation, options *azcosmos.ItemOptions) (*api.Operation, error)

Replace mocks base method.

type MockOperationCRUDAddCreateToTransactionCall

type MockOperationCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockOperationCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockOperationCRUDAddCreateToTransactionCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDAddReplaceToTransactionCall

type MockOperationCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockOperationCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockOperationCRUDAddReplaceToTransactionCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDCreateCall

type MockOperationCRUDCreateCall struct {
	*gomock.Call
}

MockOperationCRUDCreateCall wrap *gomock.Call

func (*MockOperationCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDDeleteCall

type MockOperationCRUDDeleteCall struct {
	*gomock.Call
}

MockOperationCRUDDeleteCall wrap *gomock.Call

func (*MockOperationCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDGetByIDCall

type MockOperationCRUDGetByIDCall struct {
	*gomock.Call
}

MockOperationCRUDGetByIDCall wrap *gomock.Call

func (*MockOperationCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDGetCall

type MockOperationCRUDGetCall struct {
	*gomock.Call
}

MockOperationCRUDGetCall wrap *gomock.Call

func (*MockOperationCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDListActiveOperationsCall

type MockOperationCRUDListActiveOperationsCall struct {
	*gomock.Call
}

MockOperationCRUDListActiveOperationsCall wrap *gomock.Call

func (*MockOperationCRUDListActiveOperationsCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDListActiveOperationsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDListActiveOperationsCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDListCall

type MockOperationCRUDListCall struct {
	*gomock.Call
}

MockOperationCRUDListCall wrap *gomock.Call

func (*MockOperationCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockOperationCRUDMockRecorder

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

MockOperationCRUDMockRecorder is the mock recorder for MockOperationCRUD.

func (*MockOperationCRUDMockRecorder) AddCreateToTransaction

func (mr *MockOperationCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockOperationCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockOperationCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockOperationCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockOperationCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockOperationCRUDMockRecorder) Create

func (mr *MockOperationCRUDMockRecorder) Create(ctx, newObj, options any) *MockOperationCRUDCreateCall

Create indicates an expected call of Create.

func (*MockOperationCRUDMockRecorder) Delete

func (mr *MockOperationCRUDMockRecorder) Delete(ctx, resourceID any) *MockOperationCRUDDeleteCall

Delete indicates an expected call of Delete.

func (*MockOperationCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockOperationCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockOperationCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockOperationCRUDMockRecorder) ListActiveOperations

ListActiveOperations indicates an expected call of ListActiveOperations.

func (*MockOperationCRUDMockRecorder) Replace

func (mr *MockOperationCRUDMockRecorder) Replace(ctx, newObj, options any) *MockOperationCRUDReplaceCall

Replace indicates an expected call of Replace.

type MockOperationCRUDReplaceCall

type MockOperationCRUDReplaceCall struct {
	*gomock.Call
}

MockOperationCRUDReplaceCall wrap *gomock.Call

func (*MockOperationCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockOperationCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockOperationCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUD

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

MockServiceProviderClusterCRUD is a mock of ServiceProviderClusterCRUD interface.

func NewMockServiceProviderClusterCRUD

func NewMockServiceProviderClusterCRUD(ctrl *gomock.Controller) *MockServiceProviderClusterCRUD

NewMockServiceProviderClusterCRUD creates a new mock instance.

func (*MockServiceProviderClusterCRUD) AddCreateToTransaction

AddCreateToTransaction mocks base method.

func (*MockServiceProviderClusterCRUD) AddReplaceToTransaction

AddReplaceToTransaction mocks base method.

func (*MockServiceProviderClusterCRUD) Create

Create mocks base method.

func (*MockServiceProviderClusterCRUD) Delete

func (m *MockServiceProviderClusterCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockServiceProviderClusterCRUD) EXPECT

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

func (*MockServiceProviderClusterCRUD) Get

Get mocks base method.

func (*MockServiceProviderClusterCRUD) GetByID

GetByID mocks base method.

func (*MockServiceProviderClusterCRUD) List

List mocks base method.

func (*MockServiceProviderClusterCRUD) Replace

Replace mocks base method.

type MockServiceProviderClusterCRUDAddCreateToTransactionCall

type MockServiceProviderClusterCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDAddReplaceToTransactionCall

type MockServiceProviderClusterCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDCreateCall

type MockServiceProviderClusterCRUDCreateCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDCreateCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDDeleteCall

type MockServiceProviderClusterCRUDDeleteCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDDeleteCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDGetByIDCall

type MockServiceProviderClusterCRUDGetByIDCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDGetByIDCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDGetCall

type MockServiceProviderClusterCRUDGetCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDGetCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDListCall

type MockServiceProviderClusterCRUDListCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDListCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockServiceProviderClusterCRUDMockRecorder

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

MockServiceProviderClusterCRUDMockRecorder is the mock recorder for MockServiceProviderClusterCRUD.

func (*MockServiceProviderClusterCRUDMockRecorder) AddCreateToTransaction

func (mr *MockServiceProviderClusterCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockServiceProviderClusterCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockServiceProviderClusterCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockServiceProviderClusterCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockServiceProviderClusterCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockServiceProviderClusterCRUDMockRecorder) Create

Create indicates an expected call of Create.

func (*MockServiceProviderClusterCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockServiceProviderClusterCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockServiceProviderClusterCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockServiceProviderClusterCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockServiceProviderClusterCRUDMockRecorder) Replace

Replace indicates an expected call of Replace.

type MockServiceProviderClusterCRUDReplaceCall

type MockServiceProviderClusterCRUDReplaceCall struct {
	*gomock.Call
}

MockServiceProviderClusterCRUDReplaceCall wrap *gomock.Call

func (*MockServiceProviderClusterCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockServiceProviderClusterCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockServiceProviderClusterCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUD

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

MockSubscriptionCRUD is a mock of SubscriptionCRUD interface.

func NewMockSubscriptionCRUD

func NewMockSubscriptionCRUD(ctrl *gomock.Controller) *MockSubscriptionCRUD

NewMockSubscriptionCRUD creates a new mock instance.

func (*MockSubscriptionCRUD) AddCreateToTransaction

func (m *MockSubscriptionCRUD) AddCreateToTransaction(ctx context.Context, transaction DBTransaction, newObj *arm.Subscription, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddCreateToTransaction mocks base method.

func (*MockSubscriptionCRUD) AddReplaceToTransaction

func (m *MockSubscriptionCRUD) AddReplaceToTransaction(ctx context.Context, transaction DBTransaction, newObj *arm.Subscription, opts *azcosmos.TransactionalBatchItemOptions) (string, error)

AddReplaceToTransaction mocks base method.

func (*MockSubscriptionCRUD) Create

Create mocks base method.

func (*MockSubscriptionCRUD) Delete

func (m *MockSubscriptionCRUD) Delete(ctx context.Context, resourceID string) error

Delete mocks base method.

func (*MockSubscriptionCRUD) EXPECT

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

func (*MockSubscriptionCRUD) Get

func (m *MockSubscriptionCRUD) Get(ctx context.Context, resourceID string) (*arm.Subscription, error)

Get mocks base method.

func (*MockSubscriptionCRUD) GetByID

func (m *MockSubscriptionCRUD) GetByID(ctx context.Context, cosmosID string) (*arm.Subscription, error)

GetByID mocks base method.

func (*MockSubscriptionCRUD) List

List mocks base method.

func (*MockSubscriptionCRUD) Replace

Replace mocks base method.

type MockSubscriptionCRUDAddCreateToTransactionCall

type MockSubscriptionCRUDAddCreateToTransactionCall struct {
	*gomock.Call
}

MockSubscriptionCRUDAddCreateToTransactionCall wrap *gomock.Call

func (*MockSubscriptionCRUDAddCreateToTransactionCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDAddCreateToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDAddCreateToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDAddReplaceToTransactionCall

type MockSubscriptionCRUDAddReplaceToTransactionCall struct {
	*gomock.Call
}

MockSubscriptionCRUDAddReplaceToTransactionCall wrap *gomock.Call

func (*MockSubscriptionCRUDAddReplaceToTransactionCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDAddReplaceToTransactionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDAddReplaceToTransactionCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDCreateCall

type MockSubscriptionCRUDCreateCall struct {
	*gomock.Call
}

MockSubscriptionCRUDCreateCall wrap *gomock.Call

func (*MockSubscriptionCRUDCreateCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDCreateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDCreateCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDDeleteCall

type MockSubscriptionCRUDDeleteCall struct {
	*gomock.Call
}

MockSubscriptionCRUDDeleteCall wrap *gomock.Call

func (*MockSubscriptionCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDGetByIDCall

type MockSubscriptionCRUDGetByIDCall struct {
	*gomock.Call
}

MockSubscriptionCRUDGetByIDCall wrap *gomock.Call

func (*MockSubscriptionCRUDGetByIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDGetByIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDGetByIDCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDGetCall

type MockSubscriptionCRUDGetCall struct {
	*gomock.Call
}

MockSubscriptionCRUDGetCall wrap *gomock.Call

func (*MockSubscriptionCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDListCall

type MockSubscriptionCRUDListCall struct {
	*gomock.Call
}

MockSubscriptionCRUDListCall wrap *gomock.Call

func (*MockSubscriptionCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockSubscriptionCRUDMockRecorder

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

MockSubscriptionCRUDMockRecorder is the mock recorder for MockSubscriptionCRUD.

func (*MockSubscriptionCRUDMockRecorder) AddCreateToTransaction

func (mr *MockSubscriptionCRUDMockRecorder) AddCreateToTransaction(ctx, transaction, newObj, opts any) *MockSubscriptionCRUDAddCreateToTransactionCall

AddCreateToTransaction indicates an expected call of AddCreateToTransaction.

func (*MockSubscriptionCRUDMockRecorder) AddReplaceToTransaction

func (mr *MockSubscriptionCRUDMockRecorder) AddReplaceToTransaction(ctx, transaction, newObj, opts any) *MockSubscriptionCRUDAddReplaceToTransactionCall

AddReplaceToTransaction indicates an expected call of AddReplaceToTransaction.

func (*MockSubscriptionCRUDMockRecorder) Create

func (mr *MockSubscriptionCRUDMockRecorder) Create(ctx, newObj, options any) *MockSubscriptionCRUDCreateCall

Create indicates an expected call of Create.

func (*MockSubscriptionCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockSubscriptionCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockSubscriptionCRUDMockRecorder) GetByID

GetByID indicates an expected call of GetByID.

func (*MockSubscriptionCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockSubscriptionCRUDMockRecorder) Replace

func (mr *MockSubscriptionCRUDMockRecorder) Replace(ctx, newObj, options any) *MockSubscriptionCRUDReplaceCall

Replace indicates an expected call of Replace.

type MockSubscriptionCRUDReplaceCall

type MockSubscriptionCRUDReplaceCall struct {
	*gomock.Call
}

MockSubscriptionCRUDReplaceCall wrap *gomock.Call

func (*MockSubscriptionCRUDReplaceCall) Do

Do rewrite *gomock.Call.Do

func (*MockSubscriptionCRUDReplaceCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockSubscriptionCRUDReplaceCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUD

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

MockUntypedResourceCRUD is a mock of UntypedResourceCRUD interface.

func NewMockUntypedResourceCRUD

func NewMockUntypedResourceCRUD(ctrl *gomock.Controller) *MockUntypedResourceCRUD

NewMockUntypedResourceCRUD creates a new mock instance.

func (*MockUntypedResourceCRUD) Child

func (m *MockUntypedResourceCRUD) Child(resourceType arm.ResourceType, resourceName string) (UntypedResourceCRUD, error)

Child mocks base method.

func (*MockUntypedResourceCRUD) Delete

func (m *MockUntypedResourceCRUD) Delete(ctx context.Context, resourceID *arm.ResourceID) error

Delete mocks base method.

func (*MockUntypedResourceCRUD) DeleteByCosmosID

func (m *MockUntypedResourceCRUD) DeleteByCosmosID(ctx context.Context, partitionKey, cosmosID string) error

DeleteByCosmosID mocks base method.

func (*MockUntypedResourceCRUD) EXPECT

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

func (*MockUntypedResourceCRUD) Get

Get mocks base method.

func (*MockUntypedResourceCRUD) List

List mocks base method.

func (*MockUntypedResourceCRUD) ListRecursive

ListRecursive mocks base method.

type MockUntypedResourceCRUDChildCall

type MockUntypedResourceCRUDChildCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDChildCall wrap *gomock.Call

func (*MockUntypedResourceCRUDChildCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDChildCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDChildCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDDeleteByCosmosIDCall

type MockUntypedResourceCRUDDeleteByCosmosIDCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDDeleteByCosmosIDCall wrap *gomock.Call

func (*MockUntypedResourceCRUDDeleteByCosmosIDCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDDeleteByCosmosIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDDeleteByCosmosIDCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDDeleteCall

type MockUntypedResourceCRUDDeleteCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDDeleteCall wrap *gomock.Call

func (*MockUntypedResourceCRUDDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDGetCall

type MockUntypedResourceCRUDGetCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDGetCall wrap *gomock.Call

func (*MockUntypedResourceCRUDGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDGetCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDGetCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDListCall

type MockUntypedResourceCRUDListCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDListCall wrap *gomock.Call

func (*MockUntypedResourceCRUDListCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDListCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDListCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDListRecursiveCall

type MockUntypedResourceCRUDListRecursiveCall struct {
	*gomock.Call
}

MockUntypedResourceCRUDListRecursiveCall wrap *gomock.Call

func (*MockUntypedResourceCRUDListRecursiveCall) Do

Do rewrite *gomock.Call.Do

func (*MockUntypedResourceCRUDListRecursiveCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUntypedResourceCRUDListRecursiveCall) Return

Return rewrite *gomock.Call.Return

type MockUntypedResourceCRUDMockRecorder

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

MockUntypedResourceCRUDMockRecorder is the mock recorder for MockUntypedResourceCRUD.

func (*MockUntypedResourceCRUDMockRecorder) Child

func (mr *MockUntypedResourceCRUDMockRecorder) Child(resourceType, resourceName any) *MockUntypedResourceCRUDChildCall

Child indicates an expected call of Child.

func (*MockUntypedResourceCRUDMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockUntypedResourceCRUDMockRecorder) DeleteByCosmosID

func (mr *MockUntypedResourceCRUDMockRecorder) DeleteByCosmosID(ctx, partitionKey, cosmosID any) *MockUntypedResourceCRUDDeleteByCosmosIDCall

DeleteByCosmosID indicates an expected call of DeleteByCosmosID.

func (*MockUntypedResourceCRUDMockRecorder) Get

Get indicates an expected call of Get.

func (*MockUntypedResourceCRUDMockRecorder) List

List indicates an expected call of List.

func (*MockUntypedResourceCRUDMockRecorder) ListRecursive

ListRecursive indicates an expected call of ListRecursive.

type NodePool

type NodePool struct {
	TypedDocument `json:",inline"`

	NodePoolProperties `json:"properties"`
}

func InternalToCosmosNodePool

func InternalToCosmosNodePool(internalObj *api.HCPOpenShiftClusterNodePool) (*NodePool, error)

func (*NodePool) GetTypedDocument

func (o *NodePool) GetTypedDocument() *TypedDocument

type NodePoolInternalState

type NodePoolInternalState struct {
	InternalAPI api.HCPOpenShiftClusterNodePool `json:"internalAPI"`
}

type NodePoolProperties

type NodePoolProperties struct {
	*ResourceDocument `json:",inline"`

	// when we switch to inlining the internalObj, this will be in the right spot.  We add it now so that we can switch our
	// queries to select on cosmosMetata.ResourceID instead of resourceId
	CosmosMetadata api.CosmosMetadata `json:"cosmosMetadata"`

	// IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly
	// embed the InternalAPIType which has colliding serialization fields.
	IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"`

	// TODO we may need look-aside data that we want to store in the same place.  Build the nesting to allow it
	InternalState NodePoolInternalState `json:"internalState"`
}

type OperationCRUD

type OperationCRUD interface {
	ResourceCRUD[api.Operation]

	// ListActiveOperations returns an iterator that searches for asynchronous operation documents
	// with a non-terminal status in the "Resources" container under the given partition key. The
	// options argument can further limit the search to documents that match the provided values.
	//
	// Note that ListActiveOperations does not perform the search, but merely prepares an iterator
	// to do so. Hence the lack of a Context argument. The search is performed by calling Items() on
	// the iterator in a ranged for loop.
	ListActiveOperations(options *DBClientListActiveOperationDocsOptions) DBClientIterator[api.Operation]
}

func NewOperationCRUD

func NewOperationCRUD(containerClient *azcosmos.ContainerClient, subscriptionID string) OperationCRUD

type OperationRequest

type OperationRequest = api.OperationRequest
const (
	OperationRequestCreate OperationRequest = "Create"
	OperationRequestUpdate OperationRequest = "Update"
	OperationRequestDelete OperationRequest = "Delete"

	// These are for POST actions on resources.
	OperationRequestRequestCredential OperationRequest = "RequestCredential"
	OperationRequestRevokeCredentials OperationRequest = "RevokeCredentials"
)

type PostAsyncNotificationFunc

type PostAsyncNotificationFunc func(ctx context.Context, operation *api.Operation) error

type ResourceCRUD

type ResourceCRUD[InternalAPIType any] interface {
	GetByID(ctx context.Context, cosmosID string) (*InternalAPIType, error)
	Get(ctx context.Context, resourceID string) (*InternalAPIType, error)
	List(ctx context.Context, opts *DBClientListResourceDocsOptions) (DBClientIterator[InternalAPIType], error)
	Create(ctx context.Context, newObj *InternalAPIType, options *azcosmos.ItemOptions) (*InternalAPIType, error)
	Replace(ctx context.Context, newObj *InternalAPIType, options *azcosmos.ItemOptions) (*InternalAPIType, error)
	Delete(ctx context.Context, resourceID string) error

	AddCreateToTransaction(ctx context.Context, transaction DBTransaction, newObj *InternalAPIType, opts *azcosmos.TransactionalBatchItemOptions) (string, error)
	AddReplaceToTransaction(ctx context.Context, transaction DBTransaction, newObj *InternalAPIType, opts *azcosmos.TransactionalBatchItemOptions) (string, error)
}

func NewControllerCRUD

func NewControllerCRUD(
	containerClient *azcosmos.ContainerClient, parentResourceID *azcorearm.ResourceID, resourceType azcorearm.ResourceType) ResourceCRUD[api.Controller]

type ResourceDocument

type ResourceDocument struct {
	ResourceID        *azcorearm.ResourceID       `json:"resourceId,omitempty"`
	InternalID        ocm.InternalID              `json:"internalId,omitempty"`
	ActiveOperationID string                      `json:"activeOperationId,omitempty"`
	ProvisioningState arm.ProvisioningState       `json:"provisioningState,omitempty"`
	Identity          *arm.ManagedServiceIdentity `json:"identity,omitempty"`
	SystemData        *arm.SystemData             `json:"systemData,omitempty"`
	Tags              map[string]string           `json:"tags,omitempty"`

	InternalState map[string]any `json:"internalState,omitempty"`
}

ResourceDocument captures the mapping of an Azure resource ID to an internal resource ID (the OCM API path), as well as any ARM-specific metadata for the resource.

func NewResourceDocument

func NewResourceDocument(resourceID *azcorearm.ResourceID) *ResourceDocument

func (*ResourceDocument) SetResourceID

func (o *ResourceDocument) SetResourceID(newResourceID *azcorearm.ResourceID)

type ResourceDocumentStateFilter

type ResourceDocumentStateFilter interface {
	// RemoveUnknownFields checks the customerDesiredState and serviceProviderState and removes unknown fields.
	// The simplest implementation is "remove everything" and the next simplest is round-tripping through JSON.
	RemoveUnknownFields(*ResourceDocument) error
}

ResourceDocumentStateFilter is used to remove unknown fields from ResourceDocumentProperties. Long-term, we want to reach a point where we store different types so we have full type-safety throughout the stack. Short-term, we want a low-touch modification that makes it safe to store new fields.

type ServiceProviderClusterCRUD

type ServiceProviderClusterCRUD interface {
	ResourceCRUD[api.ServiceProviderCluster]
}

type ServiceProviderNodePoolCRUD

type ServiceProviderNodePoolCRUD interface {
	ResourceCRUD[api.ServiceProviderNodePool]
}

type StopHoldLock

type StopHoldLock func() *azcosmos.ItemResponse

type SubscriptionCRUD

type SubscriptionCRUD interface {
	ResourceCRUD[arm.Subscription]
}

type TypedDocument

type TypedDocument struct {
	BaseDocument
	PartitionKey string                `json:"partitionKey"`
	ResourceID   *azcorearm.ResourceID `json:"resourceID"`
	ResourceType string                `json:"resourceType"`
	Properties   json.RawMessage       `json:"properties"`
}

TypedDocument is a BaseDocument with a ResourceType field to help distinguish heterogeneous items in a Cosmos DB container. The Properties field can be unmarshalled to any type that implements the DocumentProperties interface.

func (*TypedDocument) GetTypedDocument

func (td *TypedDocument) GetTypedDocument() *TypedDocument

type TypedDocumentAccessor

type TypedDocumentAccessor interface {
	GetTypedDocument() *TypedDocument
}

type UntypedResourceCRUD

type UntypedResourceCRUD interface {
	Get(ctx context.Context, resourceID *azcorearm.ResourceID) (*TypedDocument, error)
	// List returns back only direct descendents from the parent.
	List(ctx context.Context, opts *DBClientListResourceDocsOptions) (DBClientIterator[TypedDocument], error)
	// ListRecursive returns back every descendent from the parent.  For instance, if you ListRecursive on a cluster,
	// you will get the controllers for the cluster, the nodepools, the controllers for each nodepool, the external auths,
	// the controllers for the external auths, etc.
	ListRecursive(ctx context.Context, opts *DBClientListResourceDocsOptions) (DBClientIterator[TypedDocument], error)
	Delete(ctx context.Context, resourceID *azcorearm.ResourceID) error
	DeleteByCosmosID(ctx context.Context, partitionKey, cosmosID string) error

	Child(resourceType azcorearm.ResourceType, resourceName string) (UntypedResourceCRUD, error)
}

func NewUntypedCRUD

func NewUntypedCRUD(containerClient *azcosmos.ContainerClient, parentResourceID azcorearm.ResourceID) UntypedResourceCRUD

Jump to

Keyboard shortcuts

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