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. 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. }
Index ¶
- func SelfLink(ver meta.Version, project, resource string, key meta.Key) string
- type Addresses
- type AlphaAddresses
- type AlphaBackendServices
- type AlphaDisks
- type AlphaForwardingRules
- type AlphaHealthChecks
- type AlphaInstances
- type AlphaNetworkEndpointGroups
- type AlphaRegionBackendServices
- type AlphaRegionDisks
- type BackendServices
- type BetaAddresses
- type BetaInstances
- type Cloud
- type Disks
- type Firewalls
- type ForwardingRules
- type GCE
- func (gce *GCE) Addresses() Addresses
- func (gce *GCE) AlphaAddresses() AlphaAddresses
- func (gce *GCE) AlphaBackendServices() AlphaBackendServices
- func (gce *GCE) AlphaDisks() AlphaDisks
- func (gce *GCE) AlphaForwardingRules() AlphaForwardingRules
- func (gce *GCE) AlphaHealthChecks() AlphaHealthChecks
- func (gce *GCE) AlphaInstances() AlphaInstances
- func (gce *GCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups
- func (gce *GCE) AlphaRegionBackendServices() AlphaRegionBackendServices
- func (gce *GCE) AlphaRegionDisks() AlphaRegionDisks
- func (gce *GCE) BackendServices() BackendServices
- func (gce *GCE) BetaAddresses() BetaAddresses
- func (gce *GCE) BetaInstances() BetaInstances
- func (gce *GCE) Disks() Disks
- func (gce *GCE) Firewalls() Firewalls
- func (gce *GCE) ForwardingRules() ForwardingRules
- func (gce *GCE) GlobalAddresses() GlobalAddresses
- func (gce *GCE) GlobalForwardingRules() GlobalForwardingRules
- func (gce *GCE) HealthChecks() HealthChecks
- func (gce *GCE) HttpHealthChecks() HttpHealthChecks
- func (gce *GCE) HttpsHealthChecks() HttpsHealthChecks
- func (gce *GCE) InstanceGroups() InstanceGroups
- func (gce *GCE) Instances() Instances
- func (gce *GCE) Projects() Projects
- func (gce *GCE) Regions() Regions
- func (gce *GCE) Routes() Routes
- func (gce *GCE) SslCertificates() SslCertificates
- func (gce *GCE) TargetHttpProxies() TargetHttpProxies
- func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies
- func (gce *GCE) TargetPools() TargetPools
- func (gce *GCE) UrlMaps() UrlMaps
- func (gce *GCE) Zones() Zones
- type GCEAddresses
- func (g *GCEAddresses) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAddresses) Get(ctx context.Context, key meta.Key) (*ga.Address, error)
- func (g *GCEAddresses) Insert(ctx context.Context, key meta.Key, obj *ga.Address) error
- func (g *GCEAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Address, error)
- type GCEAlphaAddresses
- func (g *GCEAlphaAddresses) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaAddresses) Get(ctx context.Context, key meta.Key) (*alpha.Address, error)
- func (g *GCEAlphaAddresses) Insert(ctx context.Context, key meta.Key, obj *alpha.Address) error
- func (g *GCEAlphaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Address, error)
- type GCEAlphaBackendServices
- func (g *GCEAlphaBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
- func (g *GCEAlphaBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
- func (g *GCEAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*alpha.BackendService, error)
- func (g *GCEAlphaBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
- type GCEAlphaDisks
- func (g *GCEAlphaDisks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaDisks) Get(ctx context.Context, key meta.Key) (*alpha.Disk, error)
- func (g *GCEAlphaDisks) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error
- func (g *GCEAlphaDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Disk, error)
- type GCEAlphaForwardingRules
- func (g *GCEAlphaForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaForwardingRules) Get(ctx context.Context, key meta.Key) (*alpha.ForwardingRule, error)
- func (g *GCEAlphaForwardingRules) Insert(ctx context.Context, key meta.Key, obj *alpha.ForwardingRule) error
- func (g *GCEAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
- type GCEAlphaHealthChecks
- func (g *GCEAlphaHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaHealthChecks) Get(ctx context.Context, key meta.Key) (*alpha.HealthCheck, error)
- func (g *GCEAlphaHealthChecks) Insert(ctx context.Context, key meta.Key, obj *alpha.HealthCheck) error
- func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
- func (g *GCEAlphaHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *alpha.HealthCheck) error
- type GCEAlphaInstances
- func (g *GCEAlphaInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *alpha.AttachedDisk) error
- func (g *GCEAlphaInstances) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (g *GCEAlphaInstances) Get(ctx context.Context, key meta.Key) (*alpha.Instance, error)
- func (g *GCEAlphaInstances) Insert(ctx context.Context, key meta.Key, obj *alpha.Instance) error
- func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)
- func (g *GCEAlphaInstances) UpdateNetworkInterface(ctx context.Context, key meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error
- type GCEAlphaNetworkEndpointGroups
- func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
- func (g *GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key meta.Key, ...) error
- func (g *GCEAlphaNetworkEndpointGroups) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key meta.Key, ...) error
- func (g *GCEAlphaNetworkEndpointGroups) Get(ctx context.Context, key meta.Key) (*alpha.NetworkEndpointGroup, error)
- func (g *GCEAlphaNetworkEndpointGroups) Insert(ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) error
- func (g *GCEAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error)
- type GCEAlphaRegionBackendServices
- func (g *GCEAlphaRegionBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaRegionBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
- func (g *GCEAlphaRegionBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error)
- func (g *GCEAlphaRegionBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
- func (g *GCEAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.BackendService, error)
- func (g *GCEAlphaRegionBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
- type GCEAlphaRegionDisks
- func (g *GCEAlphaRegionDisks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEAlphaRegionDisks) Get(ctx context.Context, key meta.Key) (*alpha.Disk, error)
- func (g *GCEAlphaRegionDisks) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error
- func (g *GCEAlphaRegionDisks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Disk, error)
- type GCEBackendServices
- func (g *GCEBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEBackendServices) Get(ctx context.Context, key meta.Key) (*ga.BackendService, error)
- func (g *GCEBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
- func (g *GCEBackendServices) Insert(ctx context.Context, key meta.Key, obj *ga.BackendService) error
- func (g *GCEBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.BackendService, error)
- func (g *GCEBackendServices) Update(ctx context.Context, key meta.Key, arg0 *ga.BackendService) error
- type GCEBetaAddresses
- func (g *GCEBetaAddresses) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEBetaAddresses) Get(ctx context.Context, key meta.Key) (*beta.Address, error)
- func (g *GCEBetaAddresses) Insert(ctx context.Context, key meta.Key, obj *beta.Address) error
- func (g *GCEBetaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Address, error)
- type GCEBetaInstances
- func (g *GCEBetaInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *beta.AttachedDisk) error
- func (g *GCEBetaInstances) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEBetaInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (g *GCEBetaInstances) Get(ctx context.Context, key meta.Key) (*beta.Instance, error)
- func (g *GCEBetaInstances) Insert(ctx context.Context, key meta.Key, obj *beta.Instance) error
- func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)
- type GCEDisks
- func (g *GCEDisks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEDisks) Get(ctx context.Context, key meta.Key) (*ga.Disk, error)
- func (g *GCEDisks) Insert(ctx context.Context, key meta.Key, obj *ga.Disk) error
- func (g *GCEDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Disk, error)
- type GCEFirewalls
- func (g *GCEFirewalls) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEFirewalls) Get(ctx context.Context, key meta.Key) (*ga.Firewall, error)
- func (g *GCEFirewalls) Insert(ctx context.Context, key meta.Key, obj *ga.Firewall) error
- func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)
- func (g *GCEFirewalls) Update(ctx context.Context, key meta.Key, arg0 *ga.Firewall) error
- type GCEForwardingRules
- func (g *GCEForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
- func (g *GCEForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
- func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)
- type GCEGlobalAddresses
- func (g *GCEGlobalAddresses) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEGlobalAddresses) Get(ctx context.Context, key meta.Key) (*ga.Address, error)
- func (g *GCEGlobalAddresses) Insert(ctx context.Context, key meta.Key, obj *ga.Address) error
- func (g *GCEGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Address, error)
- type GCEGlobalForwardingRules
- func (g *GCEGlobalForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEGlobalForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
- func (g *GCEGlobalForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
- func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
- func (g *GCEGlobalForwardingRules) SetTarget(ctx context.Context, key meta.Key, arg0 *ga.TargetReference) error
- type GCEHealthChecks
- func (g *GCEHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HealthCheck, error)
- func (g *GCEHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HealthCheck) error
- func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)
- func (g *GCEHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HealthCheck) error
- type GCEHttpHealthChecks
- func (g *GCEHttpHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEHttpHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpHealthCheck, error)
- func (g *GCEHttpHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HttpHealthCheck) error
- func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
- func (g *GCEHttpHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HttpHealthCheck) error
- type GCEHttpsHealthChecks
- func (g *GCEHttpsHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEHttpsHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpsHealthCheck, error)
- func (g *GCEHttpsHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HttpsHealthCheck) error
- func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
- func (g *GCEHttpsHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HttpsHealthCheck) error
- type GCEInstanceGroups
- func (g *GCEInstanceGroups) AddInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error
- func (g *GCEInstanceGroups) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEInstanceGroups) Get(ctx context.Context, key meta.Key) (*ga.InstanceGroup, error)
- func (g *GCEInstanceGroups) Insert(ctx context.Context, key meta.Key, obj *ga.InstanceGroup) error
- func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)
- func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error)
- func (g *GCEInstanceGroups) RemoveInstances(ctx context.Context, key meta.Key, ...) error
- func (g *GCEInstanceGroups) SetNamedPorts(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error
- type GCEInstances
- func (g *GCEInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *ga.AttachedDisk) error
- func (g *GCEInstances) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (g *GCEInstances) Get(ctx context.Context, key meta.Key) (*ga.Instance, error)
- func (g *GCEInstances) Insert(ctx context.Context, key meta.Key, obj *ga.Instance) error
- func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)
- type GCEProjects
- type GCERegions
- type GCERoutes
- func (g *GCERoutes) Delete(ctx context.Context, key meta.Key) error
- func (g *GCERoutes) Get(ctx context.Context, key meta.Key) (*ga.Route, error)
- func (g *GCERoutes) Insert(ctx context.Context, key meta.Key, obj *ga.Route) error
- func (g *GCERoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)
- type GCESslCertificates
- func (g *GCESslCertificates) Delete(ctx context.Context, key meta.Key) error
- func (g *GCESslCertificates) Get(ctx context.Context, key meta.Key) (*ga.SslCertificate, error)
- func (g *GCESslCertificates) Insert(ctx context.Context, key meta.Key, obj *ga.SslCertificate) error
- func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
- type GCETargetHttpProxies
- func (g *GCETargetHttpProxies) Delete(ctx context.Context, key meta.Key) error
- func (g *GCETargetHttpProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpProxy, error)
- func (g *GCETargetHttpProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpProxy) error
- func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
- func (g *GCETargetHttpProxies) SetUrlMap(ctx context.Context, key meta.Key, arg0 *ga.UrlMapReference) error
- type GCETargetHttpsProxies
- func (g *GCETargetHttpsProxies) Delete(ctx context.Context, key meta.Key) error
- func (g *GCETargetHttpsProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpsProxy, error)
- func (g *GCETargetHttpsProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpsProxy) error
- func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
- func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key meta.Key, ...) error
- func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key meta.Key, arg0 *ga.UrlMapReference) error
- type GCETargetPools
- func (g *GCETargetPools) AddInstance(ctx context.Context, key meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error
- func (g *GCETargetPools) Delete(ctx context.Context, key meta.Key) error
- func (g *GCETargetPools) Get(ctx context.Context, key meta.Key) (*ga.TargetPool, error)
- func (g *GCETargetPools) Insert(ctx context.Context, key meta.Key, obj *ga.TargetPool) error
- func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)
- func (g *GCETargetPools) RemoveInstance(ctx context.Context, key meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error
- type GCEUrlMaps
- func (g *GCEUrlMaps) Delete(ctx context.Context, key meta.Key) error
- func (g *GCEUrlMaps) Get(ctx context.Context, key meta.Key) (*ga.UrlMap, error)
- func (g *GCEUrlMaps) Insert(ctx context.Context, key meta.Key, obj *ga.UrlMap) error
- func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)
- func (g *GCEUrlMaps) Update(ctx context.Context, key meta.Key, arg0 *ga.UrlMap) error
- type GCEZones
- type GlobalAddresses
- type GlobalForwardingRules
- type HealthChecks
- type HttpHealthChecks
- type HttpsHealthChecks
- type InstanceGroups
- type Instances
- type MockAddresses
- func (m *MockAddresses) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAddresses) Get(ctx context.Context, key meta.Key) (*ga.Address, error)
- func (m *MockAddresses) Insert(ctx context.Context, key meta.Key, obj *ga.Address) error
- func (m *MockAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Address, error)
- func (m *MockAddresses) Obj(o *ga.Address) *MockAddressesObj
- type MockAddressesObj
- type MockAlphaAddresses
- func (m *MockAlphaAddresses) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaAddresses) Get(ctx context.Context, key meta.Key) (*alpha.Address, error)
- func (m *MockAlphaAddresses) Insert(ctx context.Context, key meta.Key, obj *alpha.Address) error
- func (m *MockAlphaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Address, error)
- func (m *MockAlphaAddresses) Obj(o *alpha.Address) *MockAddressesObj
- type MockAlphaBackendServices
- func (m *MockAlphaBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
- func (m *MockAlphaBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
- func (m *MockAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*alpha.BackendService, error)
- func (m *MockAlphaBackendServices) Obj(o *alpha.BackendService) *MockBackendServicesObj
- func (m *MockAlphaBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
- type MockAlphaDisks
- func (m *MockAlphaDisks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaDisks) Get(ctx context.Context, key meta.Key) (*alpha.Disk, error)
- func (m *MockAlphaDisks) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error
- func (m *MockAlphaDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Disk, error)
- func (m *MockAlphaDisks) Obj(o *alpha.Disk) *MockDisksObj
- type MockAlphaForwardingRules
- func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaForwardingRules) Get(ctx context.Context, key meta.Key) (*alpha.ForwardingRule, error)
- func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key meta.Key, obj *alpha.ForwardingRule) error
- func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
- func (m *MockAlphaForwardingRules) Obj(o *alpha.ForwardingRule) *MockForwardingRulesObj
- type MockAlphaHealthChecks
- func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaHealthChecks) Get(ctx context.Context, key meta.Key) (*alpha.HealthCheck, error)
- func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key meta.Key, obj *alpha.HealthCheck) error
- func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
- func (m *MockAlphaHealthChecks) Obj(o *alpha.HealthCheck) *MockHealthChecksObj
- func (m *MockAlphaHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *alpha.HealthCheck) error
- type MockAlphaInstances
- func (m *MockAlphaInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *alpha.AttachedDisk) error
- func (m *MockAlphaInstances) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (m *MockAlphaInstances) Get(ctx context.Context, key meta.Key) (*alpha.Instance, error)
- func (m *MockAlphaInstances) Insert(ctx context.Context, key meta.Key, obj *alpha.Instance) error
- func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)
- func (m *MockAlphaInstances) Obj(o *alpha.Instance) *MockInstancesObj
- func (m *MockAlphaInstances) UpdateNetworkInterface(ctx context.Context, key meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error
- type MockAlphaNetworkEndpointGroups
- func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
- func (m *MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key meta.Key, ...) error
- func (m *MockAlphaNetworkEndpointGroups) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key meta.Key, ...) error
- func (m *MockAlphaNetworkEndpointGroups) Get(ctx context.Context, key meta.Key) (*alpha.NetworkEndpointGroup, error)
- func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) error
- func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error)
- func (m *MockAlphaNetworkEndpointGroups) Obj(o *alpha.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj
- type MockAlphaRegionBackendServices
- func (m *MockAlphaRegionBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaRegionBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
- func (m *MockAlphaRegionBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error)
- func (m *MockAlphaRegionBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
- func (m *MockAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.BackendService, error)
- func (m *MockAlphaRegionBackendServices) Obj(o *alpha.BackendService) *MockRegionBackendServicesObj
- func (m *MockAlphaRegionBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
- type MockAlphaRegionDisks
- func (m *MockAlphaRegionDisks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockAlphaRegionDisks) Get(ctx context.Context, key meta.Key) (*alpha.Disk, error)
- func (m *MockAlphaRegionDisks) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error
- func (m *MockAlphaRegionDisks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Disk, error)
- func (m *MockAlphaRegionDisks) Obj(o *alpha.Disk) *MockRegionDisksObj
- type MockBackendServices
- func (m *MockBackendServices) Delete(ctx context.Context, key meta.Key) error
- func (m *MockBackendServices) Get(ctx context.Context, key meta.Key) (*ga.BackendService, error)
- func (m *MockBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
- func (m *MockBackendServices) Insert(ctx context.Context, key meta.Key, obj *ga.BackendService) error
- func (m *MockBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.BackendService, error)
- func (m *MockBackendServices) Obj(o *ga.BackendService) *MockBackendServicesObj
- func (m *MockBackendServices) Update(ctx context.Context, key meta.Key, arg0 *ga.BackendService) error
- type MockBackendServicesObj
- type MockBetaAddresses
- func (m *MockBetaAddresses) Delete(ctx context.Context, key meta.Key) error
- func (m *MockBetaAddresses) Get(ctx context.Context, key meta.Key) (*beta.Address, error)
- func (m *MockBetaAddresses) Insert(ctx context.Context, key meta.Key, obj *beta.Address) error
- func (m *MockBetaAddresses) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Address, error)
- func (m *MockBetaAddresses) Obj(o *beta.Address) *MockAddressesObj
- type MockBetaInstances
- func (m *MockBetaInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *beta.AttachedDisk) error
- func (m *MockBetaInstances) Delete(ctx context.Context, key meta.Key) error
- func (m *MockBetaInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (m *MockBetaInstances) Get(ctx context.Context, key meta.Key) (*beta.Instance, error)
- func (m *MockBetaInstances) Insert(ctx context.Context, key meta.Key, obj *beta.Instance) error
- func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)
- func (m *MockBetaInstances) Obj(o *beta.Instance) *MockInstancesObj
- type MockDisks
- func (m *MockDisks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockDisks) Get(ctx context.Context, key meta.Key) (*ga.Disk, error)
- func (m *MockDisks) Insert(ctx context.Context, key meta.Key, obj *ga.Disk) error
- func (m *MockDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Disk, error)
- func (m *MockDisks) Obj(o *ga.Disk) *MockDisksObj
- type MockDisksObj
- type MockFirewalls
- func (m *MockFirewalls) Delete(ctx context.Context, key meta.Key) error
- func (m *MockFirewalls) Get(ctx context.Context, key meta.Key) (*ga.Firewall, error)
- func (m *MockFirewalls) Insert(ctx context.Context, key meta.Key, obj *ga.Firewall) error
- func (m *MockFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)
- func (m *MockFirewalls) Obj(o *ga.Firewall) *MockFirewallsObj
- func (m *MockFirewalls) Update(ctx context.Context, key meta.Key, arg0 *ga.Firewall) error
- type MockFirewallsObj
- type MockForwardingRules
- func (m *MockForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (m *MockForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
- func (m *MockForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
- func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)
- func (m *MockForwardingRules) Obj(o *ga.ForwardingRule) *MockForwardingRulesObj
- type MockForwardingRulesObj
- type MockGCE
- func (mock *MockGCE) Addresses() Addresses
- func (mock *MockGCE) AlphaAddresses() AlphaAddresses
- func (mock *MockGCE) AlphaBackendServices() AlphaBackendServices
- func (mock *MockGCE) AlphaDisks() AlphaDisks
- func (mock *MockGCE) AlphaForwardingRules() AlphaForwardingRules
- func (mock *MockGCE) AlphaHealthChecks() AlphaHealthChecks
- func (mock *MockGCE) AlphaInstances() AlphaInstances
- func (mock *MockGCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups
- func (mock *MockGCE) AlphaRegionBackendServices() AlphaRegionBackendServices
- func (mock *MockGCE) AlphaRegionDisks() AlphaRegionDisks
- func (mock *MockGCE) BackendServices() BackendServices
- func (mock *MockGCE) BetaAddresses() BetaAddresses
- func (mock *MockGCE) BetaInstances() BetaInstances
- func (mock *MockGCE) Disks() Disks
- func (mock *MockGCE) Firewalls() Firewalls
- func (mock *MockGCE) ForwardingRules() ForwardingRules
- func (mock *MockGCE) GlobalAddresses() GlobalAddresses
- func (mock *MockGCE) GlobalForwardingRules() GlobalForwardingRules
- func (mock *MockGCE) HealthChecks() HealthChecks
- func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks
- func (mock *MockGCE) HttpsHealthChecks() HttpsHealthChecks
- func (mock *MockGCE) InstanceGroups() InstanceGroups
- func (mock *MockGCE) Instances() Instances
- func (mock *MockGCE) Projects() Projects
- func (mock *MockGCE) Regions() Regions
- func (mock *MockGCE) Routes() Routes
- func (mock *MockGCE) SslCertificates() SslCertificates
- func (mock *MockGCE) TargetHttpProxies() TargetHttpProxies
- func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies
- func (mock *MockGCE) TargetPools() TargetPools
- func (mock *MockGCE) UrlMaps() UrlMaps
- func (mock *MockGCE) Zones() Zones
- type MockGlobalAddresses
- func (m *MockGlobalAddresses) Delete(ctx context.Context, key meta.Key) error
- func (m *MockGlobalAddresses) Get(ctx context.Context, key meta.Key) (*ga.Address, error)
- func (m *MockGlobalAddresses) Insert(ctx context.Context, key meta.Key, obj *ga.Address) error
- func (m *MockGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Address, error)
- func (m *MockGlobalAddresses) Obj(o *ga.Address) *MockGlobalAddressesObj
- type MockGlobalAddressesObj
- type MockGlobalForwardingRules
- func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key meta.Key) error
- func (m *MockGlobalForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
- func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
- func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
- func (m *MockGlobalForwardingRules) Obj(o *ga.ForwardingRule) *MockGlobalForwardingRulesObj
- func (m *MockGlobalForwardingRules) SetTarget(ctx context.Context, key meta.Key, arg0 *ga.TargetReference) error
- type MockGlobalForwardingRulesObj
- type MockHealthChecks
- func (m *MockHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HealthCheck, error)
- func (m *MockHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HealthCheck) error
- func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)
- func (m *MockHealthChecks) Obj(o *ga.HealthCheck) *MockHealthChecksObj
- func (m *MockHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HealthCheck) error
- type MockHealthChecksObj
- type MockHttpHealthChecks
- func (m *MockHttpHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockHttpHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpHealthCheck, error)
- func (m *MockHttpHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HttpHealthCheck) error
- func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
- func (m *MockHttpHealthChecks) Obj(o *ga.HttpHealthCheck) *MockHttpHealthChecksObj
- func (m *MockHttpHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HttpHealthCheck) error
- type MockHttpHealthChecksObj
- type MockHttpsHealthChecks
- func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key meta.Key) error
- func (m *MockHttpsHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpsHealthCheck, error)
- func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HttpsHealthCheck) error
- func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
- func (m *MockHttpsHealthChecks) Obj(o *ga.HttpsHealthCheck) *MockHttpsHealthChecksObj
- func (m *MockHttpsHealthChecks) Update(ctx context.Context, key meta.Key, arg0 *ga.HttpsHealthCheck) error
- type MockHttpsHealthChecksObj
- type MockInstanceGroups
- func (m *MockInstanceGroups) AddInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error
- func (m *MockInstanceGroups) Delete(ctx context.Context, key meta.Key) error
- func (m *MockInstanceGroups) Get(ctx context.Context, key meta.Key) (*ga.InstanceGroup, error)
- func (m *MockInstanceGroups) Insert(ctx context.Context, key meta.Key, obj *ga.InstanceGroup) error
- func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)
- func (m *MockInstanceGroups) ListInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error)
- func (m *MockInstanceGroups) Obj(o *ga.InstanceGroup) *MockInstanceGroupsObj
- func (m *MockInstanceGroups) RemoveInstances(ctx context.Context, key meta.Key, ...) error
- func (m *MockInstanceGroups) SetNamedPorts(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error
- type MockInstanceGroupsObj
- type MockInstances
- func (m *MockInstances) AttachDisk(ctx context.Context, key meta.Key, arg0 *ga.AttachedDisk) error
- func (m *MockInstances) Delete(ctx context.Context, key meta.Key) error
- func (m *MockInstances) DetachDisk(ctx context.Context, key meta.Key, arg0 string) error
- func (m *MockInstances) Get(ctx context.Context, key meta.Key) (*ga.Instance, error)
- func (m *MockInstances) Insert(ctx context.Context, key meta.Key, obj *ga.Instance) error
- func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)
- func (m *MockInstances) Obj(o *ga.Instance) *MockInstancesObj
- type MockInstancesObj
- type MockNetworkEndpointGroupsObj
- type MockProjectOpsState
- type MockProjects
- type MockProjectsObj
- type MockRegionBackendServicesObj
- type MockRegionDisksObj
- type MockRegions
- type MockRegionsObj
- type MockRoutes
- func (m *MockRoutes) Delete(ctx context.Context, key meta.Key) error
- func (m *MockRoutes) Get(ctx context.Context, key meta.Key) (*ga.Route, error)
- func (m *MockRoutes) Insert(ctx context.Context, key meta.Key, obj *ga.Route) error
- func (m *MockRoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)
- func (m *MockRoutes) Obj(o *ga.Route) *MockRoutesObj
- type MockRoutesObj
- type MockSslCertificates
- func (m *MockSslCertificates) Delete(ctx context.Context, key meta.Key) error
- func (m *MockSslCertificates) Get(ctx context.Context, key meta.Key) (*ga.SslCertificate, error)
- func (m *MockSslCertificates) Insert(ctx context.Context, key meta.Key, obj *ga.SslCertificate) error
- func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
- func (m *MockSslCertificates) Obj(o *ga.SslCertificate) *MockSslCertificatesObj
- type MockSslCertificatesObj
- type MockTargetHttpProxies
- func (m *MockTargetHttpProxies) Delete(ctx context.Context, key meta.Key) error
- func (m *MockTargetHttpProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpProxy, error)
- func (m *MockTargetHttpProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpProxy) error
- func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
- func (m *MockTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockTargetHttpProxiesObj
- func (m *MockTargetHttpProxies) SetUrlMap(ctx context.Context, key meta.Key, arg0 *ga.UrlMapReference) error
- type MockTargetHttpProxiesObj
- type MockTargetHttpsProxies
- func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key meta.Key) error
- func (m *MockTargetHttpsProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpsProxy, error)
- func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpsProxy) error
- func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
- func (m *MockTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockTargetHttpsProxiesObj
- func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key meta.Key, ...) error
- func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key meta.Key, arg0 *ga.UrlMapReference) error
- type MockTargetHttpsProxiesObj
- type MockTargetPools
- func (m *MockTargetPools) AddInstance(ctx context.Context, key meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error
- func (m *MockTargetPools) Delete(ctx context.Context, key meta.Key) error
- func (m *MockTargetPools) Get(ctx context.Context, key meta.Key) (*ga.TargetPool, error)
- func (m *MockTargetPools) Insert(ctx context.Context, key meta.Key, obj *ga.TargetPool) error
- func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)
- func (m *MockTargetPools) Obj(o *ga.TargetPool) *MockTargetPoolsObj
- func (m *MockTargetPools) RemoveInstance(ctx context.Context, key meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error
- type MockTargetPoolsObj
- type MockUrlMaps
- func (m *MockUrlMaps) Delete(ctx context.Context, key meta.Key) error
- func (m *MockUrlMaps) Get(ctx context.Context, key meta.Key) (*ga.UrlMap, error)
- func (m *MockUrlMaps) Insert(ctx context.Context, key meta.Key, obj *ga.UrlMap) error
- func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)
- func (m *MockUrlMaps) Obj(o *ga.UrlMap) *MockUrlMapsObj
- func (m *MockUrlMaps) Update(ctx context.Context, key meta.Key, arg0 *ga.UrlMap) error
- type MockUrlMapsObj
- type MockZones
- type MockZonesObj
- type NopRateLimiter
- type ProjectRouter
- type Projects
- type ProjectsOps
- type RateLimitKey
- type RateLimiter
- type Regions
- type ResourceID
- type Routes
- type Service
- type SingleProjectRouter
- type SslCertificates
- type TargetHttpProxies
- type TargetHttpsProxies
- type TargetPools
- type UrlMaps
- type Zones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 Update(context.Context, meta.Key, *alpha.BackendService) error }
AlphaBackendServices is an interface that allows for mocking of BackendServices.
type AlphaDisks ¶
type AlphaDisks interface { Get(ctx context.Context, key meta.Key) (*alpha.Disk, error) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Disk, error) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error Delete(ctx context.Context, key meta.Key) error }
AlphaDisks is an interface that allows for mocking of Disks.
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 ¶
type AlphaNetworkEndpointGroups interface { Get(ctx context.Context, key meta.Key) (*alpha.NetworkEndpointGroup, error) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error) Insert(ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) error Delete(ctx context.Context, key meta.Key) error AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error) AttachNetworkEndpoints(context.Context, meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error DetachNetworkEndpoints(context.Context, meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error }
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 AlphaRegionDisks ¶
type AlphaRegionDisks interface { Get(ctx context.Context, key meta.Key) (*alpha.Disk, error) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Disk, error) Insert(ctx context.Context, key meta.Key, obj *alpha.Disk) error Delete(ctx context.Context, key meta.Key) error }
AlphaRegionDisks is an interface that allows for mocking of RegionDisks.
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) 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 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 }
BetaInstances is an interface that allows for mocking of Instances.
type Cloud ¶
type Cloud interface { Addresses() Addresses AlphaAddresses() AlphaAddresses BetaAddresses() BetaAddresses GlobalAddresses() GlobalAddresses BackendServices() BackendServices AlphaBackendServices() AlphaBackendServices AlphaRegionBackendServices() AlphaRegionBackendServices Disks() Disks AlphaDisks() AlphaDisks AlphaRegionDisks() AlphaRegionDisks Firewalls() Firewalls ForwardingRules() ForwardingRules AlphaForwardingRules() AlphaForwardingRules GlobalForwardingRules() GlobalForwardingRules HealthChecks() HealthChecks AlphaHealthChecks() AlphaHealthChecks HttpHealthChecks() HttpHealthChecks HttpsHealthChecks() HttpsHealthChecks InstanceGroups() InstanceGroups Instances() Instances BetaInstances() BetaInstances AlphaInstances() AlphaInstances AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups Projects() Projects Regions() Regions Routes() Routes 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 }
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 (*GCE) AlphaAddresses ¶
func (gce *GCE) AlphaAddresses() AlphaAddresses
func (*GCE) AlphaBackendServices ¶
func (gce *GCE) AlphaBackendServices() AlphaBackendServices
func (*GCE) AlphaDisks ¶
func (gce *GCE) AlphaDisks() AlphaDisks
func (*GCE) AlphaForwardingRules ¶
func (gce *GCE) AlphaForwardingRules() AlphaForwardingRules
func (*GCE) AlphaHealthChecks ¶
func (gce *GCE) AlphaHealthChecks() AlphaHealthChecks
func (*GCE) AlphaInstances ¶
func (gce *GCE) AlphaInstances() AlphaInstances
func (*GCE) AlphaNetworkEndpointGroups ¶
func (gce *GCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups
func (*GCE) AlphaRegionBackendServices ¶
func (gce *GCE) AlphaRegionBackendServices() AlphaRegionBackendServices
func (*GCE) AlphaRegionDisks ¶
func (gce *GCE) AlphaRegionDisks() AlphaRegionDisks
func (*GCE) BackendServices ¶
func (gce *GCE) BackendServices() BackendServices
func (*GCE) BetaAddresses ¶
func (gce *GCE) BetaAddresses() BetaAddresses
func (*GCE) BetaInstances ¶
func (gce *GCE) BetaInstances() BetaInstances
func (*GCE) ForwardingRules ¶
func (gce *GCE) ForwardingRules() ForwardingRules
func (*GCE) GlobalAddresses ¶
func (gce *GCE) GlobalAddresses() GlobalAddresses
func (*GCE) GlobalForwardingRules ¶
func (gce *GCE) GlobalForwardingRules() GlobalForwardingRules
func (*GCE) HealthChecks ¶
func (gce *GCE) HealthChecks() HealthChecks
func (*GCE) HttpHealthChecks ¶
func (gce *GCE) HttpHealthChecks() HttpHealthChecks
func (*GCE) HttpsHealthChecks ¶
func (gce *GCE) HttpsHealthChecks() HttpsHealthChecks
func (*GCE) InstanceGroups ¶
func (gce *GCE) InstanceGroups() InstanceGroups
func (*GCE) SslCertificates ¶
func (gce *GCE) SslCertificates() SslCertificates
func (*GCE) TargetHttpProxies ¶
func (gce *GCE) TargetHttpProxies() TargetHttpProxies
func (*GCE) TargetHttpsProxies ¶
func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies
func (*GCE) TargetPools ¶
func (gce *GCE) TargetPools() TargetPools
type GCEAddresses ¶
type GCEAddresses struct {
// contains filtered or unexported fields
}
GCEAddresses is a simplifying adapter for the GCE Addresses.
type GCEAlphaAddresses ¶
type GCEAlphaAddresses struct {
// contains filtered or unexported fields
}
GCEAlphaAddresses is a simplifying adapter for the GCE Addresses.
type GCEAlphaBackendServices ¶
type GCEAlphaBackendServices struct {
// contains filtered or unexported fields
}
GCEAlphaBackendServices is a simplifying adapter for the GCE BackendServices.
func (*GCEAlphaBackendServices) Get ¶
func (g *GCEAlphaBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
Get the BackendService named by key.
func (*GCEAlphaBackendServices) Insert ¶
func (g *GCEAlphaBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
Insert BackendService with key of value obj.
func (*GCEAlphaBackendServices) List ¶
func (g *GCEAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*alpha.BackendService, error)
List all BackendService objects.
func (*GCEAlphaBackendServices) Update ¶
func (g *GCEAlphaBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
Update is a method on GCEAlphaBackendServices.
type GCEAlphaDisks ¶
type GCEAlphaDisks struct {
// contains filtered or unexported fields
}
GCEAlphaDisks is a simplifying adapter for the GCE Disks.
type GCEAlphaForwardingRules ¶
type GCEAlphaForwardingRules struct {
// contains filtered or unexported fields
}
GCEAlphaForwardingRules is a simplifying adapter for the GCE ForwardingRules.
func (*GCEAlphaForwardingRules) Get ¶
func (g *GCEAlphaForwardingRules) Get(ctx context.Context, key meta.Key) (*alpha.ForwardingRule, error)
Get the ForwardingRule named by key.
func (*GCEAlphaForwardingRules) Insert ¶
func (g *GCEAlphaForwardingRules) Insert(ctx context.Context, key meta.Key, obj *alpha.ForwardingRule) error
Insert ForwardingRule with key of value obj.
type GCEAlphaHealthChecks ¶
type GCEAlphaHealthChecks struct {
// contains filtered or unexported fields
}
GCEAlphaHealthChecks is a simplifying adapter for the GCE HealthChecks.
func (*GCEAlphaHealthChecks) Get ¶
func (g *GCEAlphaHealthChecks) Get(ctx context.Context, key meta.Key) (*alpha.HealthCheck, error)
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 ¶
func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
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) DetachDisk ¶
DetachDisk is a method on GCEAlphaInstances.
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 ¶
func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
AggregatedList lists all resources of the given type across all locations.
func (*GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints ¶
func (g *GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error
AttachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
func (*GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints ¶
func (g *GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error
DetachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
func (*GCEAlphaNetworkEndpointGroups) Get ¶
func (g *GCEAlphaNetworkEndpointGroups) Get(ctx context.Context, key meta.Key) (*alpha.NetworkEndpointGroup, error)
Get the NetworkEndpointGroup named by key.
func (*GCEAlphaNetworkEndpointGroups) Insert ¶
func (g *GCEAlphaNetworkEndpointGroups) Insert(ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) error
Insert NetworkEndpointGroup with key of value obj.
type GCEAlphaRegionBackendServices ¶
type GCEAlphaRegionBackendServices struct {
// contains filtered or unexported fields
}
GCEAlphaRegionBackendServices is a simplifying adapter for the GCE RegionBackendServices.
func (*GCEAlphaRegionBackendServices) Get ¶
func (g *GCEAlphaRegionBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
Get the BackendService named by key.
func (*GCEAlphaRegionBackendServices) GetHealth ¶
func (g *GCEAlphaRegionBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error)
GetHealth is a method on GCEAlphaRegionBackendServices.
func (*GCEAlphaRegionBackendServices) Insert ¶
func (g *GCEAlphaRegionBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
Insert BackendService with key of value obj.
func (*GCEAlphaRegionBackendServices) List ¶
func (g *GCEAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.BackendService, error)
List all BackendService objects.
func (*GCEAlphaRegionBackendServices) Update ¶
func (g *GCEAlphaRegionBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
Update is a method on GCEAlphaRegionBackendServices.
type GCEAlphaRegionDisks ¶
type GCEAlphaRegionDisks struct {
// contains filtered or unexported fields
}
GCEAlphaRegionDisks is a simplifying adapter for the GCE RegionDisks.
type GCEBackendServices ¶
type GCEBackendServices struct {
// contains filtered or unexported fields
}
GCEBackendServices is a simplifying adapter for the GCE BackendServices.
func (*GCEBackendServices) Get ¶
func (g *GCEBackendServices) Get(ctx context.Context, key meta.Key) (*ga.BackendService, error)
Get the BackendService named by key.
func (*GCEBackendServices) GetHealth ¶
func (g *GCEBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
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) 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.
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) DetachDisk ¶
DetachDisk is a method on GCEBetaInstances.
type GCEDisks ¶
type GCEDisks struct {
// contains filtered or unexported fields
}
GCEDisks is a simplifying adapter for the GCE Disks.
type GCEFirewalls ¶
type GCEFirewalls struct {
// contains filtered or unexported fields
}
GCEFirewalls is a simplifying adapter for the GCE Firewalls.
type GCEForwardingRules ¶
type GCEForwardingRules struct {
// contains filtered or unexported fields
}
GCEForwardingRules is a simplifying adapter for the GCE ForwardingRules.
func (*GCEForwardingRules) Get ¶
func (g *GCEForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
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.
type GCEGlobalAddresses ¶
type GCEGlobalAddresses struct {
// contains filtered or unexported fields
}
GCEGlobalAddresses is a simplifying adapter for the GCE GlobalAddresses.
type GCEGlobalForwardingRules ¶
type GCEGlobalForwardingRules struct {
// contains filtered or unexported fields
}
GCEGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
func (*GCEGlobalForwardingRules) Get ¶
func (g *GCEGlobalForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
Get the ForwardingRule named by key.
func (*GCEGlobalForwardingRules) Insert ¶
func (g *GCEGlobalForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
Insert ForwardingRule with key of value obj.
func (*GCEGlobalForwardingRules) List ¶
func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
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) 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) Get ¶
func (g *GCEHttpHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpHealthCheck, error)
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 ¶
func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
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) Get ¶
func (g *GCEHttpsHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpsHealthCheck, error)
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 ¶
func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
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 ¶
func (g *GCEInstanceGroups) AddInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error
AddInstances is a method on GCEInstanceGroups.
func (*GCEInstanceGroups) Get ¶
func (g *GCEInstanceGroups) Get(ctx context.Context, key meta.Key) (*ga.InstanceGroup, error)
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 ¶
func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error)
ListInstances is a method on GCEInstanceGroups.
func (*GCEInstanceGroups) RemoveInstances ¶
func (g *GCEInstanceGroups) RemoveInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error
RemoveInstances is a method on GCEInstanceGroups.
func (*GCEInstanceGroups) SetNamedPorts ¶
func (g *GCEInstanceGroups) SetNamedPorts(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error
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) DetachDisk ¶
DetachDisk is a method on GCEInstances.
type GCEProjects ¶
type GCEProjects struct {
// contains filtered or unexported fields
}
GCEProjects is a simplifying adapter for the GCE Projects.
func (*GCEProjects) SetCommonInstanceMetadata ¶
type GCERegions ¶
type GCERegions struct {
// contains filtered or unexported fields
}
GCERegions is a simplifying adapter for the GCE Regions.
type GCERoutes ¶
type GCERoutes struct {
// contains filtered or unexported fields
}
GCERoutes is a simplifying adapter for the GCE Routes.
type GCESslCertificates ¶
type GCESslCertificates struct {
// contains filtered or unexported fields
}
GCESslCertificates is a simplifying adapter for the GCE SslCertificates.
func (*GCESslCertificates) Get ¶
func (g *GCESslCertificates) Get(ctx context.Context, key meta.Key) (*ga.SslCertificate, error)
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) Get ¶
func (g *GCETargetHttpProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpProxy, error)
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 ¶
func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
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) Get ¶
func (g *GCETargetHttpsProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpsProxy, error)
Get the TargetHttpsProxy named by key.
func (*GCETargetHttpsProxies) Insert ¶
func (g *GCETargetHttpsProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpsProxy) error
Insert TargetHttpsProxy with key of value obj.
func (*GCETargetHttpsProxies) List ¶
func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
List all TargetHttpsProxy objects.
func (*GCETargetHttpsProxies) SetSslCertificates ¶
func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error
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) 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.
type GCEZones ¶
type GCEZones struct {
// contains filtered or unexported fields
}
GCEZones is a simplifying adapter for the GCE Zones.
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 ¶
type InstanceGroups interface { Get(ctx context.Context, key meta.Key) (*ga.InstanceGroup, error) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error) Insert(ctx context.Context, key meta.Key, obj *ga.InstanceGroup) error Delete(ctx context.Context, key meta.Key) error AddInstances(context.Context, meta.Key, *ga.InstanceGroupsAddInstancesRequest) error ListInstances(context.Context, meta.Key, *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error) RemoveInstances(context.Context, meta.Key, *ga.InstanceGroupsRemoveInstancesRequest) error SetNamedPorts(context.Context, meta.Key, *ga.InstanceGroupsSetNamedPortsRequest) error }
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 MockAddresses ¶
type MockAddresses struct { Lock sync.Mutex // 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(m *MockAddresses, ctx context.Context, key meta.Key) (bool, *ga.Address, error) ListHook func(m *MockAddresses, ctx context.Context, region string, fl *filter.F) (bool, []*ga.Address, error) InsertHook func(m *MockAddresses, ctx context.Context, key meta.Key, obj *ga.Address) (bool, error) DeleteHook func(m *MockAddresses, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockAddressesObj) *MockAddresses
NewMockAddresses returns a new mock for Addresses.
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 ¶
func (m *MockAddresses) Obj(o *ga.Address) *MockAddressesObj
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 // 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(m *MockAlphaAddresses, ctx context.Context, key meta.Key) (bool, *alpha.Address, error) ListHook func(m *MockAlphaAddresses, ctx context.Context, region string, fl *filter.F) (bool, []*alpha.Address, error) InsertHook func(m *MockAlphaAddresses, ctx context.Context, key meta.Key, obj *alpha.Address) (bool, error) DeleteHook func(m *MockAlphaAddresses, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockAddressesObj) *MockAlphaAddresses
NewMockAlphaAddresses returns a new mock for Addresses.
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 ¶
func (m *MockAlphaAddresses) Obj(o *alpha.Address) *MockAddressesObj
Obj wraps the object for use in the mock.
type MockAlphaBackendServices ¶
type MockAlphaBackendServices struct { Lock sync.Mutex // 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(m *MockAlphaBackendServices, ctx context.Context, key meta.Key) (bool, *alpha.BackendService, error) ListHook func(m *MockAlphaBackendServices, ctx context.Context, fl *filter.F) (bool, []*alpha.BackendService, error) InsertHook func(m *MockAlphaBackendServices, ctx context.Context, key meta.Key, obj *alpha.BackendService) (bool, error) DeleteHook func(m *MockAlphaBackendServices, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockAlphaBackendServices, context.Context, meta.Key, *alpha.BackendService) 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(objs map[meta.Key]*MockBackendServicesObj) *MockAlphaBackendServices
NewMockAlphaBackendServices returns a new mock for BackendServices.
func (*MockAlphaBackendServices) Get ¶
func (m *MockAlphaBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
Get returns the object from the mock.
func (*MockAlphaBackendServices) Insert ¶
func (m *MockAlphaBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
Insert is a mock for inserting/creating a new object.
func (*MockAlphaBackendServices) List ¶
func (m *MockAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*alpha.BackendService, error)
List all of the objects in the mock.
func (*MockAlphaBackendServices) Obj ¶
func (m *MockAlphaBackendServices) Obj(o *alpha.BackendService) *MockBackendServicesObj
Obj wraps the object for use in the mock.
func (*MockAlphaBackendServices) Update ¶
func (m *MockAlphaBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
Update is a mock for the corresponding method.
type MockAlphaDisks ¶
type MockAlphaDisks struct { Lock sync.Mutex // 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(m *MockAlphaDisks, ctx context.Context, key meta.Key) (bool, *alpha.Disk, error) ListHook func(m *MockAlphaDisks, ctx context.Context, zone string, fl *filter.F) (bool, []*alpha.Disk, error) InsertHook func(m *MockAlphaDisks, ctx context.Context, key meta.Key, obj *alpha.Disk) (bool, error) DeleteHook func(m *MockAlphaDisks, ctx context.Context, key meta.Key) (bool, error) // X is extra state that can be used as part of the mock. Generated code // will not use this field. X interface{} }
MockAlphaDisks is the mock for Disks.
func NewMockAlphaDisks ¶
func NewMockAlphaDisks(objs map[meta.Key]*MockDisksObj) *MockAlphaDisks
NewMockAlphaDisks returns a new mock for Disks.
func (*MockAlphaDisks) List ¶
func (m *MockAlphaDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Disk, error)
List all of the objects in the mock in the given zone.
func (*MockAlphaDisks) Obj ¶
func (m *MockAlphaDisks) Obj(o *alpha.Disk) *MockDisksObj
Obj wraps the object for use in the mock.
type MockAlphaForwardingRules ¶
type MockAlphaForwardingRules struct { Lock sync.Mutex // 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(m *MockAlphaForwardingRules, ctx context.Context, key meta.Key) (bool, *alpha.ForwardingRule, error) ListHook func(m *MockAlphaForwardingRules, ctx context.Context, region string, fl *filter.F) (bool, []*alpha.ForwardingRule, error) InsertHook func(m *MockAlphaForwardingRules, ctx context.Context, key meta.Key, obj *alpha.ForwardingRule) (bool, error) DeleteHook func(m *MockAlphaForwardingRules, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockForwardingRulesObj) *MockAlphaForwardingRules
NewMockAlphaForwardingRules returns a new mock for ForwardingRules.
func (*MockAlphaForwardingRules) Get ¶
func (m *MockAlphaForwardingRules) Get(ctx context.Context, key meta.Key) (*alpha.ForwardingRule, error)
Get returns the object from the mock.
func (*MockAlphaForwardingRules) Insert ¶
func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key meta.Key, obj *alpha.ForwardingRule) error
Insert is a mock for inserting/creating a new object.
func (*MockAlphaForwardingRules) List ¶
func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
List all of the objects in the mock in the given region.
func (*MockAlphaForwardingRules) Obj ¶
func (m *MockAlphaForwardingRules) Obj(o *alpha.ForwardingRule) *MockForwardingRulesObj
Obj wraps the object for use in the mock.
type MockAlphaHealthChecks ¶
type MockAlphaHealthChecks struct { Lock sync.Mutex // 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(m *MockAlphaHealthChecks, ctx context.Context, key meta.Key) (bool, *alpha.HealthCheck, error) ListHook func(m *MockAlphaHealthChecks, ctx context.Context, fl *filter.F) (bool, []*alpha.HealthCheck, error) InsertHook func(m *MockAlphaHealthChecks, ctx context.Context, key meta.Key, obj *alpha.HealthCheck) (bool, error) DeleteHook func(m *MockAlphaHealthChecks, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockAlphaHealthChecks, context.Context, meta.Key, *alpha.HealthCheck) 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(objs map[meta.Key]*MockHealthChecksObj) *MockAlphaHealthChecks
NewMockAlphaHealthChecks returns a new mock for HealthChecks.
func (*MockAlphaHealthChecks) Get ¶
func (m *MockAlphaHealthChecks) Get(ctx context.Context, key meta.Key) (*alpha.HealthCheck, error)
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 ¶
func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
List all of the objects in the mock.
func (*MockAlphaHealthChecks) Obj ¶
func (m *MockAlphaHealthChecks) Obj(o *alpha.HealthCheck) *MockHealthChecksObj
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 // 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(m *MockAlphaInstances, ctx context.Context, key meta.Key) (bool, *alpha.Instance, error) ListHook func(m *MockAlphaInstances, ctx context.Context, zone string, fl *filter.F) (bool, []*alpha.Instance, error) InsertHook func(m *MockAlphaInstances, ctx context.Context, key meta.Key, obj *alpha.Instance) (bool, error) DeleteHook func(m *MockAlphaInstances, ctx context.Context, key meta.Key) (bool, error) AttachDiskHook func(*MockAlphaInstances, context.Context, meta.Key, *alpha.AttachedDisk) error DetachDiskHook func(*MockAlphaInstances, context.Context, meta.Key, string) error UpdateNetworkInterfaceHook func(*MockAlphaInstances, context.Context, meta.Key, string, *alpha.NetworkInterface) 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(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) DetachDisk ¶
DetachDisk is a mock for the corresponding method.
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 ¶
func (m *MockAlphaInstances) Obj(o *alpha.Instance) *MockInstancesObj
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 // 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(m *MockAlphaNetworkEndpointGroups, ctx context.Context, key meta.Key) (bool, *alpha.NetworkEndpointGroup, error) ListHook func(m *MockAlphaNetworkEndpointGroups, ctx context.Context, zone string, fl *filter.F) (bool, []*alpha.NetworkEndpointGroup, error) InsertHook func(m *MockAlphaNetworkEndpointGroups, ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) (bool, error) DeleteHook func(m *MockAlphaNetworkEndpointGroups, ctx context.Context, key meta.Key) (bool, error) AggregatedListHook func(m *MockAlphaNetworkEndpointGroups, ctx context.Context, fl *filter.F) (bool, map[string][]*alpha.NetworkEndpointGroup, error) AttachNetworkEndpointsHook func(*MockAlphaNetworkEndpointGroups, context.Context, meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error DetachNetworkEndpointsHook func(*MockAlphaNetworkEndpointGroups, context.Context, meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest) 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(objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockAlphaNetworkEndpointGroups
NewMockAlphaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
func (*MockAlphaNetworkEndpointGroups) AggregatedList ¶
func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
AggregatedList is a mock for AggregatedList.
func (*MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints ¶
func (m *MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error
AttachNetworkEndpoints is a mock for the corresponding method.
func (*MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints ¶
func (m *MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error
DetachNetworkEndpoints is a mock for the corresponding method.
func (*MockAlphaNetworkEndpointGroups) Get ¶
func (m *MockAlphaNetworkEndpointGroups) Get(ctx context.Context, key meta.Key) (*alpha.NetworkEndpointGroup, error)
Get returns the object from the mock.
func (*MockAlphaNetworkEndpointGroups) Insert ¶
func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key meta.Key, obj *alpha.NetworkEndpointGroup) error
Insert is a mock for inserting/creating a new object.
func (*MockAlphaNetworkEndpointGroups) List ¶
func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error)
List all of the objects in the mock in the given zone.
func (*MockAlphaNetworkEndpointGroups) Obj ¶
func (m *MockAlphaNetworkEndpointGroups) Obj(o *alpha.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj
Obj wraps the object for use in the mock.
type MockAlphaRegionBackendServices ¶
type MockAlphaRegionBackendServices struct { Lock sync.Mutex // 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(m *MockAlphaRegionBackendServices, ctx context.Context, key meta.Key) (bool, *alpha.BackendService, error) ListHook func(m *MockAlphaRegionBackendServices, ctx context.Context, region string, fl *filter.F) (bool, []*alpha.BackendService, error) InsertHook func(m *MockAlphaRegionBackendServices, ctx context.Context, key meta.Key, obj *alpha.BackendService) (bool, error) DeleteHook func(m *MockAlphaRegionBackendServices, ctx context.Context, key meta.Key) (bool, error) GetHealthHook func(*MockAlphaRegionBackendServices, context.Context, meta.Key, *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error) UpdateHook func(*MockAlphaRegionBackendServices, context.Context, meta.Key, *alpha.BackendService) 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(objs map[meta.Key]*MockRegionBackendServicesObj) *MockAlphaRegionBackendServices
NewMockAlphaRegionBackendServices returns a new mock for RegionBackendServices.
func (*MockAlphaRegionBackendServices) Get ¶
func (m *MockAlphaRegionBackendServices) Get(ctx context.Context, key meta.Key) (*alpha.BackendService, error)
Get returns the object from the mock.
func (*MockAlphaRegionBackendServices) GetHealth ¶
func (m *MockAlphaRegionBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *alpha.ResourceGroupReference) (*alpha.BackendServiceGroupHealth, error)
GetHealth is a mock for the corresponding method.
func (*MockAlphaRegionBackendServices) Insert ¶
func (m *MockAlphaRegionBackendServices) Insert(ctx context.Context, key meta.Key, obj *alpha.BackendService) error
Insert is a mock for inserting/creating a new object.
func (*MockAlphaRegionBackendServices) List ¶
func (m *MockAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.BackendService, error)
List all of the objects in the mock in the given region.
func (*MockAlphaRegionBackendServices) Obj ¶
func (m *MockAlphaRegionBackendServices) Obj(o *alpha.BackendService) *MockRegionBackendServicesObj
Obj wraps the object for use in the mock.
func (*MockAlphaRegionBackendServices) Update ¶
func (m *MockAlphaRegionBackendServices) Update(ctx context.Context, key meta.Key, arg0 *alpha.BackendService) error
Update is a mock for the corresponding method.
type MockAlphaRegionDisks ¶
type MockAlphaRegionDisks struct { Lock sync.Mutex // 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(m *MockAlphaRegionDisks, ctx context.Context, key meta.Key) (bool, *alpha.Disk, error) ListHook func(m *MockAlphaRegionDisks, ctx context.Context, region string, fl *filter.F) (bool, []*alpha.Disk, error) InsertHook func(m *MockAlphaRegionDisks, ctx context.Context, key meta.Key, obj *alpha.Disk) (bool, error) DeleteHook func(m *MockAlphaRegionDisks, ctx context.Context, key meta.Key) (bool, error) // X is extra state that can be used as part of the mock. Generated code // will not use this field. X interface{} }
MockAlphaRegionDisks is the mock for RegionDisks.
func NewMockAlphaRegionDisks ¶
func NewMockAlphaRegionDisks(objs map[meta.Key]*MockRegionDisksObj) *MockAlphaRegionDisks
NewMockAlphaRegionDisks returns a new mock for RegionDisks.
func (*MockAlphaRegionDisks) List ¶
func (m *MockAlphaRegionDisks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Disk, error)
List all of the objects in the mock in the given region.
func (*MockAlphaRegionDisks) Obj ¶
func (m *MockAlphaRegionDisks) Obj(o *alpha.Disk) *MockRegionDisksObj
Obj wraps the object for use in the mock.
type MockBackendServices ¶
type MockBackendServices struct { Lock sync.Mutex // 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(m *MockBackendServices, ctx context.Context, key meta.Key) (bool, *ga.BackendService, error) ListHook func(m *MockBackendServices, ctx context.Context, fl *filter.F) (bool, []*ga.BackendService, error) InsertHook func(m *MockBackendServices, ctx context.Context, key meta.Key, obj *ga.BackendService) (bool, error) DeleteHook func(m *MockBackendServices, ctx context.Context, key meta.Key) (bool, error) GetHealthHook func(*MockBackendServices, context.Context, meta.Key, *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error) UpdateHook func(*MockBackendServices, context.Context, meta.Key, *ga.BackendService) 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(objs map[meta.Key]*MockBackendServicesObj) *MockBackendServices
NewMockBackendServices returns a new mock for BackendServices.
func (*MockBackendServices) Get ¶
func (m *MockBackendServices) Get(ctx context.Context, key meta.Key) (*ga.BackendService, error)
Get returns the object from the mock.
func (*MockBackendServices) GetHealth ¶
func (m *MockBackendServices) GetHealth(ctx context.Context, key meta.Key, arg0 *ga.ResourceGroupReference) (*ga.BackendServiceGroupHealth, error)
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 ¶
func (m *MockBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.BackendService, error)
List all of the objects in the mock.
func (*MockBackendServices) Obj ¶
func (m *MockBackendServices) Obj(o *ga.BackendService) *MockBackendServicesObj
Obj wraps the object for use in the mock.
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 ¶
func (m *MockBackendServicesObj) ToAlpha() *alpha.BackendService
ToAlpha retrieves the given version of the object.
func (*MockBackendServicesObj) ToGA ¶
func (m *MockBackendServicesObj) ToGA() *ga.BackendService
ToGA retrieves the given version of the object.
type MockBetaAddresses ¶
type MockBetaAddresses struct { Lock sync.Mutex // 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(m *MockBetaAddresses, ctx context.Context, key meta.Key) (bool, *beta.Address, error) ListHook func(m *MockBetaAddresses, ctx context.Context, region string, fl *filter.F) (bool, []*beta.Address, error) InsertHook func(m *MockBetaAddresses, ctx context.Context, key meta.Key, obj *beta.Address) (bool, error) DeleteHook func(m *MockBetaAddresses, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockAddressesObj) *MockBetaAddresses
NewMockBetaAddresses returns a new mock for Addresses.
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 ¶
func (m *MockBetaAddresses) Obj(o *beta.Address) *MockAddressesObj
Obj wraps the object for use in the mock.
type MockBetaInstances ¶
type MockBetaInstances struct { Lock sync.Mutex // 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(m *MockBetaInstances, ctx context.Context, key meta.Key) (bool, *beta.Instance, error) ListHook func(m *MockBetaInstances, ctx context.Context, zone string, fl *filter.F) (bool, []*beta.Instance, error) InsertHook func(m *MockBetaInstances, ctx context.Context, key meta.Key, obj *beta.Instance) (bool, error) DeleteHook func(m *MockBetaInstances, ctx context.Context, key meta.Key) (bool, error) AttachDiskHook func(*MockBetaInstances, context.Context, meta.Key, *beta.AttachedDisk) error DetachDiskHook func(*MockBetaInstances, context.Context, meta.Key, string) 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(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) DetachDisk ¶
DetachDisk is a mock for the corresponding method.
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 ¶
func (m *MockBetaInstances) Obj(o *beta.Instance) *MockInstancesObj
Obj wraps the object for use in the mock.
type MockDisks ¶
type MockDisks struct { Lock sync.Mutex // 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(m *MockDisks, ctx context.Context, key meta.Key) (bool, *ga.Disk, error) ListHook func(m *MockDisks, ctx context.Context, zone string, fl *filter.F) (bool, []*ga.Disk, error) InsertHook func(m *MockDisks, ctx context.Context, key meta.Key, obj *ga.Disk) (bool, error) DeleteHook func(m *MockDisks, ctx context.Context, key meta.Key) (bool, 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(objs map[meta.Key]*MockDisksObj) *MockDisks
NewMockDisks returns a new mock for Disks.
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) ToAlpha ¶
func (m *MockDisksObj) ToAlpha() *alpha.Disk
ToAlpha retrieves the given version of the object.
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 // 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(m *MockFirewalls, ctx context.Context, key meta.Key) (bool, *ga.Firewall, error) ListHook func(m *MockFirewalls, ctx context.Context, fl *filter.F) (bool, []*ga.Firewall, error) InsertHook func(m *MockFirewalls, ctx context.Context, key meta.Key, obj *ga.Firewall) (bool, error) DeleteHook func(m *MockFirewalls, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockFirewalls, context.Context, meta.Key, *ga.Firewall) 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(objs map[meta.Key]*MockFirewallsObj) *MockFirewalls
NewMockFirewalls returns a new mock for Firewalls.
func (*MockFirewalls) Obj ¶
func (m *MockFirewalls) Obj(o *ga.Firewall) *MockFirewallsObj
Obj wraps the object for use in the mock.
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 // 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(m *MockForwardingRules, ctx context.Context, key meta.Key) (bool, *ga.ForwardingRule, error) ListHook func(m *MockForwardingRules, ctx context.Context, region string, fl *filter.F) (bool, []*ga.ForwardingRule, error) InsertHook func(m *MockForwardingRules, ctx context.Context, key meta.Key, obj *ga.ForwardingRule) (bool, error) DeleteHook func(m *MockForwardingRules, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockForwardingRulesObj) *MockForwardingRules
NewMockForwardingRules returns a new mock for ForwardingRules.
func (*MockForwardingRules) Get ¶
func (m *MockForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
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 ¶
func (m *MockForwardingRules) Obj(o *ga.ForwardingRule) *MockForwardingRulesObj
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 ¶
func (m *MockForwardingRulesObj) ToAlpha() *alpha.ForwardingRule
ToAlpha retrieves the given version of the object.
func (*MockForwardingRulesObj) ToGA ¶
func (m *MockForwardingRulesObj) ToGA() *ga.ForwardingRule
ToGA retrieves the given version of the object.
type MockGCE ¶
type MockGCE struct { MockAddresses *MockAddresses MockAlphaAddresses *MockAlphaAddresses MockBetaAddresses *MockBetaAddresses MockGlobalAddresses *MockGlobalAddresses MockBackendServices *MockBackendServices MockAlphaBackendServices *MockAlphaBackendServices MockAlphaRegionBackendServices *MockAlphaRegionBackendServices MockDisks *MockDisks MockAlphaDisks *MockAlphaDisks MockAlphaRegionDisks *MockAlphaRegionDisks MockFirewalls *MockFirewalls MockForwardingRules *MockForwardingRules MockAlphaForwardingRules *MockAlphaForwardingRules MockGlobalForwardingRules *MockGlobalForwardingRules MockHealthChecks *MockHealthChecks MockAlphaHealthChecks *MockAlphaHealthChecks MockHttpHealthChecks *MockHttpHealthChecks MockHttpsHealthChecks *MockHttpsHealthChecks MockInstanceGroups *MockInstanceGroups MockInstances *MockInstances MockBetaInstances *MockBetaInstances MockAlphaInstances *MockAlphaInstances MockAlphaNetworkEndpointGroups *MockAlphaNetworkEndpointGroups MockProjects *MockProjects MockRegions *MockRegions MockRoutes *MockRoutes MockSslCertificates *MockSslCertificates MockTargetHttpProxies *MockTargetHttpProxies MockTargetHttpsProxies *MockTargetHttpsProxies MockTargetPools *MockTargetPools MockUrlMaps *MockUrlMaps MockZones *MockZones }
MockGCE is the mock for the compute API.
func (*MockGCE) AlphaAddresses ¶
func (mock *MockGCE) AlphaAddresses() AlphaAddresses
func (*MockGCE) AlphaBackendServices ¶
func (mock *MockGCE) AlphaBackendServices() AlphaBackendServices
func (*MockGCE) AlphaDisks ¶
func (mock *MockGCE) AlphaDisks() AlphaDisks
func (*MockGCE) AlphaForwardingRules ¶
func (mock *MockGCE) AlphaForwardingRules() AlphaForwardingRules
func (*MockGCE) AlphaHealthChecks ¶
func (mock *MockGCE) AlphaHealthChecks() AlphaHealthChecks
func (*MockGCE) AlphaInstances ¶
func (mock *MockGCE) AlphaInstances() AlphaInstances
func (*MockGCE) AlphaNetworkEndpointGroups ¶
func (mock *MockGCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups
func (*MockGCE) AlphaRegionBackendServices ¶
func (mock *MockGCE) AlphaRegionBackendServices() AlphaRegionBackendServices
func (*MockGCE) AlphaRegionDisks ¶
func (mock *MockGCE) AlphaRegionDisks() AlphaRegionDisks
func (*MockGCE) BackendServices ¶
func (mock *MockGCE) BackendServices() BackendServices
func (*MockGCE) BetaAddresses ¶
func (mock *MockGCE) BetaAddresses() BetaAddresses
func (*MockGCE) BetaInstances ¶
func (mock *MockGCE) BetaInstances() BetaInstances
func (*MockGCE) ForwardingRules ¶
func (mock *MockGCE) ForwardingRules() ForwardingRules
func (*MockGCE) GlobalAddresses ¶
func (mock *MockGCE) GlobalAddresses() GlobalAddresses
func (*MockGCE) GlobalForwardingRules ¶
func (mock *MockGCE) GlobalForwardingRules() GlobalForwardingRules
func (*MockGCE) HealthChecks ¶
func (mock *MockGCE) HealthChecks() HealthChecks
func (*MockGCE) HttpHealthChecks ¶
func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks
func (*MockGCE) HttpsHealthChecks ¶
func (mock *MockGCE) HttpsHealthChecks() HttpsHealthChecks
func (*MockGCE) InstanceGroups ¶
func (mock *MockGCE) InstanceGroups() InstanceGroups
func (*MockGCE) SslCertificates ¶
func (mock *MockGCE) SslCertificates() SslCertificates
func (*MockGCE) TargetHttpProxies ¶
func (mock *MockGCE) TargetHttpProxies() TargetHttpProxies
func (*MockGCE) TargetHttpsProxies ¶
func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies
func (*MockGCE) TargetPools ¶
func (mock *MockGCE) TargetPools() TargetPools
type MockGlobalAddresses ¶
type MockGlobalAddresses struct { Lock sync.Mutex // 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(m *MockGlobalAddresses, ctx context.Context, key meta.Key) (bool, *ga.Address, error) ListHook func(m *MockGlobalAddresses, ctx context.Context, fl *filter.F) (bool, []*ga.Address, error) InsertHook func(m *MockGlobalAddresses, ctx context.Context, key meta.Key, obj *ga.Address) (bool, error) DeleteHook func(m *MockGlobalAddresses, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockGlobalAddressesObj) *MockGlobalAddresses
NewMockGlobalAddresses returns a new mock for GlobalAddresses.
func (*MockGlobalAddresses) Obj ¶
func (m *MockGlobalAddresses) Obj(o *ga.Address) *MockGlobalAddressesObj
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 // 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(m *MockGlobalForwardingRules, ctx context.Context, key meta.Key) (bool, *ga.ForwardingRule, error) ListHook func(m *MockGlobalForwardingRules, ctx context.Context, fl *filter.F) (bool, []*ga.ForwardingRule, error) InsertHook func(m *MockGlobalForwardingRules, ctx context.Context, key meta.Key, obj *ga.ForwardingRule) (bool, error) DeleteHook func(m *MockGlobalForwardingRules, ctx context.Context, key meta.Key) (bool, error) SetTargetHook func(*MockGlobalForwardingRules, context.Context, meta.Key, *ga.TargetReference) 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(objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockGlobalForwardingRules
NewMockGlobalForwardingRules returns a new mock for GlobalForwardingRules.
func (*MockGlobalForwardingRules) Get ¶
func (m *MockGlobalForwardingRules) Get(ctx context.Context, key meta.Key) (*ga.ForwardingRule, error)
Get returns the object from the mock.
func (*MockGlobalForwardingRules) Insert ¶
func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key meta.Key, obj *ga.ForwardingRule) error
Insert is a mock for inserting/creating a new object.
func (*MockGlobalForwardingRules) List ¶
func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
List all of the objects in the mock.
func (*MockGlobalForwardingRules) Obj ¶
func (m *MockGlobalForwardingRules) Obj(o *ga.ForwardingRule) *MockGlobalForwardingRulesObj
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 ¶
func (m *MockGlobalForwardingRulesObj) ToGA() *ga.ForwardingRule
ToGA retrieves the given version of the object.
type MockHealthChecks ¶
type MockHealthChecks struct { Lock sync.Mutex // 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(m *MockHealthChecks, ctx context.Context, key meta.Key) (bool, *ga.HealthCheck, error) ListHook func(m *MockHealthChecks, ctx context.Context, fl *filter.F) (bool, []*ga.HealthCheck, error) InsertHook func(m *MockHealthChecks, ctx context.Context, key meta.Key, obj *ga.HealthCheck) (bool, error) DeleteHook func(m *MockHealthChecks, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockHealthChecks, context.Context, meta.Key, *ga.HealthCheck) 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(objs map[meta.Key]*MockHealthChecksObj) *MockHealthChecks
NewMockHealthChecks returns a new mock for HealthChecks.
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 ¶
func (m *MockHealthChecks) Obj(o *ga.HealthCheck) *MockHealthChecksObj
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) ToGA ¶
func (m *MockHealthChecksObj) ToGA() *ga.HealthCheck
ToGA retrieves the given version of the object.
type MockHttpHealthChecks ¶
type MockHttpHealthChecks struct { Lock sync.Mutex // 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(m *MockHttpHealthChecks, ctx context.Context, key meta.Key) (bool, *ga.HttpHealthCheck, error) ListHook func(m *MockHttpHealthChecks, ctx context.Context, fl *filter.F) (bool, []*ga.HttpHealthCheck, error) InsertHook func(m *MockHttpHealthChecks, ctx context.Context, key meta.Key, obj *ga.HttpHealthCheck) (bool, error) DeleteHook func(m *MockHttpHealthChecks, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockHttpHealthChecks, context.Context, meta.Key, *ga.HttpHealthCheck) 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(objs map[meta.Key]*MockHttpHealthChecksObj) *MockHttpHealthChecks
NewMockHttpHealthChecks returns a new mock for HttpHealthChecks.
func (*MockHttpHealthChecks) Get ¶
func (m *MockHttpHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpHealthCheck, error)
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 ¶
func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
List all of the objects in the mock.
func (*MockHttpHealthChecks) Obj ¶
func (m *MockHttpHealthChecks) Obj(o *ga.HttpHealthCheck) *MockHttpHealthChecksObj
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 ¶
func (m *MockHttpHealthChecksObj) ToGA() *ga.HttpHealthCheck
ToGA retrieves the given version of the object.
type MockHttpsHealthChecks ¶
type MockHttpsHealthChecks struct { Lock sync.Mutex // 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(m *MockHttpsHealthChecks, ctx context.Context, key meta.Key) (bool, *ga.HttpsHealthCheck, error) ListHook func(m *MockHttpsHealthChecks, ctx context.Context, fl *filter.F) (bool, []*ga.HttpsHealthCheck, error) InsertHook func(m *MockHttpsHealthChecks, ctx context.Context, key meta.Key, obj *ga.HttpsHealthCheck) (bool, error) DeleteHook func(m *MockHttpsHealthChecks, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockHttpsHealthChecks, context.Context, meta.Key, *ga.HttpsHealthCheck) 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(objs map[meta.Key]*MockHttpsHealthChecksObj) *MockHttpsHealthChecks
NewMockHttpsHealthChecks returns a new mock for HttpsHealthChecks.
func (*MockHttpsHealthChecks) Get ¶
func (m *MockHttpsHealthChecks) Get(ctx context.Context, key meta.Key) (*ga.HttpsHealthCheck, error)
Get returns the object from the mock.
func (*MockHttpsHealthChecks) Insert ¶
func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key meta.Key, obj *ga.HttpsHealthCheck) error
Insert is a mock for inserting/creating a new object.
func (*MockHttpsHealthChecks) List ¶
func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
List all of the objects in the mock.
func (*MockHttpsHealthChecks) Obj ¶
func (m *MockHttpsHealthChecks) Obj(o *ga.HttpsHealthCheck) *MockHttpsHealthChecksObj
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 ¶
func (m *MockHttpsHealthChecksObj) ToGA() *ga.HttpsHealthCheck
ToGA retrieves the given version of the object.
type MockInstanceGroups ¶
type MockInstanceGroups struct { Lock sync.Mutex // 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(m *MockInstanceGroups, ctx context.Context, key meta.Key) (bool, *ga.InstanceGroup, error) ListHook func(m *MockInstanceGroups, ctx context.Context, zone string, fl *filter.F) (bool, []*ga.InstanceGroup, error) InsertHook func(m *MockInstanceGroups, ctx context.Context, key meta.Key, obj *ga.InstanceGroup) (bool, error) DeleteHook func(m *MockInstanceGroups, ctx context.Context, key meta.Key) (bool, error) AddInstancesHook func(*MockInstanceGroups, context.Context, meta.Key, *ga.InstanceGroupsAddInstancesRequest) error ListInstancesHook func(*MockInstanceGroups, context.Context, meta.Key, *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error) RemoveInstancesHook func(*MockInstanceGroups, context.Context, meta.Key, *ga.InstanceGroupsRemoveInstancesRequest) error SetNamedPortsHook func(*MockInstanceGroups, context.Context, meta.Key, *ga.InstanceGroupsSetNamedPortsRequest) 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(objs map[meta.Key]*MockInstanceGroupsObj) *MockInstanceGroups
NewMockInstanceGroups returns a new mock for InstanceGroups.
func (*MockInstanceGroups) AddInstances ¶
func (m *MockInstanceGroups) AddInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error
AddInstances is a mock for the corresponding method.
func (*MockInstanceGroups) Get ¶
func (m *MockInstanceGroups) Get(ctx context.Context, key meta.Key) (*ga.InstanceGroup, error)
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 ¶
func (m *MockInstanceGroups) ListInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest) (*ga.InstanceGroupsListInstances, error)
ListInstances is a mock for the corresponding method.
func (*MockInstanceGroups) Obj ¶
func (m *MockInstanceGroups) Obj(o *ga.InstanceGroup) *MockInstanceGroupsObj
Obj wraps the object for use in the mock.
func (*MockInstanceGroups) RemoveInstances ¶
func (m *MockInstanceGroups) RemoveInstances(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error
RemoveInstances is a mock for the corresponding method.
func (*MockInstanceGroups) SetNamedPorts ¶
func (m *MockInstanceGroups) SetNamedPorts(ctx context.Context, key meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error
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 ¶
func (m *MockInstanceGroupsObj) ToGA() *ga.InstanceGroup
ToGA retrieves the given version of the object.
type MockInstances ¶
type MockInstances struct { Lock sync.Mutex // 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(m *MockInstances, ctx context.Context, key meta.Key) (bool, *ga.Instance, error) ListHook func(m *MockInstances, ctx context.Context, zone string, fl *filter.F) (bool, []*ga.Instance, error) InsertHook func(m *MockInstances, ctx context.Context, key meta.Key, obj *ga.Instance) (bool, error) DeleteHook func(m *MockInstances, ctx context.Context, key meta.Key) (bool, error) AttachDiskHook func(*MockInstances, context.Context, meta.Key, *ga.AttachedDisk) error DetachDiskHook func(*MockInstances, context.Context, meta.Key, string) 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(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) DetachDisk ¶
DetachDisk is a mock for the corresponding method.
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 ¶
func (m *MockInstances) Obj(o *ga.Instance) *MockInstancesObj
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 ¶
func (m *MockNetworkEndpointGroupsObj) ToAlpha() *alpha.NetworkEndpointGroup
ToAlpha 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 // 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(objs map[meta.Key]*MockProjectsObj) *MockProjects
NewMockProjects returns a new mock for Projects.
func (*MockProjects) Obj ¶
func (m *MockProjects) Obj(o *ga.Project) *MockProjectsObj
Obj wraps the object for use in the mock.
func (*MockProjects) SetCommonInstanceMetadata ¶
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 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 ¶
func (m *MockRegionBackendServicesObj) ToAlpha() *alpha.BackendService
ToAlpha 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) ToAlpha ¶
func (m *MockRegionDisksObj) ToAlpha() *alpha.Disk
ToAlpha retrieves the given version of the object.
type MockRegions ¶
type MockRegions struct { Lock sync.Mutex // 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(m *MockRegions, ctx context.Context, key meta.Key) (bool, *ga.Region, error) ListHook func(m *MockRegions, ctx context.Context, fl *filter.F) (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(objs map[meta.Key]*MockRegionsObj) *MockRegions
NewMockRegions returns a new mock for Regions.
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 // 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(m *MockRoutes, ctx context.Context, key meta.Key) (bool, *ga.Route, error) ListHook func(m *MockRoutes, ctx context.Context, fl *filter.F) (bool, []*ga.Route, error) InsertHook func(m *MockRoutes, ctx context.Context, key meta.Key, obj *ga.Route) (bool, error) DeleteHook func(m *MockRoutes, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockRoutesObj) *MockRoutes
NewMockRoutes returns a new mock for Routes.
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 MockSslCertificates ¶
type MockSslCertificates struct { Lock sync.Mutex // 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(m *MockSslCertificates, ctx context.Context, key meta.Key) (bool, *ga.SslCertificate, error) ListHook func(m *MockSslCertificates, ctx context.Context, fl *filter.F) (bool, []*ga.SslCertificate, error) InsertHook func(m *MockSslCertificates, ctx context.Context, key meta.Key, obj *ga.SslCertificate) (bool, error) DeleteHook func(m *MockSslCertificates, ctx context.Context, key meta.Key) (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(objs map[meta.Key]*MockSslCertificatesObj) *MockSslCertificates
NewMockSslCertificates returns a new mock for SslCertificates.
func (*MockSslCertificates) Get ¶
func (m *MockSslCertificates) Get(ctx context.Context, key meta.Key) (*ga.SslCertificate, error)
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 ¶
func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
List all of the objects in the mock.
func (*MockSslCertificates) Obj ¶
func (m *MockSslCertificates) Obj(o *ga.SslCertificate) *MockSslCertificatesObj
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 ¶
func (m *MockSslCertificatesObj) ToGA() *ga.SslCertificate
ToGA retrieves the given version of the object.
type MockTargetHttpProxies ¶
type MockTargetHttpProxies struct { Lock sync.Mutex // 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(m *MockTargetHttpProxies, ctx context.Context, key meta.Key) (bool, *ga.TargetHttpProxy, error) ListHook func(m *MockTargetHttpProxies, ctx context.Context, fl *filter.F) (bool, []*ga.TargetHttpProxy, error) InsertHook func(m *MockTargetHttpProxies, ctx context.Context, key meta.Key, obj *ga.TargetHttpProxy) (bool, error) DeleteHook func(m *MockTargetHttpProxies, ctx context.Context, key meta.Key) (bool, error) SetUrlMapHook func(*MockTargetHttpProxies, context.Context, meta.Key, *ga.UrlMapReference) 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(objs map[meta.Key]*MockTargetHttpProxiesObj) *MockTargetHttpProxies
NewMockTargetHttpProxies returns a new mock for TargetHttpProxies.
func (*MockTargetHttpProxies) Get ¶
func (m *MockTargetHttpProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpProxy, error)
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 ¶
func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
List all of the objects in the mock.
func (*MockTargetHttpProxies) Obj ¶
func (m *MockTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockTargetHttpProxiesObj
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 ¶
func (m *MockTargetHttpProxiesObj) ToGA() *ga.TargetHttpProxy
ToGA retrieves the given version of the object.
type MockTargetHttpsProxies ¶
type MockTargetHttpsProxies struct { Lock sync.Mutex // 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(m *MockTargetHttpsProxies, ctx context.Context, key meta.Key) (bool, *ga.TargetHttpsProxy, error) ListHook func(m *MockTargetHttpsProxies, ctx context.Context, fl *filter.F) (bool, []*ga.TargetHttpsProxy, error) InsertHook func(m *MockTargetHttpsProxies, ctx context.Context, key meta.Key, obj *ga.TargetHttpsProxy) (bool, error) DeleteHook func(m *MockTargetHttpsProxies, ctx context.Context, key meta.Key) (bool, error) SetSslCertificatesHook func(*MockTargetHttpsProxies, context.Context, meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest) error SetUrlMapHook func(*MockTargetHttpsProxies, context.Context, meta.Key, *ga.UrlMapReference) 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(objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockTargetHttpsProxies
NewMockTargetHttpsProxies returns a new mock for TargetHttpsProxies.
func (*MockTargetHttpsProxies) Get ¶
func (m *MockTargetHttpsProxies) Get(ctx context.Context, key meta.Key) (*ga.TargetHttpsProxy, error)
Get returns the object from the mock.
func (*MockTargetHttpsProxies) Insert ¶
func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key meta.Key, obj *ga.TargetHttpsProxy) error
Insert is a mock for inserting/creating a new object.
func (*MockTargetHttpsProxies) List ¶
func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
List all of the objects in the mock.
func (*MockTargetHttpsProxies) Obj ¶
func (m *MockTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockTargetHttpsProxiesObj
Obj wraps the object for use in the mock.
func (*MockTargetHttpsProxies) SetSslCertificates ¶
func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error
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 ¶
func (m *MockTargetHttpsProxiesObj) ToGA() *ga.TargetHttpsProxy
ToGA retrieves the given version of the object.
type MockTargetPools ¶
type MockTargetPools struct { Lock sync.Mutex // 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(m *MockTargetPools, ctx context.Context, key meta.Key) (bool, *ga.TargetPool, error) ListHook func(m *MockTargetPools, ctx context.Context, region string, fl *filter.F) (bool, []*ga.TargetPool, error) InsertHook func(m *MockTargetPools, ctx context.Context, key meta.Key, obj *ga.TargetPool) (bool, error) DeleteHook func(m *MockTargetPools, ctx context.Context, key meta.Key) (bool, error) AddInstanceHook func(*MockTargetPools, context.Context, meta.Key, *ga.TargetPoolsAddInstanceRequest) error RemoveInstanceHook func(*MockTargetPools, context.Context, meta.Key, *ga.TargetPoolsRemoveInstanceRequest) 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(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) 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 ¶
func (m *MockTargetPools) Obj(o *ga.TargetPool) *MockTargetPoolsObj
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 // 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(m *MockUrlMaps, ctx context.Context, key meta.Key) (bool, *ga.UrlMap, error) ListHook func(m *MockUrlMaps, ctx context.Context, fl *filter.F) (bool, []*ga.UrlMap, error) InsertHook func(m *MockUrlMaps, ctx context.Context, key meta.Key, obj *ga.UrlMap) (bool, error) DeleteHook func(m *MockUrlMaps, ctx context.Context, key meta.Key) (bool, error) UpdateHook func(*MockUrlMaps, context.Context, meta.Key, *ga.UrlMap) 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(objs map[meta.Key]*MockUrlMapsObj) *MockUrlMaps
NewMockUrlMaps returns a new mock for UrlMaps.
func (*MockUrlMaps) Obj ¶
func (m *MockUrlMaps) Obj(o *ga.UrlMap) *MockUrlMapsObj
Obj wraps the object for use in the mock.
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 // 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(m *MockZones, ctx context.Context, key meta.Key) (bool, *ga.Zone, error) ListHook func(m *MockZones, ctx context.Context, fl *filter.F) (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(objs map[meta.Key]*MockZonesObj) *MockZones
NewMockZones returns a new mock for Zones.
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 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
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 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 ¶
ResourceID identifies a GCE resource as parsed from compute resource URL.
func ParseResourceURL ¶
func ParseResourceURL(url string) (*ResourceID, error)
ParseResourceURL parses resource URLs of the following formats:
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.
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 ¶
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.
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.
Source Files ¶
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. |