cloud

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package cloud implements a more golang friendly interface to the GCE compute API. The code in this package is generated automatically via the generator implemented in "gen/main.go". The code generator creates the basic CRUD actions for the given resource: "Insert", "Get", "List" and "Delete". Additional methods by customizing the ServiceInfo object (see below). Generated code includes a full mock of the GCE compute API.

Usage

The root of the GCE compute API is the interface "Cloud". Code written using Cloud can be used against the actual implementation "GCE" or "MockGCE".

func foo(cloud Cloud) {
  igs, err := cloud.InstanceGroups().List(ctx, "us-central1-b", filter.None)
  ...
}
// Run foo against the actual cloud.
foo(NewGCE(&Service{...}))
// Run foo with a mock.
foo(NewMockGCE())

Rate limiting and routing

The generated code allows for custom policies for operation rate limiting and GCE project routing. See RateLimiter and ProjectRouter for more details.

Mocks

Mocks are automatically generated for each type implementing basic logic for resource manipulation. This eliminates the boilerplate required to mock GCE functionality. Each method will also have a corresponding "xxxHook" function generated in the mock structure where unit test code can hook the execution of the method.

Mocks for different versions of the same service will share the same set of objects, i.e. an alpha object will be visible with beta and GA methods. Note that translation is done with JSON serialization between the API versions.

Changing service code generation

The list of services to generate is contained in "meta/meta.go". To add a service, add an entry to the list "meta.AllServices". An example entry:

&ServiceInfo{
  Object:      "InstanceGroup",   // Name of the object type.
  Service:     "InstanceGroups",  // Name of the service.
  Resource:    "instanceGroups",  // Lowercase resource name (as appears in the URL).
  version:     meta.VersionAlpha, // API version (one entry per version is needed).
  keyType:     Zonal,             // What kind of resource this is.
  serviceType: reflect.TypeOf(&alpha.InstanceGroupsService{}), // Associated golang type.
  additionalMethods: []string{    // Additional methods to generate code for.
    "SetNamedPorts",
  },
  options: <options>              // Or'd ("|") together.
}

Read-only objects

Services such as Regions and Zones do not allow for mutations. Specify "ReadOnly" in ServiceInfo.options to omit the mutation methods.

Adding custom methods

Some methods that may not be properly handled by the generated code. To enable addition of custom code to the generated mocks, set the "CustomOps" option in "meta.ServiceInfo" entry. This will make the generated service interface embed a "<ServiceName>Ops" interface. This interface MUST be written by hand and contain the custom method logic. Corresponding methods must be added to the corresponding Mockxxx and GCExxx struct types.

// In "meta/meta.go":
&ServiceInfo{
  Object: "InstanceGroup",
  ...
  options: CustomOps,
}

// In the generated code "gen.go":
type InstanceGroups interface {
  InstanceGroupsOps // Added by CustomOps option.
  ...
}

// In hand written file:
type InstanceGroupsOps interface {
  MyMethod()
}

func (mock *MockInstanceGroups) MyMethod() {
  // Custom mock implementation.
}

func (gce *GCEInstanceGroups) MyMethod() {
  // Custom implementation.
}

Update generated codes

Run hack/update-cloudprovider-gce.sh to update the generated codes.

Index

Constants

View Source
const (
	NetworkTierStandard NetworkTier = "Standard"
	NetworkTierPremium  NetworkTier = "Premium"
	NetworkTierDefault  NetworkTier = NetworkTierPremium

	SchemeExternal LbScheme = "EXTERNAL"
	SchemeInternal LbScheme = "INTERNAL"
)

Variables

This section is empty.

Functions

func ContextWithCallTimeout added in v1.10.5

func ContextWithCallTimeout() (context.Context, context.CancelFunc)

ContextWithCallTimeout returns a context with a default timeout, used for generated client calls.

func RelativeResourceName added in v1.11.0

func RelativeResourceName(project, resource string, key *meta.Key) string

RelativeResourceName returns the path starting from project. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet

func ResourcePath added in v1.11.0

func ResourcePath(resource string, key *meta.Key) string

ResourcePath returns the path starting from the location. Example: regions/us-central1/subnetworks/my-subnet

func SelfLink(ver meta.Version, project, resource string, key *meta.Key) string

SelfLink returns the self link URL for the given object.

Types

type AcceptRateLimiter added in v1.10.5

type AcceptRateLimiter struct {
	// Acceptor is the underlying rate limiter.
	Acceptor acceptor
}

AcceptRateLimiter wraps an Acceptor with RateLimiter parameters.

func (*AcceptRateLimiter) Accept added in v1.10.5

func (rl *AcceptRateLimiter) Accept(ctx context.Context, key *RateLimitKey) error

Accept wraps an Acceptor and blocks on Accept or context.Done(). Key is ignored.

type Addresses

type Addresses interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Address, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*ga.Address, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error
	Delete(ctx context.Context, key *meta.Key) error
}

Addresses is an interface that allows for mocking of Addresses.

type AlphaAddresses

type AlphaAddresses interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.Address, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Address, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.Address) error
	Delete(ctx context.Context, key *meta.Key) error
}

AlphaAddresses is an interface that allows for mocking of Addresses.

type AlphaBackendServices

type AlphaBackendServices interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.BackendService, error)
	List(ctx context.Context, fl *filter.F) ([]*alpha.BackendService, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.BackendService) error
	Delete(ctx context.Context, key *meta.Key) error
	SetSecurityPolicy(context.Context, *meta.Key, *alpha.SecurityPolicyReference) error
	Update(context.Context, *meta.Key, *alpha.BackendService) error
}

AlphaBackendServices is an interface that allows for mocking of BackendServices.

type AlphaForwardingRules

type AlphaForwardingRules interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error
	Delete(ctx context.Context, key *meta.Key) error
}

AlphaForwardingRules is an interface that allows for mocking of ForwardingRules.

type AlphaHealthChecks

type AlphaHealthChecks interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error)
	List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *alpha.HealthCheck) error
}

AlphaHealthChecks is an interface that allows for mocking of HealthChecks.

type AlphaInstances

type AlphaInstances interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error)
	List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error
	Delete(ctx context.Context, key *meta.Key) error
	AttachDisk(context.Context, *meta.Key, *alpha.AttachedDisk) error
	DetachDisk(context.Context, *meta.Key, string) error
	UpdateNetworkInterface(context.Context, *meta.Key, string, *alpha.NetworkInterface) error
}

AlphaInstances is an interface that allows for mocking of Instances.

type AlphaNetworkEndpointGroups

AlphaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.

type AlphaRegionBackendServices

type AlphaRegionBackendServices interface {
	Get(ctx context.Context, key *meta.Key) (*alpha.BackendService, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*alpha.BackendService, error)
	Insert(ctx context.Context, key *meta.Key, obj *alpha.BackendService) error
	Delete(ctx context.Context, key *meta.Key) error
	GetHealth(context.Context, *meta.Key, *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error)
	Update(context.Context, *meta.Key, *alpha.BackendService) error
}

AlphaRegionBackendServices is an interface that allows for mocking of RegionBackendServices.

type BackendServices

type BackendServices interface {
	Get(ctx context.Context, key *meta.Key) (*ga.BackendService, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.BackendService, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.BackendService) error
	Delete(ctx context.Context, key *meta.Key) error
	GetHealth(context.Context, *meta.Key, *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
	Patch(context.Context, *meta.Key, *ga.BackendService) error
	Update(context.Context, *meta.Key, *ga.BackendService) error
}

BackendServices is an interface that allows for mocking of BackendServices.

type BetaAddresses

type BetaAddresses interface {
	Get(ctx context.Context, key *meta.Key) (*beta.Address, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*beta.Address, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.Address) error
	Delete(ctx context.Context, key *meta.Key) error
}

BetaAddresses is an interface that allows for mocking of Addresses.

type BetaBackendServices added in v1.11.0

type BetaBackendServices interface {
	Get(ctx context.Context, key *meta.Key) (*beta.BackendService, error)
	List(ctx context.Context, fl *filter.F) ([]*beta.BackendService, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.BackendService) error
	Delete(ctx context.Context, key *meta.Key) error
	SetSecurityPolicy(context.Context, *meta.Key, *beta.SecurityPolicyReference) error
	Update(context.Context, *meta.Key, *beta.BackendService) error
}

BetaBackendServices is an interface that allows for mocking of BackendServices.

type BetaHealthChecks added in v1.12.0

type BetaHealthChecks interface {
	Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error)
	List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *beta.HealthCheck) error
}

BetaHealthChecks is an interface that allows for mocking of HealthChecks.

type BetaInstances

type BetaInstances interface {
	Get(ctx context.Context, key *meta.Key) (*beta.Instance, error)
	List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error
	Delete(ctx context.Context, key *meta.Key) error
	AttachDisk(context.Context, *meta.Key, *beta.AttachedDisk) error
	DetachDisk(context.Context, *meta.Key, string) error
	UpdateNetworkInterface(context.Context, *meta.Key, string, *beta.NetworkInterface) error
}

BetaInstances is an interface that allows for mocking of Instances.

type BetaNetworkEndpointGroups added in v1.12.0

BetaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.

type BetaRegionDisks added in v1.11.0

type BetaRegionDisks interface {
	Get(ctx context.Context, key *meta.Key) (*beta.Disk, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*beta.Disk, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.Disk) error
	Delete(ctx context.Context, key *meta.Key) error
	Resize(context.Context, *meta.Key, *beta.RegionDisksResizeRequest) error
}

BetaRegionDisks is an interface that allows for mocking of RegionDisks.

type BetaSecurityPolicies added in v1.11.0

type BetaSecurityPolicies interface {
	Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error)
	List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error)
	Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error
	Delete(ctx context.Context, key *meta.Key) error
	AddRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
	GetRule(context.Context, *meta.Key) (*beta.SecurityPolicyRule, error)
	Patch(context.Context, *meta.Key, *beta.SecurityPolicy) error
	PatchRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
	RemoveRule(context.Context, *meta.Key) error
}

BetaSecurityPolicies is an interface that allows for mocking of SecurityPolicies.

type Cloud

type Cloud interface {
	Addresses() Addresses
	AlphaAddresses() AlphaAddresses
	BetaAddresses() BetaAddresses
	GlobalAddresses() GlobalAddresses
	BackendServices() BackendServices
	BetaBackendServices() BetaBackendServices
	AlphaBackendServices() AlphaBackendServices
	RegionBackendServices() RegionBackendServices
	AlphaRegionBackendServices() AlphaRegionBackendServices
	Disks() Disks
	BetaRegionDisks() BetaRegionDisks
	Firewalls() Firewalls
	ForwardingRules() ForwardingRules
	AlphaForwardingRules() AlphaForwardingRules
	GlobalForwardingRules() GlobalForwardingRules
	HealthChecks() HealthChecks
	BetaHealthChecks() BetaHealthChecks
	AlphaHealthChecks() AlphaHealthChecks
	HttpHealthChecks() HttpHealthChecks
	HttpsHealthChecks() HttpsHealthChecks
	InstanceGroups() InstanceGroups
	Instances() Instances
	BetaInstances() BetaInstances
	AlphaInstances() AlphaInstances
	AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups
	BetaNetworkEndpointGroups() BetaNetworkEndpointGroups
	Projects() Projects
	Regions() Regions
	Routes() Routes
	BetaSecurityPolicies() BetaSecurityPolicies
	SslCertificates() SslCertificates
	TargetHttpProxies() TargetHttpProxies
	TargetHttpsProxies() TargetHttpsProxies
	TargetPools() TargetPools
	UrlMaps() UrlMaps
	Zones() Zones
}

Cloud is an interface for the GCE compute API.

type Disks

type Disks interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Disk, error)
	List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Disk, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Disk) error
	Delete(ctx context.Context, key *meta.Key) error
	Resize(context.Context, *meta.Key, *ga.DisksResizeRequest) error
}

Disks is an interface that allows for mocking of Disks.

type Firewalls

type Firewalls interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *ga.Firewall) error
}

Firewalls is an interface that allows for mocking of Firewalls.

type ForwardingRules

type ForwardingRules interface {
	Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
	Delete(ctx context.Context, key *meta.Key) error
}

ForwardingRules is an interface that allows for mocking of ForwardingRules.

type GCE

type GCE struct {
	// contains filtered or unexported fields
}

GCE is the golang adapter for the compute APIs.

func NewGCE

func NewGCE(s *Service) *GCE

NewGCE returns a GCE.

func (*GCE) Addresses

func (gce *GCE) Addresses() Addresses

Addresses returns the interface for the ga Addresses.

func (*GCE) AlphaAddresses

func (gce *GCE) AlphaAddresses() AlphaAddresses

AlphaAddresses returns the interface for the alpha Addresses.

func (*GCE) AlphaBackendServices

func (gce *GCE) AlphaBackendServices() AlphaBackendServices

AlphaBackendServices returns the interface for the alpha BackendServices.

func (*GCE) AlphaForwardingRules

func (gce *GCE) AlphaForwardingRules() AlphaForwardingRules

AlphaForwardingRules returns the interface for the alpha ForwardingRules.

func (*GCE) AlphaHealthChecks

func (gce *GCE) AlphaHealthChecks() AlphaHealthChecks

AlphaHealthChecks returns the interface for the alpha HealthChecks.

func (*GCE) AlphaInstances

func (gce *GCE) AlphaInstances() AlphaInstances

AlphaInstances returns the interface for the alpha Instances.

func (*GCE) AlphaNetworkEndpointGroups

