Debian Codegraph @

v2/apierror/internal/proto/README.md

raw
1 # HTTP JSON Error Schema
2
3 The `error.proto` represents the HTTP-JSON schema used by Google APIs to convey
4 error payloads as described by https://cloud.google.com/apis/design/errors#http_mapping.
5 This package is for internal parsing logic only and should not be used in any
6 other context.
7
8 ## Regeneration
9
10 To regenerate the protobuf Go code you will need the following:
11
12 * A local copy of [googleapis], the absolute path to which should be exported to
13 the environment variable `GOOGLEAPIS`
14 * The protobuf compiler [protoc]
15 * The Go [protobuf plugin]
16 * The [goimports] tool
17
18 From this directory run the following command:
19 ```sh
20 protoc -I $GOOGLEAPIS -I. --go_out=. --go_opt=module=github.com/googleapis/gax-go/v2/apierror/internal/proto error.proto
21 goimports -w .
22 ```
23
24 Note: the `module` plugin option ensures the generated code is placed in this
25 directory, and not in several nested directories defined by `go_package` option.
26
27 [googleapis]: https://github.com/googleapis/googleapis
28 [protoc]: https://github.com/protocolbuffers/protobuf#protocol-compiler-installation
29 [protobuf plugin]: https://developers.google.com/protocol-buffers/docs/reference/go-generated
30 [goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports