gcp

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 15 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 */}
)

Functions

This section is empty.

Types

type Client

type Client interface {
	GetProjectByLabels(ctx context.Context, filters []string) (projects []*crmv1.Project, err error)
	GetProjectNetworks(ctx context.Context, projects []*crmv1.Project) (networks []*computev1.Network, err error)
	GetProjectSubnetworks(ctx context.Context, projects []*crmv1.Project) (subnetworks []*computev1.Subnetwork, err error)
	GetProjectRoutes(ctx context.Context, projects []*crmv1.Project) (routes []*computev1.Route, err error)
}

func NewClient

func NewClient(ctx context.Context, concurrency int) (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) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) GetProjectByLabels

func (m *MockClient) GetProjectByLabels(ctx context.Context, filters []string) ([]*cloudresourcemanager.Project, error)

GetProjectByLabels mocks base method

func (*MockClient) GetProjectNetworks

func (m *MockClient) GetProjectNetworks(ctx context.Context, projects []*cloudresourcemanager.Project) ([]*compute.Network, error)

GetProjectNetworks mocks base method

func (*MockClient) GetProjectRoutes added in v0.1.2

func (m *MockClient) GetProjectRoutes(ctx context.Context, projects []*cloudresourcemanager.Project) ([]*compute.Route, error)

GetProjectRoutes mocks base method

func (*MockClient) GetProjectSubnetworks

func (m *MockClient) GetProjectSubnetworks(ctx context.Context, projects []*cloudresourcemanager.Project) ([]*compute.Subnetwork, error)

GetProjectSubnetworks mocks base method

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) GetProjectByLabels

func (mr *MockClientMockRecorder) GetProjectByLabels(ctx, filters interface{}) *gomock.Call

GetProjectByLabels indicates an expected call of GetProjectByLabels

func (*MockClientMockRecorder) GetProjectNetworks

func (mr *MockClientMockRecorder) GetProjectNetworks(ctx, projects interface{}) *gomock.Call

GetProjectNetworks indicates an expected call of GetProjectNetworks

func (*MockClientMockRecorder) GetProjectRoutes added in v0.1.2

func (mr *MockClientMockRecorder) GetProjectRoutes(ctx, projects interface{}) *gomock.Call

GetProjectRoutes indicates an expected call of GetProjectRoutes

func (*MockClientMockRecorder) GetProjectSubnetworks

func (mr *MockClientMockRecorder) GetProjectSubnetworks(ctx, projects interface{}) *gomock.Call

GetProjectSubnetworks indicates an expected call of GetProjectSubnetworks

Jump to

Keyboard shortcuts

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