func (gce *GCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups

AlphaNetworkEndpointGroups returns the interface for the alpha NetworkEndpointGroups.

func (*GCE) AlphaRegionBackendServices

func (gce *GCE) AlphaRegionBackendServices() AlphaRegionBackendServices

AlphaRegionBackendServices returns the interface for the alpha RegionBackendServices.

func (*GCE) BackendServices

func (gce *GCE) BackendServices() BackendServices

BackendServices returns the interface for the ga BackendServices.

func (*GCE) BetaAddresses

func (gce *GCE) BetaAddresses() BetaAddresses

BetaAddresses returns the interface for the beta Addresses.

func (*GCE) BetaBackendServices added in v1.11.0

func (gce *GCE) BetaBackendServices() BetaBackendServices

BetaBackendServices returns the interface for the beta BackendServices.

func (*GCE) BetaHealthChecks added in v1.12.0

func (gce *GCE) BetaHealthChecks() BetaHealthChecks

BetaHealthChecks returns the interface for the beta HealthChecks.

func (*GCE) BetaInstances

func (gce *GCE) BetaInstances() BetaInstances

BetaInstances returns the interface for the beta Instances.

func (*GCE) BetaNetworkEndpointGroups added in v1.12.0

func (gce *GCE) BetaNetworkEndpointGroups() BetaNetworkEndpointGroups

BetaNetworkEndpointGroups returns the interface for the beta NetworkEndpointGroups.

func (*GCE) BetaRegionDisks added in v1.11.0

func (gce *GCE) BetaRegionDisks() BetaRegionDisks

BetaRegionDisks returns the interface for the beta RegionDisks.

func (*GCE) BetaSecurityPolicies added in v1.11.0

func (gce *GCE) BetaSecurityPolicies() BetaSecurityPolicies

BetaSecurityPolicies returns the interface for the beta SecurityPolicies.

func (*GCE) Disks

func (gce *GCE) Disks() Disks

Disks returns the interface for the ga Disks.

func (*GCE) Firewalls

func (gce *GCE) Firewalls() Firewalls

Firewalls returns the interface for the ga Firewalls.

func (*GCE) ForwardingRules

func (gce *GCE) ForwardingRules() ForwardingRules

ForwardingRules returns the interface for the ga ForwardingRules.

func (*GCE) GlobalAddresses

func (gce *GCE) GlobalAddresses() GlobalAddresses

GlobalAddresses returns the interface for the ga GlobalAddresses.

func (*GCE) GlobalForwardingRules

func (gce *GCE) GlobalForwardingRules() GlobalForwardingRules

GlobalForwardingRules returns the interface for the ga GlobalForwardingRules.

func (*GCE) HealthChecks

func (gce *GCE) HealthChecks() HealthChecks

HealthChecks returns the interface for the ga HealthChecks.

func (*GCE) HttpHealthChecks

func (gce *GCE) HttpHealthChecks() HttpHealthChecks

HttpHealthChecks returns the interface for the ga HttpHealthChecks.

func (*GCE) HttpsHealthChecks

func (gce *GCE) HttpsHealthChecks() HttpsHealthChecks

HttpsHealthChecks returns the interface for the ga HttpsHealthChecks.

func (*GCE) InstanceGroups

func (gce *GCE) InstanceGroups() InstanceGroups

InstanceGroups returns the interface for the ga InstanceGroups.

func (*GCE) Instances

func (gce *GCE) Instances() Instances

Instances returns the interface for the ga Instances.

func (*GCE) Projects

func (gce *GCE) Projects() Projects

Projects returns the interface for the ga Projects.

func (*GCE) RegionBackendServices

func (gce *GCE) RegionBackendServices() RegionBackendServices

RegionBackendServices returns the interface for the ga RegionBackendServices.

func (*GCE) Regions

func (gce *GCE) Regions() Regions

Regions returns the interface for the ga Regions.

func (*GCE) Routes

func (gce *GCE) Routes() Routes

Routes returns the interface for the ga Routes.

func (*GCE) SslCertificates

func (gce *GCE) SslCertificates() SslCertificates

SslCertificates returns the interface for the ga SslCertificates.

func (*GCE) TargetHttpProxies

func (gce *GCE) TargetHttpProxies() TargetHttpProxies

TargetHttpProxies returns the interface for the ga TargetHttpProxies.

func (*GCE) TargetHttpsProxies

func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies

TargetHttpsProxies returns the interface for the ga TargetHttpsProxies.

func (*GCE) TargetPools

func (gce *GCE) TargetPools() TargetPools

TargetPools returns the interface for the ga TargetPools.

func (*GCE) UrlMaps

func (gce *GCE) UrlMaps() UrlMaps

UrlMaps returns the interface for the ga UrlMaps.

func (*GCE) Zones

func (gce *GCE) Zones() Zones

Zones returns the interface for the ga Zones.

type GCEAddresses

type GCEAddresses struct {
	// contains filtered or unexported fields
}

GCEAddresses is a simplifying adapter for the GCE Addresses.

func (*GCEAddresses) Delete

func (g *GCEAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete the Address referenced by key.

func (*GCEAddresses) Get

func (g *GCEAddresses) Get(ctx context.Context, key *meta.Key) (*ga.Address, error)

Get the Address named by key.

func (*GCEAddresses) Insert

func (g *GCEAddresses) Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error

Insert Address with key of value obj.

func (*GCEAddresses) List

func (g *GCEAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Address, error)

List all Address objects.

type GCEAlphaAddresses

type GCEAlphaAddresses struct {
	// contains filtered or unexported fields
}

GCEAlphaAddresses is a simplifying adapter for the GCE Addresses.

func (*GCEAlphaAddresses) Delete

func (g *GCEAlphaAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete the Address referenced by key.

func (*GCEAlphaAddresses) Get

func (g *GCEAlphaAddresses) Get(ctx context.Context, key *meta.Key) (*alpha.Address, error)

Get the Address named by key.

func (*GCEAlphaAddresses) Insert

func (g *GCEAlphaAddresses) Insert(ctx context.Context, key *meta.Key, obj *alpha.Address) error

Insert Address with key of value obj.

func (*GCEAlphaAddresses) List

func (g *GCEAlphaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Address, error)

List all Address objects.

type GCEAlphaBackendServices

type GCEAlphaBackendServices struct {
	// contains filtered or unexported fields
}

GCEAlphaBackendServices is a simplifying adapter for the GCE BackendServices.

func (*GCEAlphaBackendServices) Delete

func (g *GCEAlphaBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete the BackendService referenced by key.

func (*GCEAlphaBackendServices) Get

Get the BackendService named by key.

func (*GCEAlphaBackendServices) Insert

Insert BackendService with key of value obj.

func (*GCEAlphaBackendServices) List

List all BackendService objects.

func (*GCEAlphaBackendServices) SetSecurityPolicy added in v1.11.0

func (g *GCEAlphaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SecurityPolicyReference) error

SetSecurityPolicy is a method on GCEAlphaBackendServices.

func (*GCEAlphaBackendServices) Update

Update is a method on GCEAlphaBackendServices.

type GCEAlphaForwardingRules

type GCEAlphaForwardingRules struct {
	// contains filtered or unexported fields
}

GCEAlphaForwardingRules is a simplifying adapter for the GCE ForwardingRules.

func (*GCEAlphaForwardingRules) Delete

func (g *GCEAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete the ForwardingRule referenced by key.

func (*GCEAlphaForwardingRules) Get

Get the ForwardingRule named by key.

func (*GCEAlphaForwardingRules) Insert

Insert ForwardingRule with key of value obj.

func (*GCEAlphaForwardingRules) List

List all ForwardingRule objects.

type GCEAlphaHealthChecks

type GCEAlphaHealthChecks struct {
	// contains filtered or unexported fields
}

GCEAlphaHealthChecks is a simplifying adapter for the GCE HealthChecks.

func (*GCEAlphaHealthChecks) Delete

func (g *GCEAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete the HealthCheck referenced by key.

func (*GCEAlphaHealthChecks) Get

Get the HealthCheck named by key.

func (*GCEAlphaHealthChecks) Insert

func (g *GCEAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error

Insert HealthCheck with key of value obj.

func (*GCEAlphaHealthChecks) List

List all HealthCheck objects.

func (*GCEAlphaHealthChecks) Update

func (g *GCEAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error

Update is a method on GCEAlphaHealthChecks.

type GCEAlphaInstances

type GCEAlphaInstances struct {
	// contains filtered or unexported fields
}

GCEAlphaInstances is a simplifying adapter for the GCE Instances.

func (*GCEAlphaInstances) AttachDisk

func (g *GCEAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error

AttachDisk is a method on GCEAlphaInstances.

func (*GCEAlphaInstances) Delete

func (g *GCEAlphaInstances) Delete(ctx context.Context, key *meta.Key) error

Delete the Instance referenced by key.

func (*GCEAlphaInstances) DetachDisk

func (g *GCEAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a method on GCEAlphaInstances.

func (*GCEAlphaInstances) Get

func (g *GCEAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error)

Get the Instance named by key.

func (*GCEAlphaInstances) Insert

func (g *GCEAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error

Insert Instance with key of value obj.

func (*GCEAlphaInstances) List

func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)

List all Instance objects.

func (*GCEAlphaInstances) UpdateNetworkInterface

func (g *GCEAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error

UpdateNetworkInterface is a method on GCEAlphaInstances.

type GCEAlphaNetworkEndpointGroups

type GCEAlphaNetworkEndpointGroups struct {
	// contains filtered or unexported fields
}

GCEAlphaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.

func (*GCEAlphaNetworkEndpointGroups) AggregatedList

AggregatedList lists all resources of the given type across all locations.

func (*GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints

AttachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.

func (*GCEAlphaNetworkEndpointGroups) Delete

Delete the NetworkEndpointGroup referenced by key.

func (*GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints

DetachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.

func (*GCEAlphaNetworkEndpointGroups) Get

Get the NetworkEndpointGroup named by key.

func (*GCEAlphaNetworkEndpointGroups) Insert

Insert NetworkEndpointGroup with key of value obj.

func (*GCEAlphaNetworkEndpointGroups) List

List all NetworkEndpointGroup objects.

func (*GCEAlphaNetworkEndpointGroups) ListNetworkEndpoints

ListNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.

type GCEAlphaRegionBackendServices

type GCEAlphaRegionBackendServices struct {
	// contains filtered or unexported fields
}

GCEAlphaRegionBackendServices is a simplifying adapter for the GCE RegionBackendServices.

func (*GCEAlphaRegionBackendServices) Delete

Delete the BackendService referenced by key.

func (*GCEAlphaRegionBackendServices) Get

Get the BackendService named by key.

func (*GCEAlphaRegionBackendServices) GetHealth

GetHealth is a method on GCEAlphaRegionBackendServices.

func (*GCEAlphaRegionBackendServices) Insert

Insert BackendService with key of value obj.

func (*GCEAlphaRegionBackendServices) List

List all BackendService objects.

func (*GCEAlphaRegionBackendServices) Update

Update is a method on GCEAlphaRegionBackendServices.

type GCEBackendServices

type GCEBackendServices struct {
	// contains filtered or unexported fields
}

GCEBackendServices is a simplifying adapter for the GCE BackendServices.

func (*GCEBackendServices) Delete

func (g *GCEBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete the BackendService referenced by key.

func (*GCEBackendServices) Get

Get the BackendService named by key.

func (*GCEBackendServices) GetHealth

GetHealth is a method on GCEBackendServices.

func (*GCEBackendServices) Insert

func (g *GCEBackendServices) Insert(ctx context.Context, key *meta.Key, obj *ga.BackendService) error

Insert BackendService with key of value obj.

func (*GCEBackendServices) List

func (g *GCEBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.BackendService, error)

List all BackendService objects.

func (*GCEBackendServices) Patch added in v1.11.0

func (g *GCEBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *ga.BackendService) error

Patch is a method on GCEBackendServices.

func (*GCEBackendServices) Update

func (g *GCEBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *ga.BackendService) error

Update is a method on GCEBackendServices.

type GCEBetaAddresses

type GCEBetaAddresses struct {
	// contains filtered or unexported fields
}

GCEBetaAddresses is a simplifying adapter for the GCE Addresses.

func (*GCEBetaAddresses) Delete

func (g *GCEBetaAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete the Address referenced by key.

func (*GCEBetaAddresses) Get

func (g *GCEBetaAddresses) Get(ctx context.Context, key *meta.Key) (*beta.Address, error)

Get the Address named by key.

func (*GCEBetaAddresses) Insert

func (g *GCEBetaAddresses) Insert(ctx context.Context, key *meta.Key, obj *beta.Address) error

Insert Address with key of value obj.

func (*GCEBetaAddresses) List

func (g *GCEBetaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Address, error)

List all Address objects.

type GCEBetaBackendServices added in v1.11.0

type GCEBetaBackendServices struct {
	// contains filtered or unexported fields
}

GCEBetaBackendServices is a simplifying adapter for the GCE BackendServices.

func (*GCEBetaBackendServices) Delete added in v1.11.0

func (g *GCEBetaBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete the BackendService referenced by key.

func (*GCEBetaBackendServices) Get added in v1.11.0

Get the BackendService named by key.

func (*GCEBetaBackendServices) Insert added in v1.11.0

Insert BackendService with key of value obj.

func (*GCEBetaBackendServices) List added in v1.11.0

List all BackendService objects.

func (*GCEBetaBackendServices) SetSecurityPolicy added in v1.11.0

func (g *GCEBetaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyReference) error

SetSecurityPolicy is a method on GCEBetaBackendServices.

func (*GCEBetaBackendServices) Update added in v1.12.0

func (g *GCEBetaBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *beta.BackendService) error

Update is a method on GCEBetaBackendServices.

type GCEBetaHealthChecks added in v1.12.0

type GCEBetaHealthChecks struct {
	// contains filtered or unexported fields
}

GCEBetaHealthChecks is a simplifying adapter for the GCE HealthChecks.

func (*GCEBetaHealthChecks) Delete added in v1.12.0

func (g *GCEBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete the HealthCheck referenced by key.

func (*GCEBetaHealthChecks) Get added in v1.12.0

Get the HealthCheck named by key.

func (*GCEBetaHealthChecks) Insert added in v1.12.0

func (g *GCEBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error

Insert HealthCheck with key of value obj.

func (*GCEBetaHealthChecks) List added in v1.12.0

func (g *GCEBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error)

List all HealthCheck objects.

func (*GCEBetaHealthChecks) Update added in v1.12.0

func (g *GCEBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error

Update is a method on GCEBetaHealthChecks.

type GCEBetaInstances

type GCEBetaInstances struct {
	// contains filtered or unexported fields
}

GCEBetaInstances is a simplifying adapter for the GCE Instances.

func (*GCEBetaInstances) AttachDisk

func (g *GCEBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error

AttachDisk is a method on GCEBetaInstances.

func (*GCEBetaInstances) Delete

func (g *GCEBetaInstances) Delete(ctx context.Context, key *meta.Key) error

Delete the Instance referenced by key.

func (*GCEBetaInstances) DetachDisk

func (g *GCEBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a method on GCEBetaInstances.

func (*GCEBetaInstances) Get

func (g *GCEBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error)

Get the Instance named by key.

func (*GCEBetaInstances) Insert

func (g *GCEBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error

Insert Instance with key of value obj.

func (*GCEBetaInstances) List

func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)

List all Instance objects.

func (*GCEBetaInstances) UpdateNetworkInterface

func (g *GCEBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error

UpdateNetworkInterface is a method on GCEBetaInstances.

type GCEBetaNetworkEndpointGroups added in v1.12.0

type GCEBetaNetworkEndpointGroups struct {
	// contains filtered or unexported fields
}

GCEBetaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.

func (*GCEBetaNetworkEndpointGroups) AggregatedList added in v1.12.0

AggregatedList lists all resources of the given type across all locations.

func (*GCEBetaNetworkEndpointGroups) AttachNetworkEndpoints added in v1.12.0

AttachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.

func (*GCEBetaNetworkEndpointGroups) Delete added in v1.12.0

Delete the NetworkEndpointGroup referenced by key.

func (*GCEBetaNetworkEndpointGroups) DetachNetworkEndpoints added in v1.12.0

DetachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.

func (*GCEBetaNetworkEndpointGroups) Get added in v1.12.0

Get the NetworkEndpointGroup named by key.

func (*GCEBetaNetworkEndpointGroups) Insert added in v1.12.0

Insert NetworkEndpointGroup with key of value obj.

func (*GCEBetaNetworkEndpointGroups) List added in v1.12.0

List all NetworkEndpointGroup objects.

func (*GCEBetaNetworkEndpointGroups) ListNetworkEndpoints added in v1.12.0

ListNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.

type GCEBetaRegionDisks added in v1.11.0

type GCEBetaRegionDisks struct {
	// contains filtered or unexported fields
}

GCEBetaRegionDisks is a simplifying adapter for the GCE RegionDisks.

func (*GCEBetaRegionDisks) Delete added in v1.11.0

func (g *GCEBetaRegionDisks) Delete(ctx context.Context, key *meta.Key) error

Delete the Disk referenced by key.

func (*GCEBetaRegionDisks) Get added in v1.11.0

func (g *GCEBetaRegionDisks) Get(ctx context.Context, key *meta.Key) (*beta.Disk, error)

Get the Disk named by key.

func (*GCEBetaRegionDisks) Insert added in v1.11.0

func (g *GCEBetaRegionDisks) Insert(ctx context.Context, key *meta.Key, obj *beta.Disk) error

Insert Disk with key of value obj.

func (*GCEBetaRegionDisks) List added in v1.11.0

func (g *GCEBetaRegionDisks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Disk, error)

List all Disk objects.

func (*GCEBetaRegionDisks) Resize added in v1.11.0

Resize is a method on GCEBetaRegionDisks.

type GCEBetaSecurityPolicies added in v1.11.0

type GCEBetaSecurityPolicies struct {
	// contains filtered or unexported fields
}

GCEBetaSecurityPolicies is a simplifying adapter for the GCE SecurityPolicies.

func (*GCEBetaSecurityPolicies) AddRule added in v1.11.0

AddRule is a method on GCEBetaSecurityPolicies.

func (*GCEBetaSecurityPolicies) Delete added in v1.11.0

func (g *GCEBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error

Delete the SecurityPolicy referenced by key.

func (*GCEBetaSecurityPolicies) Get added in v1.11.0

Get the SecurityPolicy named by key.

func (*GCEBetaSecurityPolicies) GetRule added in v1.11.0

GetRule is a method on GCEBetaSecurityPolicies.

func (*GCEBetaSecurityPolicies) Insert added in v1.11.0

Insert SecurityPolicy with key of value obj.

func (*GCEBetaSecurityPolicies) List added in v1.11.0

List all SecurityPolicy objects.

func (*GCEBetaSecurityPolicies) Patch added in v1.11.0

Patch is a method on GCEBetaSecurityPolicies.

func (*GCEBetaSecurityPolicies) PatchRule added in v1.11.0

PatchRule is a method on GCEBetaSecurityPolicies.

func (*GCEBetaSecurityPolicies) RemoveRule added in v1.11.0

func (g *GCEBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error

RemoveRule is a method on GCEBetaSecurityPolicies.

type GCEDisks

type GCEDisks struct {
	// contains filtered or unexported fields
}

GCEDisks is a simplifying adapter for the GCE Disks.

func (*GCEDisks) Delete

func (g *GCEDisks) Delete(ctx context.Context, key *meta.Key) error

Delete the Disk referenced by key.

func (*GCEDisks) Get

func (g *GCEDisks) Get(ctx context.Context, key *meta.Key) (*ga.Disk, error)

Get the Disk named by key.

func (*GCEDisks) Insert

func (g *GCEDisks) Insert(ctx context.Context, key *meta.Key, obj *ga.Disk) error

Insert Disk with key of value obj.

func (*GCEDisks) List

func (g *GCEDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Disk, error)

List all Disk objects.

func (*GCEDisks) Resize added in v1.11.0

func (g *GCEDisks) Resize(ctx context.Context, key *meta.Key, arg0 *ga.DisksResizeRequest) error

Resize is a method on GCEDisks.

type GCEFirewalls

type GCEFirewalls struct {
	// contains filtered or unexported fields
}

GCEFirewalls is a simplifying adapter for the GCE Firewalls.

func (*GCEFirewalls) Delete

func (g *GCEFirewalls) Delete(ctx context.Context, key *meta.Key) error

Delete the Firewall referenced by key.

func (*GCEFirewalls) Get

func (g *GCEFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error)

Get the Firewall named by key.

func (*GCEFirewalls) Insert

func (g *GCEFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error

Insert Firewall with key of value obj.

func (*GCEFirewalls) List

func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)

List all Firewall objects.

func (*GCEFirewalls) Update

func (g *GCEFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error

Update is a method on GCEFirewalls.

type GCEForwardingRules

type GCEForwardingRules struct {
	// contains filtered or unexported fields
}

GCEForwardingRules is a simplifying adapter for the GCE ForwardingRules.

func (*GCEForwardingRules) Delete

func (g *GCEForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete the ForwardingRule referenced by key.

func (*GCEForwardingRules) Get

Get the ForwardingRule named by key.

func (*GCEForwardingRules) Insert

func (g *GCEForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error

Insert ForwardingRule with key of value obj.

func (*GCEForwardingRules) List

func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)

List all ForwardingRule objects.

type GCEGlobalAddresses

type GCEGlobalAddresses struct {
	// contains filtered or unexported fields
}

GCEGlobalAddresses is a simplifying adapter for the GCE GlobalAddresses.

func (*GCEGlobalAddresses) Delete

func (g *GCEGlobalAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete the Address referenced by key.

func (*GCEGlobalAddresses) Get

func (g *GCEGlobalAddresses) Get(ctx context.Context, key *meta.Key) (*ga.Address, error)

Get the Address named by key.

func (*GCEGlobalAddresses) Insert

func (g *GCEGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error

Insert Address with key of value obj.

func (*GCEGlobalAddresses) List

func (g *GCEGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Address, error)

List all Address objects.

type GCEGlobalForwardingRules

type GCEGlobalForwardingRules struct {
	// contains filtered or unexported fields
}

GCEGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.

func (*GCEGlobalForwardingRules) Delete

func (g *GCEGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete the ForwardingRule referenced by key.

func (*GCEGlobalForwardingRules) Get

Get the ForwardingRule named by key.

func (*GCEGlobalForwardingRules) Insert

Insert ForwardingRule with key of value obj.

func (*GCEGlobalForwardingRules) List

List all ForwardingRule objects.

func (*GCEGlobalForwardingRules) SetTarget

func (g *GCEGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error

SetTarget is a method on GCEGlobalForwardingRules.

type GCEHealthChecks

type GCEHealthChecks struct {
	// contains filtered or unexported fields
}

GCEHealthChecks is a simplifying adapter for the GCE HealthChecks.

func (*GCEHealthChecks) Delete

func (g *GCEHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete the HealthCheck referenced by key.

func (*GCEHealthChecks) Get

func (g *GCEHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)

Get the HealthCheck named by key.

func (*GCEHealthChecks) Insert

func (g *GCEHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error

Insert HealthCheck with key of value obj.

func (*GCEHealthChecks) List

func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)

List all HealthCheck objects.

func (*GCEHealthChecks) Update

func (g *GCEHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error

Update is a method on GCEHealthChecks.

type GCEHttpHealthChecks

type GCEHttpHealthChecks struct {
	// contains filtered or unexported fields
}

GCEHttpHealthChecks is a simplifying adapter for the GCE HttpHealthChecks.

func (*GCEHttpHealthChecks) Delete

func (g *GCEHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete the HttpHealthCheck referenced by key.

func (*GCEHttpHealthChecks) Get

Get the HttpHealthCheck named by key.

func (*GCEHttpHealthChecks) Insert

func (g *GCEHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error

Insert HttpHealthCheck with key of value obj.

func (*GCEHttpHealthChecks) List

List all HttpHealthCheck objects.

func (*GCEHttpHealthChecks) Update

func (g *GCEHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error

Update is a method on GCEHttpHealthChecks.

type GCEHttpsHealthChecks

type GCEHttpsHealthChecks struct {
	// contains filtered or unexported fields
}

GCEHttpsHealthChecks is a simplifying adapter for the GCE HttpsHealthChecks.

func (*GCEHttpsHealthChecks) Delete

func (g *GCEHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete the HttpsHealthCheck referenced by key.

func (*GCEHttpsHealthChecks) Get

Get the HttpsHealthCheck named by key.

func (*GCEHttpsHealthChecks) Insert

func (g *GCEHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error

Insert HttpsHealthCheck with key of value obj.

func (*GCEHttpsHealthChecks) List

List all HttpsHealthCheck objects.

func (*GCEHttpsHealthChecks) Update

func (g *GCEHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error

Update is a method on GCEHttpsHealthChecks.

type GCEInstanceGroups

type GCEInstanceGroups struct {
	// contains filtered or unexported fields
}

GCEInstanceGroups is a simplifying adapter for the GCE InstanceGroups.

func (*GCEInstanceGroups) AddInstances

AddInstances is a method on GCEInstanceGroups.

func (*GCEInstanceGroups) Delete

func (g *GCEInstanceGroups) Delete(ctx context.Context, key *meta.Key) error

Delete the InstanceGroup referenced by key.

func (*GCEInstanceGroups) Get

Get the InstanceGroup named by key.

func (*GCEInstanceGroups) Insert

func (g *GCEInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error

Insert InstanceGroup with key of value obj.

func (*GCEInstanceGroups) List

func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)

List all InstanceGroup objects.

func (*GCEInstanceGroups) ListInstances

ListInstances is a method on GCEInstanceGroups.

func (*GCEInstanceGroups) RemoveInstances

RemoveInstances is a method on GCEInstanceGroups.

func (*GCEInstanceGroups) SetNamedPorts

SetNamedPorts is a method on GCEInstanceGroups.

type GCEInstances

type GCEInstances struct {
	// contains filtered or unexported fields
}

GCEInstances is a simplifying adapter for the GCE Instances.

func (*GCEInstances) AttachDisk

func (g *GCEInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error

AttachDisk is a method on GCEInstances.

func (*GCEInstances) Delete

func (g *GCEInstances) Delete(ctx context.Context, key *meta.Key) error

Delete the Instance referenced by key.

func (*GCEInstances) DetachDisk

func (g *GCEInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a method on GCEInstances.

func (*GCEInstances) Get

func (g *GCEInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error)

Get the Instance named by key.

func (*GCEInstances) Insert

func (g *GCEInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error

Insert Instance with key of value obj.

func (*GCEInstances) List

func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)

List all Instance objects.

type GCEProjects

type GCEProjects struct {
	// contains filtered or unexported fields
}

GCEProjects is a simplifying adapter for the GCE Projects.

func (*GCEProjects) Get

func (g *GCEProjects) Get(ctx context.Context, projectID string) (*compute.Project, error)

Get a project by projectID.

func (*GCEProjects) SetCommonInstanceMetadata

func (g *GCEProjects) SetCommonInstanceMetadata(ctx context.Context, projectID string, m *compute.Metadata) error

SetCommonInstanceMetadata for a given project.

type GCERegionBackendServices

type GCERegionBackendServices struct {
	// contains filtered or unexported fields
}

GCERegionBackendServices is a simplifying adapter for the GCE RegionBackendServices.

func (*GCERegionBackendServices) Delete

func (g *GCERegionBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete the BackendService referenced by key.

func (*GCERegionBackendServices) Get

Get the BackendService named by key.

func (*GCERegionBackendServices) GetHealth

GetHealth is a method on GCERegionBackendServices.

func (*GCERegionBackendServices) Insert

Insert BackendService with key of value obj.

func (*GCERegionBackendServices) List

func (g *GCERegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*ga.BackendService, error)

List all BackendService objects.

func (*GCERegionBackendServices) Update

func (g *GCERegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *ga.BackendService) error

Update is a method on GCERegionBackendServices.

type GCERegions

type GCERegions struct {
	// contains filtered or unexported fields
}

GCERegions is a simplifying adapter for the GCE Regions.

func (*GCERegions) Get

func (g *GCERegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error)

Get the Region named by key.

func (*GCERegions) List

func (g *GCERegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error)

List all Region objects.

type GCERoutes

type GCERoutes struct {
	// contains filtered or unexported fields
}

GCERoutes is a simplifying adapter for the GCE Routes.

func (*GCERoutes) Delete

func (g *GCERoutes) Delete(ctx context.Context, key *meta.Key) error

Delete the Route referenced by key.

func (*GCERoutes) Get

func (g *GCERoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error)

Get the Route named by key.

func (*GCERoutes) Insert

func (g *GCERoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error

Insert Route with key of value obj.

func (*GCERoutes) List

func (g *GCERoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)

List all Route objects.

type GCESslCertificates

type GCESslCertificates struct {
	// contains filtered or unexported fields
}

GCESslCertificates is a simplifying adapter for the GCE SslCertificates.

func (*GCESslCertificates) Delete

func (g *GCESslCertificates) Delete(ctx context.Context, key *meta.Key) error

Delete the SslCertificate referenced by key.

func (*GCESslCertificates) Get

Get the SslCertificate named by key.

func (*GCESslCertificates) Insert

func (g *GCESslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error

Insert SslCertificate with key of value obj.

func (*GCESslCertificates) List

func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)

List all SslCertificate objects.

type GCETargetHttpProxies

type GCETargetHttpProxies struct {
	// contains filtered or unexported fields
}

GCETargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.

func (*GCETargetHttpProxies) Delete

func (g *GCETargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error

Delete the TargetHttpProxy referenced by key.

func (*GCETargetHttpProxies) Get

Get the TargetHttpProxy named by key.

func (*GCETargetHttpProxies) Insert

func (g *GCETargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error

Insert TargetHttpProxy with key of value obj.

func (*GCETargetHttpProxies) List

List all TargetHttpProxy objects.

func (*GCETargetHttpProxies) SetUrlMap

func (g *GCETargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error

SetUrlMap is a method on GCETargetHttpProxies.

type GCETargetHttpsProxies

type GCETargetHttpsProxies struct {
	// contains filtered or unexported fields
}

GCETargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.

func (*GCETargetHttpsProxies) Delete

func (g *GCETargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error

Delete the TargetHttpsProxy referenced by key.

func (*GCETargetHttpsProxies) Get

Get the TargetHttpsProxy named by key.

func (*GCETargetHttpsProxies) Insert

Insert TargetHttpsProxy with key of value obj.

func (*GCETargetHttpsProxies) List

List all TargetHttpsProxy objects.

func (*GCETargetHttpsProxies) SetSslCertificates

SetSslCertificates is a method on GCETargetHttpsProxies.

func (*GCETargetHttpsProxies) SetUrlMap

func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error

SetUrlMap is a method on GCETargetHttpsProxies.

type GCETargetPools

type GCETargetPools struct {
	// contains filtered or unexported fields
}

GCETargetPools is a simplifying adapter for the GCE TargetPools.

func (*GCETargetPools) AddInstance

func (g *GCETargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error

AddInstance is a method on GCETargetPools.

func (*GCETargetPools) Delete

func (g *GCETargetPools) Delete(ctx context.Context, key *meta.Key) error

Delete the TargetPool referenced by key.

func (*GCETargetPools) Get

func (g *GCETargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error)

Get the TargetPool named by key.

func (*GCETargetPools) Insert

func (g *GCETargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error

Insert TargetPool with key of value obj.

func (*GCETargetPools) List

func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)

List all TargetPool objects.

func (*GCETargetPools) RemoveInstance

func (g *GCETargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error

RemoveInstance is a method on GCETargetPools.

type GCEUrlMaps

type GCEUrlMaps struct {
	// contains filtered or unexported fields
}

GCEUrlMaps is a simplifying adapter for the GCE UrlMaps.

func (*GCEUrlMaps) Delete

func (g *GCEUrlMaps) Delete(ctx context.Context, key *meta.Key) error

Delete the UrlMap referenced by key.

func (*GCEUrlMaps) Get

func (g *GCEUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)

Get the UrlMap named by key.

func (*GCEUrlMaps) Insert

func (g *GCEUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error

Insert UrlMap with key of value obj.

func (*GCEUrlMaps) List

func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)

List all UrlMap objects.

func (*GCEUrlMaps) Update

func (g *GCEUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error

Update is a method on GCEUrlMaps.

type GCEZones

type GCEZones struct {
	// contains filtered or unexported fields
}

GCEZones is a simplifying adapter for the GCE Zones.

func (*GCEZones) Get

func (g *GCEZones) Get(ctx context.Context, key *meta.Key) (*ga.Zone, error)

Get the Zone named by key.

func (*GCEZones) List

func (g *GCEZones) List(ctx context.Context, fl *filter.F) ([]*ga.Zone, error)

List all Zone objects.

type GlobalAddresses

type GlobalAddresses interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Address, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.Address, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error
	Delete(ctx context.Context, key *meta.Key) error
}

GlobalAddresses is an interface that allows for mocking of GlobalAddresses.

type GlobalForwardingRules

type GlobalForwardingRules interface {
	Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
	Delete(ctx context.Context, key *meta.Key) error
	SetTarget(context.Context, *meta.Key, *ga.TargetReference) error
}

GlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.

type HealthChecks

type HealthChecks interface {
	Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *ga.HealthCheck) error
}

HealthChecks is an interface that allows for mocking of HealthChecks.

type HttpHealthChecks

type HttpHealthChecks interface {
	Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *ga.HttpHealthCheck) error
}

HttpHealthChecks is an interface that allows for mocking of HttpHealthChecks.

type HttpsHealthChecks

type HttpsHealthChecks interface {
	Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *ga.HttpsHealthCheck) error
}

HttpsHealthChecks is an interface that allows for mocking of HttpsHealthChecks.

type InstanceGroups

InstanceGroups is an interface that allows for mocking of InstanceGroups.

type Instances

type Instances interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Instance, error)
	List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error
	Delete(ctx context.Context, key *meta.Key) error
	AttachDisk(context.Context, *meta.Key, *ga.AttachedDisk) error
	DetachDisk(context.Context, *meta.Key, string) error
}

Instances is an interface that allows for mocking of Instances.

type LbScheme

type LbScheme string

LbScheme represents the possible types of load balancers

type MinimumRateLimiter added in v1.10.5

type MinimumRateLimiter struct {
	// RateLimiter is the underlying ratelimiter which is called after the mininum time is reacehd.
	RateLimiter RateLimiter
	// Minimum is the minimum wait time before the underlying ratelimiter is called.
	Minimum time.Duration
}

MinimumRateLimiter wraps a RateLimiter and will only call its Accept until the minimum duration has been met or the context is cancelled.

func (*MinimumRateLimiter) Accept added in v1.10.5

func (m *MinimumRateLimiter) Accept(ctx context.Context, key *RateLimitKey) error

Accept blocks on the minimum duration and context. Once the minimum duration is met, the func is blocked on the underlying ratelimiter.

type MockAddresses

type MockAddresses struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockAddressesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockAddresses) (bool, *ga.Address, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockAddresses) (bool, []*ga.Address, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Address, m *MockAddresses) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockAddresses) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAddresses is the mock for Addresses.

func NewMockAddresses

func NewMockAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockAddresses

NewMockAddresses returns a new mock for Addresses.

func (*MockAddresses) Delete

func (m *MockAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAddresses) Get

func (m *MockAddresses) Get(ctx context.Context, key *meta.Key) (*ga.Address, error)

Get returns the object from the mock.

func (*MockAddresses) Insert

func (m *MockAddresses) Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error

Insert is a mock for inserting/creating a new object.

func (*MockAddresses) List

func (m *MockAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Address, error)

List all of the objects in the mock in the given region.

func (*MockAddresses) Obj

Obj wraps the object for use in the mock.

type MockAddressesObj

type MockAddressesObj struct {
	Obj interface{}
}

MockAddressesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockAddressesObj) ToAlpha

func (m *MockAddressesObj) ToAlpha() *alpha.Address

ToAlpha retrieves the given version of the object.

func (*MockAddressesObj) ToBeta

func (m *MockAddressesObj) ToBeta() *beta.Address

ToBeta retrieves the given version of the object.

func (*MockAddressesObj) ToGA

func (m *MockAddressesObj) ToGA() *ga.Address

ToGA retrieves the given version of the object.

type MockAlphaAddresses

type MockAlphaAddresses struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockAddressesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockAlphaAddresses) (bool, *alpha.Address, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockAlphaAddresses) (bool, []*alpha.Address, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Address, m *MockAlphaAddresses) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaAddresses) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaAddresses is the mock for Addresses.

func NewMockAlphaAddresses

func NewMockAlphaAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockAlphaAddresses

NewMockAlphaAddresses returns a new mock for Addresses.

func (*MockAlphaAddresses) Delete

func (m *MockAlphaAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAlphaAddresses) Get

func (m *MockAlphaAddresses) Get(ctx context.Context, key *meta.Key) (*alpha.Address, error)

Get returns the object from the mock.

func (*MockAlphaAddresses) Insert

func (m *MockAlphaAddresses) Insert(ctx context.Context, key *meta.Key, obj *alpha.Address) error

Insert is a mock for inserting/creating a new object.

func (*MockAlphaAddresses) List

func (m *MockAlphaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Address, error)

List all of the objects in the mock in the given region.

func (*MockAlphaAddresses) Obj

Obj wraps the object for use in the mock.

type MockAlphaBackendServices

type MockAlphaBackendServices struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockBackendServicesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook               func(ctx context.Context, key *meta.Key, m *MockAlphaBackendServices) (bool, *alpha.BackendService, error)
	ListHook              func(ctx context.Context, fl *filter.F, m *MockAlphaBackendServices) (bool, []*alpha.BackendService, error)
	InsertHook            func(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *MockAlphaBackendServices) (bool, error)
	DeleteHook            func(ctx context.Context, key *meta.Key, m *MockAlphaBackendServices) (bool, error)
	SetSecurityPolicyHook func(context.Context, *meta.Key, *alpha.SecurityPolicyReference, *MockAlphaBackendServices) error
	UpdateHook            func(context.Context, *meta.Key, *alpha.BackendService, *MockAlphaBackendServices) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaBackendServices is the mock for BackendServices.

func NewMockAlphaBackendServices

func NewMockAlphaBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockAlphaBackendServices

NewMockAlphaBackendServices returns a new mock for BackendServices.

func (*MockAlphaBackendServices) Delete

func (m *MockAlphaBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAlphaBackendServices) Get

Get returns the object from the mock.

func (*MockAlphaBackendServices) Insert

Insert is a mock for inserting/creating a new object.

func (*MockAlphaBackendServices) List

List all of the objects in the mock.

func (*MockAlphaBackendServices) Obj

Obj wraps the object for use in the mock.

func (*MockAlphaBackendServices) SetSecurityPolicy added in v1.11.0

func (m *MockAlphaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SecurityPolicyReference) error

SetSecurityPolicy is a mock for the corresponding method.

func (*MockAlphaBackendServices) Update

Update is a mock for the corresponding method.

type MockAlphaForwardingRules

type MockAlphaForwardingRules struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockForwardingRulesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, *alpha.ForwardingRule, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockAlphaForwardingRules) (bool, []*alpha.ForwardingRule, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *MockAlphaForwardingRules) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaForwardingRules is the mock for ForwardingRules.

func NewMockAlphaForwardingRules

func NewMockAlphaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockAlphaForwardingRules

NewMockAlphaForwardingRules returns a new mock for ForwardingRules.

func (*MockAlphaForwardingRules) Delete

func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAlphaForwardingRules) Get

Get returns the object from the mock.

func (*MockAlphaForwardingRules) Insert

Insert is a mock for inserting/creating a new object.

func (*MockAlphaForwardingRules) List

List all of the objects in the mock in the given region.

func (*MockAlphaForwardingRules) Obj

Obj wraps the object for use in the mock.

type MockAlphaHealthChecks

type MockAlphaHealthChecks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockHealthChecksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, *alpha.HealthCheck, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockAlphaHealthChecks) (bool, []*alpha.HealthCheck, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *MockAlphaHealthChecks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *alpha.HealthCheck, *MockAlphaHealthChecks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaHealthChecks is the mock for HealthChecks.

func NewMockAlphaHealthChecks

func NewMockAlphaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockAlphaHealthChecks

NewMockAlphaHealthChecks returns a new mock for HealthChecks.

func (*MockAlphaHealthChecks) Delete

func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAlphaHealthChecks) Get

Get returns the object from the mock.

func (*MockAlphaHealthChecks) Insert

func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error

Insert is a mock for inserting/creating a new object.

func (*MockAlphaHealthChecks) List

List all of the objects in the mock.

func (*MockAlphaHealthChecks) Obj

Obj wraps the object for use in the mock.

func (*MockAlphaHealthChecks) Update

func (m *MockAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error

Update is a mock for the corresponding method.

type MockAlphaInstances

type MockAlphaInstances struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockInstancesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook                    func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, *alpha.Instance, error)
	ListHook                   func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaInstances) (bool, []*alpha.Instance, error)
	InsertHook                 func(ctx context.Context, key *meta.Key, obj *alpha.Instance, m *MockAlphaInstances) (bool, error)
	DeleteHook                 func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, error)
	AttachDiskHook             func(context.Context, *meta.Key, *alpha.AttachedDisk, *MockAlphaInstances) error
	DetachDiskHook             func(context.Context, *meta.Key, string, *MockAlphaInstances) error
	UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *alpha.NetworkInterface, *MockAlphaInstances) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaInstances is the mock for Instances.

func NewMockAlphaInstances

func NewMockAlphaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockAlphaInstances

NewMockAlphaInstances returns a new mock for Instances.

func (*MockAlphaInstances) AttachDisk

func (m *MockAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error

AttachDisk is a mock for the corresponding method.

func (*MockAlphaInstances) Delete

func (m *MockAlphaInstances) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockAlphaInstances) DetachDisk

func (m *MockAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a mock for the corresponding method.

func (*MockAlphaInstances) Get

func (m *MockAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error)

Get returns the object from the mock.

func (*MockAlphaInstances) Insert

func (m *MockAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error

Insert is a mock for inserting/creating a new object.

func (*MockAlphaInstances) List

func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)

List all of the objects in the mock in the given zone.

func (*MockAlphaInstances) Obj

Obj wraps the object for use in the mock.

func (*MockAlphaInstances) UpdateNetworkInterface

func (m *MockAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error

UpdateNetworkInterface is a mock for the corresponding method.

type MockAlphaNetworkEndpointGroups

type MockAlphaNetworkEndpointGroups struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockNetworkEndpointGroupsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError            map[meta.Key]error
	ListError           *error
	InsertError         map[meta.Key]error
	DeleteError         map[meta.Key]error
	AggregatedListError *error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook                    func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, *alpha.NetworkEndpointGroup, error)
	ListHook                   func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, []*alpha.NetworkEndpointGroup, error)
	InsertHook                 func(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup, m *MockAlphaNetworkEndpointGroups) (bool, error)
	DeleteHook                 func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, error)
	AggregatedListHook         func(ctx context.Context, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, map[string][]*alpha.NetworkEndpointGroup, error)
	AttachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
	DetachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
	ListNetworkEndpointsHook   func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockAlphaNetworkEndpointGroups) ([]*alpha.NetworkEndpointWithHealthStatus, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaNetworkEndpointGroups is the mock for NetworkEndpointGroups.

func NewMockAlphaNetworkEndpointGroups

func NewMockAlphaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockAlphaNetworkEndpointGroups

NewMockAlphaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.

func (*MockAlphaNetworkEndpointGroups) AggregatedList

AggregatedList is a mock for AggregatedList.

func (*MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints

AttachNetworkEndpoints is a mock for the corresponding method.

func (*MockAlphaNetworkEndpointGroups) Delete

Delete is a mock for deleting the object.

func (*MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints

DetachNetworkEndpoints is a mock for the corresponding method.

func (*MockAlphaNetworkEndpointGroups) Get

Get returns the object from the mock.

func (*MockAlphaNetworkEndpointGroups) Insert

Insert is a mock for inserting/creating a new object.

func (*MockAlphaNetworkEndpointGroups) List

List all of the objects in the mock in the given zone.

func (*MockAlphaNetworkEndpointGroups) ListNetworkEndpoints

ListNetworkEndpoints is a mock for the corresponding method.

func (*MockAlphaNetworkEndpointGroups) Obj

Obj wraps the object for use in the mock.

type MockAlphaRegionBackendServices

type MockAlphaRegionBackendServices struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockRegionBackendServicesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook       func(ctx context.Context, key *meta.Key, m *MockAlphaRegionBackendServices) (bool, *alpha.BackendService, error)
	ListHook      func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionBackendServices) (bool, []*alpha.BackendService, error)
	InsertHook    func(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *MockAlphaRegionBackendServices) (bool, error)
	DeleteHook    func(ctx context.Context, key *meta.Key, m *MockAlphaRegionBackendServices) (bool, error)
	GetHealthHook func(context.Context, *meta.Key, *alpha.ResourceGroupReference, *MockAlphaRegionBackendServices) (*alpha.BackendServiceGroupHealth, error)
	UpdateHook    func(context.Context, *meta.Key, *alpha.BackendService, *MockAlphaRegionBackendServices) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockAlphaRegionBackendServices is the mock for RegionBackendServices.

func NewMockAlphaRegionBackendServices

func NewMockAlphaRegionBackendServices(pr ProjectRouter, objs map[meta.Key]*MockRegionBackendServicesObj) *MockAlphaRegionBackendServices

NewMockAlphaRegionBackendServices returns a new mock for RegionBackendServices.

func (*MockAlphaRegionBackendServices) Delete

Delete is a mock for deleting the object.

func (*MockAlphaRegionBackendServices) Get

Get returns the object from the mock.

func (*MockAlphaRegionBackendServices) GetHealth

GetHealth is a mock for the corresponding method.

func (*MockAlphaRegionBackendServices) Insert

Insert is a mock for inserting/creating a new object.

func (*MockAlphaRegionBackendServices) List

List all of the objects in the mock in the given region.

func (*MockAlphaRegionBackendServices) Obj

Obj wraps the object for use in the mock.

func (*MockAlphaRegionBackendServices) Update

Update is a mock for the corresponding method.

type MockBackendServices

type MockBackendServices struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockBackendServicesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook       func(ctx context.Context, key *meta.Key, m *MockBackendServices) (bool, *ga.BackendService, error)
	ListHook      func(ctx context.Context, fl *filter.F, m *MockBackendServices) (bool, []*ga.BackendService, error)
	InsertHook    func(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *MockBackendServices) (bool, error)
	DeleteHook    func(ctx context.Context, key *meta.Key, m *MockBackendServices) (bool, error)
	GetHealthHook func(context.Context, *meta.Key, *ga.ResourceGroupReference, *MockBackendServices) (*ga.BackendServiceGroupHealth, error)
	PatchHook     func(context.Context, *meta.Key, *ga.BackendService, *MockBackendServices) error
	UpdateHook    func(context.Context, *meta.Key, *ga.BackendService, *MockBackendServices) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBackendServices is the mock for BackendServices.

func NewMockBackendServices

func NewMockBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockBackendServices

NewMockBackendServices returns a new mock for BackendServices.

func (*MockBackendServices) Delete

func (m *MockBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBackendServices) Get

Get returns the object from the mock.

func (*MockBackendServices) GetHealth

GetHealth is a mock for the corresponding method.

func (*MockBackendServices) Insert

func (m *MockBackendServices) Insert(ctx context.Context, key *meta.Key, obj *ga.BackendService) error

Insert is a mock for inserting/creating a new object.

func (*MockBackendServices) List

List all of the objects in the mock.

func (*MockBackendServices) Obj

Obj wraps the object for use in the mock.

func (*MockBackendServices) Patch added in v1.11.0

func (m *MockBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *ga.BackendService) error

Patch is a mock for the corresponding method.

func (*MockBackendServices) Update

func (m *MockBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *ga.BackendService) error

Update is a mock for the corresponding method.

type MockBackendServicesObj

type MockBackendServicesObj struct {
	Obj interface{}
}

MockBackendServicesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockBackendServicesObj) ToAlpha

ToAlpha retrieves the given version of the object.

func (*MockBackendServicesObj) ToBeta added in v1.11.0

ToBeta retrieves the given version of the object.

func (*MockBackendServicesObj) ToGA

ToGA retrieves the given version of the object.

type MockBetaAddresses

type MockBetaAddresses struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockAddressesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockBetaAddresses) (bool, *beta.Address, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockBetaAddresses) (bool, []*beta.Address, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Address, m *MockBetaAddresses) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaAddresses) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaAddresses is the mock for Addresses.

func NewMockBetaAddresses

func NewMockBetaAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockBetaAddresses

NewMockBetaAddresses returns a new mock for Addresses.

func (*MockBetaAddresses) Delete

func (m *MockBetaAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaAddresses) Get

func (m *MockBetaAddresses) Get(ctx context.Context, key *meta.Key) (*beta.Address, error)

Get returns the object from the mock.

func (*MockBetaAddresses) Insert

func (m *MockBetaAddresses) Insert(ctx context.Context, key *meta.Key, obj *beta.Address) error

Insert is a mock for inserting/creating a new object.

func (*MockBetaAddresses) List

func (m *MockBetaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Address, error)

List all of the objects in the mock in the given region.

func (*MockBetaAddresses) Obj

Obj wraps the object for use in the mock.

type MockBetaBackendServices added in v1.11.0

type MockBetaBackendServices struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockBackendServicesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook               func(ctx context.Context, key *meta.Key, m *MockBetaBackendServices) (bool, *beta.BackendService, error)
	ListHook              func(ctx context.Context, fl *filter.F, m *MockBetaBackendServices) (bool, []*beta.BackendService, error)
	InsertHook            func(ctx context.Context, key *meta.Key, obj *beta.BackendService, m *MockBetaBackendServices) (bool, error)
	DeleteHook            func(ctx context.Context, key *meta.Key, m *MockBetaBackendServices) (bool, error)
	SetSecurityPolicyHook func(context.Context, *meta.Key, *beta.SecurityPolicyReference, *MockBetaBackendServices) error
	UpdateHook            func(context.Context, *meta.Key, *beta.BackendService, *MockBetaBackendServices) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaBackendServices is the mock for BackendServices.

func NewMockBetaBackendServices added in v1.11.0

func NewMockBetaBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockBetaBackendServices

NewMockBetaBackendServices returns a new mock for BackendServices.

func (*MockBetaBackendServices) Delete added in v1.11.0

func (m *MockBetaBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaBackendServices) Get added in v1.11.0

Get returns the object from the mock.

func (*MockBetaBackendServices) Insert added in v1.11.0

Insert is a mock for inserting/creating a new object.

func (*MockBetaBackendServices) List added in v1.11.0

List all of the objects in the mock.

func (*MockBetaBackendServices) Obj added in v1.11.0

Obj wraps the object for use in the mock.

func (*MockBetaBackendServices) SetSecurityPolicy added in v1.11.0

func (m *MockBetaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyReference) error

SetSecurityPolicy is a mock for the corresponding method.

func (*MockBetaBackendServices) Update added in v1.12.0

Update is a mock for the corresponding method.

type MockBetaHealthChecks added in v1.12.0

type MockBetaHealthChecks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockHealthChecksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, *beta.HealthCheck, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockBetaHealthChecks) (bool, []*beta.HealthCheck, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *MockBetaHealthChecks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *beta.HealthCheck, *MockBetaHealthChecks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaHealthChecks is the mock for HealthChecks.

func NewMockBetaHealthChecks added in v1.12.0

func NewMockBetaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockBetaHealthChecks

NewMockBetaHealthChecks returns a new mock for HealthChecks.

func (*MockBetaHealthChecks) Delete added in v1.12.0

func (m *MockBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaHealthChecks) Get added in v1.12.0

Get returns the object from the mock.

func (*MockBetaHealthChecks) Insert added in v1.12.0

func (m *MockBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error

Insert is a mock for inserting/creating a new object.

func (*MockBetaHealthChecks) List added in v1.12.0

List all of the objects in the mock.

func (*MockBetaHealthChecks) Obj added in v1.12.0

Obj wraps the object for use in the mock.

func (*MockBetaHealthChecks) Update added in v1.12.0

func (m *MockBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error

Update is a mock for the corresponding method.

type MockBetaInstances

type MockBetaInstances struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockInstancesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook                    func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, *beta.Instance, error)
	ListHook                   func(ctx context.Context, zone string, fl *filter.F, m *MockBetaInstances) (bool, []*beta.Instance, error)
	InsertHook                 func(ctx context.Context, key *meta.Key, obj *beta.Instance, m *MockBetaInstances) (bool, error)
	DeleteHook                 func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, error)
	AttachDiskHook             func(context.Context, *meta.Key, *beta.AttachedDisk, *MockBetaInstances) error
	DetachDiskHook             func(context.Context, *meta.Key, string, *MockBetaInstances) error
	UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *beta.NetworkInterface, *MockBetaInstances) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaInstances is the mock for Instances.

func NewMockBetaInstances

func NewMockBetaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockBetaInstances

NewMockBetaInstances returns a new mock for Instances.

func (*MockBetaInstances) AttachDisk

func (m *MockBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error

AttachDisk is a mock for the corresponding method.

func (*MockBetaInstances) Delete

func (m *MockBetaInstances) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaInstances) DetachDisk

func (m *MockBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a mock for the corresponding method.

func (*MockBetaInstances) Get

func (m *MockBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error)

Get returns the object from the mock.

func (*MockBetaInstances) Insert

func (m *MockBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error

Insert is a mock for inserting/creating a new object.

func (*MockBetaInstances) List

func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)

List all of the objects in the mock in the given zone.

func (*MockBetaInstances) Obj

Obj wraps the object for use in the mock.

func (*MockBetaInstances) UpdateNetworkInterface

func (m *MockBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error

UpdateNetworkInterface is a mock for the corresponding method.

type MockBetaNetworkEndpointGroups added in v1.12.0

type MockBetaNetworkEndpointGroups struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockNetworkEndpointGroupsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError            map[meta.Key]error
	ListError           *error
	InsertError         map[meta.Key]error
	DeleteError         map[meta.Key]error
	AggregatedListError *error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook                    func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, *beta.NetworkEndpointGroup, error)
	ListHook                   func(ctx context.Context, zone string, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, []*beta.NetworkEndpointGroup, error)
	InsertHook                 func(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup, m *MockBetaNetworkEndpointGroups) (bool, error)
	DeleteHook                 func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, error)
	AggregatedListHook         func(ctx context.Context, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, map[string][]*beta.NetworkEndpointGroup, error)
	AttachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsAttachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
	DetachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsDetachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
	ListNetworkEndpointsHook   func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockBetaNetworkEndpointGroups) ([]*beta.NetworkEndpointWithHealthStatus, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaNetworkEndpointGroups is the mock for NetworkEndpointGroups.

func NewMockBetaNetworkEndpointGroups added in v1.12.0

func NewMockBetaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockBetaNetworkEndpointGroups

NewMockBetaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.

func (*MockBetaNetworkEndpointGroups) AggregatedList added in v1.12.0

AggregatedList is a mock for AggregatedList.

func (*MockBetaNetworkEndpointGroups) AttachNetworkEndpoints added in v1.12.0

AttachNetworkEndpoints is a mock for the corresponding method.

func (*MockBetaNetworkEndpointGroups) Delete added in v1.12.0

Delete is a mock for deleting the object.

func (*MockBetaNetworkEndpointGroups) DetachNetworkEndpoints added in v1.12.0

DetachNetworkEndpoints is a mock for the corresponding method.

func (*MockBetaNetworkEndpointGroups) Get added in v1.12.0

Get returns the object from the mock.

func (*MockBetaNetworkEndpointGroups) Insert added in v1.12.0

Insert is a mock for inserting/creating a new object.

func (*MockBetaNetworkEndpointGroups) List added in v1.12.0

List all of the objects in the mock in the given zone.

func (*MockBetaNetworkEndpointGroups) ListNetworkEndpoints added in v1.12.0

ListNetworkEndpoints is a mock for the corresponding method.

func (*MockBetaNetworkEndpointGroups) Obj added in v1.12.0

Obj wraps the object for use in the mock.

type MockBetaRegionDisks added in v1.11.0

type MockBetaRegionDisks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockRegionDisksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockBetaRegionDisks) (bool, *beta.Disk, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionDisks) (bool, []*beta.Disk, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Disk, m *MockBetaRegionDisks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionDisks) (bool, error)
	ResizeHook func(context.Context, *meta.Key, *beta.RegionDisksResizeRequest, *MockBetaRegionDisks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaRegionDisks is the mock for RegionDisks.

func NewMockBetaRegionDisks added in v1.11.0

func NewMockBetaRegionDisks(pr ProjectRouter, objs map[meta.Key]*MockRegionDisksObj) *MockBetaRegionDisks

NewMockBetaRegionDisks returns a new mock for RegionDisks.

func (*MockBetaRegionDisks) Delete added in v1.11.0

func (m *MockBetaRegionDisks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaRegionDisks) Get added in v1.11.0

func (m *MockBetaRegionDisks) Get(ctx context.Context, key *meta.Key) (*beta.Disk, error)

Get returns the object from the mock.

func (*MockBetaRegionDisks) Insert added in v1.11.0

func (m *MockBetaRegionDisks) Insert(ctx context.Context, key *meta.Key, obj *beta.Disk) error

Insert is a mock for inserting/creating a new object.

func (*MockBetaRegionDisks) List added in v1.11.0

func (m *MockBetaRegionDisks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Disk, error)

List all of the objects in the mock in the given region.

func (*MockBetaRegionDisks) Obj added in v1.11.0

Obj wraps the object for use in the mock.

func (*MockBetaRegionDisks) Resize added in v1.11.0

Resize is a mock for the corresponding method.

type MockBetaSecurityPolicies added in v1.11.0

type MockBetaSecurityPolicies struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockSecurityPoliciesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook        func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, *beta.SecurityPolicy, error)
	ListHook       func(ctx context.Context, fl *filter.F, m *MockBetaSecurityPolicies) (bool, []*beta.SecurityPolicy, error)
	InsertHook     func(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy, m *MockBetaSecurityPolicies) (bool, error)
	DeleteHook     func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, error)
	AddRuleHook    func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
	GetRuleHook    func(context.Context, *meta.Key, *MockBetaSecurityPolicies) (*beta.SecurityPolicyRule, error)
	PatchHook      func(context.Context, *meta.Key, *beta.SecurityPolicy, *MockBetaSecurityPolicies) error
	PatchRuleHook  func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
	RemoveRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockBetaSecurityPolicies is the mock for SecurityPolicies.

func NewMockBetaSecurityPolicies added in v1.11.0

func NewMockBetaSecurityPolicies(pr ProjectRouter, objs map[meta.Key]*MockSecurityPoliciesObj) *MockBetaSecurityPolicies

NewMockBetaSecurityPolicies returns a new mock for SecurityPolicies.

func (*MockBetaSecurityPolicies) AddRule added in v1.11.0

AddRule is a mock for the corresponding method.

func (*MockBetaSecurityPolicies) Delete added in v1.11.0

func (m *MockBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockBetaSecurityPolicies) Get added in v1.11.0

Get returns the object from the mock.

func (*MockBetaSecurityPolicies) GetRule added in v1.11.0

GetRule is a mock for the corresponding method.

func (*MockBetaSecurityPolicies) Insert added in v1.11.0

Insert is a mock for inserting/creating a new object.

func (*MockBetaSecurityPolicies) List added in v1.11.0

List all of the objects in the mock.

func (*MockBetaSecurityPolicies) Obj added in v1.11.0

Obj wraps the object for use in the mock.

func (*MockBetaSecurityPolicies) Patch added in v1.11.0

Patch is a mock for the corresponding method.

func (*MockBetaSecurityPolicies) PatchRule added in v1.11.0

PatchRule is a mock for the corresponding method.

func (*MockBetaSecurityPolicies) RemoveRule added in v1.11.0

func (m *MockBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error

RemoveRule is a mock for the corresponding method.

type MockDisks

type MockDisks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockDisksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockDisks) (bool, *ga.Disk, error)
	ListHook   func(ctx context.Context, zone string, fl *filter.F, m *MockDisks) (bool, []*ga.Disk, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Disk, m *MockDisks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockDisks) (bool, error)
	ResizeHook func(context.Context, *meta.Key, *ga.DisksResizeRequest, *MockDisks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockDisks is the mock for Disks.

func NewMockDisks

func NewMockDisks(pr ProjectRouter, objs map[meta.Key]*MockDisksObj) *MockDisks

NewMockDisks returns a new mock for Disks.

func (*MockDisks) Delete

func (m *MockDisks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockDisks) Get

func (m *MockDisks) Get(ctx context.Context, key *meta.Key) (*ga.Disk, error)

Get returns the object from the mock.

func (*MockDisks) Insert

func (m *MockDisks) Insert(ctx context.Context, key *meta.Key, obj *ga.Disk) error

Insert is a mock for inserting/creating a new object.

func (*MockDisks) List

func (m *MockDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Disk, error)

List all of the objects in the mock in the given zone.

func (*MockDisks) Obj

func (m *MockDisks) Obj(o *ga.Disk) *MockDisksObj

Obj wraps the object for use in the mock.

func (*MockDisks) Resize added in v1.11.0

func (m *MockDisks) Resize(ctx context.Context, key *meta.Key, arg0 *ga.DisksResizeRequest) error

Resize is a mock for the corresponding method.

type MockDisksObj

type MockDisksObj struct {
	Obj interface{}
}

MockDisksObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockDisksObj) ToGA

func (m *MockDisksObj) ToGA() *ga.Disk

ToGA retrieves the given version of the object.

type MockFirewalls

type MockFirewalls struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockFirewallsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, *ga.Firewall, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockFirewalls) (bool, []*ga.Firewall, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *MockFirewalls) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *ga.Firewall, *MockFirewalls) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockFirewalls is the mock for Firewalls.

func NewMockFirewalls

func NewMockFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockFirewalls

NewMockFirewalls returns a new mock for Firewalls.

func (*MockFirewalls) Delete

func (m *MockFirewalls) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockFirewalls) Get

func (m *MockFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error)

Get returns the object from the mock.

func (*MockFirewalls) Insert

func (m *MockFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error

Insert is a mock for inserting/creating a new object.

func (*MockFirewalls) List

func (m *MockFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)

List all of the objects in the mock.

func (*MockFirewalls) Obj

Obj wraps the object for use in the mock.

func (*MockFirewalls) Update

func (m *MockFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error

Update is a mock for the corresponding method.

type MockFirewallsObj

type MockFirewallsObj struct {
	Obj interface{}
}

MockFirewallsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockFirewallsObj) ToGA

func (m *MockFirewallsObj) ToGA() *ga.Firewall

ToGA retrieves the given version of the object.

type MockForwardingRules

type MockForwardingRules struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockForwardingRulesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, *ga.ForwardingRule, error)
	ListHook   func(ctx context.Context, region string, fl *filter.F, m *MockForwardingRules) (bool, []*ga.ForwardingRule, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockForwardingRules) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockForwardingRules is the mock for ForwardingRules.

func NewMockForwardingRules

func NewMockForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockForwardingRules

NewMockForwardingRules returns a new mock for ForwardingRules.

func (*MockForwardingRules) Delete

func (m *MockForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockForwardingRules) Get

Get returns the object from the mock.

func (*MockForwardingRules) Insert

func (m *MockForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error

Insert is a mock for inserting/creating a new object.

func (*MockForwardingRules) List

func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)

List all of the objects in the mock in the given region.

func (*MockForwardingRules) Obj

Obj wraps the object for use in the mock.

type MockForwardingRulesObj

type MockForwardingRulesObj struct {
	Obj interface{}
}

MockForwardingRulesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockForwardingRulesObj) ToAlpha

ToAlpha retrieves the given version of the object.

func (*MockForwardingRulesObj) ToGA

ToGA retrieves the given version of the object.

type MockGCE

type MockGCE struct {
	MockAddresses                  *MockAddresses
	MockAlphaAddresses             *MockAlphaAddresses
	MockBetaAddresses              *MockBetaAddresses
	MockGlobalAddresses            *MockGlobalAddresses
	MockBackendServices            *MockBackendServices
	MockBetaBackendServices        *MockBetaBackendServices
	MockAlphaBackendServices       *MockAlphaBackendServices
	MockRegionBackendServices      *MockRegionBackendServices
	MockAlphaRegionBackendServices *MockAlphaRegionBackendServices
	MockDisks                      *MockDisks
	MockBetaRegionDisks            *MockBetaRegionDisks
	MockFirewalls                  *MockFirewalls
	MockForwardingRules            *MockForwardingRules
	MockAlphaForwardingRules       *MockAlphaForwardingRules
	MockGlobalForwardingRules      *MockGlobalForwardingRules
	MockHealthChecks               *MockHealthChecks
	MockBetaHealthChecks           *MockBetaHealthChecks
	MockAlphaHealthChecks          *MockAlphaHealthChecks
	MockHttpHealthChecks           *MockHttpHealthChecks
	MockHttpsHealthChecks          *MockHttpsHealthChecks
	MockInstanceGroups             *MockInstanceGroups
	MockInstances                  *MockInstances
	MockBetaInstances              *MockBetaInstances
	MockAlphaInstances             *MockAlphaInstances
	MockAlphaNetworkEndpointGroups *MockAlphaNetworkEndpointGroups
	MockBetaNetworkEndpointGroups  *MockBetaNetworkEndpointGroups
	MockProjects                   *MockProjects
	MockRegions                    *MockRegions
	MockRoutes                     *MockRoutes
	MockBetaSecurityPolicies       *MockBetaSecurityPolicies
	MockSslCertificates            *MockSslCertificates
	MockTargetHttpProxies          *MockTargetHttpProxies
	MockTargetHttpsProxies         *MockTargetHttpsProxies
	MockTargetPools                *MockTargetPools
	MockUrlMaps                    *MockUrlMaps
	MockZones                      *MockZones
}

MockGCE is the mock for the compute API.

func NewMockGCE

func NewMockGCE(projectRouter ProjectRouter) *MockGCE

NewMockGCE returns a new mock for GCE.

func (*MockGCE) Addresses

func (mock *MockGCE) Addresses() Addresses

Addresses returns the interface for the ga Addresses.

func (*MockGCE) AlphaAddresses

func (mock *MockGCE) AlphaAddresses() AlphaAddresses

AlphaAddresses returns the interface for the alpha Addresses.

func (*MockGCE) AlphaBackendServices

func (mock *MockGCE) AlphaBackendServices() AlphaBackendServices

AlphaBackendServices returns the interface for the alpha BackendServices.

func (*MockGCE) AlphaForwardingRules

func (mock *MockGCE) AlphaForwardingRules() AlphaForwardingRules

AlphaForwardingRules returns the interface for the alpha ForwardingRules.

func (*MockGCE) AlphaHealthChecks

func (mock *MockGCE) AlphaHealthChecks() AlphaHealthChecks

AlphaHealthChecks returns the interface for the alpha HealthChecks.

func (*MockGCE) AlphaInstances

func (mock *MockGCE) AlphaInstances() AlphaInstances

AlphaInstances returns the interface for the alpha Instances.

func (*MockGCE) AlphaNetworkEndpointGroups

func (mock *MockGCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups

AlphaNetworkEndpointGroups returns the interface for the alpha NetworkEndpointGroups.

func (*MockGCE) AlphaRegionBackendServices

func (mock *MockGCE) AlphaRegionBackendServices() AlphaRegionBackendServices

AlphaRegionBackendServices returns the interface for the alpha RegionBackendServices.

func (*MockGCE) BackendServices

func (mock *MockGCE) BackendServices() BackendServices

BackendServices returns the interface for the ga BackendServices.

func (*MockGCE) BetaAddresses

func (mock *MockGCE) BetaAddresses() BetaAddresses

BetaAddresses returns the interface for the beta Addresses.

func (*MockGCE) BetaBackendServices added in v1.11.0

func (mock *MockGCE) BetaBackendServices() BetaBackendServices

BetaBackendServices returns the interface for the beta BackendServices.

func (*MockGCE) BetaHealthChecks added in v1.12.0

func (mock *MockGCE) BetaHealthChecks() BetaHealthChecks

BetaHealthChecks returns the interface for the beta HealthChecks.

func (*MockGCE) BetaInstances

func (mock *MockGCE) BetaInstances() BetaInstances

BetaInstances returns the interface for the beta Instances.

func (*MockGCE) BetaNetworkEndpointGroups added in v1.12.0

func (mock *MockGCE) BetaNetworkEndpointGroups() BetaNetworkEndpointGroups

BetaNetworkEndpointGroups returns the interface for the beta NetworkEndpointGroups.

func (*MockGCE) BetaRegionDisks added in v1.11.0

func (mock *MockGCE) BetaRegionDisks() BetaRegionDisks

BetaRegionDisks returns the interface for the beta RegionDisks.

func (*MockGCE) BetaSecurityPolicies added in v1.11.0

func (mock *MockGCE) BetaSecurityPolicies() BetaSecurityPolicies

BetaSecurityPolicies returns the interface for the beta SecurityPolicies.

func (*MockGCE) Disks

func (mock *MockGCE) Disks() Disks

Disks returns the interface for the ga Disks.

func (*MockGCE) Firewalls

func (mock *MockGCE) Firewalls() Firewalls

Firewalls returns the interface for the ga Firewalls.

func (*MockGCE) ForwardingRules

func (mock *MockGCE) ForwardingRules() ForwardingRules

ForwardingRules returns the interface for the ga ForwardingRules.

func (*MockGCE) GlobalAddresses

func (mock *MockGCE) GlobalAddresses() GlobalAddresses

GlobalAddresses returns the interface for the ga GlobalAddresses.

func (*MockGCE) GlobalForwardingRules

func (mock *MockGCE) GlobalForwardingRules() GlobalForwardingRules

GlobalForwardingRules returns the interface for the ga GlobalForwardingRules.

func (*MockGCE) HealthChecks

func (mock *MockGCE) HealthChecks() HealthChecks

HealthChecks returns the interface for the ga HealthChecks.

func (*MockGCE) HttpHealthChecks

func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks

HttpHealthChecks returns the interface for the ga HttpHealthChecks.

func (*MockGCE) HttpsHealthChecks

func (mock *MockGCE) HttpsHealthChecks() HttpsHealthChecks

HttpsHealthChecks returns the interface for the ga HttpsHealthChecks.

func (*MockGCE) InstanceGroups

func (mock *MockGCE) InstanceGroups() InstanceGroups

InstanceGroups returns the interface for the ga InstanceGroups.

func (*MockGCE) Instances

func (mock *MockGCE) Instances() Instances

Instances returns the interface for the ga Instances.

func (*MockGCE) Projects

func (mock *MockGCE) Projects() Projects

Projects returns the interface for the ga Projects.

func (*MockGCE) RegionBackendServices

func (mock *MockGCE) RegionBackendServices() RegionBackendServices

RegionBackendServices returns the interface for the ga RegionBackendServices.

func (*MockGCE) Regions

func (mock *MockGCE) Regions() Regions

Regions returns the interface for the ga Regions.

func (*MockGCE) Routes

func (mock *MockGCE) Routes() Routes

Routes returns the interface for the ga Routes.

func (*MockGCE) SslCertificates

func (mock *MockGCE) SslCertificates() SslCertificates

SslCertificates returns the interface for the ga SslCertificates.

func (*MockGCE) TargetHttpProxies

func (mock *MockGCE) TargetHttpProxies() TargetHttpProxies

TargetHttpProxies returns the interface for the ga TargetHttpProxies.

func (*MockGCE) TargetHttpsProxies

func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies

TargetHttpsProxies returns the interface for the ga TargetHttpsProxies.

func (*MockGCE) TargetPools

func (mock *MockGCE) TargetPools() TargetPools

TargetPools returns the interface for the ga TargetPools.

func (*MockGCE) UrlMaps

func (mock *MockGCE) UrlMaps() UrlMaps

UrlMaps returns the interface for the ga UrlMaps.

func (*MockGCE) Zones

func (mock *MockGCE) Zones() Zones

Zones returns the interface for the ga Zones.

type MockGlobalAddresses

type MockGlobalAddresses struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockGlobalAddressesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockGlobalAddresses) (bool, *ga.Address, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockGlobalAddresses) (bool, []*ga.Address, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Address, m *MockGlobalAddresses) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalAddresses) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockGlobalAddresses is the mock for GlobalAddresses.

func NewMockGlobalAddresses

func NewMockGlobalAddresses(pr ProjectRouter, objs map[meta.Key]*MockGlobalAddressesObj) *MockGlobalAddresses

NewMockGlobalAddresses returns a new mock for GlobalAddresses.

func (*MockGlobalAddresses) Delete

func (m *MockGlobalAddresses) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockGlobalAddresses) Get

func (m *MockGlobalAddresses) Get(ctx context.Context, key *meta.Key) (*ga.Address, error)

Get returns the object from the mock.

func (*MockGlobalAddresses) Insert

func (m *MockGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *ga.Address) error

Insert is a mock for inserting/creating a new object.

func (*MockGlobalAddresses) List

func (m *MockGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Address, error)

List all of the objects in the mock.

func (*MockGlobalAddresses) Obj

Obj wraps the object for use in the mock.

type MockGlobalAddressesObj

type MockGlobalAddressesObj struct {
	Obj interface{}
}

MockGlobalAddressesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockGlobalAddressesObj) ToGA

func (m *MockGlobalAddressesObj) ToGA() *ga.Address

ToGA retrieves the given version of the object.

type MockGlobalForwardingRules

type MockGlobalForwardingRules struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockGlobalForwardingRulesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook       func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, *ga.ForwardingRule, error)
	ListHook      func(ctx context.Context, fl *filter.F, m *MockGlobalForwardingRules) (bool, []*ga.ForwardingRule, error)
	InsertHook    func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockGlobalForwardingRules) (bool, error)
	DeleteHook    func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, error)
	SetTargetHook func(context.Context, *meta.Key, *ga.TargetReference, *MockGlobalForwardingRules) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockGlobalForwardingRules is the mock for GlobalForwardingRules.

func NewMockGlobalForwardingRules

func NewMockGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockGlobalForwardingRules

NewMockGlobalForwardingRules returns a new mock for GlobalForwardingRules.

func (*MockGlobalForwardingRules) Delete

func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockGlobalForwardingRules) Get

Get returns the object from the mock.

func (*MockGlobalForwardingRules) Insert

Insert is a mock for inserting/creating a new object.

func (*MockGlobalForwardingRules) List

List all of the objects in the mock.

func (*MockGlobalForwardingRules) Obj

Obj wraps the object for use in the mock.

func (*MockGlobalForwardingRules) SetTarget

func (m *MockGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error

SetTarget is a mock for the corresponding method.

type MockGlobalForwardingRulesObj

type MockGlobalForwardingRulesObj struct {
	Obj interface{}
}

MockGlobalForwardingRulesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockGlobalForwardingRulesObj) ToGA

ToGA retrieves the given version of the object.

type MockHealthChecks

type MockHealthChecks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockHealthChecksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, *ga.HealthCheck, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockHealthChecks) (bool, []*ga.HealthCheck, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *MockHealthChecks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *ga.HealthCheck, *MockHealthChecks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockHealthChecks is the mock for HealthChecks.

func NewMockHealthChecks

func NewMockHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockHealthChecks

NewMockHealthChecks returns a new mock for HealthChecks.

func (*MockHealthChecks) Delete

func (m *MockHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockHealthChecks) Get

func (m *MockHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)

Get returns the object from the mock.

func (*MockHealthChecks) Insert

func (m *MockHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error

Insert is a mock for inserting/creating a new object.

func (*MockHealthChecks) List

func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)

List all of the objects in the mock.

func (*MockHealthChecks) Obj

Obj wraps the object for use in the mock.

func (*MockHealthChecks) Update

func (m *MockHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error

Update is a mock for the corresponding method.

type MockHealthChecksObj

type MockHealthChecksObj struct {
	Obj interface{}
}

MockHealthChecksObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockHealthChecksObj) ToAlpha

func (m *MockHealthChecksObj) ToAlpha() *alpha.HealthCheck

ToAlpha retrieves the given version of the object.

func (*MockHealthChecksObj) ToBeta added in v1.12.0

func (m *MockHealthChecksObj) ToBeta() *beta.HealthCheck

ToBeta retrieves the given version of the object.

func (*MockHealthChecksObj) ToGA

func (m *MockHealthChecksObj) ToGA() *ga.HealthCheck

ToGA retrieves the given version of the object.

type MockHttpHealthChecks

type MockHttpHealthChecks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockHttpHealthChecksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, *ga.HttpHealthCheck, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockHttpHealthChecks) (bool, []*ga.HttpHealthCheck, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck, m *MockHttpHealthChecks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *ga.HttpHealthCheck, *MockHttpHealthChecks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockHttpHealthChecks is the mock for HttpHealthChecks.

func NewMockHttpHealthChecks

func NewMockHttpHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpHealthChecksObj) *MockHttpHealthChecks

NewMockHttpHealthChecks returns a new mock for HttpHealthChecks.

func (*MockHttpHealthChecks) Delete

func (m *MockHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockHttpHealthChecks) Get

Get returns the object from the mock.

func (*MockHttpHealthChecks) Insert

func (m *MockHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error

Insert is a mock for inserting/creating a new object.

func (*MockHttpHealthChecks) List

List all of the objects in the mock.

func (*MockHttpHealthChecks) Obj

Obj wraps the object for use in the mock.

func (*MockHttpHealthChecks) Update

func (m *MockHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error

Update is a mock for the corresponding method.

type MockHttpHealthChecksObj

type MockHttpHealthChecksObj struct {
	Obj interface{}
}

MockHttpHealthChecksObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockHttpHealthChecksObj) ToGA

ToGA retrieves the given version of the object.

type MockHttpsHealthChecks

type MockHttpsHealthChecks struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockHttpsHealthChecksObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, *ga.HttpsHealthCheck, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockHttpsHealthChecks) (bool, []*ga.HttpsHealthCheck, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck, m *MockHttpsHealthChecks) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *ga.HttpsHealthCheck, *MockHttpsHealthChecks) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockHttpsHealthChecks is the mock for HttpsHealthChecks.

func NewMockHttpsHealthChecks

func NewMockHttpsHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpsHealthChecksObj) *MockHttpsHealthChecks

NewMockHttpsHealthChecks returns a new mock for HttpsHealthChecks.

func (*MockHttpsHealthChecks) Delete

func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockHttpsHealthChecks) Get

Get returns the object from the mock.

func (*MockHttpsHealthChecks) Insert

Insert is a mock for inserting/creating a new object.

func (*MockHttpsHealthChecks) List

List all of the objects in the mock.

func (*MockHttpsHealthChecks) Obj

Obj wraps the object for use in the mock.

func (*MockHttpsHealthChecks) Update

func (m *MockHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error

Update is a mock for the corresponding method.

type MockHttpsHealthChecksObj

type MockHttpsHealthChecksObj struct {
	Obj interface{}
}

MockHttpsHealthChecksObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockHttpsHealthChecksObj) ToGA

ToGA retrieves the given version of the object.

type MockInstanceGroups

type MockInstanceGroups struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockInstanceGroupsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook             func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, *ga.InstanceGroup, error)
	ListHook            func(ctx context.Context, zone string, fl *filter.F, m *MockInstanceGroups) (bool, []*ga.InstanceGroup, error)
	InsertHook          func(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup, m *MockInstanceGroups) (bool, error)
	DeleteHook          func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, error)
	AddInstancesHook    func(context.Context, *meta.Key, *ga.InstanceGroupsAddInstancesRequest, *MockInstanceGroups) error
	ListInstancesHook   func(context.Context, *meta.Key, *ga.InstanceGroupsListInstancesRequest, *filter.F, *MockInstanceGroups) ([]*ga.InstanceWithNamedPorts, error)
	RemoveInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsRemoveInstancesRequest, *MockInstanceGroups) error
	SetNamedPortsHook   func(context.Context, *meta.Key, *ga.InstanceGroupsSetNamedPortsRequest, *MockInstanceGroups) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockInstanceGroups is the mock for InstanceGroups.

func NewMockInstanceGroups

func NewMockInstanceGroups(pr ProjectRouter, objs map[meta.Key]*MockInstanceGroupsObj) *MockInstanceGroups

NewMockInstanceGroups returns a new mock for InstanceGroups.

func (*MockInstanceGroups) AddInstances

AddInstances is a mock for the corresponding method.

func (*MockInstanceGroups) Delete

func (m *MockInstanceGroups) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockInstanceGroups) Get

Get returns the object from the mock.

func (*MockInstanceGroups) Insert

func (m *MockInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error

Insert is a mock for inserting/creating a new object.

func (*MockInstanceGroups) List

func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)

List all of the objects in the mock in the given zone.

func (*MockInstanceGroups) ListInstances

ListInstances is a mock for the corresponding method.

func (*MockInstanceGroups) Obj

Obj wraps the object for use in the mock.

func (*MockInstanceGroups) RemoveInstances

RemoveInstances is a mock for the corresponding method.

func (*MockInstanceGroups) SetNamedPorts

SetNamedPorts is a mock for the corresponding method.

type MockInstanceGroupsObj

type MockInstanceGroupsObj struct {
	Obj interface{}
}

MockInstanceGroupsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockInstanceGroupsObj) ToGA

ToGA retrieves the given version of the object.

type MockInstances

type MockInstances struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockInstancesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook        func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, *ga.Instance, error)
	ListHook       func(ctx context.Context, zone string, fl *filter.F, m *MockInstances) (bool, []*ga.Instance, error)
	InsertHook     func(ctx context.Context, key *meta.Key, obj *ga.Instance, m *MockInstances) (bool, error)
	DeleteHook     func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, error)
	AttachDiskHook func(context.Context, *meta.Key, *ga.AttachedDisk, *MockInstances) error
	DetachDiskHook func(context.Context, *meta.Key, string, *MockInstances) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockInstances is the mock for Instances.

func NewMockInstances

func NewMockInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockInstances

NewMockInstances returns a new mock for Instances.

func (*MockInstances) AttachDisk

func (m *MockInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error

AttachDisk is a mock for the corresponding method.

func (*MockInstances) Delete

func (m *MockInstances) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockInstances) DetachDisk

func (m *MockInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error

DetachDisk is a mock for the corresponding method.

func (*MockInstances) Get

func (m *MockInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error)

Get returns the object from the mock.

func (*MockInstances) Insert

func (m *MockInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error

Insert is a mock for inserting/creating a new object.

func (*MockInstances) List

func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)

List all of the objects in the mock in the given zone.

func (*MockInstances) Obj

Obj wraps the object for use in the mock.

type MockInstancesObj

type MockInstancesObj struct {
	Obj interface{}
}

MockInstancesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockInstancesObj) ToAlpha

func (m *MockInstancesObj) ToAlpha() *alpha.Instance

ToAlpha retrieves the given version of the object.

func (*MockInstancesObj) ToBeta

func (m *MockInstancesObj) ToBeta() *beta.Instance

ToBeta retrieves the given version of the object.

func (*MockInstancesObj) ToGA

func (m *MockInstancesObj) ToGA() *ga.Instance

ToGA retrieves the given version of the object.

type MockNetworkEndpointGroupsObj

type MockNetworkEndpointGroupsObj struct {
	Obj interface{}
}

MockNetworkEndpointGroupsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockNetworkEndpointGroupsObj) ToAlpha

ToAlpha retrieves the given version of the object.

func (*MockNetworkEndpointGroupsObj) ToBeta added in v1.12.0

ToBeta retrieves the given version of the object.

type MockProjectOpsState

type MockProjectOpsState struct {
	// contains filtered or unexported fields
}

MockProjectOpsState is stored in the mock.X field.

type MockProjects

type MockProjects struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockProjectsObj

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockProjects is the mock for Projects.

func NewMockProjects

func NewMockProjects(pr ProjectRouter, objs map[meta.Key]*MockProjectsObj) *MockProjects

NewMockProjects returns a new mock for Projects.

func (*MockProjects) Get

func (m *MockProjects) Get(ctx context.Context, projectID string) (*compute.Project, error)

Get a project by projectID.

func (*MockProjects) Obj

func (m *MockProjects) Obj(o *ga.Project) *MockProjectsObj

Obj wraps the object for use in the mock.

func (*MockProjects) SetCommonInstanceMetadata

func (m *MockProjects) SetCommonInstanceMetadata(ctx context.Context, projectID string, meta *compute.Metadata) error

SetCommonInstanceMetadata for a given project.

type MockProjectsObj

type MockProjectsObj struct {
	Obj interface{}
}

MockProjectsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockProjectsObj) ToGA

func (m *MockProjectsObj) ToGA() *ga.Project

ToGA retrieves the given version of the object.

type MockRegionBackendServices

type MockRegionBackendServices struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockRegionBackendServicesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook       func(ctx context.Context, key *meta.Key, m *MockRegionBackendServices) (bool, *ga.BackendService, error)
	ListHook      func(ctx context.Context, region string, fl *filter.F, m *MockRegionBackendServices) (bool, []*ga.BackendService, error)
	InsertHook    func(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *MockRegionBackendServices) (bool, error)
	DeleteHook    func(ctx context.Context, key *meta.Key, m *MockRegionBackendServices) (bool, error)
	GetHealthHook func(context.Context, *meta.Key, *ga.ResourceGroupReference, *MockRegionBackendServices) (*ga.BackendServiceGroupHealth, error)
	UpdateHook    func(context.Context, *meta.Key, *ga.BackendService, *MockRegionBackendServices) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockRegionBackendServices is the mock for RegionBackendServices.

func NewMockRegionBackendServices

func NewMockRegionBackendServices(pr ProjectRouter, objs map[meta.Key]*MockRegionBackendServicesObj) *MockRegionBackendServices

NewMockRegionBackendServices returns a new mock for RegionBackendServices.

func (*MockRegionBackendServices) Delete

func (m *MockRegionBackendServices) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockRegionBackendServices) Get

Get returns the object from the mock.

func (*MockRegionBackendServices) GetHealth

GetHealth is a mock for the corresponding method.

func (*MockRegionBackendServices) Insert

Insert is a mock for inserting/creating a new object.

func (*MockRegionBackendServices) List

func (m *MockRegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*ga.BackendService, error)

List all of the objects in the mock in the given region.

func (*MockRegionBackendServices) Obj

Obj wraps the object for use in the mock.

func (*MockRegionBackendServices) Update

Update is a mock for the corresponding method.

type MockRegionBackendServicesObj

type MockRegionBackendServicesObj struct {
	Obj interface{}
}

MockRegionBackendServicesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockRegionBackendServicesObj) ToAlpha

ToAlpha retrieves the given version of the object.

func (*MockRegionBackendServicesObj) ToGA

ToGA retrieves the given version of the object.

type MockRegionDisksObj

type MockRegionDisksObj struct {
	Obj interface{}
}

MockRegionDisksObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockRegionDisksObj) ToBeta added in v1.11.0

func (m *MockRegionDisksObj) ToBeta() *beta.Disk

ToBeta retrieves the given version of the object.

type MockRegions

type MockRegions struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockRegionsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError  map[meta.Key]error
	ListError *error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook  func(ctx context.Context, key *meta.Key, m *MockRegions) (bool, *ga.Region, error)
	ListHook func(ctx context.Context, fl *filter.F, m *MockRegions) (bool, []*ga.Region, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockRegions is the mock for Regions.

func NewMockRegions

func NewMockRegions(pr ProjectRouter, objs map[meta.Key]*MockRegionsObj) *MockRegions

NewMockRegions returns a new mock for Regions.

func (*MockRegions) Get

func (m *MockRegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error)

Get returns the object from the mock.

func (*MockRegions) List

func (m *MockRegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error)

List all of the objects in the mock.

func (*MockRegions) Obj

func (m *MockRegions) Obj(o *ga.Region) *MockRegionsObj

Obj wraps the object for use in the mock.

type MockRegionsObj

type MockRegionsObj struct {
	Obj interface{}
}

MockRegionsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockRegionsObj) ToGA

