clientmock

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ApiKey                         MeshApiKeyClient
	BuildingBlock                  meshBuildingBlockClient
	BuildingBlockRun               MeshBuildingBlockRunClient
	BuildingBlockDefinition        meshBuildingBlockDefinitionClient
	BuildingBlockDefinitionVersion meshBuildingBlockDefinitionVersionClient
	BuildingBlockRunner            MeshBuildingBlockRunnerClient
	BuildingBlockV2                MeshBuildingBlockV2Client
	Integration                    MeshIntegrationClient
	LandingZone                    MeshLandingZoneClient
	Location                       MeshLocationClient
	PaymentMethod                  MeshPaymentMethodClient
	Platform                       MeshPlatformClient
	PlatformType                   MeshPlatformTypeClient
	Project                        MeshProjectClient
	ProjectGroupBinding            MeshProjectGroupBindingClient
	ProjectUserBinding             MeshProjectUserBindingClient
	ServiceInstance                MeshServiceInstanceClient
	TagDefinition                  MeshTagDefinitionClient
	Tenant                         MeshTenantClient
	TenantV4                       MeshTenantV4Client
	Workspace                      MeshWorkspaceClient
	WorkspaceGroupBinding          MeshWorkspaceGroupBindingClient
	WorkspaceUserBinding           MeshWorkspaceUserBindingClient
}

func NewMock

func NewMock() Client

func (*Client) AsClient

func (c *Client) AsClient() client.Client

type MeshApiKeyClient added in v0.20.6

type MeshApiKeyClient struct {
	Store *Store[client.MeshApiKey]
}

func (MeshApiKeyClient) Create added in v0.20.6

func (MeshApiKeyClient) Delete added in v0.20.6

func (m MeshApiKeyClient) Delete(_ context.Context, uuid string) error

func (MeshApiKeyClient) Read added in v0.20.6

func (MeshApiKeyClient) Update added in v0.20.6

type MeshBuildingBlockRunClient added in v0.23.0

type MeshBuildingBlockRunClient struct {
	Store    *Store[client.MeshBuildingBlockRun]
	LogStore *Store[client.MeshBuildingBlockRunLogs]
}

func (MeshBuildingBlockRunClient) GetLogs added in v0.23.0

type MeshBuildingBlockRunnerClient added in v0.20.12

type MeshBuildingBlockRunnerClient struct {
	Store *Store[client.MeshBuildingBlockRunner]
}

func (MeshBuildingBlockRunnerClient) Create added in v0.20.12

func (MeshBuildingBlockRunnerClient) Delete added in v0.20.12

func (MeshBuildingBlockRunnerClient) Read added in v0.20.12

func (MeshBuildingBlockRunnerClient) Update added in v0.20.12

type MeshBuildingBlockV2Client added in v0.20.4

type MeshBuildingBlockV2Client struct {
	Store           *Store[client.MeshBuildingBlockV2]
	BbdVersionStore *Store[client.MeshBuildingBlockDefinitionVersion]
}

func (MeshBuildingBlockV2Client) Create added in v0.20.4

func (MeshBuildingBlockV2Client) Delete added in v0.20.4

func (m MeshBuildingBlockV2Client) Delete(_ context.Context, bbUuid string, purge bool) error

func (MeshBuildingBlockV2Client) List added in v0.23.0

func (MeshBuildingBlockV2Client) Read added in v0.20.4

func (MeshBuildingBlockV2Client) ReadFunc added in v0.20.4

func (MeshBuildingBlockV2Client) TriggerRun added in v0.23.0

func (m MeshBuildingBlockV2Client) TriggerRun(_ context.Context, bbUuid string) error

func (MeshBuildingBlockV2Client) Update added in v0.23.0

type MeshIntegrationClient

type MeshIntegrationClient struct {
	Store *Store[client.MeshIntegration]
}

func (MeshIntegrationClient) Create

func (MeshIntegrationClient) Delete

func (m MeshIntegrationClient) Delete(_ context.Context, uuid string) error

func (MeshIntegrationClient) List

func (MeshIntegrationClient) Read

func (MeshIntegrationClient) Update

type MeshLandingZoneClient added in v0.20.4

type MeshLandingZoneClient struct {
	Store *Store[client.MeshLandingZone]
}

func (MeshLandingZoneClient) Create added in v0.20.4

func (MeshLandingZoneClient) Delete added in v0.20.4

func (m MeshLandingZoneClient) Delete(_ context.Context, name string) error

func (MeshLandingZoneClient) List added in v0.24.3

List applies only the plain attribute filters from the query; it does not simulate marketplace visibility or permissions. The mock stores the landing zone's platform as a uuid ref, so platform_uuid filters against that ref uuid.

func (MeshLandingZoneClient) Read added in v0.20.4

func (MeshLandingZoneClient) Update added in v0.20.4

type MeshLocationClient

type MeshLocationClient struct {
	Store *Store[client.MeshLocation]
}

func (MeshLocationClient) Create

func (MeshLocationClient) Delete

func (m MeshLocationClient) Delete(_ context.Context, name string) error

func (MeshLocationClient) Read

func (MeshLocationClient) Update

type MeshPaymentMethodClient added in v0.20.4

type MeshPaymentMethodClient struct {
	Store *Store[client.MeshPaymentMethod]
}

func (MeshPaymentMethodClient) Create added in v0.20.4

func (MeshPaymentMethodClient) Delete added in v0.20.4

func (m MeshPaymentMethodClient) Delete(_ context.Context, identifier string) error

func (MeshPaymentMethodClient) Read added in v0.20.4

func (m MeshPaymentMethodClient) Read(_ context.Context, workspace string, identifier string) (*client.MeshPaymentMethod, error)

func (MeshPaymentMethodClient) Update added in v0.20.4

type MeshPlatformClient

type MeshPlatformClient struct {
	Store *Store[client.MeshPlatform]
}

func (MeshPlatformClient) Create

func (MeshPlatformClient) Delete

func (m MeshPlatformClient) Delete(_ context.Context, uuid string) error

func (MeshPlatformClient) List added in v0.24.3

List applies only the plain attribute filters from the query; it does not simulate marketplace visibility or permissions (the mock has no notion of the calling workspace). Entitlement and config-redaction behaviour is therefore acceptance-only.

func (MeshPlatformClient) Read

func (MeshPlatformClient) Update

type MeshPlatformTypeClient

type MeshPlatformTypeClient struct {
	Store *Store[client.MeshPlatformType]
}

func (MeshPlatformTypeClient) Create

func (MeshPlatformTypeClient) Delete

func (MeshPlatformTypeClient) List

func (m MeshPlatformTypeClient) List(_ context.Context, category *string, lifecycleStatus *string) ([]client.MeshPlatformType, error)

func (MeshPlatformTypeClient) Read

func (MeshPlatformTypeClient) Update

type MeshProjectClient added in v0.20.4

type MeshProjectClient struct {
	Store *Store[client.MeshProject]
}

func (MeshProjectClient) Create added in v0.20.4

func (MeshProjectClient) Delete added in v0.20.4

func (m MeshProjectClient) Delete(_ context.Context, workspace string, name string) error

func (MeshProjectClient) List added in v0.20.4

func (m MeshProjectClient) List(_ context.Context, workspaceIdentifier string, paymentMethodIdentifier *string) ([]client.MeshProject, error)

func (MeshProjectClient) Read added in v0.20.4

func (m MeshProjectClient) Read(_ context.Context, workspace string, name string) (*client.MeshProject, error)

func (MeshProjectClient) Update added in v0.20.4

type MeshProjectGroupBindingClient added in v0.20.4

type MeshProjectGroupBindingClient struct {
	Store *Store[client.MeshProjectGroupBinding]
}

func (MeshProjectGroupBindingClient) Create added in v0.20.4

func (MeshProjectGroupBindingClient) Delete added in v0.20.4

func (MeshProjectGroupBindingClient) Read added in v0.20.4

type MeshProjectUserBindingClient added in v0.20.4

type MeshProjectUserBindingClient struct {
	Store *Store[client.MeshProjectUserBinding]
}

func (MeshProjectUserBindingClient) Create added in v0.20.4

func (MeshProjectUserBindingClient) Delete added in v0.20.4

func (MeshProjectUserBindingClient) Read added in v0.20.4

type MeshServiceInstanceClient added in v0.18.2

type MeshServiceInstanceClient struct {
	Store *Store[client.MeshServiceInstance]
}

func (MeshServiceInstanceClient) List added in v0.18.2

func (MeshServiceInstanceClient) Read added in v0.18.2

type MeshTagDefinitionClient

type MeshTagDefinitionClient struct {
	Store *Store[client.MeshTagDefinition]
}

func (MeshTagDefinitionClient) Create

func (MeshTagDefinitionClient) Delete

func (MeshTagDefinitionClient) List

func (MeshTagDefinitionClient) Read

func (MeshTagDefinitionClient) Update

type MeshTenantClient added in v0.20.4

type MeshTenantClient struct {
	Store *Store[client.MeshTenant]
	// LandingZoneStore lets Create resolve the assigned landing zone's default quotas, which the backend
	// merges into a tenant's effective quotas.
	LandingZoneStore *Store[client.MeshLandingZone]
}

func (MeshTenantClient) Create added in v0.20.4

func (MeshTenantClient) Delete added in v0.20.4

func (m MeshTenantClient) Delete(_ context.Context, uuid string) error

func (MeshTenantClient) List added in v0.24.0

func (MeshTenantClient) Read added in v0.20.4

func (MeshTenantClient) ReadFunc added in v0.24.0

func (m MeshTenantClient) ReadFunc(uuid string) func(ctx context.Context) (*client.MeshTenant, error)

type MeshTenantV4Client added in v0.20.4

type MeshTenantV4Client struct {
	Store *Store[client.MeshTenantV4]
}

func (MeshTenantV4Client) Create added in v0.20.4

func (MeshTenantV4Client) Delete added in v0.20.4

func (m MeshTenantV4Client) Delete(_ context.Context, uuid string) error

func (MeshTenantV4Client) List added in v0.20.4

func (MeshTenantV4Client) Read added in v0.20.4

func (MeshTenantV4Client) ReadFunc added in v0.20.4

func (m MeshTenantV4Client) ReadFunc(uuid string) func(ctx context.Context) (*client.MeshTenantV4, error)

type MeshWorkspaceClient added in v0.20.4

type MeshWorkspaceClient struct {
	Store *Store[client.MeshWorkspace]
}

func (MeshWorkspaceClient) Create added in v0.20.4

func (MeshWorkspaceClient) Delete added in v0.20.4

func (m MeshWorkspaceClient) Delete(_ context.Context, name string) error

func (MeshWorkspaceClient) Read added in v0.20.4

func (MeshWorkspaceClient) Update added in v0.20.4

type MeshWorkspaceGroupBindingClient added in v0.20.4

type MeshWorkspaceGroupBindingClient struct {
	Store *Store[client.MeshWorkspaceGroupBinding]
}

func (MeshWorkspaceGroupBindingClient) Create added in v0.20.4

func (MeshWorkspaceGroupBindingClient) Delete added in v0.20.4

func (MeshWorkspaceGroupBindingClient) Read added in v0.20.4

type MeshWorkspaceUserBindingClient added in v0.20.4

type MeshWorkspaceUserBindingClient struct {
	Store *Store[client.MeshWorkspaceUserBinding]
}

func (MeshWorkspaceUserBindingClient) Create added in v0.20.4

func (MeshWorkspaceUserBindingClient) Delete added in v0.20.4

func (MeshWorkspaceUserBindingClient) Read added in v0.20.4

type Store

type Store[M any] struct {
	// contains filtered or unexported fields
}

Store is a concurrency-safe key-value store for mock client data. Always use NewStore to create instances; pass *Store to mock client structs.

func NewStore added in v0.20.4

func NewStore[M any]() *Store[M]

func (*Store[M]) Delete added in v0.20.4

func (s *Store[M]) Delete(key string)

func (*Store[M]) Get added in v0.20.4

func (s *Store[M]) Get(key string) (*M, bool)

func (*Store[M]) Set added in v0.20.4

func (s *Store[M]) Set(key string, val *M)

func (*Store[M]) SortedKeys

func (s *Store[M]) SortedKeys() []string

func (*Store[M]) Values added in v0.20.4

func (s *Store[M]) Values() []*M

Values returns a snapshot of all stored values.

Jump to

Keyboard shortcuts

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