mirror of
https://github.com/restic/restic.git
synced 2025-08-24 16:07:28 +00:00
Update dependenciess
Exclude minio-go for now (pin to 3.x.y).
This commit is contained in:
15
vendor/cloud.google.com/go/vision/apiv1/doc.go
generated
vendored
15
vendor/cloud.google.com/go/vision/apiv1/doc.go
generated
vendored
@@ -16,6 +16,7 @@
|
||||
|
||||
// Package vision is an auto-generated package for the
|
||||
// Google Cloud Vision API.
|
||||
|
||||
//
|
||||
// Integrates Google Vision features, including image labeling, face, logo,
|
||||
// and landmark detection, optical character recognition (OCR), and detection
|
||||
@@ -27,11 +28,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.
|
||||
|
7
vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go
generated
vendored
7
vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go
generated
vendored
@@ -27,6 +27,7 @@ import (
|
||||
visionpb "google.golang.org/genproto/googleapis/cloud/vision/v1"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
// ImageAnnotatorCallOptions contains the retry settings for each method of ImageAnnotatorClient.
|
||||
@@ -73,7 +74,7 @@ type ImageAnnotatorClient struct {
|
||||
CallOptions *ImageAnnotatorCallOptions
|
||||
|
||||
// The metadata to be sent with each request.
|
||||
xGoogHeader []string
|
||||
Metadata metadata.MD
|
||||
}
|
||||
|
||||
// NewImageAnnotatorClient creates a new image annotator client.
|
||||
@@ -113,12 +114,12 @@ func (c *ImageAnnotatorClient) Close() error {
|
||||
func (c *ImageAnnotatorClient) 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...))
|
||||
}
|
||||
|
||||
// BatchAnnotateImages run image detection and annotation for a batch of images.
|
||||
func (c *ImageAnnotatorClient) BatchAnnotateImages(ctx context.Context, req *visionpb.BatchAnnotateImagesRequest, opts ...gax.CallOption) (*visionpb.BatchAnnotateImagesResponse, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
ctx = insertMetadata(ctx, c.Metadata)
|
||||
opts = append(c.CallOptions.BatchAnnotateImages[0:len(c.CallOptions.BatchAnnotateImages):len(c.CallOptions.BatchAnnotateImages)], opts...)
|
||||
var resp *visionpb.BatchAnnotateImagesResponse
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
|
Reference in New Issue
Block a user