func (m *MockRegionsObj) ToGA() *ga.Region

ToGA retrieves the given version of the object.

type MockRoutes

type MockRoutes struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockRoutesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, *ga.Route, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockRoutes) (bool, []*ga.Route, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Route, m *MockRoutes) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockRoutes is the mock for Routes.

func NewMockRoutes

func NewMockRoutes(pr ProjectRouter, objs map[meta.Key]*MockRoutesObj) *MockRoutes

NewMockRoutes returns a new mock for Routes.

func (*MockRoutes) Delete

func (m *MockRoutes) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockRoutes) Get

func (m *MockRoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error)

Get returns the object from the mock.

func (*MockRoutes) Insert

func (m *MockRoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error

Insert is a mock for inserting/creating a new object.

func (*MockRoutes) List

func (m *MockRoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)

List all of the objects in the mock.

func (*MockRoutes) Obj

func (m *MockRoutes) Obj(o *ga.Route) *MockRoutesObj

Obj wraps the object for use in the mock.

type MockRoutesObj

type MockRoutesObj struct {
	Obj interface{}
}

MockRoutesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockRoutesObj) ToGA

func (m *MockRoutesObj) ToGA() *ga.Route

ToGA retrieves the given version of the object.

type MockSecurityPoliciesObj added in v1.11.0

