Documentation
¶
Index ¶
- type Folders
- func (s *Folders) CreateFolder(ctx context.Context, req *pb.CreateFolderRequest) (*longrunningpb.Operation, error)
- func (s *Folders) DeleteFolder(ctx context.Context, req *pb.DeleteFolderRequest) (*longrunningpb.Operation, error)
- func (s *Folders) GetFolder(ctx context.Context, req *pb.GetFolderRequest) (*pb.Folder, error)
- func (s *Folders) MoveFolder(ctx context.Context, req *pb.MoveFolderRequest) (*longrunningpb.Operation, error)
- func (s *Folders) SearchFolders(ctx context.Context, req *pb.SearchFoldersRequest) (*pb.SearchFoldersResponse, error)
- func (s *Folders) UpdateFolder(ctx context.Context, req *pb.UpdateFolderRequest) (*longrunningpb.Operation, error)
- type MockService
- type ProjectsInternal
- func (s *ProjectsInternal) GetProject(project *projects.ProjectName) (*projects.ProjectData, error)
- func (s *ProjectsInternal) GetProjectByID(projectID string) (*projects.ProjectData, error)
- func (s *ProjectsInternal) GetProjectByIDOrNumber(projectIDOrNumber string) (*projects.ProjectData, error)
- func (s *ProjectsInternal) GetProjectByNumber(projectNumberAsString string) (*projects.ProjectData, error)
- type ProjectsV1
- func (s *ProjectsV1) CreateProject(ctx context.Context, req *pb.CreateProjectRequest) (*longrunningpb.Operation, error)
- func (s *ProjectsV1) DeleteProject(ctx context.Context, req *pb.DeleteProjectRequest) (*longrunningpb.Operation, error)
- func (s *ProjectsV1) GetProject(ctx context.Context, req *pb.GetProjectRequest) (*pb.Project, error)
- func (s *ProjectsV1) UpdateProject(ctx context.Context, req *pb.UpdateProjectRequest) (*pb.Project, error)
- type ProjectsV3
- func (s *ProjectsV3) CreateProject(ctx context.Context, req *pb.CreateProjectRequest) (*longrunningpb.Operation, error)
- func (s *ProjectsV3) DeleteProject(ctx context.Context, req *pb.DeleteProjectRequest) (*longrunningpb.Operation, error)
- func (s *ProjectsV3) GetProject(ctx context.Context, req *pb.GetProjectRequest) (*pb.Project, error)
- func (s *ProjectsV3) UpdateProject(ctx context.Context, req *pb.UpdateProjectRequest) (*longrunningpb.Operation, error)
- type TagKeys
- func (s *TagKeys) CreateTagKey(ctx context.Context, req *pb.CreateTagKeyRequest) (*longrunningpb.Operation, error)
- func (s *TagKeys) DeleteTagKey(ctx context.Context, req *pb.DeleteTagKeyRequest) (*longrunningpb.Operation, error)
- func (s *TagKeys) GetTagKey(ctx context.Context, req *pb.GetTagKeyRequest) (*pb.TagKey, error)
- func (s *TagKeys) UpdateTagKey(ctx context.Context, req *pb.UpdateTagKeyRequest) (*longrunningpb.Operation, error)
- type TagValues
- func (s *TagValues) CreateTagValue(ctx context.Context, req *pb.CreateTagValueRequest) (*longrunningpb.Operation, error)
- func (s *TagValues) DeleteTagValue(ctx context.Context, req *pb.DeleteTagValueRequest) (*longrunningpb.Operation, error)
- func (s *TagValues) GetTagValue(ctx context.Context, req *pb.GetTagValueRequest) (*pb.TagValue, error)
- func (s *TagValues) UpdateTagValue(ctx context.Context, req *pb.UpdateTagValueRequest) (*longrunningpb.Operation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Folders ¶
type Folders struct { *MockService pb.UnimplementedFoldersServer }
func (*Folders) CreateFolder ¶
func (s *Folders) CreateFolder(ctx context.Context, req *pb.CreateFolderRequest) (*longrunningpb.Operation, error)
func (*Folders) DeleteFolder ¶
func (s *Folders) DeleteFolder(ctx context.Context, req *pb.DeleteFolderRequest) (*longrunningpb.Operation, error)
func (*Folders) MoveFolder ¶
func (s *Folders) MoveFolder(ctx context.Context, req *pb.MoveFolderRequest) (*longrunningpb.Operation, error)
func (*Folders) SearchFolders ¶
func (s *Folders) SearchFolders(ctx context.Context, req *pb.SearchFoldersRequest) (*pb.SearchFoldersResponse, error)
func (*Folders) UpdateFolder ¶
func (s *Folders) UpdateFolder(ctx context.Context, req *pb.UpdateFolderRequest) (*longrunningpb.Operation, error)
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) ExpectedHosts ¶
func (s *MockService) ExpectedHosts() []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) GetProjectByIDOrNumber ¶
func (s *ProjectsInternal) GetProjectByIDOrNumber(projectIDOrNumber string) (*projects.ProjectData, error)
GetProjectByIDOrNumber returns the project for the provided id or number.
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 ¶
func (s *ProjectsV1) CreateProject(ctx context.Context, req *pb.CreateProjectRequest) (*longrunningpb.Operation, error)
Request that a new project be created.
func (*ProjectsV1) DeleteProject ¶
func (s *ProjectsV1) DeleteProject(ctx context.Context, req *pb.DeleteProjectRequest) (*longrunningpb.Operation, error)
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 (s *ProjectsV3) CreateProject(ctx context.Context, req *pb.CreateProjectRequest) (*longrunningpb.Operation, error)
func (*ProjectsV3) DeleteProject ¶
func (s *ProjectsV3) DeleteProject(ctx context.Context, req *pb.DeleteProjectRequest) (*longrunningpb.Operation, error)
func (*ProjectsV3) GetProject ¶
func (s *ProjectsV3) GetProject(ctx context.Context, req *pb.GetProjectRequest) (*pb.Project, error)
func (*ProjectsV3) UpdateProject ¶
func (s *ProjectsV3) UpdateProject(ctx context.Context, req *pb.UpdateProjectRequest) (*longrunningpb.Operation, error)
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) 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 (*TagValues) UpdateTagValue ¶
func (s *TagValues) UpdateTagValue(ctx context.Context, req *pb.UpdateTagValueRequest) (*longrunningpb.Operation, error)