gcp

package
v0.0.0-...-bafb678 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package gcp is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAPIForbidden is returned when the api returns a 401
	ErrAPIForbidden = wrapError{/* contains filtered or unexported fields */}

	// ErrAPINotEnabled is returned when an api is not enabled
	ErrAPINotEnabled = wrapError{/* contains filtered or unexported fields */}

	// ErrUnknownProjectID is returned when an api throws 'googleapi: Error 400: Unknown project id: 0, invalid'
	ErrUnknownProjectID = wrapError{/* contains filtered or unexported fields */}

	// ErrProjectNotFound is returned when an api throws 'googleapi: Error 404: The requested project was not found., notFound'
	ErrProjectNotFound = wrapError{/* contains filtered or unexported fields */}

	// ErrEntityNotFound is returned when pubsub topics return html with a 404
	ErrEntityNotFound = wrapError{/* contains filtered or unexported fields */}

	// ErrEntityNotActive is returned when cloud sql instance is not running and its databases cannot be fetched
	ErrEntityNotActive = wrapError{/* contains filtered or unexported fields */}

	// ErrServiceNotFound is returned when an a cloud endpoints service cannot be found
	ErrServiceNotFound = wrapError{/* contains filtered or unexported fields */}
)

Functions

This section is empty.

Types

type Client

type Client interface {
	LoadGKEClusterKubeConfig(ctx context.Context, credential *api.GKECredentials) (kubeContextName string, err error)
	GetGKECluster(ctx context.Context, projectID, location, clusterID string) (cluster *containerv1.Cluster, err error)
	DeployGoogleCloudEndpoints(ctx context.Context, params api.Params) (err error)
}

func NewClient

func NewClient(ctx context.Context) (Client, error)

NewClient returns a new gcp.Client

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) DeployGoogleCloudEndpoints

func (m *MockClient) DeployGoogleCloudEndpoints(ctx context.Context, params api.Params) error

DeployGoogleCloudEndpoints mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) GetGKECluster

func (m *MockClient) GetGKECluster(ctx context.Context, projectID, location, clusterID string) (*container.Cluster, error)

GetGKECluster mocks base method.

func (*MockClient) LoadGKEClusterKubeConfig

func (m *MockClient) LoadGKEClusterKubeConfig(ctx context.Context, credential *api.GKECredentials) (string, error)

LoadGKEClusterKubeConfig mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) DeployGoogleCloudEndpoints

func (mr *MockClientMockRecorder) DeployGoogleCloudEndpoints(ctx, params interface{}) *gomock.Call

DeployGoogleCloudEndpoints indicates an expected call of DeployGoogleCloudEndpoints.

func (*MockClientMockRecorder) GetGKECluster

func (mr *MockClientMockRecorder) GetGKECluster(ctx, projectID, location, clusterID interface{}) *gomock.Call

GetGKECluster indicates an expected call of GetGKECluster.

func (*MockClientMockRecorder) LoadGKEClusterKubeConfig

func (mr *MockClientMockRecorder) LoadGKEClusterKubeConfig(ctx, credential interface{}) *gomock.Call

LoadGKEClusterKubeConfig indicates an expected call of LoadGKEClusterKubeConfig.

Jump to

Keyboard shortcuts

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