type MockSecurityPoliciesObj struct {
	Obj interface{}
}

MockSecurityPoliciesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockSecurityPoliciesObj) ToBeta added in v1.11.0

ToBeta retrieves the given version of the object.

type MockSslCertificates

type MockSslCertificates struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockSslCertificatesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, *ga.SslCertificate, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockSslCertificates) (bool, []*ga.SslCertificate, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslCertificate, m *MockSslCertificates) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockSslCertificates is the mock for SslCertificates.

func NewMockSslCertificates

func NewMockSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockSslCertificates

NewMockSslCertificates returns a new mock for SslCertificates.

func (*MockSslCertificates) Delete

func (m *MockSslCertificates) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockSslCertificates) Get

Get returns the object from the mock.

func (*MockSslCertificates) Insert

func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error

Insert is a mock for inserting/creating a new object.

func (*MockSslCertificates) List

List all of the objects in the mock.

func (*MockSslCertificates) Obj

Obj wraps the object for use in the mock.

type MockSslCertificatesObj

type MockSslCertificatesObj struct {
	Obj interface{}
}

MockSslCertificatesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockSslCertificatesObj) ToGA

ToGA retrieves the given version of the object.

type MockTargetHttpProxies

type MockTargetHttpProxies struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockTargetHttpProxiesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook       func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, *ga.TargetHttpProxy, error)
	ListHook      func(ctx context.Context, fl *filter.F, m *MockTargetHttpProxies) (bool, []*ga.TargetHttpProxy, error)
	InsertHook    func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy, m *MockTargetHttpProxies) (bool, error)
	DeleteHook    func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, error)
	SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpProxies) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockTargetHttpProxies is the mock for TargetHttpProxies.

