diff --git a/Makefile b/Makefile index 3fbf645..b1dec72 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,7 @@ debug: generate: @go generate ./... - -protoc: - @protoc --proto_path $(DIR)api/ --go_out=plugins=grpc:internal/grpc --go_opt=paths=source_relative $(shell find $(DIR)api/ -type f -name "*.proto") + @protoc --proto_path $(DIR)api/ --go_out=plugins=grpc:internal/rpc --go_opt=paths=source_relative $(shell find $(DIR)api/ -type f -name "*.proto") snapshot-release: @goreleaser release --snapshot --skip-publish --rm-dist diff --git a/api/endpoints.proto b/api/endpoints.proto new file mode 100644 index 0000000..2f76706 --- /dev/null +++ b/api/endpoints.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +option go_package = "github.com/baez90/inetmock/internal/rpc"; +option java_multiple_files = true; +option java_package = "com.github.baez90.inetmock.rpc"; +option java_outer_classname = "EndpointsProto"; + +package inetmock; + +service Endpoints { + rpc GetEndpoints (GetEndpointsRequest) returns (GetEndpointsResponse) { + } +} + +message GetEndpointsRequest { +} + +message GetEndpointsResponse { + repeated Endpoint endpoints = 1; +} + +message Endpoint { + string id = 1; + string name = 2; + string handler = 3; + string listenAddress = 4; + int32 port = 5; +} \ No newline at end of file diff --git a/api/handlers.proto b/api/handlers.proto new file mode 100644 index 0000000..121a9e4 --- /dev/null +++ b/api/handlers.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option go_package = "github.com/baez90/inetmock/internal/rpc"; +option java_multiple_files = true; +option java_package = "com.github.baez90.inetmock.rpc"; +option java_outer_classname = "HandlersProto"; + +package inetmock; + +service Handlers { + rpc GetHandlers(GetHandlersRequest) returns (GetHandlersResponse) {} +} + +message GetHandlersRequest { +} + +message GetHandlersResponse { + repeated string handlers = 1; +} \ No newline at end of file