Help us shape the future of Go! Take the 2026 Go Developer Survey

statusmanager

package
v0.60.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package statusmanager is a generated GoMock package.

Index

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) Delete

func (m *MockStatusManager) Delete(ctx context.Context, id resources.ID, operationID uuid.UUID) error

Delete mocks base method.

func (*MockStatusManager) EXPECT

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

func (*MockStatusManager) Get

func (m *MockStatusManager) Get(ctx context.Context, id resources.ID, operationID uuid.UUID) (*Status, error)

Get mocks base method.

func (*MockStatusManager) QueueAsyncOperation

func (m *MockStatusManager) QueueAsyncOperation(ctx context.Context, sCtx *v1.ARMRequestContext, options QueueOperationOptions) error

QueueAsyncOperation mocks base method.

func (*MockStatusManager) Update

func (m *MockStatusManager) Update(ctx context.Context, id resources.ID, operationID uuid.UUID, state v1.ProvisioningState, endTime *time.Time, opError *v1.ErrorDetails) error

Update mocks base method.

type MockStatusManagerDeleteCall added in v0.35.0

type MockStatusManagerDeleteCall struct {
	*gomock.Call
}

MockStatusManagerDeleteCall wrap *gomock.Call

func (*MockStatusManagerDeleteCall) Do added in v0.35.0

Do rewrite *gomock.Call.Do

func (*MockStatusManagerDeleteCall) DoAndReturn added in v0.35.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStatusManagerDeleteCall) Return added in v0.35.0

Return rewrite *gomock.Call.Return

type MockStatusManagerGetCall added in v0.35.0

type MockStatusManagerGetCall struct {
	*gomock.Call
}

MockStatusManagerGetCall wrap *gomock.Call

func (*MockStatusManagerGetCall) Do added in v0.35.0

Do rewrite *gomock.Call.Do

func (*MockStatusManagerGetCall) DoAndReturn added in v0.35.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStatusManagerGetCall) Return added in v0.35.0

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(ctx, id, operationID any) *MockStatusManagerDeleteCall

Delete indicates an expected call of Delete.

func (*MockStatusManagerMockRecorder) Get

func (mr *MockStatusManagerMockRecorder) Get(ctx, id, operationID any) *MockStatusManagerGetCall

Get indicates an expected call of Get.

func (*MockStatusManagerMockRecorder) QueueAsyncOperation

func (mr *MockStatusManagerMockRecorder) QueueAsyncOperation(ctx, sCtx, options any) *MockStatusManagerQueueAsyncOperationCall

QueueAsyncOperation indicates an expected call of QueueAsyncOperation.

func (*MockStatusManagerMockRecorder) Update

func (mr *MockStatusManagerMockRecorder) Update(ctx, id, operationID, state, endTime, opError any) *MockStatusManagerUpdateCall

Update indicates an expected call of Update.

type MockStatusManagerQueueAsyncOperationCall added in v0.35.0

type MockStatusManagerQueueAsyncOperationCall struct {
	*gomock.Call
}

MockStatusManagerQueueAsyncOperationCall wrap *gomock.Call

func (*MockStatusManagerQueueAsyncOperationCall) Do added in v0.35.0

Do rewrite *gomock.Call.Do

func (*MockStatusManagerQueueAsyncOperationCall) DoAndReturn added in v0.35.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStatusManagerQueueAsyncOperationCall) Return added in v0.35.0

Return rewrite *gomock.Call.Return

type MockStatusManagerUpdateCall added in v0.35.0

type MockStatusManagerUpdateCall struct {
	*gomock.Call
}

MockStatusManagerUpdateCall wrap *gomock.Call

func (*MockStatusManagerUpdateCall) Do added in v0.35.0

Do rewrite *gomock.Call.Do

func (*MockStatusManagerUpdateCall) DoAndReturn added in v0.35.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStatusManagerUpdateCall) Return added in v0.35.0

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"`
}

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(databaseClient database.Client, queueClient queue.Client, location string) StatusManager

New creates statusManager instance.

Jump to

Keyboard shortcuts

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