func NewMockTargetHttpProxies

func NewMockTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockTargetHttpProxies

NewMockTargetHttpProxies returns a new mock for TargetHttpProxies.

func (*MockTargetHttpProxies) Delete

func (m *MockTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockTargetHttpProxies) Get

Get returns the object from the mock.

func (*MockTargetHttpProxies) Insert

func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error

Insert is a mock for inserting/creating a new object.

func (*MockTargetHttpProxies) List

List all of the objects in the mock.

func (*MockTargetHttpProxies) Obj

Obj wraps the object for use in the mock.

func (*MockTargetHttpProxies) SetUrlMap

func (m *MockTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error

SetUrlMap is a mock for the corresponding method.

type MockTargetHttpProxiesObj

type MockTargetHttpProxiesObj struct {
	Obj interface{}
}

MockTargetHttpProxiesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockTargetHttpProxiesObj) ToGA

ToGA retrieves the given version of the object.

type MockTargetHttpsProxies

type MockTargetHttpsProxies struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockTargetHttpsProxiesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook                func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, *ga.TargetHttpsProxy, error)
	ListHook               func(ctx context.Context, fl *filter.F, m *MockTargetHttpsProxies) (bool, []*ga.TargetHttpsProxy, error)
	InsertHook             func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockTargetHttpsProxies) (bool, error)
	DeleteHook             func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, error)
	SetSslCertificatesHook func(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest, *MockTargetHttpsProxies) error
	SetUrlMapHook          func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpsProxies) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockTargetHttpsProxies is the mock for TargetHttpsProxies.

