Documentation ¶
Overview ¶
Package statusmanager is a generated GoMock package.
Index ¶
- type MockStatusManager
- func (m *MockStatusManager) Delete(arg0 context.Context, arg1 resources.ID, arg2 uuid.UUID) error
- func (m *MockStatusManager) EXPECT() *MockStatusManagerMockRecorder
- func (m *MockStatusManager) Get(arg0 context.Context, arg1 resources.ID, arg2 uuid.UUID) (*Status, error)
- func (m *MockStatusManager) QueueAsyncOperation(arg0 context.Context, arg1 *v1.ARMRequestContext, arg2 QueueOperationOptions) error
- func (m *MockStatusManager) Update(arg0 context.Context, arg1 resources.ID, arg2 uuid.UUID, ...) error
- type MockStatusManagerDeleteCall
- func (c *MockStatusManagerDeleteCall) Do(f func(context.Context, resources.ID, uuid.UUID) error) *MockStatusManagerDeleteCall
- func (c *MockStatusManagerDeleteCall) DoAndReturn(f func(context.Context, resources.ID, uuid.UUID) error) *MockStatusManagerDeleteCall
- func (c *MockStatusManagerDeleteCall) Return(arg0 error) *MockStatusManagerDeleteCall
- type MockStatusManagerGetCall
- func (c *MockStatusManagerGetCall) Do(f func(context.Context, resources.ID, uuid.UUID) (*Status, error)) *MockStatusManagerGetCall
- func (c *MockStatusManagerGetCall) DoAndReturn(f func(context.Context, resources.ID, uuid.UUID) (*Status, error)) *MockStatusManagerGetCall
- func (c *MockStatusManagerGetCall) Return(arg0 *Status, arg1 error) *MockStatusManagerGetCall
- type MockStatusManagerMockRecorder
- func (mr *MockStatusManagerMockRecorder) Delete(arg0, arg1, arg2 any) *MockStatusManagerDeleteCall
- func (mr *MockStatusManagerMockRecorder) Get(arg0, arg1, arg2 any) *MockStatusManagerGetCall
- func (mr *MockStatusManagerMockRecorder) QueueAsyncOperation(arg0, arg1, arg2 any) *MockStatusManagerQueueAsyncOperationCall
- func (mr *MockStatusManagerMockRecorder) Update(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockStatusManagerUpdateCall
- type MockStatusManagerQueueAsyncOperationCall
- func (c *MockStatusManagerQueueAsyncOperationCall) Do(f func(context.Context, *v1.ARMRequestContext, QueueOperationOptions) error) *MockStatusManagerQueueAsyncOperationCall
- func (c *MockStatusManagerQueueAsyncOperationCall) DoAndReturn(f func(context.Context, *v1.ARMRequestContext, QueueOperationOptions) error) *MockStatusManagerQueueAsyncOperationCall
- func (c *MockStatusManagerQueueAsyncOperationCall) Return(arg0 error) *MockStatusManagerQueueAsyncOperationCall
- type MockStatusManagerUpdateCall
- type QueueOperationOptions
- type Status
- type StatusManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStatusManager ¶
type MockStatusManager struct {
// contains filtered or unexported fields
}
MockStatusManager is a mock of StatusManager interface.
func NewMockStatusManager ¶
func NewMockStatusManager(ctrl *gomock.Controller) *MockStatusManager
NewMockStatusManager creates a new mock instance.
func (*MockStatusManager) EXPECT ¶
func (m *MockStatusManager) EXPECT() *MockStatusManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStatusManager) Get ¶
func (m *MockStatusManager) Get(arg0 context.Context, arg1 resources.ID, arg2 uuid.UUID) (*Status, error)
Get mocks base method.
func (*MockStatusManager) QueueAsyncOperation ¶
func (m *MockStatusManager) QueueAsyncOperation(arg0 context.Context, arg1 *v1.ARMRequestContext, arg2 QueueOperationOptions) error
QueueAsyncOperation mocks base method.
type MockStatusManagerDeleteCall ¶ added in v0.35.0
MockStatusManagerDeleteCall wrap *gomock.Call
func (*MockStatusManagerDeleteCall) Do ¶ added in v0.35.0
func (c *MockStatusManagerDeleteCall) Do(f func(context.Context, resources.ID, uuid.UUID) error) *MockStatusManagerDeleteCall
Do rewrite *gomock.Call.Do
func (*MockStatusManagerDeleteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockStatusManagerDeleteCall) DoAndReturn(f func(context.Context, resources.ID, uuid.UUID) error) *MockStatusManagerDeleteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockStatusManagerDeleteCall) Return ¶ added in v0.35.0
func (c *MockStatusManagerDeleteCall) Return(arg0 error) *MockStatusManagerDeleteCall
Return rewrite *gomock.Call.Return
type MockStatusManagerGetCall ¶ added in v0.35.0
MockStatusManagerGetCall wrap *gomock.Call
func (*MockStatusManagerGetCall) Do ¶ added in v0.35.0
func (c *MockStatusManagerGetCall) Do(f func(context.Context, resources.ID, uuid.UUID) (*Status, error)) *MockStatusManagerGetCall
Do rewrite *gomock.Call.Do
func (*MockStatusManagerGetCall) DoAndReturn ¶ added in v0.35.0
func (c *MockStatusManagerGetCall) DoAndReturn(f func(context.Context, resources.ID, uuid.UUID) (*Status, error)) *MockStatusManagerGetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockStatusManagerGetCall) Return ¶ added in v0.35.0
func (c *MockStatusManagerGetCall) Return(arg0 *Status, arg1 error) *MockStatusManagerGetCall
Return rewrite *gomock.Call.Return
type MockStatusManagerMockRecorder ¶
type MockStatusManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockStatusManagerMockRecorder is the mock recorder for MockStatusManager.
func (*MockStatusManagerMockRecorder) Delete ¶
func (mr *MockStatusManagerMockRecorder) Delete(arg0, arg1, arg2 any) *MockStatusManagerDeleteCall
Delete indicates an expected call of Delete.
func (*MockStatusManagerMockRecorder) Get ¶
func (mr *MockStatusManagerMockRecorder) Get(arg0, arg1, arg2 any) *MockStatusManagerGetCall
Get indicates an expected call of Get.
func (*MockStatusManagerMockRecorder) QueueAsyncOperation ¶
func (mr *MockStatusManagerMockRecorder) QueueAsyncOperation(arg0, arg1, arg2 any) *MockStatusManagerQueueAsyncOperationCall
QueueAsyncOperation indicates an expected call of QueueAsyncOperation.
func (*MockStatusManagerMockRecorder) Update ¶
func (mr *MockStatusManagerMockRecorder) Update(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockStatusManagerUpdateCall
Update indicates an expected call of Update.
type MockStatusManagerQueueAsyncOperationCall ¶ added in v0.35.0
MockStatusManagerQueueAsyncOperationCall wrap *gomock.Call
func (*MockStatusManagerQueueAsyncOperationCall) Do ¶ added in v0.35.0
func (c *MockStatusManagerQueueAsyncOperationCall) Do(f func(context.Context, *v1.ARMRequestContext, QueueOperationOptions) error) *MockStatusManagerQueueAsyncOperationCall
Do rewrite *gomock.Call.Do
func (*MockStatusManagerQueueAsyncOperationCall) DoAndReturn ¶ added in v0.35.0
func (c *MockStatusManagerQueueAsyncOperationCall) DoAndReturn(f func(context.Context, *v1.ARMRequestContext, QueueOperationOptions) error) *MockStatusManagerQueueAsyncOperationCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockStatusManagerQueueAsyncOperationCall) Return ¶ added in v0.35.0
func (c *MockStatusManagerQueueAsyncOperationCall) Return(arg0 error) *MockStatusManagerQueueAsyncOperationCall
Return rewrite *gomock.Call.Return
type MockStatusManagerUpdateCall ¶ added in v0.35.0
MockStatusManagerUpdateCall wrap *gomock.Call
func (*MockStatusManagerUpdateCall) Do ¶ added in v0.35.0
func (c *MockStatusManagerUpdateCall) Do(f func(context.Context, resources.ID, uuid.UUID, v1.ProvisioningState, *time.Time, *v1.ErrorDetails) error) *MockStatusManagerUpdateCall
Do rewrite *gomock.Call.Do
func (*MockStatusManagerUpdateCall) DoAndReturn ¶ added in v0.35.0
func (c *MockStatusManagerUpdateCall) DoAndReturn(f func(context.Context, resources.ID, uuid.UUID, v1.ProvisioningState, *time.Time, *v1.ErrorDetails) error) *MockStatusManagerUpdateCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockStatusManagerUpdateCall) Return ¶ added in v0.35.0
func (c *MockStatusManagerUpdateCall) Return(arg0 error) *MockStatusManagerUpdateCall
Return rewrite *gomock.Call.Return
type QueueOperationOptions ¶
type QueueOperationOptions struct { // OperationTimeout specifies the timeout duration for the async operation. OperationTimeout time.Duration // RetryAfter specifies the value of the Retry-After header that will be used for async operations. RetryAfter time.Duration }
QueueOperationOptions is the options type provided when queueing an async operation.
type Status ¶
type Status struct { v1.AsyncOperationStatus // LinkedResourceID is the resource id associated with operation status. LinkedResourceID string `json:"resourceID"` // Location represents the location of operationstatus. Location string `json:"location"` // RetryAfter is the value of the Retry-After header that will be used for async operations. RetryAfter time.Duration `json:"retryAfter"` // HomeTenantID is async operation caller's tenant id such as the value from x-ms-home-tenant-id header. HomeTenantID string `json:"clientTenantID,omitempty"` // ClientObjectID is async operation caller's client id such as the value from x-ms-client-object-id header. ClientObjectID string `json:"clientObjectID,omitempty"` // LastUpdatedTime represents the async operation last updated time. LastUpdatedTime time.Time `json:"lastUpdatedTime,omitempty"` }
Status is the datamodel for Async operation statuses.
type StatusManager ¶
type StatusManager interface { // Get gets an async operation status object. Get(ctx context.Context, id resources.ID, operationID uuid.UUID) (*Status, error) // QueueAsyncOperation creates an async operation status object and queue async operation. QueueAsyncOperation(ctx context.Context, sCtx *v1.ARMRequestContext, options QueueOperationOptions) error // Update updates an async operation status. Update(ctx context.Context, id resources.ID, operationID uuid.UUID, state v1.ProvisioningState, endTime *time.Time, opError *v1.ErrorDetails) error // Delete deletes an async operation status. Delete(ctx context.Context, id resources.ID, operationID uuid.UUID) error }
StatusManager is an interface to manage async operation status.
func New ¶
func New(dataProvider dataprovider.DataStorageProvider, q queue.Client, location string) StatusManager
New creates statusManager instance.