mockcompute

package
v0.0.0-...-748718d Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PtrTo

func PtrTo[T any](t T) *T

Types

type DisksV1

type DisksV1 struct {
	*MockService
	pb.UnimplementedDisksServer
}

func (*DisksV1) Delete

func (s *DisksV1) Delete(ctx context.Context, req *pb.DeleteDiskRequest) (*pb.Operation, error)

func (*DisksV1) Get

func (s *DisksV1) Get(ctx context.Context, req *pb.GetDiskRequest) (*pb.Disk, error)

func (*DisksV1) Insert

func (s *DisksV1) Insert(ctx context.Context, req *pb.InsertDiskRequest) (*pb.Operation, error)

func (*DisksV1) Update

func (s *DisksV1) Update(ctx context.Context, req *pb.UpdateDiskRequest) (*pb.Operation, error)

Updates a Disk resource in the specified project using the data included in the request.

type GlobalAddressesV1

type GlobalAddressesV1 struct {
	*MockService
	pb.UnimplementedGlobalAddressesServer
}

func (*GlobalAddressesV1) Delete

func (*GlobalAddressesV1) Get

func (*GlobalAddressesV1) Insert

func (*GlobalAddressesV1) SetLabels

type GlobalBackendServicesV1

type GlobalBackendServicesV1 struct {
	*MockService
	pb.UnimplementedBackendServicesServer
}

func (*GlobalBackendServicesV1) Delete

func (*GlobalBackendServicesV1) Get

func (*GlobalBackendServicesV1) Insert

func (*GlobalBackendServicesV1) Update

type GlobalForwardingRulesV1

type GlobalForwardingRulesV1 struct {
	*MockService
	pb.UnimplementedGlobalForwardingRulesServer
}

func (*GlobalForwardingRulesV1) Delete

func (*GlobalForwardingRulesV1) Get

func (*GlobalForwardingRulesV1) Insert

func (*GlobalForwardingRulesV1) SetLabels

func (*GlobalForwardingRulesV1) SetTarget

type GlobalHealthCheckV1

type GlobalHealthCheckV1 struct {
	*MockService
	pb.UnimplementedHealthChecksServer
}

func (*GlobalHealthCheckV1) Delete

func (*GlobalHealthCheckV1) Get

func (*GlobalHealthCheckV1) Insert

func (*GlobalHealthCheckV1) Patch

Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*GlobalHealthCheckV1) Update

Updates a HealthCheck resource in the specified project using the data included in the request.

type GlobalOperationsV1

type GlobalOperationsV1 struct {
	*MockService
	pb.UnimplementedGlobalOperationsServer
}

func (*GlobalOperationsV1) Get

type GlobalSSLCertificatesV1

type GlobalSSLCertificatesV1 struct {
	*MockService
	pb.UnimplementedSslCertificatesServer
}

func (*GlobalSSLCertificatesV1) Delete

func (*GlobalSSLCertificatesV1) Get

func (*GlobalSSLCertificatesV1) Insert

type GlobalTargetHTTPProxiesV1

type GlobalTargetHTTPProxiesV1 struct {
	*MockService
	pb.UnimplementedTargetHttpProxiesServer
}

func (*GlobalTargetHTTPProxiesV1) Delete

func (*GlobalTargetHTTPProxiesV1) Get

func (*GlobalTargetHTTPProxiesV1) Insert

func (*GlobalTargetHTTPProxiesV1) Patch

Updates a TargetHttpProxy resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*GlobalTargetHTTPProxiesV1) SetUrlMap

type GlobalTargetHTTPSProxiesV1

type GlobalTargetHTTPSProxiesV1 struct {
	*MockService
	pb.UnimplementedTargetHttpsProxiesServer
}

func (*GlobalTargetHTTPSProxiesV1) Delete

func (*GlobalTargetHTTPSProxiesV1) Get

func (*GlobalTargetHTTPSProxiesV1) Insert

func (*GlobalTargetHTTPSProxiesV1) Patch

Updates a TargetHttpsProxy resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*GlobalTargetHTTPSProxiesV1) SetQuicOverride

func (*GlobalTargetHTTPSProxiesV1) SetUrlMap

type GlobalTargetTcpProxyV1

type GlobalTargetTcpProxyV1 struct {
	*MockService
	pb.UnimplementedTargetTcpProxiesServer
}

func (*GlobalTargetTcpProxyV1) Delete

func (*GlobalTargetTcpProxyV1) Get

func (*GlobalTargetTcpProxyV1) Insert

func (*GlobalTargetTcpProxyV1) SetProxyHeader

type GlobalURLMapsV1

type GlobalURLMapsV1 struct {
	*MockService
	pb.UnimplementedUrlMapsServer
}

func (*GlobalURLMapsV1) Delete

func (*GlobalURLMapsV1) Get

func (*GlobalURLMapsV1) Insert

func (*GlobalURLMapsV1) Patch

Updates a UrlMap resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*GlobalURLMapsV1) Update