func NewMockTargetHttpsProxies

func NewMockTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockTargetHttpsProxies

NewMockTargetHttpsProxies returns a new mock for TargetHttpsProxies.

func (*MockTargetHttpsProxies) Delete

func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockTargetHttpsProxies) Get

Get returns the object from the mock.

func (*MockTargetHttpsProxies) Insert

Insert is a mock for inserting/creating a new object.

func (*MockTargetHttpsProxies) List

List all of the objects in the mock.

func (*MockTargetHttpsProxies) Obj

Obj wraps the object for use in the mock.

func (*MockTargetHttpsProxies) SetSslCertificates

SetSslCertificates is a mock for the corresponding method.

func (*MockTargetHttpsProxies) SetUrlMap

func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error

SetUrlMap is a mock for the corresponding method.

type MockTargetHttpsProxiesObj

type MockTargetHttpsProxiesObj struct {
	Obj interface{}
}

MockTargetHttpsProxiesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockTargetHttpsProxiesObj) ToGA

ToGA retrieves the given version of the object.

type MockTargetPools

type MockTargetPools struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockTargetPoolsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook            func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, *ga.TargetPool, error)
	ListHook           func(ctx context.Context, region string, fl *filter.F, m *MockTargetPools) (bool, []*ga.TargetPool, error)
	InsertHook         func(ctx context.Context, key *meta.Key, obj *ga.TargetPool, m *MockTargetPools) (bool, error)
	DeleteHook         func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, error)
	AddInstanceHook    func(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest, *MockTargetPools) error
	RemoveInstanceHook func(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest, *MockTargetPools) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockTargetPools is the mock for TargetPools.

func NewMockTargetPools

func NewMockTargetPools(pr ProjectRouter, objs map[meta.Key]*MockTargetPoolsObj) *MockTargetPools

NewMockTargetPools returns a new mock for TargetPools.

func (*MockTargetPools) AddInstance

func (m *MockTargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error

AddInstance is a mock for the corresponding method.

func (*MockTargetPools) Delete

func (m *MockTargetPools) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockTargetPools) Get

func (m *MockTargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error)

Get returns the object from the mock.

func (*MockTargetPools) Insert

func (m *MockTargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error

Insert is a mock for inserting/creating a new object.

func (*MockTargetPools) List

func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)

List all of the objects in the mock in the given region.

func (*MockTargetPools) Obj

Obj wraps the object for use in the mock.

func (*MockTargetPools) RemoveInstance

func (m *MockTargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error

RemoveInstance is a mock for the corresponding method.

type MockTargetPoolsObj

type MockTargetPoolsObj struct {
	Obj interface{}
}

MockTargetPoolsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockTargetPoolsObj) ToGA

func (m *MockTargetPoolsObj) ToGA() *ga.TargetPool

ToGA retrieves the given version of the object.

type MockUrlMaps

type MockUrlMaps struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockUrlMapsObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError    map[meta.Key]error
	ListError   *error
	InsertError map[meta.Key]error
	DeleteError map[meta.Key]error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook    func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, *ga.UrlMap, error)
	ListHook   func(ctx context.Context, fl *filter.F, m *MockUrlMaps) (bool, []*ga.UrlMap, error)
	InsertHook func(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *MockUrlMaps) (bool, error)
	DeleteHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, error)
	UpdateHook func(context.Context, *meta.Key, *ga.UrlMap, *MockUrlMaps) error

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockUrlMaps is the mock for UrlMaps.

