assetinventory

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 11 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 interface {
	FindProjects(ctx context.Context, gcpFolderID string, labelQuery []string) ([]*ProjectInfo, error)
	Close() error
}

Client is an interface for mocking asset inventory client.

func NewClient

func NewClient(ctx context.Context, backoffInitialDelay time.Duration, maxRetryAttempts int, opts ...option.ClientOption) (Client, error)

NewClient creates a new asset inventory client.

type MockClient

type MockClient struct {
	ListProjectsErr error
	StubProjects    []*ProjectInfo
}

MockClient is a mock of the Client interface.

func (*MockClient) Close

func (m *MockClient) Close() error

Close is a mock of the Close method.

func (*MockClient) FindProjects

func (m *MockClient) FindProjects(ctx context.Context, folderID string, labelQuery []string) ([]*ProjectInfo, error)

Projects is a mock of the Projects method.

type ProjectInfo

type ProjectInfo struct {
	ProjectID string
	Labels    map[string]string
}

ProjectInfo contains information about a GCP project.

Jump to

Keyboard shortcuts

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