Updates a UrlMap resource in the specified project using the data included in the request.

type ImageName

type ImageName struct {
	Project *projects.ProjectData
	Name    string
}

func (*ImageName) String

func (n *ImageName) String() string

type ImagesV1

type ImagesV1 struct {
	*MockService
	pb.UnimplementedImagesServer
}

func (*ImagesV1) Delete

func (s *ImagesV1) Delete(ctx context.Context, req *pb.DeleteImageRequest) (*pb.Operation, error)

func (*ImagesV1) Get

func (s *ImagesV1) Get(ctx context.Context, req *pb.GetImageRequest) (*pb.Image, error)

func (*ImagesV1) GetFromFamily

func (s *ImagesV1) GetFromFamily(ctx context.Context, req *pb.GetFromFamilyImageRequest) (*pb.Image, error)

func (*ImagesV1) Insert

func (s *ImagesV1) Insert(ctx context.Context, req *pb.InsertImageRequest) (*pb.Operation, error)

func (*ImagesV1) Patch

func (s *ImagesV1) Patch(ctx context.Context, req *pb.PatchImageRequest) (*pb.Operation, error)

func (*ImagesV1) SetLabels

func (s *ImagesV1) SetLabels(ctx context.Context, req *pb.SetLabelsImageRequest) (*pb.Operation, error)

type InstancesV1

type InstancesV1 struct {
	*MockService
	pb.UnimplementedInstancesServer
}

func (*InstancesV1) AttachDisk

func (*InstancesV1) Delete

func (*InstancesV1) DetachDisk

func (*InstancesV1) Get

func (*InstancesV1) Insert

func (*InstancesV1) SetLabels

func (*InstancesV1) SetMachineType

func (s *InstancesV1) SetMachineType(ctx context.Context, req *pb.SetMachineTypeInstanceRequest) (*pb.Operation, error)

func (*InstancesV1) SetServiceAccount

func (s *InstancesV1) SetServiceAccount(ctx context.Context, req *pb.SetServiceAccountInstanceRequest) (*pb.Operation, error)

func (*InstancesV1) Start

func (*InstancesV1) Stop

func (*InstancesV1) Update

Updates a Instance resource in the specified project using the data included in the request.

type MockService

type MockService struct {
	*common.MockEnvironment
	// contains filtered or unexported fields
}

MockService represents a mocked compute service.

func New

func New(env *common.MockEnvironment, storage storage.Storage) *MockService

New creates a MockService.

func (*MockService) ExpectedHosts

func (s *MockService) ExpectedHosts() []string

func (*MockService) NewHTTPMux

func (s *MockService) NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error)

func (*MockService) Register

func (s *MockService) Register(grpcServer *grpc.Server)

type NetworksV1

type NetworksV1 struct {
	*MockService
	pb.UnimplementedNetworksServer
}

func (*NetworksV1) Delete

func (*NetworksV1) Get

func (s *NetworksV1) Get(ctx context.Context, req *pb.GetNetworkRequest) (*pb.Network, error)

func (*NetworksV1) Insert

func (*NetworksV1) Patch

Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.

func (*NetworksV1) RemovePeering

func (s *NetworksV1) RemovePeering(ctx context.Context, req *pb.RemovePeeringNetworkRequest) (*pb.Operation, error)

type NodeGroupsV1

type NodeGroupsV1 struct {
	*MockService
	pb.UnimplementedNodeGroupsServer
}

func (*NodeGroupsV1) Delete

func (*NodeGroupsV1) Get

func (*NodeGroupsV1) Insert

func (*NodeGroupsV1) Patch

type NodeTemplatesV1

type NodeTemplatesV1 struct {
	*MockService
	pb.UnimplementedNodeTemplatesServer
}

func (*NodeTemplatesV1) Delete

func (*NodeTemplatesV1) Get

func (*NodeTemplatesV1) Insert

type RegionalAddressesV1

type RegionalAddressesV1 struct {
	*MockService
	pb.UnimplementedAddressesServer
}

func (*RegionalAddressesV1) Delete

func (*RegionalAddressesV1) Get

func (*RegionalAddressesV1) Insert

func (*RegionalAddressesV1) SetLabels

type RegionalBackendServicesV1

type RegionalBackendServicesV1 struct {
	*MockService
	pb.UnimplementedRegionBackendServicesServer
}

func (*RegionalBackendServicesV1) Delete

func (*RegionalBackendServicesV1) Get

func (*RegionalBackendServicesV1) Insert

func (*RegionalBackendServicesV1) Update

type RegionalDisksV1

type RegionalDisksV1 struct {
	*MockService
	pb.UnimplementedRegionDisksServer
}

func (*RegionalDisksV1) Delete

func (*RegionalDisksV1) Get

func (*RegionalDisksV1) Insert

func (*RegionalDisksV1) Update

Updates a disk resource in the specified project using the data included in the request.

type RegionalForwardingRulesV1

