Update dependenciess

Exclude minio-go for now (pin to 3.x.y).
This commit is contained in:
Alexander Neumann
2017-12-03 21:01:25 +01:00
parent 9d0f13c4c0
commit 946c8399e2
2985 changed files with 1008107 additions and 118934 deletions

View File

@@ -14,9 +14,11 @@
// AUTO-GENERATED CODE. DO NOT EDIT.
// Package videointelligence is an experimental, auto-generated package for the
// Package videointelligence is an auto-generated package for the
// Google Cloud Video Intelligence API.
//
// NOTE: This package is in alpha. It is not stable, and is likely to be subject to changes.
//
// Google Cloud Video Intelligence API.
package videointelligence // import "cloud.google.com/go/videointelligence/apiv1beta1"
@@ -25,11 +27,15 @@ import (
"google.golang.org/grpc/metadata"
)
func insertXGoog(ctx context.Context, val []string) context.Context {
md, _ := metadata.FromOutgoingContext(ctx)
md = md.Copy()
md["x-goog-api-client"] = val
return metadata.NewOutgoingContext(ctx, md)
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
for _, md := range mds {
for k, v := range md {
out[k] = append(out[k], v...)
}
}
return metadata.NewOutgoingContext(ctx, out)
}
// DefaultAuthScopes reports the default set of authentication scopes to use with this package.

View File

@@ -118,8 +118,9 @@ func TestVideoIntelligenceServiceAnnotateVideo(t *testing.T) {
Result: &longrunningpb.Operation_Response{Response: any},
})
var inputUri string = "inputUri1707300727"
var features []videointelligencepb.Feature = nil
var inputUri string = "gs://demomaker/cat.mp4"
var featuresElement videointelligencepb.Feature = videointelligencepb.Feature_LABEL_DETECTION
var features = []videointelligencepb.Feature{featuresElement}
var request = &videointelligencepb.AnnotateVideoRequest{
InputUri: inputUri,
Features: features,
@@ -163,8 +164,9 @@ func TestVideoIntelligenceServiceAnnotateVideoError(t *testing.T) {
},
})
var inputUri string = "inputUri1707300727"
var features []videointelligencepb.Feature = nil
var inputUri string = "gs://demomaker/cat.mp4"
var featuresElement videointelligencepb.Feature = videointelligencepb.Feature_LABEL_DETECTION
var features = []videointelligencepb.Feature{featuresElement}
var request = &videointelligencepb.AnnotateVideoRequest{
InputUri: inputUri,
Features: features,

View File

@@ -30,6 +30,7 @@ import (
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
// CallOptions contains the retry settings for each method of Client.
@@ -81,7 +82,7 @@ type Client struct {
CallOptions *CallOptions
// The metadata to be sent with each request.
xGoogHeader []string
Metadata metadata.MD
}
// NewClient creates a new video intelligence service client.
@@ -130,7 +131,7 @@ func (c *Client) Close() error {
func (c *Client) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", version.Go()}, keyval...)
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
c.xGoogHeader = []string{gax.XGoogHeader(kv...)}
c.Metadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
}
// AnnotateVideo performs asynchronous video annotation. Progress and results can be
@@ -138,7 +139,7 @@ func (c *Client) setGoogleClientInfo(keyval ...string) {
// Operation.metadata contains AnnotateVideoProgress (progress).
// Operation.response contains AnnotateVideoResponse (results).
func (c *Client) AnnotateVideo(ctx context.Context, req *videointelligencepb.AnnotateVideoRequest, opts ...gax.CallOption) (*AnnotateVideoOperation, error) {
ctx = insertXGoog(ctx, c.xGoogHeader)
ctx = insertMetadata(ctx, c.Metadata)
opts = append(c.CallOptions.AnnotateVideo[0:len(c.CallOptions.AnnotateVideo):len(c.CallOptions.AnnotateVideo)], opts...)
var resp *longrunningpb.Operation
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {