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