Skip to content

Commit

Permalink
feat: add delete function
Browse files Browse the repository at this point in the history
adding delete method for standard resource types.
  • Loading branch information
toumorokoshi committed Sep 27, 2023
1 parent ce27cb9 commit 84b7380
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1,783 deletions.
6 changes: 4 additions & 2 deletions examples/bookstore.yaml.output.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

import "google/api/annotations.proto";

import "google/protobuf/empty.proto";

option go_package = "/bookstore";

message Book {
Expand Down Expand Up @@ -49,7 +51,7 @@ service Bookstore {
option (google.api.http) = { get: "/{path=publisher/*/book/*}" };
}

rpc DeleteBook ( DeleteBookRequest ) returns ( DeleteBookRequest ) {
rpc DeleteBook ( DeleteBookRequest ) returns ( google.protobuf.Empty ) {
option (google.api.http) = { delete: "/{path=publisher/*/book/*}" };
}

Expand All @@ -61,7 +63,7 @@ service Bookstore {
option (google.api.http) = { get: "/{path=publisher/*}" };
}

rpc DeletePublisher ( DeletePublisherRequest ) returns ( DeletePublisherRequest ) {
rpc DeletePublisher ( DeletePublisherRequest ) returns ( google.protobuf.Empty ) {
option (google.api.http) = { delete: "/{path=publisher/*}" };
}
}
18 changes: 13 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ module github.com/aep-dev/aepc
go 1.20

require (
github.com/golang/glog v1.1.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1
github.com/jhump/protoreflect v1.15.2
github.com/spf13/cobra v1.7.0
google.golang.org/api v0.139.0
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.57.0
google.golang.org/protobuf v1.31.0
)

require gopkg.in/yaml.v2 v2.4.0 // indirect
require (
github.com/bufbuild/protocompile v0.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sync v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

require (
github.com/ghodss/yaml v1.0.0
Expand Down
Loading

0 comments on commit 84b7380

Please sign in to comment.