From 7fa22014a5615a5173d1aba147817289440466e0 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 17 May 2019 10:57:16 +0200 Subject: [PATCH 1/4] spec tags service will close #6 --- protos/services/tags_service.proto | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 protos/services/tags_service.proto diff --git a/protos/services/tags_service.proto b/protos/services/tags_service.proto new file mode 100644 index 0000000..6db0b9b --- /dev/null +++ b/protos/services/tags_service.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package stashall; + +import "google/protobuf/empty.proto"; + +message CreateTagRequest { + string label = 1; + string color = 2; +} + +message CreateTagResponse { + string id = 1; + string label = 2; + string color = 3; +} + +message EditTagRequest { + string id = 1; + string label = 2; + string color = 3; +} + +message DeleteTagRequest { string id = 1; } + +service TagsService { + /// The client must send the Authorization metadata + rpc createTag(CreateTagRequest) returns (CreateTagResponse); + + /// The client must send the Authorization metadata + rpc editTag(EditTagRequest) returns (google.protobuf.Empty); + + /// The client must send the Authorization metadata + rpc deleteTag(DeleteTagRequest) returns (google.protobuf.Empty); +} \ No newline at end of file From bfb2253a4931e904f9bff9d53cabc5938bdc413b Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 17 May 2019 11:05:34 +0200 Subject: [PATCH 2/4] improve tag --- protos/models/tag.proto | 9 +++++++++ protos/services/tags_service.proto | 9 ++------- 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 protos/models/tag.proto diff --git a/protos/models/tag.proto b/protos/models/tag.proto new file mode 100644 index 0000000..576a956 --- /dev/null +++ b/protos/models/tag.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package stashall; + +message Tag { + string id = 1; + string label = 2; + string color = 3; +} \ No newline at end of file diff --git a/protos/services/tags_service.proto b/protos/services/tags_service.proto index 6db0b9b..90d5dbd 100644 --- a/protos/services/tags_service.proto +++ b/protos/services/tags_service.proto @@ -3,18 +3,13 @@ syntax = "proto3"; package stashall; import "google/protobuf/empty.proto"; +import "models/tag.proto"; message CreateTagRequest { string label = 1; string color = 2; } -message CreateTagResponse { - string id = 1; - string label = 2; - string color = 3; -} - message EditTagRequest { string id = 1; string label = 2; @@ -25,7 +20,7 @@ message DeleteTagRequest { string id = 1; } service TagsService { /// The client must send the Authorization metadata - rpc createTag(CreateTagRequest) returns (CreateTagResponse); + rpc createTag(CreateTagRequest) returns (Tag); /// The client must send the Authorization metadata rpc editTag(EditTagRequest) returns (google.protobuf.Empty); From ebe3660e53647f5295cb96c29e25666ee5b19233 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 17 May 2019 11:06:27 +0200 Subject: [PATCH 3/4] improve tag --- protos/services/tags_service.proto | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/protos/services/tags_service.proto b/protos/services/tags_service.proto index 90d5dbd..21fa336 100644 --- a/protos/services/tags_service.proto +++ b/protos/services/tags_service.proto @@ -10,12 +10,6 @@ message CreateTagRequest { string color = 2; } -message EditTagRequest { - string id = 1; - string label = 2; - string color = 3; -} - message DeleteTagRequest { string id = 1; } service TagsService { @@ -23,7 +17,7 @@ service TagsService { rpc createTag(CreateTagRequest) returns (Tag); /// The client must send the Authorization metadata - rpc editTag(EditTagRequest) returns (google.protobuf.Empty); + rpc editTag(Tag) returns (google.protobuf.Empty); /// The client must send the Authorization metadata rpc deleteTag(DeleteTagRequest) returns (google.protobuf.Empty); From 1e7332a926f65e2903daba1727a3eea0c3daf492 Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 18 May 2019 10:06:12 +0200 Subject: [PATCH 4/4] add description --- protos/models/tag.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protos/models/tag.proto b/protos/models/tag.proto index 576a956..576ee29 100644 --- a/protos/models/tag.proto +++ b/protos/models/tag.proto @@ -5,5 +5,6 @@ package stashall; message Tag { string id = 1; string label = 2; - string color = 3; + string description = 3; + string color = 4; } \ No newline at end of file