Merge pull request #119 from hasLeland/update-genproto
Fix all references to broken google genproto locations
This commit is contained in:
Коммит
a6148a3a52
|
@ -18,9 +18,10 @@ before_install:
|
|||
- export PATH=$HOME/bin/:$PATH
|
||||
|
||||
# golang/protobuf contains protoc-gen-go which generates the .pb.go files
|
||||
- go get -v github.com/golang/protobuf/...
|
||||
#- go get -v github.com/golang/protobuf/... || true
|
||||
- go get -v github.com/golang/protobuf/protoc-gen-go
|
||||
# For http annotation support
|
||||
- go get -v google.golang.org/genproto/...
|
||||
- go get -v github.com/TuneLab/go-genproto/... || true
|
||||
# go-bindata is used to create binary data from template files
|
||||
- go get -v github.com/jteeuwen/go-bindata/...
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -8,12 +8,12 @@ default: truss
|
|||
|
||||
dependencies:
|
||||
go get github.com/go-kit/kit
|
||||
go get google.golang.org/genproto
|
||||
go get github.com/TuneLab/go-genproto
|
||||
go get github.com/golang/protobuf/{proto,protoc-gen-go}
|
||||
|
||||
update-dependencies:
|
||||
go get -u github.com/go-kit/kit
|
||||
go get -u google.golang.org/genproto
|
||||
go get -u github.com/TuneLab/go-genproto
|
||||
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
|
||||
|
||||
# Generate go files containing the all template files in []byte form
|
||||
|
|
|
@ -21,15 +21,15 @@ To install this software, you must:
|
|||
download a release from [github](https://github.com/google/protobuf/releases)
|
||||
and add to `$PATH`.
|
||||
Otherwise [install from source.](https://github.com/google/protobuf)
|
||||
1. Install the `proto` and `protoc-gen-go` packages. (`protoc-gen-go` must be in `$PATH`)
|
||||
1. Install the `protoc-gen-go` package (must be in `$PATH`).
|
||||
|
||||
```
|
||||
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
|
||||
go get -u github.com/golang/protobuf/protoc-gen-go
|
||||
```
|
||||
1. Install HTTP Annotations
|
||||
|
||||
```
|
||||
go get -u google.golang.org/genproto
|
||||
go get -u github.com/TuneLab/go-genproto
|
||||
```
|
||||
1. Install Truss with
|
||||
|
||||
|
|
|
@ -34,8 +34,9 @@ message LouderRequest {
|
|||
}
|
||||
```
|
||||
The RPC calls can be annotated with HTTP transport option (endpoint name and type of request). For this we must import the google annotations library.
|
||||
|
||||
```
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Echo {
|
||||
...
|
||||
|
|
|
@ -8,7 +8,7 @@ syntax = "proto3";
|
|||
// for `package echo;` truss will create the directory "echo-service".
|
||||
package echo;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Echo {
|
||||
// Echo "echos" the incoming string
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Basic {
|
||||
rpc GetBasic (BasicTypeRequest) returns (BasicTypeResponse) {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
import "imported.proto";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
message BasicTypeRequest {
|
||||
double A = 1;
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Repeated {
|
||||
rpc GetRepeated (RepeatedTypeRequest) returns (RepeatedTypeResponse) {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Nested {
|
||||
rpc GetNested (NestedTypeRequest) returns (NestedTypeResponse) {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Map {
|
||||
rpc GetMap (MapTypeRequest) returns (MapTypeResponse) {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package transport;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service TransportPermutations {
|
||||
rpc GetWithQuery (GetWithQueryRequest) returns (GetWithQueryResponse) {
|
||||
|
|
|
@ -28,7 +28,7 @@ func TestNewFromString(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
|
|
@ -31,7 +31,7 @@ func TestNewClientServiceArgs(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
message SumRequest {
|
||||
repeated int64 a = 1;
|
||||
|
|
|
@ -49,7 +49,7 @@ func TestApplyTemplateFromPath(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -141,7 +141,7 @@ func TestAllTemplates(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -171,7 +171,7 @@ func TestAllTemplates(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
|
|
@ -21,7 +21,7 @@ func TestNewData(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
|
|
@ -38,7 +38,7 @@ func TestServerMethsTempl(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -98,7 +98,7 @@ func TestApplyServerTempl(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -190,7 +190,7 @@ func TestIsValidFunc(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -257,7 +257,7 @@ func TestPruneDecls(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
@ -384,7 +384,7 @@ func TestUpdateMethods(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
|
|
@ -28,7 +28,7 @@ func TestNewMethod(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
message SumRequest {
|
||||
int64 a = 1;
|
||||
|
|
|
@ -195,7 +195,7 @@ func generalService() (*svcdef.Svcdef, *gengokit.Data, error) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
// RequestMessage is so foo
|
||||
message RequestMessage {
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -56,7 +56,7 @@ type MapServer interface {
|
|||
protoCode := `
|
||||
syntax = "proto3";
|
||||
package TEST;
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
enum EnumType {
|
||||
A = 0;
|
||||
|
|
|
@ -23,7 +23,7 @@ func basicFromString(t *testing.T) *Svcdef {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
message SumRequest {
|
||||
int64 a = 1;
|
||||
|
@ -158,7 +158,7 @@ func TestNoHTTPBinding(t *testing.T) {
|
|||
// General package
|
||||
package general;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
message SumRequest {
|
||||
int64 a = 1;
|
||||
|
|
|
@ -3,7 +3,7 @@ syntax = "proto3";
|
|||
|
||||
package TEST;
|
||||
|
||||
import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto";
|
||||
|
||||
service Map {
|
||||
rpc GetMap (MapTypeRequest) returns (MapTypeResponse) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче