inventory_stub

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStubClient

func GetStubClient() client.TenantAwareInventoryClient

GetStubClient initializes the stub client with default responses and returns it

Types

type StubResponse

type StubResponse struct {
	Response interface{}
	Error    error
}

StubResponse holds the response and error for a stubbed method call

type StubTenantAwareInventoryClient

type StubTenantAwareInventoryClient struct {
	StubbedResponses map[string]StubResponse
}

StubTenantAwareInventoryClient is a mock implementation of TenantAwareInventoryClient

func (*StubTenantAwareInventoryClient) Close

Close is a stub implementation of the Close method

func (*StubTenantAwareInventoryClient) Create

Create returns a stubbed Resource based on tenantID and resource

func (*StubTenantAwareInventoryClient) Delete

Delete returns a stubbed DeleteResourceResponse based on tenantID and id

func (*StubTenantAwareInventoryClient) DeleteAllResources

func (c *StubTenantAwareInventoryClient) DeleteAllResources(
	ctx context.Context, tenantID string, kind inv_v1.ResourceKind, enforce bool,
) error

DeleteAllResources is a stub implementation of the DeleteAllResources method

func (*StubTenantAwareInventoryClient) Find

Find returns a stubbed FindResourcesResponse based on the filter

func (*StubTenantAwareInventoryClient) FindAll

FindAll returns a stubbed list of ResourceTenantIDCarrier based on the filter

func (*StubTenantAwareInventoryClient) Get

Get returns a stubbed GetResourceResponse based on tenantID and id

func (*StubTenantAwareInventoryClient) GetHostByUUID

func (c *StubTenantAwareInventoryClient) GetHostByUUID(
	ctx context.Context, tenantID, uuid string,
) (*computev1.HostResource, error)

GetHostByUUID returns a stubbed HostResource based on tenantID and uuid

func (*StubTenantAwareInventoryClient) GetSitesPerRegion

GetSitesPerRegion returns a stubbed GetSitesPerRegionResponse based on the request

func (*StubTenantAwareInventoryClient) GetTreeHierarchy

GetTreeHierarchy returns a stubbed list of TreeNodes based on the request

func (*StubTenantAwareInventoryClient) List

List returns a stubbed ListResourcesResponse based on the filter

func (*StubTenantAwareInventoryClient) ListAll

ListAll returns a stubbed list of Resources based on the filter

func (*StubTenantAwareInventoryClient) ListInheritedTelemetryProfiles

func (c *StubTenantAwareInventoryClient) ListInheritedTelemetryProfiles(
	ctx context.Context, tenantID string, inheritBy *inv_v1.ListInheritedTelemetryProfilesRequest_InheritBy,
	filter, orderBy string, limit, offset uint32,
) (*inv_v1.ListInheritedTelemetryProfilesResponse, error)

ListInheritedTelemetryProfiles returns a stubbed ListInheritedTelemetryProfilesResponse

func (*StubTenantAwareInventoryClient) TestGetClientCache

func (c *StubTenantAwareInventoryClient) TestGetClientCache() *cache.InventoryCache

TestGetClientCache is a stub implementation of the TestGetClientCache method

func (*StubTenantAwareInventoryClient) TestGetClientCacheUUID

func (c *StubTenantAwareInventoryClient) TestGetClientCacheUUID() *cache.InventoryCache

TestGetClientCacheUUID is a stub implementation of the TestGetClientCacheUUID method

func (*StubTenantAwareInventoryClient) TestingOnlySetClient

func (c *StubTenantAwareInventoryClient) TestingOnlySetClient(
	client inv_v1.InventoryServiceClient,
)

TestingOnlySetClient is a stub implementation of the TestingOnlySetClient method

func (*StubTenantAwareInventoryClient) Update

Update returns a stubbed Resource based on tenantID, id, field mask, and resource

func (*StubTenantAwareInventoryClient) UpdateSubscriptions

func (c *StubTenantAwareInventoryClient) UpdateSubscriptions(
	ctx context.Context, tenantID string, kinds []inv_v1.ResourceKind,
) error

UpdateSubscriptions is a stub implementation of the UpdateSubscriptions method

Jump to

Keyboard shortcuts

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