mockcompute

package
v0.0.0-...-8078c5c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 16 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 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 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) ExpectedHost

func (s *MockService) ExpectedHost() 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.

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 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 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 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)

Jump to

Keyboard shortcuts

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