encoding/protobuf: don't map google.protobuf types
(at least not yet)
Issue #5
Change-Id: If8430cf8ec9bb376bcf0c69ec385f1f0d066c4e6
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2374
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/protobuf/testdata/client_config.proto.out.cue b/encoding/protobuf/testdata/client_config.proto.out.cue
index 66ec87a..fc7f747 100644
--- a/encoding/protobuf/testdata/client_config.proto.out.cue
+++ b/encoding/protobuf/testdata/client_config.proto.out.cue
@@ -21,8 +21,8 @@
package client
import (
+ "github.com/golang/protobuf/ptypes/duration"
"istio.io/api/mixer/v1"
- "time"
)
// Specifies the behavior when the client is unable to connect to Mixer.
@@ -36,10 +36,10 @@
// Base time to wait between retries. Will be adjusted by exponential
// backoff and jitter.
- baseRetryWait?: time.Duration @protobuf(3,type=google.protobuf.Duration,name=base_retry_wait)
+ baseRetryWait?: duration.Duration @protobuf(3,type=google.protobuf.Duration,name=base_retry_wait)
// Max time to wait between retries.
- maxRetryWait?: time.Duration @protobuf(4,type=google.protobuf.Duration,name=max_retry_wait)
+ maxRetryWait?: duration.Duration @protobuf(4,type=google.protobuf.Duration,name=max_retry_wait)
}
// Example of single-value enum.
@@ -108,7 +108,7 @@
// Specify refresh interval to write Mixer client statistics to Envoy share
// memory. If not specified, the interval is 10 seconds.
- statsUpdateInterval?: time.Duration @protobuf(5,type=google.protobuf.Duration,name=stats_update_interval)
+ statsUpdateInterval?: duration.Duration @protobuf(5,type=google.protobuf.Duration,name=stats_update_interval)
// Name of the cluster that will forward check calls to a pool of mixer
// servers. Defaults to "mixer_server". By using different names for
@@ -183,5 +183,5 @@
// Specify report interval to send periodical reports for long TCP
// connections. If not specified, the interval is 10 seconds. This interval
// should not be less than 1 second, otherwise it will be reset to 1 second.
- reportInterval?: time.Duration @protobuf(6,type=google.protobuf.Duration,name=report_interval)
+ reportInterval?: duration.Duration @protobuf(6,type=google.protobuf.Duration,name=report_interval)
}