func NewMockUrlMaps

func NewMockUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockUrlMaps

NewMockUrlMaps returns a new mock for UrlMaps.

func (*MockUrlMaps) Delete

func (m *MockUrlMaps) Delete(ctx context.Context, key *meta.Key) error

Delete is a mock for deleting the object.

func (*MockUrlMaps) Get

func (m *MockUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)

Get returns the object from the mock.

func (*MockUrlMaps) Insert

func (m *MockUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error

Insert is a mock for inserting/creating a new object.

func (*MockUrlMaps) List

func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)

List all of the objects in the mock.

func (*MockUrlMaps) Obj

func (m *MockUrlMaps) Obj(o *ga.UrlMap) *MockUrlMapsObj

Obj wraps the object for use in the mock.

func (*MockUrlMaps) Update

func (m *MockUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error

Update is a mock for the corresponding method.

type MockUrlMapsObj

type MockUrlMapsObj struct {
	Obj interface{}
}

MockUrlMapsObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockUrlMapsObj) ToGA

func (m *MockUrlMapsObj) ToGA() *ga.UrlMap

ToGA retrieves the given version of the object.

type MockZones

type MockZones struct {
	Lock sync.Mutex

	ProjectRouter ProjectRouter

	// Objects maintained by the mock.
	Objects map[meta.Key]*MockZonesObj

	// If an entry exists for the given key and operation, then the error
	// will be returned instead of the operation.
	GetError  map[meta.Key]error
	ListError *error

	// xxxHook allow you to intercept the standard processing of the mock in
	// order to add your own logic. Return (true, _, _) to prevent the normal
	// execution flow of the mock. Return (false, nil, nil) to continue with
	// normal mock behavior/ after the hook function executes.
	GetHook  func(ctx context.Context, key *meta.Key, m *MockZones) (bool, *ga.Zone, error)
	ListHook func(ctx context.Context, fl *filter.F, m *MockZones) (bool, []*ga.Zone, error)

	// X is extra state that can be used as part of the mock. Generated code
	// will not use this field.
	X interface{}
}

MockZones is the mock for Zones.

func NewMockZones

func NewMockZones(pr ProjectRouter, objs map[meta.Key]*MockZonesObj) *MockZones

NewMockZones returns a new mock for Zones.

func (*MockZones) Get

func (m *MockZones) Get(ctx context.Context, key *meta.Key) (*ga.Zone, error)

Get returns the object from the mock.

func (*MockZones) List

func (m *MockZones) List(ctx context.Context, fl *filter.F) ([]*ga.Zone, error)

List all of the objects in the mock.

func (*MockZones) Obj

func (m *MockZones) Obj(o *ga.Zone) *MockZonesObj

Obj wraps the object for use in the mock.

type MockZonesObj

type MockZonesObj struct {
	Obj interface{}
}

MockZonesObj is used to store the various object versions in the shared map of mocked objects. This allows for multiple API versions to co-exist and share the same "view" of the objects in the backend.

func (*MockZonesObj) ToGA

func (m *MockZonesObj) ToGA() *ga.Zone

ToGA retrieves the given version of the object.

type NetworkTier

type NetworkTier string

NetworkTier represents the Network Service Tier used by a resource

func NetworkTierGCEValueToType

func NetworkTierGCEValueToType(s string) NetworkTier

NetworkTierGCEValueToType converts the value of the NetworkTier field of a GCE object to the NetworkTier type.

func (NetworkTier) ToGCEValue

func (n NetworkTier) ToGCEValue() string

ToGCEValue converts NetworkTier to a string that we can populate the NetworkTier field of GCE objects, including ForwardingRules and Addresses.

type NopRateLimiter

type NopRateLimiter struct {
}

NopRateLimiter is a rate limiter that performs no rate limiting.

func (*NopRateLimiter) Accept

func (*NopRateLimiter) Accept(ctx context.Context, key *RateLimitKey) error

Accept everything immediately.

type ProjectRouter

type ProjectRouter interface {
	// ProjectID returns the project ID (non-numeric) to be used for a call
	// to an API (version,service). Example tuples: ("ga", "ForwardingRules"),
	// ("alpha", "GlobalAddresses").
	//
	// This allows for plumbing different service calls to the appropriate
	// project, for instance, networking services to a separate project
	// than instance management.
	ProjectID(ctx context.Context, version meta.Version, service string) string
}

ProjectRouter routes service calls to the appropriate GCE project.

type Projects

type Projects interface {
	// ProjectsOps is an interface with additional non-CRUD type methods.
	// This interface is expected to be implemented by hand (non-autogenerated).
	ProjectsOps
}

Projects is an interface that allows for mocking of Projects.

type ProjectsOps

type ProjectsOps interface {
	Get(ctx context.Context, projectID string) (*compute.Project, error)
	SetCommonInstanceMetadata(ctx context.Context, projectID string, m *compute.Metadata) error
}

ProjectsOps is the manually implemented methods for the Projects service.

type RateLimitKey

type RateLimitKey struct {
	// ProjectID is the non-numeric ID of the project.
	ProjectID string
	// Operation is the specific method being invoked (e.g. "Get", "List").
	Operation string
	// Version is the API version of the call.
	Version meta.Version
	// Service is the service being invoked (e.g. "Firewalls", "BackendServices")
	Service string
}

RateLimitKey is a key identifying the operation to be rate limited. The rate limit queue will be determined based on the contents of RateKey.

type RateLimiter

type RateLimiter interface {
	// Accept uses the RateLimitKey to derive a sleep time for the calling
	// goroutine. This call will block until the operation is ready for
	// execution.
	//
	// Accept returns an error if the given context ctx was canceled
	// while waiting for acceptance into the queue.
	Accept(ctx context.Context, key *RateLimitKey) error
}

RateLimiter is the interface for a rate limiting policy.

type RegionBackendServices

type RegionBackendServices interface {
	Get(ctx context.Context, key *meta.Key) (*ga.BackendService, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*ga.BackendService, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.BackendService) error
	Delete(ctx context.Context, key *meta.Key) error
	GetHealth(context.Context, *meta.Key, *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
	Update(context.Context, *meta.Key, *ga.BackendService) error
}

RegionBackendServices is an interface that allows for mocking of RegionBackendServices.

type Regions

type Regions interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Region, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.Region, error)
}

Regions is an interface that allows for mocking of Regions.

type ResourceID

type ResourceID struct {
	ProjectID string
	Resource  string
	Key       *meta.Key
}

ResourceID identifies a GCE resource as parsed from compute resource URL.

func NewAddressesResourceID added in v1.11.0

func NewAddressesResourceID(project, region, name string) *ResourceID

NewAddressesResourceID creates a ResourceID for the Addresses resource.

func NewBackendServicesResourceID added in v1.11.0

func NewBackendServicesResourceID(project, name string) *ResourceID

NewBackendServicesResourceID creates a ResourceID for the BackendServices resource.

func NewDisksResourceID added in v1.11.0

func NewDisksResourceID(project, zone, name string) *ResourceID

NewDisksResourceID creates a ResourceID for the Disks resource.

func NewFirewallsResourceID added in v1.11.0

func NewFirewallsResourceID(project, name string) *ResourceID

NewFirewallsResourceID creates a ResourceID for the Firewalls resource.

func NewForwardingRulesResourceID added in v1.11.0

func NewForwardingRulesResourceID(project, region, name string) *ResourceID

NewForwardingRulesResourceID creates a ResourceID for the ForwardingRules resource.

func NewGlobalAddressesResourceID added in v1.11.0

func NewGlobalAddressesResourceID(project, name string) *ResourceID

NewGlobalAddressesResourceID creates a ResourceID for the GlobalAddresses resource.

func NewGlobalForwardingRulesResourceID added in v1.11.0

func NewGlobalForwardingRulesResourceID(project, name string) *ResourceID

NewGlobalForwardingRulesResourceID creates a ResourceID for the GlobalForwardingRules resource.

func NewHealthChecksResourceID added in v1.11.0

func NewHealthChecksResourceID(project, name string) *ResourceID

NewHealthChecksResourceID creates a ResourceID for the HealthChecks resource.

func NewHttpHealthChecksResourceID added in v1.11.0

func NewHttpHealthChecksResourceID(project, name string) *ResourceID

NewHttpHealthChecksResourceID creates a ResourceID for the HttpHealthChecks resource.

func NewHttpsHealthChecksResourceID added in v1.11.0

func NewHttpsHealthChecksResourceID(project, name string) *ResourceID

NewHttpsHealthChecksResourceID creates a ResourceID for the HttpsHealthChecks resource.

func NewInstanceGroupsResourceID added in v1.11.0

func NewInstanceGroupsResourceID(project, zone, name string) *ResourceID

NewInstanceGroupsResourceID creates a ResourceID for the InstanceGroups resource.

func NewInstancesResourceID added in v1.11.0

func NewInstancesResourceID(project, zone, name string) *ResourceID

NewInstancesResourceID creates a ResourceID for the Instances resource.

func NewNetworkEndpointGroupsResourceID added in v1.11.0

func NewNetworkEndpointGroupsResourceID(project, zone, name string) *ResourceID

NewNetworkEndpointGroupsResourceID creates a ResourceID for the NetworkEndpointGroups resource.

func NewProjectsResourceID added in v1.11.0

func NewProjectsResourceID(project string) *ResourceID

NewProjectsResourceID creates a ResourceID for the Projects resource.

func NewRegionBackendServicesResourceID added in v1.11.0

func NewRegionBackendServicesResourceID(project, region, name string) *ResourceID

NewRegionBackendServicesResourceID creates a ResourceID for the RegionBackendServices resource.

func NewRegionDisksResourceID added in v1.11.0

func NewRegionDisksResourceID(project, region, name string) *ResourceID

NewRegionDisksResourceID creates a ResourceID for the RegionDisks resource.

func NewRegionsResourceID added in v1.11.0

func NewRegionsResourceID(project, name string) *ResourceID

NewRegionsResourceID creates a ResourceID for the Regions resource.

func NewRoutesResourceID added in v1.11.0

func NewRoutesResourceID(project, name string) *ResourceID

NewRoutesResourceID creates a ResourceID for the Routes resource.

func NewSecurityPoliciesResourceID added in v1.11.0

func NewSecurityPoliciesResourceID(project, name string) *ResourceID

NewSecurityPoliciesResourceID creates a ResourceID for the SecurityPolicies resource.

func NewSslCertificatesResourceID added in v1.11.0

func NewSslCertificatesResourceID(project, name string) *ResourceID

NewSslCertificatesResourceID creates a ResourceID for the SslCertificates resource.

func NewTargetHttpProxiesResourceID added in v1.11.0

func NewTargetHttpProxiesResourceID(project, name string) *ResourceID

NewTargetHttpProxiesResourceID creates a ResourceID for the TargetHttpProxies resource.

func NewTargetHttpsProxiesResourceID added in v1.11.0

func NewTargetHttpsProxiesResourceID(project, name string) *ResourceID

NewTargetHttpsProxiesResourceID creates a ResourceID for the TargetHttpsProxies resource.

func NewTargetPoolsResourceID added in v1.11.0

func NewTargetPoolsResourceID(project, region, name string) *ResourceID

NewTargetPoolsResourceID creates a ResourceID for the TargetPools resource.

func NewUrlMapsResourceID added in v1.11.0

func NewUrlMapsResourceID(project, name string) *ResourceID

NewUrlMapsResourceID creates a ResourceID for the UrlMaps resource.

func NewZonesResourceID added in v1.11.0

func NewZonesResourceID(project, name string) *ResourceID

NewZonesResourceID creates a ResourceID for the Zones resource.

func ParseResourceURL

func ParseResourceURL(url string) (*ResourceID, error)

ParseResourceURL parses resource URLs of the following formats:

global/<res>/<name>
regions/<region>/<res>/<name>
zones/<zone>/<res>/<name>
projects/<proj>
projects/<proj>/global/<res>/<name>
projects/<proj>/regions/<region>/<res>/<name>
projects/<proj>/zones/<zone>/<res>/<name>
[https://www.googleapis.com/compute/<ver>]/projects/<proj>/global/<res>/<name>
[https://www.googleapis.com/compute/<ver>]/projects/<proj>/regions/<region>/<res>/<name>
[https://www.googleapis.com/compute/<ver>]/projects/<proj>/zones/<zone>/<res>/<name>

func (*ResourceID) Equal

func (r *ResourceID) Equal(other *ResourceID) bool

Equal returns true if two resource IDs are equal.

func (*ResourceID) RelativeResourceName added in v1.11.0

func (r *ResourceID) RelativeResourceName() string

RelativeResourceName returns the relative resource name string representing this ResourceID.

func (*ResourceID) ResourcePath added in v1.11.0

func (r *ResourceID) ResourcePath() string

ResourcePath returns the resource path representing this ResourceID.

func (r *ResourceID) SelfLink(ver meta.Version) string

type Routes

type Routes interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Route, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error
	Delete(ctx context.Context, key *meta.Key) error
}

Routes is an interface that allows for mocking of Routes.

type Service

type Service struct {
	GA            *ga.Service
	Alpha         *alpha.Service
	Beta          *beta.Service
	ProjectRouter ProjectRouter
	RateLimiter   RateLimiter
}

Service is the top-level adapter for all of the different compute API versions.

func (*Service) WaitForCompletion

func (s *Service) WaitForCompletion(ctx context.Context, genericOp interface{}) error

WaitForCompletion of a long running operation. This will poll the state of GCE for the completion status of the given operation. genericOp can be one of alpha, beta, ga Operation types.

type SingleProjectRouter

type SingleProjectRouter struct {
	ID string
}

SingleProjectRouter routes all service calls to the same project ID.

func (*SingleProjectRouter) ProjectID

func (r *SingleProjectRouter) ProjectID(ctx context.Context, version meta.Version, service string) string

ProjectID returns the project ID to be used for a call to the API.

type SslCertificates

type SslCertificates interface {
	Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error
	Delete(ctx context.Context, key *meta.Key) error
}

SslCertificates is an interface that allows for mocking of SslCertificates.

type TargetHttpProxies

type TargetHttpProxies interface {
	Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error
	Delete(ctx context.Context, key *meta.Key) error
	SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}

TargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.

type TargetHttpsProxies

type TargetHttpsProxies interface {
	Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error
	Delete(ctx context.Context, key *meta.Key) error
	SetSslCertificates(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest) error
	SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}

TargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.

type TargetPools

type TargetPools interface {
	Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error)
	List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error
	Delete(ctx context.Context, key *meta.Key) error
	AddInstance(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest) error
	RemoveInstance(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest) error
}

TargetPools is an interface that allows for mocking of TargetPools.

type UrlMaps

type UrlMaps interface {
	Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)
	Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error
	Delete(ctx context.Context, key *meta.Key) error
	Update(context.Context, *meta.Key, *ga.UrlMap) error
}

UrlMaps is an interface that allows for mocking of UrlMaps.

type Zones

type Zones interface {
	Get(ctx context.Context, key *meta.Key) (*ga.Zone, error)
	List(ctx context.Context, fl *filter.F) ([]*ga.Zone, error)
}

Zones is an interface that allows for mocking of Zones.

Directories

Path Synopsis
Package filter encapsulates the filter argument to compute API calls.
Package filter encapsulates the filter argument to compute API calls.
Generator for GCE compute wrapper code.
Generator for GCE compute wrapper code.
Package meta contains the meta description of the GCE cloud types to generate code for.
Package meta contains the meta description of the GCE cloud types to generate code for.
Package mock encapsulates mocks for testing GCE provider functionality.
Package mock encapsulates mocks for testing GCE provider functionality.

Jump to

Keyboard shortcuts

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