mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 16:39:38 -05:00
2d8fcd9bf4
Co-authored-by: Malte Poll <mp@edgeless.systems> Co-authored-by: katexochen <katexochen@users.noreply.github.com> Co-authored-by: Daniel Weiße <dw@edgeless.systems> Co-authored-by: Thomas Tendyck <tt@edgeless.systems> Co-authored-by: Benedict Schlueter <bs@edgeless.systems> Co-authored-by: leongross <leon.gross@rub.de> Co-authored-by: Moritz Eckert <m1gh7ym0@gmail.com>
102 lines
3.4 KiB
Go
102 lines
3.4 KiB
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/googleapis/gax-go/v2"
|
|
computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
|
|
adminpb "google.golang.org/genproto/googleapis/iam/admin/v1"
|
|
iampb "google.golang.org/genproto/googleapis/iam/v1"
|
|
)
|
|
|
|
type instanceAPI interface {
|
|
Close() error
|
|
List(ctx context.Context, req *computepb.ListInstancesRequest,
|
|
opts ...gax.CallOption) InstanceIterator
|
|
}
|
|
|
|
type operationRegionAPI interface {
|
|
Close() error
|
|
Wait(ctx context.Context, req *computepb.WaitRegionOperationRequest,
|
|
opts ...gax.CallOption) (*computepb.Operation, error)
|
|
}
|
|
|
|
type operationZoneAPI interface {
|
|
Close() error
|
|
Wait(ctx context.Context, req *computepb.WaitZoneOperationRequest,
|
|
opts ...gax.CallOption) (*computepb.Operation, error)
|
|
}
|
|
|
|
type operationGlobalAPI interface {
|
|
Close() error
|
|
Wait(ctx context.Context, req *computepb.WaitGlobalOperationRequest,
|
|
opts ...gax.CallOption) (*computepb.Operation, error)
|
|
}
|
|
|
|
type firewallsAPI interface {
|
|
Close() error
|
|
Delete(ctx context.Context, req *computepb.DeleteFirewallRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
Insert(ctx context.Context, req *computepb.InsertFirewallRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
}
|
|
|
|
type networksAPI interface {
|
|
Close() error
|
|
Delete(ctx context.Context, req *computepb.DeleteNetworkRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
Insert(ctx context.Context, req *computepb.InsertNetworkRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
}
|
|
|
|
type subnetworksAPI interface {
|
|
Close() error
|
|
Delete(ctx context.Context, req *computepb.DeleteSubnetworkRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
Insert(ctx context.Context, req *computepb.InsertSubnetworkRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
}
|
|
|
|
type instanceTemplateAPI interface {
|
|
Close() error
|
|
Delete(ctx context.Context, req *computepb.DeleteInstanceTemplateRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
Insert(ctx context.Context, req *computepb.InsertInstanceTemplateRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
}
|
|
|
|
type instanceGroupManagersAPI interface {
|
|
Close() error
|
|
Delete(ctx context.Context, req *computepb.DeleteInstanceGroupManagerRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
Insert(ctx context.Context, req *computepb.InsertInstanceGroupManagerRequest,
|
|
opts ...gax.CallOption) (Operation, error)
|
|
ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesInstanceGroupManagersRequest,
|
|
opts ...gax.CallOption) ManagedInstanceIterator
|
|
}
|
|
|
|
type iamAPI interface {
|
|
Close() error
|
|
CreateServiceAccount(ctx context.Context, req *adminpb.CreateServiceAccountRequest, opts ...gax.CallOption) (*adminpb.ServiceAccount, error)
|
|
CreateServiceAccountKey(ctx context.Context, req *adminpb.CreateServiceAccountKeyRequest, opts ...gax.CallOption) (*adminpb.ServiceAccountKey, error)
|
|
DeleteServiceAccount(ctx context.Context, req *adminpb.DeleteServiceAccountRequest, opts ...gax.CallOption) error
|
|
}
|
|
|
|
type projectsAPI interface {
|
|
Close() error
|
|
GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
|
|
SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
|
|
}
|
|
|
|
type Operation interface {
|
|
Proto() *computepb.Operation
|
|
}
|
|
|
|
type ManagedInstanceIterator interface {
|
|
Next() (*computepb.ManagedInstance, error)
|
|
}
|
|
|
|
type InstanceIterator interface {
|
|
Next() (*computepb.Instance, error)
|
|
}
|