Skip to content

Commit

Permalink
Merge pull request #98 from weaveworks/create_plan
Browse files Browse the repository at this point in the history
feat: initial implementation of microvm create
  • Loading branch information
richardcase authored Oct 7, 2021
2 parents e89b9f6 + 5ae8cad commit 28f2a5b
Show file tree
Hide file tree
Showing 84 changed files with 4,208 additions and 1,149 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ linters-settings:
go: "1.16"
stylecheck:
go: "1.16"
cyclop:
max-complexity: 12
skip-tests: true

linters:
enable-all: true
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ PROTOC_GEN_GO := $(TOOLS_BIN_DIR)/protoc-gen-go
PROTOC_GEN_GO_GRPC := $(TOOLS_BIN_DIR)/protoc-gen-go-grpc
PROTO_GEN_GRPC_GW := $(TOOLS_BIN_DIR)/protoc-gen-grpc-gateway
PROTO_GEN_GRPC_OAPI := $(TOOLS_BIN_DIR)/protoc-gen-openapiv2
WIRE := $(TOOLS_BIN_DIR)/wire

.DEFAULT_GOAL := help

Expand All @@ -57,6 +58,7 @@ generate: $(BUF) $(MOCKGEN) ## Generate code
generate: ## Generate code
$(MAKE) generate-go
$(MAKE) generate-proto
$(MAKE) generate-di

.PHONY: generate-go
generate-go: $(MOCKGEN) ## Generate Go Code
Expand All @@ -65,7 +67,11 @@ generate-go: $(MOCKGEN) ## Generate Go Code
.PHONY: generate-proto ## Generate protobuf/grpc code
generate-proto: $(BUF) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) $(PROTO_GEN_GRPC_GW) $(PROTO_GEN_GRPC_OAPI)
$(BUF) generate


.PHONY: generate-di ## Generate the dependency injection code
generate-di: $(WIRE)
$(WIRE) gen github.com/weaveworks/reignite/internal/inject

##@ Linting

.PHONY: lint
Expand Down Expand Up @@ -114,6 +120,9 @@ $(PROTO_GEN_GRPC_GW): $(TOOLS_DIR)/go.mod
$(PROTO_GEN_GRPC_OAPI): $(TOOLS_DIR)/go.mod
cd $(TOOLS_DIR); go build -tags=tools -o $(subst hack/tools/,,$@) github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2

$(WIRE): $(TOOLS_DIR)/go.mod
cd $(TOOLS_DIR); go build -tags=tools -o $(subst hack/tools/,,$@) github.com/google/wire/cmd/wire

BUF_TARGET := buf-Linux-x86_64.tar.gz

ifeq ($(OS), darwin)
Expand Down
44 changes: 24 additions & 20 deletions api/services/microvm/v1alpha1/microvms.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 9 additions & 35 deletions api/services/microvm/v1alpha1/microvms.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions api/services/microvm/v1alpha1/microvms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ option go_package = "github.com/weaveworks/reignite/api/services/microvm/v1alpha

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Reignite MicroVM API",
version: "0.1";
description: "The Reignite MicroVM API handles operations for provisioning and managing microvms";
};
consumes: "application/json";
produces: "application/json";
title: "Reignite MicroVM API"
version: "0.1"
description: "The Reignite MicroVM API handles operations for provisioning and managing microvms"
}
consumes: "application/json"
produces: "application/json"
};

// MicroVM providers a service to create and manage the lifecycle of microvms.
Expand Down
Loading

0 comments on commit 28f2a5b

Please sign in to comment.