googleapis / go-genproto Goto Github PK
View Code? Open in Web Editor NEWGenerated code for Google Cloud client libraries.
Home Page: https://pkg.go.dev/google.golang.org/genproto
License: Apache License 2.0
Generated code for Google Cloud client libraries.
Home Page: https://pkg.go.dev/google.golang.org/genproto
License: Apache License 2.0
Go fails by saying unknown error occurred. Do it have something to with protobuf dependencies?
Please resolve.
go get google.golang.org/genproto/...
is failing by Unknown Error Occured.
Go version : 1.8
.
OS : Parrot OS (Unix Kernel 4+).
Using go-cli
.
I am already working on the resolution. If possible, do update me incase I am missing out on something.
https://github.com/golang/protobuf/blob/master/descriptor/descriptor.go imports google.golang.org/genproto/protobuf
which as of b3e7c2f contains no buildable go files (and further, removes expected types).
$ go install github.com/golang/protobuf/descriptor
../../github.com/golang/protobuf/descriptor/descriptor.go:46:2: no buildable Go source files in ${GOPATH}/src/google.golang.org/genproto/protobuf
Should this be filed against github.com/golang/protobuf instead?
Recent regeneration commits have steamrolled over response_body
field required for grpc-ecosystem/grpc-gateway#712.
This seems because the http.proto
not based on the last http.proto
. It was overwritten in 9739b9a.
Formerly-internal-only response_body
has been made public in this sync commit googleapis/googleapis@3544ab1
https://github.com/googleapis/api-common-protos has not been synced for months (since July).
Can someone make sure that 3544ab16c3342d790b00764251e348705991ea4b
makes it into the regenerated file?
https://blog.golang.org/protobuf-apiv2
This repository was generated with the old proto library. What's the recommended way of using the new one?
Hi! I have a transitive dependency on go-genproto
by way of gRPC. I'm bringing my project up-to-date to use Go modules, and I'm finding that it's hard to reason about what version of go-genproto
I'm using because there are no tagged releases.
Go has officially adopted semantic versioning, with tags like v1.2.3
. Would you consider adding such tags for go-genproto
?
I'm not sure what go-genproto does. Say I'm interested in writing a gRPC client application that targets one of google's services, and I don't want to have to download that service's protobuf, and all its imported protobufs, then protoc-gen-go these protobuf files to get generated go code I can import in my app.
Is this what go-genproto does for me?
I go get google.golang.org/genproto/...
. That pulls the go-genproto module. Then what? How do I use that module in my application? Do I need to protoc-gen-go something or is the simple act of go get
go-genproto taking care of this?
In my application, how do I import a given google service, what's the exact import url?
I'm currently using the streaming API from the Google Cloud Speech To Text Golang client library. When I'm trying to Send(*StreamingRecognizeRequest)
, it has got no issue. But when I tried to use the Recv() (*StreamingRecognizeResponse, error)
method from type Speech_StreamingRecognizeClient interface
, it returns the error "rpc error: code = Unavailable desc = The service is currently unavailable."
There are many packages that do not end in the same name as its import path.
For example:
package google_type // import "google.golang.org/genproto/googleapis/type/latlng"
Not sure what to do about ones like appengine/v1
, should they be package appengine
or package v1
?
I am looking at this file: go-genproto/googleapis/cloud/speech/v1/cloud_speech.pb.go
. I am wondering why the Go API client for Speech does not support fields like AudioChannelCount
and EnableSeparateRecognitionPerChannel
in type RecognitionConfig struct
Hi,
I was wondering if someone could point me in the right direction as to how to regenerate protos? I recently updated the Bigtable protos which are now available on googleapis:
googleapis/googleapis@546d3a
But am unsure how to trigger an "update from googleapis" in this repo.
Thanks!
Just pulled the latest master 86e600f and it's no longer building:
$ go build .
# google.golang.org/genproto/googleapis/api/annotations
./annotations.pb.go:40:10: unknown field 'Filename' in struct literal of type proto.ExtensionDesc
This CL has changed the path of google/protobuf/field_mask.proto (and couple more files) in the proto registry to src/google/protobuf/field_mask.proto (which no longer matches its import path in *.proto, import "google/protobuf/field_mask.proto")
Hi,
I couldn't find the details for max-surge and max-unavailable from node pool management
Am I missing something?
We're missing google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas.GenericSignedAttestation
from:
https://github.com/googleapis/go-genproto/blob/master/googleapis/devtools/containeranalysis/v1beta1/attestation/attestation.pb.go
The protobuf appears in: https://github.com/grafeas/grafeas/blob/master/proto/v1beta1/attestation.proto#L91
Could we have that added please? I'm guessing a resync will do it 😄
Hi, I was trying to go get -u github.com/golang/protobuf/protoc-gen-go
and the following error occured:
go: google.golang.org/[email protected]: parsing go.mod: missing module line go get: error loading module requirements
Im not sure what is causing this, but the version seems to indicate that this is a very recent version of genproto.
go: /usr/local/go/bin/go
git: /usr/bin/git
protoc: /usr/bin/protoc
protoc-gen-go: /go/bin/protoc-gen-go
warning: "google.golang.org/genproto/..." matched no packages
cannot find root of google.golang.org/genproto
I clone source code into $GOPATH/srt/github.com/, but got above error.
google.golang.org is an old directory? Need I make a new one?
The Remote Execution API (REAPI) is a gRPC+protobuf protocol that Bazel (but not only) uses to distribute build and test actions across multiple machines. The protos are currently hosted in a separate repo from the core googleapis
: remote-apis
. Would be nice to add it as a proto source to go-genproto
: that would make it easier for Go developers to use that API.
This project doesn't appear to include any copyright information or a NOTICE file. Can you add one? This is desired to comply with the open source license conditions.
Hi!
What are the plans for migrating generation to use the new Go protobuf stack?
Thanks! 😁
Hello~community maintainer:
the comminity has not released a version for a long time, can you release a version?
We need to tie the regeneration of these APIs to fixes needed in cloud.google.com/go pkgs (and perhaps others?).
Whether this is automated or manual.. . We could add a CI step of just go-getting these packages?
This issue triggered by googleapis/google-cloud-go#630 - we recently regenerated and broke go-get for pubsub client.
When I try to compile this, I get the following error:
external/org_golang_google_genproto/googleapis/api/annotations/annotations.pb.go:41: unknown field 'Filename' in struct literal of type proto.ExtensionDesc
I'm using bazel. Building this because it is a dependency of github.com/grpc-ecosystem/grpc-gateway
Hi,
One of my project dependencies depends on your library's master, and now my build is broken with the following error message:
../../vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go:111:28:
undefined: proto.InternalMessageInfo
I'm using dep
.
Please advise.
Many thanks.
When reading a asset from a file or inline after json.Unmarshal the Asset.Resource.Data
is empty even if the JSON is not:
package main
import (
"encoding/json"
"io/ioutil"
"log"
"google.golang.org/genproto/googleapis/cloud/asset/v1"
)
func main() {
file, err := ioutil.ReadFile("asset.json")
if err != nil {
log.Panic(err)
}
var myAsset asset.Asset
err = json.Unmarshal(file, &myAsset)
if err != nil {
log.Panic(err)
}
log.Printf("%v", myAsset.Resource)
}
With asset.json is
{
"name": "//cloudresourcemanager.googleapis.com/projects/123456789012",
"asset_type": "cloudresourcemanager.googleapis.com/Project",
"resource": {
"version": "v1",
"discovery_document_uri": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v1",
"discovery_name": "Project",
"parent": "//cloudresourcemanager.googleapis.com/folders/234567890121",
"data": {
"createTime": "2018-08-08T08:04:36.279Z",
"labels": {
"env": "dev",
"product": "my"
},
"lifecycleState": "ACTIVE",
"name": "my-project",
"parent": {
"id": "234567890121",
"type": "folder"
},
"projectId": "my-project-id",
"projectNumber": "123456789012"
}
},
"ancestors": [
"projects/123456789012",
"folders/234567890121",
"organizations/345678901212"
]
}
$ go run main.go
2020/05/13 11:08:59 version:"v1" discovery_document_uri:"https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v1" discovery_name:"Project" parent:"//cloudresourcemanager.googleapis.com/folders/234567890121" data:<>
data
should contain the information about from the json data block.
Webhook Request messages send by dialogflow (see 'Sample Request to the Service" at https://dialogflow.com/docs/fulfillment) use keys with lower camel case but the json value in the protobuf generated files (see https://github.com/google/go-genproto/blob/master/googleapis/cloud/dialogflow/v2/webhook.pb.go) defines the json field names as underlined words. For example Dialogflow request message sends "queryResult" but in the json definition it is "query_result".
This mismatch causes issues when a RESTful webhook handler tries to decode received JSON message to the WebhookRequest struct.
Hi!
So this is not actually an issue. I was just wondering how it works the whole process of integrating the generated go stubs from googleapis/api-common-protos to this repository.
The thing is that in my company we also have a main common repository which we have some protobuf types. We want to automate our CI to generate the stubs in go
, dart
, c#
, etc. to separate repositores, just like it works in this repo.
I searched into the code and studied for a while to try to understand better what is going on. I see that there is a google bot that creates a PR whenever there is a merge into the protobuf
source repo. Is this something related to the artman tool? Or maybe some ready solution like a github action?
@codyoss could you help?
Can we include the original proto files here as well like it is done for https://github.com/golang/protobuf/tree/master/ptypes?
Hello.
After migrating from github.com/golang/[email protected] to google.golang.org/[email protected], I get an error when trying to make unmarshal google.rpc.Status.
cannot use &s (type *"google.golang.org/genproto/googleapis/rpc/status".Status) as type protoreflect.ProtoMessage in argument to protojson.Unmarshal:
*"google.golang.org/genproto/googleapis/rpc/status".Status does not implement protoreflect.ProtoMessage (missing ProtoReflect method)
Maybe it is worth regenerating structures?
How to use with Google Api Auth?
Not a high priority, but as of right now this is the only github repo we have in the google org :)
I would be great if this repository also contains a compiled version of google/protobuf/compiler/plugin.proto
.
I expect that this repository contains the proto because it is a part of protoc distribution. So it should be common enough to store in this repository.
Currently I am using github.com/golang/protobuf/protoc-gen-go/plugin
as a compiled version of the proto file but unfortunately that go package cannot coexist with google.golang.org/genproto/protobuf
because both have their own instances of descriptor.proto
and they collide with each other at runtime.
This module is currently affected by an issue similar to openzipkin/zipkin-go#114. It can be reproduced with Go 1.12 as follows:
$ export GO111MODULE=on
$ cd $(mktemp -d)
$ go mod init m
go: creating new go.mod: module m
$ go get -u google.golang.org/genproto
...
go: finding github.com/golang/lint latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
...
go get: error loading module requirements
$ echo $?
1
To resolve this for this repository, its go.mod file needs to be updated to include newer versions of dependencies, in order to avoid pulling in older module versions that cause this conflict.
I haven't looked into the exact cause for this repo yet. It might be just a matter of waiting for golang/go#30833 to be resolved. I'll investigate more later.
glide.yml
package: ...
import:
- package: github.com/golang/protobuf
version: ~1.3.0
subpackages:
- protoc-gen-go
- package: github.com/google/protobuf
version: ~3.11.0
- package: google.golang.org/grpc
version: ~1.27.0
- package: github.com/gogo/protobuf
version: ~1.3.0
- package: github.com/mwitkow/go-proto-validators
- package: github.com/grpc-ecosystem/go-grpc-middleware
version: ~1.2.0
makefile
.PHONY: build
build:
go install ./vendor/github.com/golang/protobuf/protoc-gen-go
go install ./vendor/github.com/mwitkow/go-proto-validators/protoc-gen-govalidators
protoc \
--go_out=plugins=grpc:. \
--govalidators_out=. \
--proto_path=. \
--proto_path=./vendor \
--proto_path=./vendor/github.com/google/protobuf/src \
*.proto
Recently, I could not build my protobuf package well. It works fine before.
Terminal shows message below:
vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go:42:11: undefined: "{{PATH_TO_PACKAGE}}/vendor/github.com/golang/protobuf/proto".ProtoPackageIsVersion4
And "ProtoPackageIsVersionX" in proto.go is "ProtoPackageIsVersion3"
Does it means that I must upgrade "github.com/golang/protobuf" to v1.4.0?
It looks like the automated build process for this repo overrides the PROTOBUF
variable in regen.sh
but does not include the /src
suffix.
This results in the RegisterFile calls including src/
and breaks reflection/grpc_cli unless you change all your imports to also include src/
(ex: import "src/google/protobuf/field_mask.proto";
).
Hi,
We are using the logging api and have found that we are unable to attach a request latency to the HttpRequest
proto message that is sent along with a specific log. https://github.com/google/go-genproto/blob/master/googleapis/logging/type/http_request.pb.go#L35
Compared to how AppEngine logs work in the system, it would be great if we could send along the latency of each request that we serve and have it display in the UI. We are already using the metadata to include the latency, but it requires the person to expand out the metadata for every request log that they want to see.
Thanks,
Braden
Please add Go bindings for https://github.com/googleapis/api-common-protos/blob/master/google/api/field_behavior.proto
As per https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/ServerConfig
the container
ServerConfig
resource should contain channels
.
I would like to use the new ResultStore Upload API protos which were recently added.
I realize this repo is labelled as experimental. I have a production use-case for this code. Would it better if I recreated my own version of this repository to integrate this code into a Golang project?
googleapis/googleapis has this
i have been trying out the following snippet.
according to the signature context can be the only argument. somehow it errors out everytime.
pool, _ := x509.SystemCertPool()
creds := credentials.NewClientTLSFromCert(pool, "embeddedassistant.googleapis.com")
perRPC, _ := oauth.NewServiceAccountFromFile("/path/to/credentials.json")
conn, err := grpc.Dial(conf.AssistantEndpoint, grpc.WithTransportCredentials(creds),grpc.WithPerRPCCredentials(perRPC))
if err != nil {
// fatal
fmt.Println(err)
os.Exit(1)
}
Assistant := embedded.NewEmbeddedAssistantClient(conn)
assistStream, err := s.Assistant.Assist(ctx) // ERRORS OUT HERE SAYING NOT ENOUGH ARGUMENT
if err != nil {
fmt.Println(err)
return err
}
thanks.
Hello,
When I try to test the bigquery in the project cloud.google.com/go/bigquery in version 0.16.0 it fails with
/usr/share/gocode/src/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:40: unknown field 'Filename' in struct literal of type proto.ExtensionDesc
FAIL cloud.google.com/go/bigquery [build failed]
I have already install the project "go-genproto" in the commit 891aceb
Thank you for your help
This PR is effectively a breaking change since it is incompatible with the v1.2 protoc toolchain.
Obviously there's nothing you can do about that, but it would be helpful if this repository was tagged with semantic versions so users can more sanely manage dependencies, particularly in light of newer dependency-management tools like dep
and go modules.
There is currently an issue with this library including the following import:_ "google/cloud/recommendationengine/v1beta1"
Blocking generation of this client until issues are resolved so that other clients can re-gen.
When I built my repo, I met unfined error:
elm-edit bjxzi$ go build
# github.com/mstrzele/helm-edit/vendor/google.golang.org/genproto/googleapis/rpc/status
vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go:111: undefined: proto.InternalMessageInfo
https://github.com/google/go-genproto/blob/master/googleapis/rpc/status/status.pb.go#L111
Do we want to put these packages under google.golang.org/genproto
?
/cc @adamtanner
I'm having trouble building, got this error:
package google.golang.org/genproto/googleapis/type: no buildable Go source files in /go/src/google.golang.org/genproto/googleapis/type
Anyone has the same problem?
I’m upgrading an older project of mine to a newer version of google.golang.org/genproto
and noticed that a number of new dependencies are coming in via the honnef.co/go/tools
edge:
% go list -m all | wc -l
46
% go get -u honnef.co/go/tools
go: honnef.co/go/tools upgrade => v0.0.1-2020.1.3
% go list -m all | wc -l
53
The only reason why Go module honnef.co/go/tools
is in my dependency closure at all is because genproto’s go.mod pulls it in, which is because tools.go pulls it in:
Line 30 in 1f37eeb
I appreciate what tools.go is trying to do, and versioning the tools used in your CI pipeline is a good idea.
Ideally this could be done without burdening users of genproto with these module dependencies, though.
cc @bcmills in case he has any tips for how to change this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.