type RegionalForwardingRulesV1 struct {
	*MockService
	pb.UnimplementedForwardingRulesServer
}

func (*RegionalForwardingRulesV1) Delete

func (*RegionalForwardingRulesV1) Get

func (*RegionalForwardingRulesV1) Insert

func (*RegionalForwardingRulesV1) SetLabels

func (*RegionalForwardingRulesV1) SetTarget

type RegionalHealthCheckV1

type RegionalHealthCheckV1 struct {
	*MockService
	pb.UnimplementedRegionHealthChecksServer
}

func (*RegionalHealthCheckV1) Delete

func (*RegionalHealthCheckV1) Get

func (*RegionalHealthCheckV1) Insert

func (*RegionalHealthCheckV1) Patch

Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*RegionalHealthCheckV1) Update

Updates a HealthCheck resource in the specified project using the data included in the request.

type RegionalOperationsV1

type RegionalOperationsV1 struct {
	*MockService
	pb.UnimplementedRegionOperationsServer
}

func (*RegionalOperationsV1) Get

type RegionalSSLCertificatesV1

type RegionalSSLCertificatesV1 struct {
	*MockService
	pb.UnimplementedRegionSslCertificatesServer
}

func (*RegionalSSLCertificatesV1) Delete

func (*RegionalSSLCertificatesV1) Get

func (*RegionalSSLCertificatesV1) Insert

type RegionalServiceAttachmentV1

type RegionalServiceAttachmentV1 struct {
	*MockService
	pb.UnimplementedServiceAttachmentsServer
}

func (*RegionalServiceAttachmentV1) Delete

func (*RegionalServiceAttachmentV1) Get

func (*RegionalServiceAttachmentV1) Insert

func (*RegionalServiceAttachmentV1) Patch

Updates a ServiceAttachment resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

type RegionalTargetHTTPProxiesV1

type RegionalTargetHTTPProxiesV1 struct {
	*MockService
	pb.UnimplementedRegionTargetHttpProxiesServer
}

func (*RegionalTargetHTTPProxiesV1) Delete

func (*RegionalTargetHTTPProxiesV1) Get

func (*RegionalTargetHTTPProxiesV1) Insert

func (*RegionalTargetHTTPProxiesV1) SetUrlMap

type RegionalTargetHTTPSProxiesV1

type RegionalTargetHTTPSProxiesV1 struct {
	*MockService
	pb.UnimplementedRegionTargetHttpsProxiesServer
}

func (*RegionalTargetHTTPSProxiesV1) Delete

func (*RegionalTargetHTTPSProxiesV1) Get

func (*RegionalTargetHTTPSProxiesV1) Insert

func (*RegionalTargetHTTPSProxiesV1) SetUrlMap

type RegionalURLMapsV1

type RegionalURLMapsV1 struct {
	*MockService
	pb.UnimplementedRegionUrlMapsServer
}

func (*RegionalURLMapsV1) Delete

func (*RegionalURLMapsV1) Get

func (*RegionalURLMapsV1) Insert

func (*RegionalURLMapsV1) Patch

Updates a UrlMap resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

func (*RegionalURLMapsV1) Update

Updates a UrlMap resource in the specified project using the data included in the request.

type SubnetsV1

type SubnetsV1 struct {
	*MockService
	pb.UnimplementedSubnetworksServer
}

func (*SubnetsV1) Delete

func (*SubnetsV1) Get

func (*SubnetsV1) Insert

func (*SubnetsV1) SetPrivateIpGoogleAccess

func (s *SubnetsV1) SetPrivateIpGoogleAccess(ctx context.Context, req *pb.SetPrivateIpGoogleAccessSubnetworkRequest) (*pb.Operation, error)

type TargetSslProxyV1

type TargetSslProxyV1 struct {
	*MockService
	pb.UnimplementedTargetSslProxiesServer
}

func (*TargetSslProxyV1) Delete

func (*TargetSslProxyV1) Get

func (*TargetSslProxyV1) Insert

type TargetVpnGatewaysV1

type TargetVpnGatewaysV1 struct {
	*MockService
	pb.UnimplementedTargetVpnGatewaysServer
}

func (*TargetVpnGatewaysV1) Delete

func (*TargetVpnGatewaysV1) Get

func (*TargetVpnGatewaysV1) Insert

func (*TargetVpnGatewaysV1) SetLabels

type VPNGatewaysV1

type VPNGatewaysV1 struct {
	*MockService
	pb.UnimplementedVpnGatewaysServer
}

func (*VPNGatewaysV1) Delete

func (*VPNGatewaysV1) Get

func (*VPNGatewaysV1) Insert

func (*VPNGatewaysV1) SetLabels

type ZonesV1

type ZonesV1 struct {
	*MockService
	pb.UnimplementedZonesServer
}

func (*ZonesV1) Get

func (s *ZonesV1) Get(ctx context.Context, req *pb.GetZoneRequest) (*pb.Zone, error)

Jump to

Keyboard shortcuts

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