Documentation ¶
Index ¶
- Variables
- type Compute
- type GcpClient
- func (g *GcpClient) DescribeInstance(ctx context.Context, projectID, zone, instanceName string) (*Compute, error)
- func (g *GcpClient) GetAsset(ctx context.Context, gcpProjectID, resourceName string) (*assetpb.ResourceSearchResult, error)
- func (g *GcpClient) VerifyCode(ctx context.Context, gcpProjectID, verificationCode string) (bool, error)
- type GcpServiceClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Supported AssetTypes: https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types SupportedAssetTypes = []string{ "compute.googleapis.com/Instance", } )
Functions ¶
This section is empty.
Types ¶
type Compute ¶
type Compute struct { Instance *compute.Instance `json:"instance"` Firewalls []*compute.Firewall `json:"firewalls"` IsPublic bool `json:"is_public"` }
type GcpClient ¶
type GcpClient struct {
// contains filtered or unexported fields
}
func (*GcpClient) DescribeInstance ¶
type GcpServiceClient ¶
type GcpServiceClient interface { VerifyCode(ctx context.Context, gcpProjectID, verificationCode string) (bool, error) GetAsset(ctx context.Context, gcpProjectID, resourceName string) (*assetpb.ResourceSearchResult, error) DescribeInstance(ctx context.Context, projectID, zone, instanceName string) (*Compute, error) }
func NewGcpClient ¶
Click to show internal directories.
Click to hide internal directories.