2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
package gcp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-12-08 05:26:51 -05:00
|
|
|
"cloud.google.com/go/compute/apiv1/computepb"
|
2022-03-22 11:03:15 -04:00
|
|
|
"github.com/googleapis/gax-go/v2"
|
|
|
|
)
|
|
|
|
|
2022-12-28 07:30:39 -05:00
|
|
|
type globalForwardingRulesAPI interface {
|
2022-11-09 08:43:48 -05:00
|
|
|
List(ctx context.Context, req *computepb.ListGlobalForwardingRulesRequest, opts ...gax.CallOption) forwardingRuleIterator
|
2022-06-09 16:26:36 -04:00
|
|
|
Close() error
|
|
|
|
}
|
|
|
|
|
2022-12-28 07:30:39 -05:00
|
|
|
type regionalForwardingRulesAPI interface {
|
|
|
|
List(ctx context.Context, req *computepb.ListForwardingRulesRequest, opts ...gax.CallOption) forwardingRuleIterator
|
|
|
|
Close() error
|
|
|
|
}
|
|
|
|
|
2022-11-09 08:43:48 -05:00
|
|
|
type imdsAPI interface {
|
2022-10-24 10:58:21 -04:00
|
|
|
InstanceID() (string, error)
|
2022-03-22 11:03:15 -04:00
|
|
|
ProjectID() (string, error)
|
|
|
|
Zone() (string, error)
|
|
|
|
InstanceName() (string, error)
|
|
|
|
}
|
|
|
|
|
2022-11-09 08:43:48 -05:00
|
|
|
type instanceAPI interface {
|
|
|
|
Get(ctx context.Context, req *computepb.GetInstanceRequest, opts ...gax.CallOption) (*computepb.Instance, error)
|
|
|
|
List(ctx context.Context, req *computepb.ListInstancesRequest, opts ...gax.CallOption) instanceIterator
|
|
|
|
Close() error
|
2022-05-24 04:04:42 -04:00
|
|
|
}
|
2022-06-09 16:26:36 -04:00
|
|
|
|
2022-11-09 08:43:48 -05:00
|
|
|
type subnetAPI interface {
|
|
|
|
Get(ctx context.Context, req *computepb.GetSubnetworkRequest, opts ...gax.CallOption) (*computepb.Subnetwork, error)
|
|
|
|
Close() error
|
2022-06-09 16:26:36 -04:00
|
|
|
}
|
2023-06-20 06:02:31 -04:00
|
|
|
|
|
|
|
type zoneAPI interface {
|
|
|
|
List(ctx context.Context, req *computepb.ListZonesRequest, opts ...gax.CallOption) zoneIterator
|
|
|
|
}
|