mockresourcemanager

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockService

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

MockService represents a mocked privateca 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) GetProjectStore

func (s *MockService) GetProjectStore() projects.ProjectStore

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 ProjectsInternal

type ProjectsInternal struct {
	*MockService
}

func (*ProjectsInternal) GetProject

func (s *ProjectsInternal) GetProject(project *projects.ProjectName) (*projects.ProjectData, error)

GetProject returns the project for the parsed ProjectName.

func (*ProjectsInternal) GetProjectByID

func (s *ProjectsInternal) GetProjectByID(projectID string) (*projects.ProjectData, error)

GetProjectByID returns the project with the specified project id, or an error if not found.

func (*ProjectsInternal) GetProjectByNumber

func (s *ProjectsInternal) GetProjectByNumber(projectNumberAsString string) (*projects.ProjectData, error)

GetProjectByNumber returns the project with the specified project number, or an error if not found. Note that the project number must still be passed as a string, to keep terraform happy.

type ProjectsV1

type ProjectsV1 struct {
	*MockService
	pb.UnimplementedProjectsServer
}

func (*ProjectsV1) CreateProject

Request that a new project be created.

func (*ProjectsV1) DeleteProject

Request that a new project be created.

func (*ProjectsV1) GetProject

func (s *ProjectsV1) GetProject(ctx context.Context, req *pb.GetProjectRequest) (*pb.Project, error)

Retrieves the project identified by the specified `name` (for example, `projects/415104041262`).

func (*ProjectsV1) UpdateProject

func (s *ProjectsV1) UpdateProject(ctx context.Context, req *pb.UpdateProjectRequest) (*pb.Project, error)

Updates a project. Only the V3 `display_name` and `labels` fields can be change.

type ProjectsV3

type ProjectsV3 struct {
	*MockService
	pb.UnimplementedProjectsServer
}

func (*ProjectsV3) CreateProject

func (*ProjectsV3) DeleteProject

func (*ProjectsV3) GetProject

func (s *ProjectsV3) GetProject(ctx context.Context, req *pb.GetProjectRequest) (*pb.Project, error)

func (*ProjectsV3) UpdateProject

type TagKeys

type TagKeys struct {
	*MockService
	pb.UnimplementedTagKeysServer
}

func (*TagKeys) CreateTagKey

func (s *TagKeys) CreateTagKey(ctx context.Context, req *pb.CreateTagKeyRequest) (*longrunningpb.Operation, error)

func (*TagKeys) DeleteTagKey

func (s *TagKeys) DeleteTagKey(ctx context.Context, req *pb.DeleteTagKeyRequest) (*longrunningpb.Operation, error)

func (*TagKeys) GetTagKey

func (s *TagKeys) GetTagKey(ctx context.Context, req *pb.GetTagKeyRequest) (*pb.TagKey, error)

func (*TagKeys) UpdateTagKey

func (s *TagKeys) UpdateTagKey(ctx context.Context, req *pb.UpdateTagKeyRequest) (*longrunningpb.Operation, error)

type TagValues

type TagValues struct {
	*MockService
	pb.UnimplementedTagValuesServer
}

func (*TagValues) CreateTagValue

func (s *TagValues) CreateTagValue(ctx context.Context, req *pb.CreateTagValueRequest) (*longrunningpb.Operation, error)

func (*TagValues) DeleteTagValue

func (s *TagValues) DeleteTagValue(ctx context.Context, req *pb.DeleteTagValueRequest) (*longrunningpb.Operation, error)

func (*TagValues) GetTagValue

func (s *TagValues) GetTagValue(ctx context.Context, req *pb.GetTagValueRequest) (*pb.TagValue, error)

func (*TagValues) UpdateTagValue

func (s *TagValues) UpdateTagValue(ctx context.Context, req *pb.UpdateTagValueRequest) (*longrunningpb.Operation, error)

Jump to

Keyboard shortcuts

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