diff --git a/Gopkg.lock b/Gopkg.lock index 7a417a8..f6de3d2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,7 +2,7 @@ [[projects]] - digest = "1:7d4ae02f02b59fc967428e108406234c1ae9bb901aa163bb99d4c4b3e2a3c561" + digest = "1:a325ce61868a1a85c2d8ce43bf4d00734d6419ae85853338c2b5951c11bcc594" name = "cloud.google.com/go" packages = [ "compute/metadata", @@ -13,9 +13,6 @@ "internal/optional", "internal/trace", "internal/version", - "logging", - "logging/apiv2", - "logging/internal", "storage", ] pruneopts = "UT" @@ -23,7 +20,7 @@ version = "v0.38.0" [[projects]] - digest = "1:1d3ad0f6a57c08e2168089a64c34313930571fcbe5359d71c608a97ce504f7ca" + digest = "1:499b09c6fecbec76e839ef9acf07af100219048ed22b3ca7d78948ae2767e781" name = "github.com/golang/protobuf" packages = [ "proto", @@ -31,7 +28,6 @@ "ptypes", "ptypes/any", "ptypes/duration", - "ptypes/empty", "ptypes/struct", "ptypes/timestamp", "ptypes/wrappers", @@ -153,12 +149,9 @@ [[projects]] branch = "master" - digest = "1:a2fc247e64b5dafd3251f12d396ec85f163d5bb38763c4997856addddf6e78d8" + digest = "1:b521f10a2d8fa85c04a8ef4e62f2d1e14d303599a55d64dabf9f5a02f84d35eb" name = "golang.org/x/sync" - packages = [ - "errgroup", - "semaphore", - ] + packages = ["errgroup"] pruneopts = "UT" revision = "112230192c580c3556b8cee6403af37a4fc5f28c" @@ -196,7 +189,7 @@ version = "v0.3.2" [[projects]] - digest = "1:994730ad32f9717bf35dccdf1c1619e0a1374439cc990bff8d588c6a68348049" + digest = "1:5547ddc83919a19761cd976ed633ac3fd20e53341150140ba085d4569c8cbcdc" name = "google.golang.org/api" packages = [ "cloudbuild/v1", @@ -208,7 +201,6 @@ "iterator", "option", "storage/v1", - "support/bundler", "transport", "transport/grpc", "transport/http", @@ -241,23 +233,15 @@ [[projects]] branch = "master" - digest = "1:f24be77fdd5624b07d22093335e50834602f49eca8b7247847ff4f2b7e411726" + digest = "1:8507e4270c1e2fc10a8536a1ca832529b070307ce2b3aa1c82b285f205793871" name = "google.golang.org/genproto" packages = [ - "googleapis/api", "googleapis/api/annotations", - "googleapis/api/distribution", - "googleapis/api/label", - "googleapis/api/metric", - "googleapis/api/monitoredres", "googleapis/datastore/v1", "googleapis/iam/v1", - "googleapis/logging/type", - "googleapis/logging/v2", "googleapis/rpc/code", "googleapis/rpc/status", "googleapis/type/latlng", - "protobuf/field_mask", ] pruneopts = "UT" revision = "54afdca5d873f7b529e2ce3def1a99df16feda90" @@ -310,7 +294,6 @@ input-imports = [ "cloud.google.com/go/compute/metadata", "cloud.google.com/go/datastore", - "cloud.google.com/go/logging", "cloud.google.com/go/storage", "github.com/google/go-containerregistry/pkg/authn", "github.com/google/go-containerregistry/pkg/name", @@ -320,9 +303,10 @@ "github.com/google/go-containerregistry/pkg/v1/types", "github.com/google/ko/pkg/build", "github.com/google/uuid", - "golang.org/x/oauth2/google", + "golang.org/x/oauth2", "google.golang.org/api/cloudbuild/v1", "google.golang.org/api/googleapi", + "google.golang.org/api/option", ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/api/README.md b/cmd/api/README.md index 2092a43..ca57afd 100644 --- a/cmd/api/README.md +++ b/cmd/api/README.md @@ -33,7 +33,8 @@ more). Uploading tarball of [.] to [gs://my-project_cloudbuild/source/1557981306.47-9ee5987ef42e4dc988d7dcd4a4dc0bdc.tgz] Created [https://api-an3qnndwmq-uc.a.run.app/v1/projects/my-project/builds/a33da1cc-8e3c-4579-92cd-d7bab749ba22]. -Logs are available in the Cloud Console. + +... snip ... ID CREATE_TIME DURATION SOURCE IMAGES STATUS a33da1cc-8e3c-4579-92cd-d7bab749ba22 2019-05-16T04:35:07+00:00 1M6S gs://my-project_cloudbuild/source/1557981306.47-9ee5987ef42e4dc988d7dcd4a4dc0bdc.tgz gcr.io/my-project/built SUCCESS ``` @@ -65,13 +66,21 @@ statusDetail: '' ## Known differences / NYEs -- [ ] Builds are performed entirely in the context of the - `projects.builds.create` request, not by polling a long-running operation. - The `--async` flag has no effect. -- [ ] Build operations (source pulls and image pushes) are authorized using the +- Builds are performed entirely in the context of the `projects.builds.create` + request, not by polling a long-running operation. The `--async` flag has no +effect. +- Build operations (source pulls and image pushes) are authorized using the end-user credentials, not the project's builder service account. -- [ ] Build logs are not yet written to Cloud Storage, so they're not available - via `gcloud`. +- Build logs are written to Cloud Storage in one shot, at the end of the build. + When the build request completes, `gcloud` will show all build logs at once +without streaming. +- Build logs are written to the source upload bucket, and not a separate logs + bucket as is the default in GCB. +- Builds cannot be cancelled. The client doesn't know the build ID until it's + completed. + +## Not yet implemented + - [ ] `timing` is not collected or reported. - [ ] `timeout` is not configurable. If Cloud Run request times out, client gets a 502. @@ -79,5 +88,3 @@ statusDetail: '' Grafeas instance. - [ ] `projects.builds.list` is not yet implemented. - [ ] `operations.get` and `operations.list` are not yet implemented. -- [ ] `projects.builds.cancel` is not implementable (the client doesn't get the - build ID until it's complete). diff --git a/cmd/api/main.go b/cmd/api/main.go index 3789886..657a1be 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -18,13 +18,16 @@ import ( "cloud.google.com/go/compute/metadata" "cloud.google.com/go/datastore" + "cloud.google.com/go/storage" "github.com/google/go-containerregistry/pkg/authn" "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/uuid" "github.com/imjasonh/kontain.me/pkg/run" + "golang.org/x/oauth2" gcb "google.golang.org/api/cloudbuild/v1" + "google.golang.org/api/option" ) const base = "packs/run:v3alpha2" @@ -82,6 +85,15 @@ func extractToken(r *http.Request) string { return r.URL.Query().Get("access_token") } +func (s *server) logWriter(req *gcb.Build, tok string) io.WriteCloser { + ctx := context.Background() // TODO + gcs, err := storage.NewClient(ctx, option.WithTokenSource(oauth2.StaticTokenSource(&oauth2.Token{AccessToken: tok}))) + if err != nil { + log.Fatalf("storage.NewClient: %v", err) + } + return gcs.Bucket(req.LogsBucket).Object(fmt.Sprintf("log-%s.txt", req.Id)).NewWriter(ctx) +} + func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) { s.info.Println("handler:", r.Method, r.URL) projectID := extractPath(r.URL.Path, projectRE) @@ -275,6 +287,12 @@ func (s *server) prepareWorkspace(tok string) (string, string, error) { func (s *server) fetchAndBuild(src, layers, tok string, req *gcb.Build) error { image := req.Images[0] source := fmt.Sprintf("https://storage.googleapis.com/%s/%s?access_token=%s", req.Source.StorageSource.Bucket, req.Source.StorageSource.Object, tok) + w := s.logWriter(req, tok) + defer func() { + if err := w.Close(); err != nil { + s.error.Printf("Closing GCS log: %v", err) + } + }() for _, cmd := range []string{ fmt.Sprintf("chown -R %d:%d %s", os.Geteuid(), os.Getgid(), src), fmt.Sprintf("chown -R %d:%d %s", os.Geteuid(), os.Getgid(), layers), @@ -284,7 +302,7 @@ func (s *server) fetchAndBuild(src, layers, tok string, req *gcb.Build) error { fmt.Sprintf("/lifecycle/builder -layers=%s -app=%s -group=%s/group.toml -plan=%s/plan.toml", layers, src, layers, layers), fmt.Sprintf("/lifecycle/exporter -layers=%s -helpers=false -app=%s -image=%s -group=%s/group.toml %s", layers, src, base, layers, image), } { - if err := run.Do(s.info.Writer(), cmd); err != nil { + if err := run.Do(io.MultiWriter(s.info.Writer(), w), cmd); err != nil { return fmt.Errorf("Running %q: %v", cmd, err) } } diff --git a/vendor/cloud.google.com/go/logging/apiv2/README.md b/vendor/cloud.google.com/go/logging/apiv2/README.md deleted file mode 100644 index d2d9a17..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Auto-generated logging v2 clients -================================= - -This package includes auto-generated clients for the logging v2 API. - -Use the handwritten logging client (in the parent directory, -cloud.google.com/go/logging) in preference to this. - -This code is EXPERIMENTAL and subject to CHANGE AT ANY TIME. - - diff --git a/vendor/cloud.google.com/go/logging/apiv2/config_client.go b/vendor/cloud.google.com/go/logging/apiv2/config_client.go deleted file mode 100644 index 39c78e2..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/config_client.go +++ /dev/null @@ -1,438 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package logging - -import ( - "context" - "fmt" - "math" - "time" - - "github.com/golang/protobuf/proto" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/transport" - loggingpb "google.golang.org/genproto/googleapis/logging/v2" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" -) - -// ConfigCallOptions contains the retry settings for each method of ConfigClient. -type ConfigCallOptions struct { - ListSinks []gax.CallOption - GetSink []gax.CallOption - CreateSink []gax.CallOption - UpdateSink []gax.CallOption - DeleteSink []gax.CallOption - ListExclusions []gax.CallOption - GetExclusion []gax.CallOption - CreateExclusion []gax.CallOption - UpdateExclusion []gax.CallOption - DeleteExclusion []gax.CallOption -} - -func defaultConfigClientOptions() []option.ClientOption { - return []option.ClientOption{ - option.WithEndpoint("logging.googleapis.com:443"), - option.WithScopes(DefaultAuthScopes()...), - } -} - -func defaultConfigCallOptions() *ConfigCallOptions { - retry := map[[2]string][]gax.CallOption{ - {"default", "idempotent"}: { - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.DeadlineExceeded, - codes.Internal, - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.3, - }) - }), - }, - } - return &ConfigCallOptions{ - ListSinks: retry[[2]string{"default", "idempotent"}], - GetSink: retry[[2]string{"default", "idempotent"}], - CreateSink: retry[[2]string{"default", "non_idempotent"}], - UpdateSink: retry[[2]string{"default", "idempotent"}], - DeleteSink: retry[[2]string{"default", "idempotent"}], - ListExclusions: retry[[2]string{"default", "idempotent"}], - GetExclusion: retry[[2]string{"default", "idempotent"}], - CreateExclusion: retry[[2]string{"default", "non_idempotent"}], - UpdateExclusion: retry[[2]string{"default", "non_idempotent"}], - DeleteExclusion: retry[[2]string{"default", "idempotent"}], - } -} - -// ConfigClient is a client for interacting with Stackdriver Logging API. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type ConfigClient struct { - // The connection to the service. - conn *grpc.ClientConn - - // The gRPC API client. - configClient loggingpb.ConfigServiceV2Client - - // The call options for this service. - CallOptions *ConfigCallOptions - - // The x-goog-* metadata to be sent with each request. - xGoogMetadata metadata.MD -} - -// NewConfigClient creates a new config service v2 client. -// -// Service for configuring sinks used to export log entries out of -// Logging. -func NewConfigClient(ctx context.Context, opts ...option.ClientOption) (*ConfigClient, error) { - conn, err := transport.DialGRPC(ctx, append(defaultConfigClientOptions(), opts...)...) - if err != nil { - return nil, err - } - c := &ConfigClient{ - conn: conn, - CallOptions: defaultConfigCallOptions(), - - configClient: loggingpb.NewConfigServiceV2Client(conn), - } - c.SetGoogleClientInfo() - return c, nil -} - -// Connection returns the client's connection to the API service. -func (c *ConfigClient) Connection() *grpc.ClientConn { - return c.conn -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *ConfigClient) Close() error { - return c.conn.Close() -} - -// SetGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *ConfigClient) SetGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", versionGo()}, keyval...) - kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) - c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) -} - -// ListSinks lists sinks. -func (c *ConfigClient) ListSinks(ctx context.Context, req *loggingpb.ListSinksRequest, opts ...gax.CallOption) *LogSinkIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.ListSinks[0:len(c.CallOptions.ListSinks):len(c.CallOptions.ListSinks)], opts...) - it := &LogSinkIterator{} - req = proto.Clone(req).(*loggingpb.ListSinksRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*loggingpb.LogSink, string, error) { - var resp *loggingpb.ListSinksResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.ListSinks(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.Sinks, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// GetSink gets a sink. -func (c *ConfigClient) GetSink(ctx context.Context, req *loggingpb.GetSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "sink_name", req.GetSinkName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.GetSink[0:len(c.CallOptions.GetSink):len(c.CallOptions.GetSink)], opts...) - var resp *loggingpb.LogSink - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.GetSink(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// CreateSink creates a sink that exports specified log entries to a destination. The -// export of newly-ingested log entries begins immediately, unless the sink's -// writer_identity is not permitted to write to the destination. A sink can -// export log entries only from the resource owning the sink. -func (c *ConfigClient) CreateSink(ctx context.Context, req *loggingpb.CreateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.CreateSink[0:len(c.CallOptions.CreateSink):len(c.CallOptions.CreateSink)], opts...) - var resp *loggingpb.LogSink - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.CreateSink(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// UpdateSink updates a sink. This method replaces the following fields in the existing -// sink with values from the new sink: destination, and filter. -// The updated sink might also have a new writer_identity; see the -// unique_writer_identity field. -func (c *ConfigClient) UpdateSink(ctx context.Context, req *loggingpb.UpdateSinkRequest, opts ...gax.CallOption) (*loggingpb.LogSink, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "sink_name", req.GetSinkName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.UpdateSink[0:len(c.CallOptions.UpdateSink):len(c.CallOptions.UpdateSink)], opts...) - var resp *loggingpb.LogSink - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.UpdateSink(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// DeleteSink deletes a sink. If the sink has a unique writer_identity, then that -// service account is also deleted. -func (c *ConfigClient) DeleteSink(ctx context.Context, req *loggingpb.DeleteSinkRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "sink_name", req.GetSinkName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.DeleteSink[0:len(c.CallOptions.DeleteSink):len(c.CallOptions.DeleteSink)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = c.configClient.DeleteSink(ctx, req, settings.GRPC...) - return err - }, opts...) - return err -} - -// ListExclusions lists all the exclusions in a parent resource. -func (c *ConfigClient) ListExclusions(ctx context.Context, req *loggingpb.ListExclusionsRequest, opts ...gax.CallOption) *LogExclusionIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.ListExclusions[0:len(c.CallOptions.ListExclusions):len(c.CallOptions.ListExclusions)], opts...) - it := &LogExclusionIterator{} - req = proto.Clone(req).(*loggingpb.ListExclusionsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*loggingpb.LogExclusion, string, error) { - var resp *loggingpb.ListExclusionsResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.ListExclusions(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.Exclusions, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// GetExclusion gets the description of an exclusion. -func (c *ConfigClient) GetExclusion(ctx context.Context, req *loggingpb.GetExclusionRequest, opts ...gax.CallOption) (*loggingpb.LogExclusion, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.GetExclusion[0:len(c.CallOptions.GetExclusion):len(c.CallOptions.GetExclusion)], opts...) - var resp *loggingpb.LogExclusion - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.GetExclusion(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// CreateExclusion creates a new exclusion in a specified parent resource. -// Only log entries belonging to that resource can be excluded. -// You can have up to 10 exclusions in a resource. -func (c *ConfigClient) CreateExclusion(ctx context.Context, req *loggingpb.CreateExclusionRequest, opts ...gax.CallOption) (*loggingpb.LogExclusion, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.CreateExclusion[0:len(c.CallOptions.CreateExclusion):len(c.CallOptions.CreateExclusion)], opts...) - var resp *loggingpb.LogExclusion - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.CreateExclusion(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// UpdateExclusion changes one or more properties of an existing exclusion. -func (c *ConfigClient) UpdateExclusion(ctx context.Context, req *loggingpb.UpdateExclusionRequest, opts ...gax.CallOption) (*loggingpb.LogExclusion, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.UpdateExclusion[0:len(c.CallOptions.UpdateExclusion):len(c.CallOptions.UpdateExclusion)], opts...) - var resp *loggingpb.LogExclusion - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.configClient.UpdateExclusion(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// DeleteExclusion deletes an exclusion. -func (c *ConfigClient) DeleteExclusion(ctx context.Context, req *loggingpb.DeleteExclusionRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.DeleteExclusion[0:len(c.CallOptions.DeleteExclusion):len(c.CallOptions.DeleteExclusion)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = c.configClient.DeleteExclusion(ctx, req, settings.GRPC...) - return err - }, opts...) - return err -} - -// LogExclusionIterator manages a stream of *loggingpb.LogExclusion. -type LogExclusionIterator struct { - items []*loggingpb.LogExclusion - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*loggingpb.LogExclusion, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *LogExclusionIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *LogExclusionIterator) Next() (*loggingpb.LogExclusion, error) { - var item *loggingpb.LogExclusion - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *LogExclusionIterator) bufLen() int { - return len(it.items) -} - -func (it *LogExclusionIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// LogSinkIterator manages a stream of *loggingpb.LogSink. -type LogSinkIterator struct { - items []*loggingpb.LogSink - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*loggingpb.LogSink, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *LogSinkIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *LogSinkIterator) Next() (*loggingpb.LogSink, error) { - var item *loggingpb.LogSink - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *LogSinkIterator) bufLen() int { - return len(it.items) -} - -func (it *LogSinkIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/doc.go b/vendor/cloud.google.com/go/logging/apiv2/doc.go deleted file mode 100644 index 809378d..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/doc.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -// Package logging is an auto-generated package for the -// Stackdriver Logging API. -// -// NOTE: This package is in alpha. It is not stable, and is likely to change. -// -// Writes log entries and manages your Logging configuration. -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and -// for creating the underlying connection, but is not used for subsequent calls. -// Individual methods on the client use the ctx given to them. -// -// To close the open connection, use the Close() method. -// -// For information about setting deadlines, reusing contexts, and more -// please visit godoc.org/cloud.google.com/go. -// -// Use the client at cloud.google.com/go/logging in preference to this. -package logging // import "cloud.google.com/go/logging/apiv2" - -import ( - "context" - "runtime" - "strings" - "unicode" - - "google.golang.org/grpc/metadata" -) - -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. -func DefaultAuthScopes() []string { - return []string{ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read", - "https://www.googleapis.com/auth/logging.write", - } -} - -// versionGo returns the Go runtime version. The returned string -// has no whitespace, suitable for reporting in header. -func versionGo() string { - const develPrefix = "devel +" - - s := runtime.Version() - if strings.HasPrefix(s, develPrefix) { - s = s[len(develPrefix):] - if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - return s - } - - notSemverRune := func(r rune) bool { - return strings.IndexRune("0123456789.", r) < 0 - } - - if strings.HasPrefix(s, "go1") { - s = s[2:] - var prerelease string - if p := strings.IndexFunc(s, notSemverRune); p >= 0 { - s, prerelease = s[:p], s[p:] - } - if strings.HasSuffix(s, ".") { - s += "0" - } else if strings.Count(s, ".") < 2 { - s += ".0" - } - if prerelease != "" { - s += "-" + prerelease - } - return s - } - return "UNKNOWN" -} - -const versionClient = "20190404" diff --git a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go b/vendor/cloud.google.com/go/logging/apiv2/logging_client.go deleted file mode 100644 index 15ca909..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/logging_client.go +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package logging - -import ( - "context" - "fmt" - "math" - "time" - - "github.com/golang/protobuf/proto" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/transport" - monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres" - loggingpb "google.golang.org/genproto/googleapis/logging/v2" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" -) - -// CallOptions contains the retry settings for each method of Client. -type CallOptions struct { - DeleteLog []gax.CallOption - WriteLogEntries []gax.CallOption - ListLogEntries []gax.CallOption - ListMonitoredResourceDescriptors []gax.CallOption - ListLogs []gax.CallOption -} - -func defaultClientOptions() []option.ClientOption { - return []option.ClientOption{ - option.WithEndpoint("logging.googleapis.com:443"), - option.WithScopes(DefaultAuthScopes()...), - } -} - -func defaultCallOptions() *CallOptions { - retry := map[[2]string][]gax.CallOption{ - {"default", "idempotent"}: { - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.DeadlineExceeded, - codes.Internal, - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.3, - }) - }), - }, - } - return &CallOptions{ - DeleteLog: retry[[2]string{"default", "idempotent"}], - WriteLogEntries: retry[[2]string{"default", "idempotent"}], - ListLogEntries: retry[[2]string{"default", "idempotent"}], - ListMonitoredResourceDescriptors: retry[[2]string{"default", "idempotent"}], - ListLogs: retry[[2]string{"default", "idempotent"}], - } -} - -// Client is a client for interacting with Stackdriver Logging API. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type Client struct { - // The connection to the service. - conn *grpc.ClientConn - - // The gRPC API client. - client loggingpb.LoggingServiceV2Client - - // The call options for this service. - CallOptions *CallOptions - - // The x-goog-* metadata to be sent with each request. - xGoogMetadata metadata.MD -} - -// NewClient creates a new logging service v2 client. -// -// Service for ingesting and querying logs. -func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { - conn, err := transport.DialGRPC(ctx, append(defaultClientOptions(), opts...)...) - if err != nil { - return nil, err - } - c := &Client{ - conn: conn, - CallOptions: defaultCallOptions(), - - client: loggingpb.NewLoggingServiceV2Client(conn), - } - c.SetGoogleClientInfo() - return c, nil -} - -// Connection returns the client's connection to the API service. -func (c *Client) Connection() *grpc.ClientConn { - return c.conn -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *Client) Close() error { - return c.conn.Close() -} - -// SetGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *Client) SetGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", versionGo()}, keyval...) - kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) - c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) -} - -// DeleteLog deletes all the log entries in a log. -// The log reappears if it receives new entries. -// Log entries written shortly before the delete operation might not be -// deleted. -func (c *Client) DeleteLog(ctx context.Context, req *loggingpb.DeleteLogRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "log_name", req.GetLogName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.DeleteLog[0:len(c.CallOptions.DeleteLog):len(c.CallOptions.DeleteLog)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = c.client.DeleteLog(ctx, req, settings.GRPC...) - return err - }, opts...) - return err -} - -// WriteLogEntries writes log entries to Logging. This API method is the -// only way to send log entries to Logging. This method -// is used, directly or indirectly, by the Logging agent -// (fluentd) and all logging libraries configured to use Logging. -// A single request may contain log entries for a maximum of 1000 -// different resources (projects, organizations, billing accounts or -// folders) -func (c *Client) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLogEntriesRequest, opts ...gax.CallOption) (*loggingpb.WriteLogEntriesResponse, error) { - ctx = insertMetadata(ctx, c.xGoogMetadata) - opts = append(c.CallOptions.WriteLogEntries[0:len(c.CallOptions.WriteLogEntries):len(c.CallOptions.WriteLogEntries)], opts...) - var resp *loggingpb.WriteLogEntriesResponse - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.client.WriteLogEntries(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// ListLogEntries lists log entries. Use this method to retrieve log entries from -// Logging. For ways to export log entries, see -// Exporting Logs (at /logging/docs/export). -func (c *Client) ListLogEntries(ctx context.Context, req *loggingpb.ListLogEntriesRequest, opts ...gax.CallOption) *LogEntryIterator { - ctx = insertMetadata(ctx, c.xGoogMetadata) - opts = append(c.CallOptions.ListLogEntries[0:len(c.CallOptions.ListLogEntries):len(c.CallOptions.ListLogEntries)], opts...) - it := &LogEntryIterator{} - req = proto.Clone(req).(*loggingpb.ListLogEntriesRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*loggingpb.LogEntry, string, error) { - var resp *loggingpb.ListLogEntriesResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.client.ListLogEntries(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.Entries, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// ListMonitoredResourceDescriptors lists the descriptors for monitored resource types used by Logging. -func (c *Client) ListMonitoredResourceDescriptors(ctx context.Context, req *loggingpb.ListMonitoredResourceDescriptorsRequest, opts ...gax.CallOption) *MonitoredResourceDescriptorIterator { - ctx = insertMetadata(ctx, c.xGoogMetadata) - opts = append(c.CallOptions.ListMonitoredResourceDescriptors[0:len(c.CallOptions.ListMonitoredResourceDescriptors):len(c.CallOptions.ListMonitoredResourceDescriptors)], opts...) - it := &MonitoredResourceDescriptorIterator{} - req = proto.Clone(req).(*loggingpb.ListMonitoredResourceDescriptorsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*monitoredrespb.MonitoredResourceDescriptor, string, error) { - var resp *loggingpb.ListMonitoredResourceDescriptorsResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.client.ListMonitoredResourceDescriptors(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.ResourceDescriptors, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// ListLogs lists the logs in projects, organizations, folders, or billing accounts. -// Only logs that have entries are listed. -func (c *Client) ListLogs(ctx context.Context, req *loggingpb.ListLogsRequest, opts ...gax.CallOption) *StringIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.ListLogs[0:len(c.CallOptions.ListLogs):len(c.CallOptions.ListLogs)], opts...) - it := &StringIterator{} - req = proto.Clone(req).(*loggingpb.ListLogsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]string, string, error) { - var resp *loggingpb.ListLogsResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.client.ListLogs(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.LogNames, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// LogEntryIterator manages a stream of *loggingpb.LogEntry. -type LogEntryIterator struct { - items []*loggingpb.LogEntry - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*loggingpb.LogEntry, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *LogEntryIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *LogEntryIterator) Next() (*loggingpb.LogEntry, error) { - var item *loggingpb.LogEntry - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *LogEntryIterator) bufLen() int { - return len(it.items) -} - -func (it *LogEntryIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// MonitoredResourceDescriptorIterator manages a stream of *monitoredrespb.MonitoredResourceDescriptor. -type MonitoredResourceDescriptorIterator struct { - items []*monitoredrespb.MonitoredResourceDescriptor - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*monitoredrespb.MonitoredResourceDescriptor, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *MonitoredResourceDescriptorIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *MonitoredResourceDescriptorIterator) Next() (*monitoredrespb.MonitoredResourceDescriptor, error) { - var item *monitoredrespb.MonitoredResourceDescriptor - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *MonitoredResourceDescriptorIterator) bufLen() int { - return len(it.items) -} - -func (it *MonitoredResourceDescriptorIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// StringIterator manages a stream of string. -type StringIterator struct { - items []string - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []string, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *StringIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *StringIterator) Next() (string, error) { - var item string - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *StringIterator) bufLen() int { - return len(it.items) -} - -func (it *StringIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go b/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go deleted file mode 100644 index 9217f22..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/metrics_client.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package logging - -import ( - "context" - "fmt" - "math" - "time" - - "github.com/golang/protobuf/proto" - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "google.golang.org/api/transport" - loggingpb "google.golang.org/genproto/googleapis/logging/v2" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" -) - -// MetricsCallOptions contains the retry settings for each method of MetricsClient. -type MetricsCallOptions struct { - ListLogMetrics []gax.CallOption - GetLogMetric []gax.CallOption - CreateLogMetric []gax.CallOption - UpdateLogMetric []gax.CallOption - DeleteLogMetric []gax.CallOption -} - -func defaultMetricsClientOptions() []option.ClientOption { - return []option.ClientOption{ - option.WithEndpoint("logging.googleapis.com:443"), - option.WithScopes(DefaultAuthScopes()...), - } -} - -func defaultMetricsCallOptions() *MetricsCallOptions { - retry := map[[2]string][]gax.CallOption{ - {"default", "idempotent"}: { - gax.WithRetry(func() gax.Retryer { - return gax.OnCodes([]codes.Code{ - codes.DeadlineExceeded, - codes.Internal, - codes.Unavailable, - }, gax.Backoff{ - Initial: 100 * time.Millisecond, - Max: 60000 * time.Millisecond, - Multiplier: 1.3, - }) - }), - }, - } - return &MetricsCallOptions{ - ListLogMetrics: retry[[2]string{"default", "idempotent"}], - GetLogMetric: retry[[2]string{"default", "idempotent"}], - CreateLogMetric: retry[[2]string{"default", "non_idempotent"}], - UpdateLogMetric: retry[[2]string{"default", "idempotent"}], - DeleteLogMetric: retry[[2]string{"default", "idempotent"}], - } -} - -// MetricsClient is a client for interacting with Stackdriver Logging API. -// -// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. -type MetricsClient struct { - // The connection to the service. - conn *grpc.ClientConn - - // The gRPC API client. - metricsClient loggingpb.MetricsServiceV2Client - - // The call options for this service. - CallOptions *MetricsCallOptions - - // The x-goog-* metadata to be sent with each request. - xGoogMetadata metadata.MD -} - -// NewMetricsClient creates a new metrics service v2 client. -// -// Service for configuring logs-based metrics. -func NewMetricsClient(ctx context.Context, opts ...option.ClientOption) (*MetricsClient, error) { - conn, err := transport.DialGRPC(ctx, append(defaultMetricsClientOptions(), opts...)...) - if err != nil { - return nil, err - } - c := &MetricsClient{ - conn: conn, - CallOptions: defaultMetricsCallOptions(), - - metricsClient: loggingpb.NewMetricsServiceV2Client(conn), - } - c.SetGoogleClientInfo() - return c, nil -} - -// Connection returns the client's connection to the API service. -func (c *MetricsClient) Connection() *grpc.ClientConn { - return c.conn -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (c *MetricsClient) Close() error { - return c.conn.Close() -} - -// SetGoogleClientInfo sets the name and version of the application in -// the `x-goog-api-client` header passed on each request. Intended for -// use by Google-written clients. -func (c *MetricsClient) SetGoogleClientInfo(keyval ...string) { - kv := append([]string{"gl-go", versionGo()}, keyval...) - kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) - c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) -} - -// ListLogMetrics lists logs-based metrics. -func (c *MetricsClient) ListLogMetrics(ctx context.Context, req *loggingpb.ListLogMetricsRequest, opts ...gax.CallOption) *LogMetricIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.ListLogMetrics[0:len(c.CallOptions.ListLogMetrics):len(c.CallOptions.ListLogMetrics)], opts...) - it := &LogMetricIterator{} - req = proto.Clone(req).(*loggingpb.ListLogMetricsRequest) - it.InternalFetch = func(pageSize int, pageToken string) ([]*loggingpb.LogMetric, string, error) { - var resp *loggingpb.ListLogMetricsResponse - req.PageToken = pageToken - if pageSize > math.MaxInt32 { - req.PageSize = math.MaxInt32 - } else { - req.PageSize = int32(pageSize) - } - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.metricsClient.ListLogMetrics(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, "", err - } - return resp.Metrics, resp.NextPageToken, nil - } - fetch := func(pageSize int, pageToken string) (string, error) { - items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) - if err != nil { - return "", err - } - it.items = append(it.items, items...) - return nextPageToken, nil - } - it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) - it.pageInfo.MaxSize = int(req.PageSize) - return it -} - -// GetLogMetric gets a logs-based metric. -func (c *MetricsClient) GetLogMetric(ctx context.Context, req *loggingpb.GetLogMetricRequest, opts ...gax.CallOption) (*loggingpb.LogMetric, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "metric_name", req.GetMetricName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.GetLogMetric[0:len(c.CallOptions.GetLogMetric):len(c.CallOptions.GetLogMetric)], opts...) - var resp *loggingpb.LogMetric - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.metricsClient.GetLogMetric(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// CreateLogMetric creates a logs-based metric. -func (c *MetricsClient) CreateLogMetric(ctx context.Context, req *loggingpb.CreateLogMetricRequest, opts ...gax.CallOption) (*loggingpb.LogMetric, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", req.GetParent())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.CreateLogMetric[0:len(c.CallOptions.CreateLogMetric):len(c.CallOptions.CreateLogMetric)], opts...) - var resp *loggingpb.LogMetric - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.metricsClient.CreateLogMetric(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// UpdateLogMetric creates or updates a logs-based metric. -func (c *MetricsClient) UpdateLogMetric(ctx context.Context, req *loggingpb.UpdateLogMetricRequest, opts ...gax.CallOption) (*loggingpb.LogMetric, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "metric_name", req.GetMetricName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.UpdateLogMetric[0:len(c.CallOptions.UpdateLogMetric):len(c.CallOptions.UpdateLogMetric)], opts...) - var resp *loggingpb.LogMetric - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.metricsClient.UpdateLogMetric(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - -// DeleteLogMetric deletes a logs-based metric. -func (c *MetricsClient) DeleteLogMetric(ctx context.Context, req *loggingpb.DeleteLogMetricRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "metric_name", req.GetMetricName())) - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append(c.CallOptions.DeleteLogMetric[0:len(c.CallOptions.DeleteLogMetric):len(c.CallOptions.DeleteLogMetric)], opts...) - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - _, err = c.metricsClient.DeleteLogMetric(ctx, req, settings.GRPC...) - return err - }, opts...) - return err -} - -// LogMetricIterator manages a stream of *loggingpb.LogMetric. -type LogMetricIterator struct { - items []*loggingpb.LogMetric - pageInfo *iterator.PageInfo - nextFunc func() error - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*loggingpb.LogMetric, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *LogMetricIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *LogMetricIterator) Next() (*loggingpb.LogMetric, error) { - var item *loggingpb.LogMetric - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *LogMetricIterator) bufLen() int { - return len(it.items) -} - -func (it *LogMetricIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/vendor/cloud.google.com/go/logging/apiv2/path_funcs.go b/vendor/cloud.google.com/go/logging/apiv2/path_funcs.go deleted file mode 100644 index 37bbe9d..0000000 --- a/vendor/cloud.google.com/go/logging/apiv2/path_funcs.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package logging - -// ConfigProjectPath returns the path for the project resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s", project) -// instead. -func ConfigProjectPath(project string) string { - return "" + - "projects/" + - project + - "" -} - -// ConfigSinkPath returns the path for the sink resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s/sinks/%s", project, sink) -// instead. -func ConfigSinkPath(project, sink string) string { - return "" + - "projects/" + - project + - "/sinks/" + - sink + - "" -} - -// ConfigExclusionPath returns the path for the exclusion resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s/exclusions/%s", project, exclusion) -// instead. -func ConfigExclusionPath(project, exclusion string) string { - return "" + - "projects/" + - project + - "/exclusions/" + - exclusion + - "" -} - -// ProjectPath returns the path for the project resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s", project) -// instead. -func ProjectPath(project string) string { - return "" + - "projects/" + - project + - "" -} - -// LogPath returns the path for the log resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s/logs/%s", project, log) -// instead. -func LogPath(project, log string) string { - return "" + - "projects/" + - project + - "/logs/" + - log + - "" -} - -// MetricsProjectPath returns the path for the project resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s", project) -// instead. -func MetricsProjectPath(project string) string { - return "" + - "projects/" + - project + - "" -} - -// MetricsMetricPath returns the path for the metric resource. -// -// Deprecated: Use -// fmt.Sprintf("projects/%s/metrics/%s", project, metric) -// instead. -func MetricsMetricPath(project, metric string) string { - return "" + - "projects/" + - project + - "/metrics/" + - metric + - "" -} diff --git a/vendor/cloud.google.com/go/logging/doc.go b/vendor/cloud.google.com/go/logging/doc.go deleted file mode 100644 index f63d499..0000000 --- a/vendor/cloud.google.com/go/logging/doc.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/* -Package logging contains a Stackdriver Logging client suitable for writing logs. -For reading logs, and working with sinks, metrics and monitored resources, -see package cloud.google.com/go/logging/logadmin. - -This client uses Logging API v2. -See https://cloud.google.com/logging/docs/api/v2/ for an introduction to the API. - - -Creating a Client - -Use a Client to interact with the Stackdriver Logging API. - - // Create a Client - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - - -Basic Usage - -For most use cases, you'll want to add log entries to a buffer to be periodically -flushed (automatically and asynchronously) to the Stackdriver Logging service. - - // Initialize a logger - lg := client.Logger("my-log") - - // Add entry to log buffer - lg.Log(logging.Entry{Payload: "something happened!"}) - - -Closing your Client - -You should call Client.Close before your program exits to flush any buffered log entries to the Stackdriver Logging service. - - // Close the client when finished. - err = client.Close() - if err != nil { - // TODO: Handle error. - } - - -Synchronous Logging - -For critical errors, you may want to send your log entries immediately. -LogSync is slow and will block until the log entry has been sent, so it is -not recommended for normal use. - - err = lg.LogSync(ctx, logging.Entry{Payload: "ALERT! Something critical happened!"}) - if err != nil { - // TODO: Handle error. - } - - -Payloads - -An entry payload can be a string, as in the examples above. It can also be any value -that can be marshaled to a JSON object, like a map[string]interface{} or a struct: - - type MyEntry struct { - Name string - Count int - } - lg.Log(logging.Entry{Payload: MyEntry{Name: "Bob", Count: 3}}) - -If you have a []byte of JSON, wrap it in json.RawMessage: - - j := []byte(`{"Name": "Bob", "Count": 3}`) - lg.Log(logging.Entry{Payload: json.RawMessage(j)}) - - -The Standard Logger Interface - -You may want use a standard log.Logger in your program. - - // stdlg implements log.Logger - stdlg := lg.StandardLogger(logging.Info) - stdlg.Println("some info") - - -Log Levels - -An Entry may have one of a number of severity levels associated with it. - - logging.Entry{ - Payload: "something terrible happened!", - Severity: logging.Critical, - } - - -Viewing Logs - -You can view Stackdriver logs for projects at -https://console.cloud.google.com/logs/viewer. Use the dropdown at the top left. When -running from a Google Cloud Platform VM, select "GCE VM Instance". Otherwise, select -"Google Project" and then the project ID. Logs for organizations, folders and billing -accounts can be viewed on the command line with the "gcloud logging read" command. - - -Grouping Logs by Request - -To group all the log entries written during a single HTTP request, create two -Loggers, a "parent" and a "child," with different log IDs. Both should be in the same -project, and have the same MonitoredResouce type and labels. - -- Parent entries must have HTTPRequest.Request populated. (Strictly speaking, only the URL is necessary.) - -- A child entry's timestamp must be within the time interval covered by the parent request (i.e., older -than parent.Timestamp, and newer than parent.Timestamp - parent.HTTPRequest.Latency, assuming the -parent timestamp marks the end of the request. - -- The trace field must be populated in all of the entries and match exactly. - -You should observe the child log entries grouped under the parent on the console. The -parent entry will not inherit the severity of its children; you must update the -parent severity yourself. -*/ -package logging // import "cloud.google.com/go/logging" diff --git a/vendor/cloud.google.com/go/logging/internal/common.go b/vendor/cloud.google.com/go/logging/internal/common.go deleted file mode 100644 index c5788fe..0000000 --- a/vendor/cloud.google.com/go/logging/internal/common.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "fmt" - "strings" -) - -const ( - // ProdAddr is the production address. - ProdAddr = "logging.googleapis.com:443" -) - -// LogPath creates a formatted path from a parent and a logID. -func LogPath(parent, logID string) string { - logID = strings.Replace(logID, "/", "%2F", -1) - return fmt.Sprintf("%s/logs/%s", parent, logID) -} - -// LogIDFromPath parses and returns the ID from a log path. -func LogIDFromPath(parent, path string) string { - start := len(parent) + len("/logs/") - if len(path) < start { - return "" - } - logID := path[start:] - return strings.Replace(logID, "%2F", "/", -1) -} diff --git a/vendor/cloud.google.com/go/logging/logging.go b/vendor/cloud.google.com/go/logging/logging.go deleted file mode 100644 index 7738e26..0000000 --- a/vendor/cloud.google.com/go/logging/logging.go +++ /dev/null @@ -1,874 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// API/gRPC features intentionally missing from this client: -// - You cannot have the server pick the time of the entry. This client -// always sends a time. -// - There is no way to provide a protocol buffer payload. -// - No support for the "partial success" feature when writing log entries. - -// TODO(jba): test whether forward-slash characters in the log ID must be URL-encoded. -// These features are missing now, but will likely be added: -// - There is no way to specify CallOptions. - -package logging - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "log" - "net/http" - "strconv" - "strings" - "sync" - "time" - "unicode/utf8" - - "cloud.google.com/go/compute/metadata" - "cloud.google.com/go/internal/version" - vkit "cloud.google.com/go/logging/apiv2" - "cloud.google.com/go/logging/internal" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - structpb "github.com/golang/protobuf/ptypes/struct" - tspb "github.com/golang/protobuf/ptypes/timestamp" - "google.golang.org/api/option" - "google.golang.org/api/support/bundler" - mrpb "google.golang.org/genproto/googleapis/api/monitoredres" - logtypepb "google.golang.org/genproto/googleapis/logging/type" - logpb "google.golang.org/genproto/googleapis/logging/v2" -) - -const ( - // ReadScope is the scope for reading from the logging service. - ReadScope = "https://www.googleapis.com/auth/logging.read" - - // WriteScope is the scope for writing to the logging service. - WriteScope = "https://www.googleapis.com/auth/logging.write" - - // AdminScope is the scope for administrative actions on the logging service. - AdminScope = "https://www.googleapis.com/auth/logging.admin" -) - -const ( - // defaultErrorCapacity is the capacity of the channel used to deliver - // errors to the OnError function. - defaultErrorCapacity = 10 - - // DefaultDelayThreshold is the default value for the DelayThreshold LoggerOption. - DefaultDelayThreshold = time.Second - - // DefaultEntryCountThreshold is the default value for the EntryCountThreshold LoggerOption. - DefaultEntryCountThreshold = 1000 - - // DefaultEntryByteThreshold is the default value for the EntryByteThreshold LoggerOption. - DefaultEntryByteThreshold = 1 << 20 // 1MiB - - // DefaultBufferedByteLimit is the default value for the BufferedByteLimit LoggerOption. - DefaultBufferedByteLimit = 1 << 30 // 1GiB - - // defaultWriteTimeout is the timeout for the underlying write API calls. As - // write API calls are not idempotent, they are not retried on timeout. This - // timeout is to allow clients to degrade gracefully if underlying logging - // service is temporarily impaired for some reason. - defaultWriteTimeout = 10 * time.Minute -) - -// For testing: -var now = time.Now - -// ErrOverflow signals that the number of buffered entries for a Logger -// exceeds its BufferLimit. -var ErrOverflow = bundler.ErrOverflow - -// ErrOversizedEntry signals that an entry's size exceeds the maximum number of -// bytes that will be sent in a single call to the logging service. -var ErrOversizedEntry = bundler.ErrOversizedItem - -// Client is a Logging client. A Client is associated with a single Cloud project. -type Client struct { - client *vkit.Client // client for the logging service - parent string // e.g. "projects/proj-id" - errc chan error // should be buffered to minimize dropped errors - donec chan struct{} // closed on Client.Close to close Logger bundlers - loggers sync.WaitGroup // so we can wait for loggers to close - closed bool - - mu sync.Mutex - nErrs int // number of errors we saw - lastErr error // last error we saw - - // OnError is called when an error occurs in a call to Log or Flush. The - // error may be due to an invalid Entry, an overflow because BufferLimit - // was reached (in which case the error will be ErrOverflow) or an error - // communicating with the logging service. OnError is called with errors - // from all Loggers. It is never called concurrently. OnError is expected - // to return quickly; if errors occur while OnError is running, some may - // not be reported. The default behavior is to call log.Printf. - // - // This field should be set only once, before any method of Client is called. - OnError func(err error) -} - -// NewClient returns a new logging client associated with the provided parent. -// A parent can take any of the following forms: -// projects/PROJECT_ID -// folders/FOLDER_ID -// billingAccounts/ACCOUNT_ID -// organizations/ORG_ID -// for backwards compatibility, a string with no '/' is also allowed and is interpreted -// as a project ID. -// -// By default NewClient uses WriteScope. To use a different scope, call -// NewClient using a WithScopes option (see https://godoc.org/google.golang.org/api/option#WithScopes). -func NewClient(ctx context.Context, parent string, opts ...option.ClientOption) (*Client, error) { - if !strings.ContainsRune(parent, '/') { - parent = "projects/" + parent - } - opts = append([]option.ClientOption{ - option.WithEndpoint(internal.ProdAddr), - option.WithScopes(WriteScope), - }, opts...) - c, err := vkit.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - c.SetGoogleClientInfo("gccl", version.Repo) - client := &Client{ - client: c, - parent: parent, - errc: make(chan error, defaultErrorCapacity), // create a small buffer for errors - donec: make(chan struct{}), - OnError: func(e error) { log.Printf("logging client: %v", e) }, - } - // Call the user's function synchronously, to make life easier for them. - go func() { - for err := range client.errc { - // This reference to OnError is memory-safe if the user sets OnError before - // calling any client methods. The reference happens before the first read from - // client.errc, which happens before the first write to client.errc, which - // happens before any call, which happens before the user sets OnError. - if fn := client.OnError; fn != nil { - fn(err) - } else { - log.Printf("logging (parent %q): %v", parent, err) - } - } - }() - return client, nil -} - -var unixZeroTimestamp *tspb.Timestamp - -func init() { - var err error - unixZeroTimestamp, err = ptypes.TimestampProto(time.Unix(0, 0)) - if err != nil { - panic(err) - } -} - -// Ping reports whether the client's connection to the logging service and the -// authentication configuration are valid. To accomplish this, Ping writes a -// log entry "ping" to a log named "ping". -func (c *Client) Ping(ctx context.Context) error { - ent := &logpb.LogEntry{ - Payload: &logpb.LogEntry_TextPayload{TextPayload: "ping"}, - Timestamp: unixZeroTimestamp, // Identical timestamps and insert IDs are both - InsertId: "ping", // necessary for the service to dedup these entries. - } - _, err := c.client.WriteLogEntries(ctx, &logpb.WriteLogEntriesRequest{ - LogName: internal.LogPath(c.parent, "ping"), - Resource: monitoredResource(c.parent), - Entries: []*logpb.LogEntry{ent}, - }) - return err -} - -// error puts the error on the client's error channel -// without blocking, and records summary error info. -func (c *Client) error(err error) { - select { - case c.errc <- err: - default: - } - c.mu.Lock() - c.lastErr = err - c.nErrs++ - c.mu.Unlock() -} - -func (c *Client) extractErrorInfo() error { - var err error - c.mu.Lock() - if c.lastErr != nil { - err = fmt.Errorf("saw %d errors; last: %v", c.nErrs, c.lastErr) - c.nErrs = 0 - c.lastErr = nil - } - c.mu.Unlock() - return err -} - -// A Logger is used to write log messages to a single log. It can be configured -// with a log ID, common monitored resource, and a set of common labels. -type Logger struct { - client *Client - logName string // "projects/{projectID}/logs/{logID}" - stdLoggers map[Severity]*log.Logger - bundler *bundler.Bundler - - // Options - commonResource *mrpb.MonitoredResource - commonLabels map[string]string - ctxFunc func() (context.Context, func()) -} - -// A LoggerOption is a configuration option for a Logger. -type LoggerOption interface { - set(*Logger) -} - -// CommonResource sets the monitored resource associated with all log entries -// written from a Logger. If not provided, the resource is automatically -// detected based on the running environment. This value can be overridden -// per-entry by setting an Entry's Resource field. -func CommonResource(r *mrpb.MonitoredResource) LoggerOption { return commonResource{r} } - -type commonResource struct{ *mrpb.MonitoredResource } - -func (r commonResource) set(l *Logger) { l.commonResource = r.MonitoredResource } - -var detectedResource struct { - pb *mrpb.MonitoredResource - once sync.Once -} - -func detectResource() *mrpb.MonitoredResource { - detectedResource.once.Do(func() { - if !metadata.OnGCE() { - return - } - projectID, err := metadata.ProjectID() - if err != nil { - return - } - id, err := metadata.InstanceID() - if err != nil { - return - } - zone, err := metadata.Zone() - if err != nil { - return - } - name, err := metadata.InstanceName() - if err != nil { - return - } - detectedResource.pb = &mrpb.MonitoredResource{ - Type: "gce_instance", - Labels: map[string]string{ - "project_id": projectID, - "instance_id": id, - "instance_name": name, - "zone": zone, - }, - } - }) - return detectedResource.pb -} - -var resourceInfo = map[string]struct{ rtype, label string }{ - "organizations": {"organization", "organization_id"}, - "folders": {"folder", "folder_id"}, - "projects": {"project", "project_id"}, - "billingAccounts": {"billing_account", "account_id"}, -} - -func monitoredResource(parent string) *mrpb.MonitoredResource { - parts := strings.SplitN(parent, "/", 2) - if len(parts) != 2 { - return globalResource(parent) - } - info, ok := resourceInfo[parts[0]] - if !ok { - return globalResource(parts[1]) - } - return &mrpb.MonitoredResource{ - Type: info.rtype, - Labels: map[string]string{info.label: parts[1]}, - } -} - -func globalResource(projectID string) *mrpb.MonitoredResource { - return &mrpb.MonitoredResource{ - Type: "global", - Labels: map[string]string{ - "project_id": projectID, - }, - } -} - -// CommonLabels are labels that apply to all log entries written from a Logger, -// so that you don't have to repeat them in each log entry's Labels field. If -// any of the log entries contains a (key, value) with the same key that is in -// CommonLabels, then the entry's (key, value) overrides the one in -// CommonLabels. -func CommonLabels(m map[string]string) LoggerOption { return commonLabels(m) } - -type commonLabels map[string]string - -func (c commonLabels) set(l *Logger) { l.commonLabels = c } - -// ConcurrentWriteLimit determines how many goroutines will send log entries to the -// underlying service. The default is 1. Set ConcurrentWriteLimit to a higher value to -// increase throughput. -func ConcurrentWriteLimit(n int) LoggerOption { return concurrentWriteLimit(n) } - -type concurrentWriteLimit int - -func (c concurrentWriteLimit) set(l *Logger) { l.bundler.HandlerLimit = int(c) } - -// DelayThreshold is the maximum amount of time that an entry should remain -// buffered in memory before a call to the logging service is triggered. Larger -// values of DelayThreshold will generally result in fewer calls to the logging -// service, while increasing the risk that log entries will be lost if the -// process crashes. -// The default is DefaultDelayThreshold. -func DelayThreshold(d time.Duration) LoggerOption { return delayThreshold(d) } - -type delayThreshold time.Duration - -func (d delayThreshold) set(l *Logger) { l.bundler.DelayThreshold = time.Duration(d) } - -// EntryCountThreshold is the maximum number of entries that will be buffered -// in memory before a call to the logging service is triggered. Larger values -// will generally result in fewer calls to the logging service, while -// increasing both memory consumption and the risk that log entries will be -// lost if the process crashes. -// The default is DefaultEntryCountThreshold. -func EntryCountThreshold(n int) LoggerOption { return entryCountThreshold(n) } - -type entryCountThreshold int - -func (e entryCountThreshold) set(l *Logger) { l.bundler.BundleCountThreshold = int(e) } - -// EntryByteThreshold is the maximum number of bytes of entries that will be -// buffered in memory before a call to the logging service is triggered. See -// EntryCountThreshold for a discussion of the tradeoffs involved in setting -// this option. -// The default is DefaultEntryByteThreshold. -func EntryByteThreshold(n int) LoggerOption { return entryByteThreshold(n) } - -type entryByteThreshold int - -func (e entryByteThreshold) set(l *Logger) { l.bundler.BundleByteThreshold = int(e) } - -// EntryByteLimit is the maximum number of bytes of entries that will be sent -// in a single call to the logging service. ErrOversizedEntry is returned if an -// entry exceeds EntryByteLimit. This option limits the size of a single RPC -// payload, to account for network or service issues with large RPCs. If -// EntryByteLimit is smaller than EntryByteThreshold, the latter has no effect. -// The default is zero, meaning there is no limit. -func EntryByteLimit(n int) LoggerOption { return entryByteLimit(n) } - -type entryByteLimit int - -func (e entryByteLimit) set(l *Logger) { l.bundler.BundleByteLimit = int(e) } - -// BufferedByteLimit is the maximum number of bytes that the Logger will keep -// in memory before returning ErrOverflow. This option limits the total memory -// consumption of the Logger (but note that each Logger has its own, separate -// limit). It is possible to reach BufferedByteLimit even if it is larger than -// EntryByteThreshold or EntryByteLimit, because calls triggered by the latter -// two options may be enqueued (and hence occupying memory) while new log -// entries are being added. -// The default is DefaultBufferedByteLimit. -func BufferedByteLimit(n int) LoggerOption { return bufferedByteLimit(n) } - -type bufferedByteLimit int - -func (b bufferedByteLimit) set(l *Logger) { l.bundler.BufferedByteLimit = int(b) } - -// ContextFunc is a function that will be called to obtain a context.Context for the -// WriteLogEntries RPC executed in the background for calls to Logger.Log. The -// default is a function that always returns context.Background. The second return -// value of the function is a function to call after the RPC completes. -// -// The function is not used for calls to Logger.LogSync, since the caller can pass -// in the context directly. -// -// This option is EXPERIMENTAL. It may be changed or removed. -func ContextFunc(f func() (ctx context.Context, afterCall func())) LoggerOption { - return contextFunc(f) -} - -type contextFunc func() (ctx context.Context, afterCall func()) - -func (c contextFunc) set(l *Logger) { l.ctxFunc = c } - -// Logger returns a Logger that will write entries with the given log ID, such as -// "syslog". A log ID must be less than 512 characters long and can only -// include the following characters: upper and lower case alphanumeric -// characters: [A-Za-z0-9]; and punctuation characters: forward-slash, -// underscore, hyphen, and period. -func (c *Client) Logger(logID string, opts ...LoggerOption) *Logger { - r := detectResource() - if r == nil { - r = monitoredResource(c.parent) - } - l := &Logger{ - client: c, - logName: internal.LogPath(c.parent, logID), - commonResource: r, - ctxFunc: func() (context.Context, func()) { return context.Background(), nil }, - } - l.bundler = bundler.NewBundler(&logpb.LogEntry{}, func(entries interface{}) { - l.writeLogEntries(entries.([]*logpb.LogEntry)) - }) - l.bundler.DelayThreshold = DefaultDelayThreshold - l.bundler.BundleCountThreshold = DefaultEntryCountThreshold - l.bundler.BundleByteThreshold = DefaultEntryByteThreshold - l.bundler.BufferedByteLimit = DefaultBufferedByteLimit - for _, opt := range opts { - opt.set(l) - } - l.stdLoggers = map[Severity]*log.Logger{} - for s := range severityName { - l.stdLoggers[s] = log.New(severityWriter{l, s}, "", 0) - } - - c.loggers.Add(1) - // Start a goroutine that cleans up the bundler, its channel - // and the writer goroutines when the client is closed. - go func() { - defer c.loggers.Done() - <-c.donec - l.bundler.Flush() - }() - return l -} - -type severityWriter struct { - l *Logger - s Severity -} - -func (w severityWriter) Write(p []byte) (n int, err error) { - w.l.Log(Entry{ - Severity: w.s, - Payload: string(p), - }) - return len(p), nil -} - -// Close waits for all opened loggers to be flushed and closes the client. -func (c *Client) Close() error { - if c.closed { - return nil - } - close(c.donec) // close Logger bundlers - c.loggers.Wait() // wait for all bundlers to flush and close - // Now there can be no more errors. - close(c.errc) // terminate error goroutine - // Prefer errors arising from logging to the error returned from Close. - err := c.extractErrorInfo() - err2 := c.client.Close() - if err == nil { - err = err2 - } - c.closed = true - return err -} - -// Severity is the severity of the event described in a log entry. These -// guideline severity levels are ordered, with numerically smaller levels -// treated as less severe than numerically larger levels. -type Severity int - -const ( - // Default means the log entry has no assigned severity level. - Default = Severity(logtypepb.LogSeverity_DEFAULT) - // Debug means debug or trace information. - Debug = Severity(logtypepb.LogSeverity_DEBUG) - // Info means routine information, such as ongoing status or performance. - Info = Severity(logtypepb.LogSeverity_INFO) - // Notice means normal but significant events, such as start up, shut down, or configuration. - Notice = Severity(logtypepb.LogSeverity_NOTICE) - // Warning means events that might cause problems. - Warning = Severity(logtypepb.LogSeverity_WARNING) - // Error means events that are likely to cause problems. - Error = Severity(logtypepb.LogSeverity_ERROR) - // Critical means events that cause more severe problems or brief outages. - Critical = Severity(logtypepb.LogSeverity_CRITICAL) - // Alert means a person must take an action immediately. - Alert = Severity(logtypepb.LogSeverity_ALERT) - // Emergency means one or more systems are unusable. - Emergency = Severity(logtypepb.LogSeverity_EMERGENCY) -) - -var severityName = map[Severity]string{ - Default: "Default", - Debug: "Debug", - Info: "Info", - Notice: "Notice", - Warning: "Warning", - Error: "Error", - Critical: "Critical", - Alert: "Alert", - Emergency: "Emergency", -} - -// String converts a severity level to a string. -func (v Severity) String() string { - // same as proto.EnumName - s, ok := severityName[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// ParseSeverity returns the Severity whose name equals s, ignoring case. It -// returns Default if no Severity matches. -func ParseSeverity(s string) Severity { - sl := strings.ToLower(s) - for sev, name := range severityName { - if strings.ToLower(name) == sl { - return sev - } - } - return Default -} - -// Entry is a log entry. -// See https://cloud.google.com/logging/docs/view/logs_index for more about entries. -type Entry struct { - // Timestamp is the time of the entry. If zero, the current time is used. - Timestamp time.Time - - // Severity is the entry's severity level. - // The zero value is Default. - Severity Severity - - // Payload must be either a string, or something that marshals via the - // encoding/json package to a JSON object (and not any other type of JSON value). - Payload interface{} - - // Labels optionally specifies key/value labels for the log entry. - // The Logger.Log method takes ownership of this map. See Logger.CommonLabels - // for more about labels. - Labels map[string]string - - // InsertID is a unique ID for the log entry. If you provide this field, - // the logging service considers other log entries in the same log with the - // same ID as duplicates which can be removed. If omitted, the logging - // service will generate a unique ID for this log entry. Note that because - // this client retries RPCs automatically, it is possible (though unlikely) - // that an Entry without an InsertID will be written more than once. - InsertID string - - // HTTPRequest optionally specifies metadata about the HTTP request - // associated with this log entry, if applicable. It is optional. - HTTPRequest *HTTPRequest - - // Operation optionally provides information about an operation associated - // with the log entry, if applicable. - Operation *logpb.LogEntryOperation - - // LogName is the full log name, in the form - // "projects/{ProjectID}/logs/{LogID}". It is set by the client when - // reading entries. It is an error to set it when writing entries. - LogName string - - // Resource is the monitored resource associated with the entry. - Resource *mrpb.MonitoredResource - - // Trace is the resource name of the trace associated with the log entry, - // if any. If it contains a relative resource name, the name is assumed to - // be relative to //tracing.googleapis.com. - Trace string - - // ID of the span within the trace associated with the log entry. - // The ID is a 16-character hexadecimal encoding of an 8-byte array. - SpanID string - - // Optional. Source code location information associated with the log entry, - // if any. - SourceLocation *logpb.LogEntrySourceLocation -} - -// HTTPRequest contains an http.Request as well as additional -// information about the request and its response. -type HTTPRequest struct { - // Request is the http.Request passed to the handler. - Request *http.Request - - // RequestSize is the size of the HTTP request message in bytes, including - // the request headers and the request body. - RequestSize int64 - - // Status is the response code indicating the status of the response. - // Examples: 200, 404. - Status int - - // ResponseSize is the size of the HTTP response message sent back to the client, in bytes, - // including the response headers and the response body. - ResponseSize int64 - - // Latency is the request processing latency on the server, from the time the request was - // received until the response was sent. - Latency time.Duration - - // LocalIP is the IP address (IPv4 or IPv6) of the origin server that the request - // was sent to. - LocalIP string - - // RemoteIP is the IP address (IPv4 or IPv6) of the client that issued the - // HTTP request. Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - RemoteIP string - - // CacheHit reports whether an entity was served from cache (with or without - // validation). - CacheHit bool - - // CacheValidatedWithOriginServer reports whether the response was - // validated with the origin server before being served from cache. This - // field is only meaningful if CacheHit is true. - CacheValidatedWithOriginServer bool -} - -func fromHTTPRequest(r *HTTPRequest) *logtypepb.HttpRequest { - if r == nil { - return nil - } - if r.Request == nil { - panic("HTTPRequest must have a non-nil Request") - } - u := *r.Request.URL - u.Fragment = "" - pb := &logtypepb.HttpRequest{ - RequestMethod: r.Request.Method, - RequestUrl: fixUTF8(u.String()), - RequestSize: r.RequestSize, - Status: int32(r.Status), - ResponseSize: r.ResponseSize, - UserAgent: r.Request.UserAgent(), - ServerIp: r.LocalIP, - RemoteIp: r.RemoteIP, // TODO(jba): attempt to parse http.Request.RemoteAddr? - Referer: r.Request.Referer(), - CacheHit: r.CacheHit, - CacheValidatedWithOriginServer: r.CacheValidatedWithOriginServer, - } - if r.Latency != 0 { - pb.Latency = ptypes.DurationProto(r.Latency) - } - return pb -} - -// fixUTF8 is a helper that fixes an invalid UTF-8 string by replacing -// invalid UTF-8 runes with the Unicode replacement character (U+FFFD). -// See Issue https://github.com/googleapis/google-cloud-go/issues/1383. -func fixUTF8(s string) string { - if utf8.ValidString(s) { - return s - } - - // Otherwise time to build the sequence. - buf := new(bytes.Buffer) - buf.Grow(len(s)) - for _, r := range s { - if utf8.ValidRune(r) { - buf.WriteRune(r) - } else { - buf.WriteRune('\uFFFD') - } - } - return buf.String() -} - -// toProtoStruct converts v, which must marshal into a JSON object, -// into a Google Struct proto. -func toProtoStruct(v interface{}) (*structpb.Struct, error) { - // Fast path: if v is already a *structpb.Struct, nothing to do. - if s, ok := v.(*structpb.Struct); ok { - return s, nil - } - // v is a Go value that supports JSON marshalling. We want a Struct - // protobuf. Some day we may have a more direct way to get there, but right - // now the only way is to marshal the Go value to JSON, unmarshal into a - // map, and then build the Struct proto from the map. - var jb []byte - var err error - if raw, ok := v.(json.RawMessage); ok { // needed for Go 1.7 and below - jb = []byte(raw) - } else { - jb, err = json.Marshal(v) - if err != nil { - return nil, fmt.Errorf("logging: json.Marshal: %v", err) - } - } - var m map[string]interface{} - err = json.Unmarshal(jb, &m) - if err != nil { - return nil, fmt.Errorf("logging: json.Unmarshal: %v", err) - } - return jsonMapToProtoStruct(m), nil -} - -func jsonMapToProtoStruct(m map[string]interface{}) *structpb.Struct { - fields := map[string]*structpb.Value{} - for k, v := range m { - fields[k] = jsonValueToStructValue(v) - } - return &structpb.Struct{Fields: fields} -} - -func jsonValueToStructValue(v interface{}) *structpb.Value { - switch x := v.(type) { - case bool: - return &structpb.Value{Kind: &structpb.Value_BoolValue{BoolValue: x}} - case float64: - return &structpb.Value{Kind: &structpb.Value_NumberValue{NumberValue: x}} - case string: - return &structpb.Value{Kind: &structpb.Value_StringValue{StringValue: x}} - case nil: - return &structpb.Value{Kind: &structpb.Value_NullValue{}} - case map[string]interface{}: - return &structpb.Value{Kind: &structpb.Value_StructValue{StructValue: jsonMapToProtoStruct(x)}} - case []interface{}: - var vals []*structpb.Value - for _, e := range x { - vals = append(vals, jsonValueToStructValue(e)) - } - return &structpb.Value{Kind: &structpb.Value_ListValue{ListValue: &structpb.ListValue{Values: vals}}} - default: - panic(fmt.Sprintf("bad type %T for JSON value", v)) - } -} - -// LogSync logs the Entry synchronously without any buffering. Because LogSync is slow -// and will block, it is intended primarily for debugging or critical errors. -// Prefer Log for most uses. -// TODO(jba): come up with a better name (LogNow?) or eliminate. -func (l *Logger) LogSync(ctx context.Context, e Entry) error { - ent, err := l.toLogEntry(e) - if err != nil { - return err - } - _, err = l.client.client.WriteLogEntries(ctx, &logpb.WriteLogEntriesRequest{ - LogName: l.logName, - Resource: l.commonResource, - Labels: l.commonLabels, - Entries: []*logpb.LogEntry{ent}, - }) - return err -} - -// Log buffers the Entry for output to the logging service. It never blocks. -func (l *Logger) Log(e Entry) { - ent, err := l.toLogEntry(e) - if err != nil { - l.client.error(err) - return - } - if err := l.bundler.Add(ent, proto.Size(ent)); err != nil { - l.client.error(err) - } -} - -// Flush blocks until all currently buffered log entries are sent. -// -// If any errors occurred since the last call to Flush from any Logger, or the -// creation of the client if this is the first call, then Flush returns a non-nil -// error with summary information about the errors. This information is unlikely to -// be actionable. For more accurate error reporting, set Client.OnError. -func (l *Logger) Flush() error { - l.bundler.Flush() - return l.client.extractErrorInfo() -} - -func (l *Logger) writeLogEntries(entries []*logpb.LogEntry) { - req := &logpb.WriteLogEntriesRequest{ - LogName: l.logName, - Resource: l.commonResource, - Labels: l.commonLabels, - Entries: entries, - } - ctx, afterCall := l.ctxFunc() - ctx, cancel := context.WithTimeout(ctx, defaultWriteTimeout) - defer cancel() - _, err := l.client.client.WriteLogEntries(ctx, req) - if err != nil { - l.client.error(err) - } - if afterCall != nil { - afterCall() - } -} - -// StandardLogger returns a *log.Logger for the provided severity. -// -// This method is cheap. A single log.Logger is pre-allocated for each -// severity level in each Logger. Callers may mutate the returned log.Logger -// (for example by calling SetFlags or SetPrefix). -func (l *Logger) StandardLogger(s Severity) *log.Logger { return l.stdLoggers[s] } - -func (l *Logger) toLogEntry(e Entry) (*logpb.LogEntry, error) { - if e.LogName != "" { - return nil, errors.New("logging: Entry.LogName should be not be set when writing") - } - t := e.Timestamp - if t.IsZero() { - t = now() - } - ts, err := ptypes.TimestampProto(t) - if err != nil { - return nil, err - } - if e.Trace == "" && e.HTTPRequest != nil && e.HTTPRequest.Request != nil { - traceHeader := e.HTTPRequest.Request.Header.Get("X-Cloud-Trace-Context") - if traceHeader != "" { - // Set to a relative resource name, as described at - // https://cloud.google.com/appengine/docs/flexible/go/writing-application-logs. - e.Trace = fmt.Sprintf("%s/traces/%s", l.client.parent, traceHeader) - } - } - ent := &logpb.LogEntry{ - Timestamp: ts, - Severity: logtypepb.LogSeverity(e.Severity), - InsertId: e.InsertID, - HttpRequest: fromHTTPRequest(e.HTTPRequest), - Operation: e.Operation, - Labels: e.Labels, - Trace: e.Trace, - SpanId: e.SpanID, - Resource: e.Resource, - SourceLocation: e.SourceLocation, - } - switch p := e.Payload.(type) { - case string: - ent.Payload = &logpb.LogEntry_TextPayload{TextPayload: p} - default: - s, err := toProtoStruct(p) - if err != nil { - return nil, err - } - ent.Payload = &logpb.LogEntry_JsonPayload{JsonPayload: s} - } - return ent, nil -} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go deleted file mode 100644 index b4eb03e..0000000 --- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/empty.proto - -package empty - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_900544acb223d5b8, []int{0} -} - -func (*Empty) XXX_WellKnownType() string { return "Empty" } - -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) -} - -var xxx_messageInfo_Empty proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") -} - -func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) } - -var fileDescriptor_900544acb223d5b8 = []byte{ - // 148 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, - 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, - 0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36, - 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0x47, 0x58, 0x53, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x0c, - 0xb1, 0xed, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, - 0x13, 0x03, 0xa0, 0xea, 0xf4, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, - 0xea, 0x93, 0xd8, 0xc0, 0x06, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd4, 0xb3, 0xa6, - 0xb7, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto deleted file mode 100644 index 03cacd2..0000000 --- a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "github.com/golang/protobuf/ptypes/empty"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "EmptyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -message Empty {} diff --git a/vendor/golang.org/x/sync/semaphore/semaphore.go b/vendor/golang.org/x/sync/semaphore/semaphore.go deleted file mode 100644 index 7f096fe..0000000 --- a/vendor/golang.org/x/sync/semaphore/semaphore.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package semaphore provides a weighted semaphore implementation. -package semaphore // import "golang.org/x/sync/semaphore" - -import ( - "container/list" - "context" - "sync" -) - -type waiter struct { - n int64 - ready chan<- struct{} // Closed when semaphore acquired. -} - -// NewWeighted creates a new weighted semaphore with the given -// maximum combined weight for concurrent access. -func NewWeighted(n int64) *Weighted { - w := &Weighted{size: n} - return w -} - -// Weighted provides a way to bound concurrent access to a resource. -// The callers can request access with a given weight. -type Weighted struct { - size int64 - cur int64 - mu sync.Mutex - waiters list.List -} - -// Acquire acquires the semaphore with a weight of n, blocking until resources -// are available or ctx is done. On success, returns nil. On failure, returns -// ctx.Err() and leaves the semaphore unchanged. -// -// If ctx is already done, Acquire may still succeed without blocking. -func (s *Weighted) Acquire(ctx context.Context, n int64) error { - s.mu.Lock() - if s.size-s.cur >= n && s.waiters.Len() == 0 { - s.cur += n - s.mu.Unlock() - return nil - } - - if n > s.size { - // Don't make other Acquire calls block on one that's doomed to fail. - s.mu.Unlock() - <-ctx.Done() - return ctx.Err() - } - - ready := make(chan struct{}) - w := waiter{n: n, ready: ready} - elem := s.waiters.PushBack(w) - s.mu.Unlock() - - select { - case <-ctx.Done(): - err := ctx.Err() - s.mu.Lock() - select { - case <-ready: - // Acquired the semaphore after we were canceled. Rather than trying to - // fix up the queue, just pretend we didn't notice the cancelation. - err = nil - default: - s.waiters.Remove(elem) - } - s.mu.Unlock() - return err - - case <-ready: - return nil - } -} - -// TryAcquire acquires the semaphore with a weight of n without blocking. -// On success, returns true. On failure, returns false and leaves the semaphore unchanged. -func (s *Weighted) TryAcquire(n int64) bool { - s.mu.Lock() - success := s.size-s.cur >= n && s.waiters.Len() == 0 - if success { - s.cur += n - } - s.mu.Unlock() - return success -} - -// Release releases the semaphore with a weight of n. -func (s *Weighted) Release(n int64) { - s.mu.Lock() - s.cur -= n - if s.cur < 0 { - s.mu.Unlock() - panic("semaphore: released more than held") - } - for { - next := s.waiters.Front() - if next == nil { - break // No more waiters blocked. - } - - w := next.Value.(waiter) - if s.size-s.cur < w.n { - // Not enough tokens for the next waiter. We could keep going (to try to - // find a waiter with a smaller request), but under load that could cause - // starvation for large requests; instead, we leave all remaining waiters - // blocked. - // - // Consider a semaphore used as a read-write lock, with N tokens, N - // readers, and one writer. Each reader can Acquire(1) to obtain a read - // lock. The writer can Acquire(N) to obtain a write lock, excluding all - // of the readers. If we allow the readers to jump ahead in the queue, - // the writer will starve — there is always one token available for every - // reader. - break - } - - s.cur += w.n - s.waiters.Remove(next) - close(w.ready) - } - s.mu.Unlock() -} diff --git a/vendor/google.golang.org/api/support/bundler/bundler.go b/vendor/google.golang.org/api/support/bundler/bundler.go deleted file mode 100644 index c553271..0000000 --- a/vendor/google.golang.org/api/support/bundler/bundler.go +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package bundler supports bundling (batching) of items. Bundling amortizes an -// action with fixed costs over multiple items. For example, if an API provides -// an RPC that accepts a list of items as input, but clients would prefer -// adding items one at a time, then a Bundler can accept individual items from -// the client and bundle many of them into a single RPC. -// -// This package is experimental and subject to change without notice. -package bundler - -import ( - "context" - "errors" - "math" - "reflect" - "sync" - "time" - - "golang.org/x/sync/semaphore" -) - -const ( - DefaultDelayThreshold = time.Second - DefaultBundleCountThreshold = 10 - DefaultBundleByteThreshold = 1e6 // 1M - DefaultBufferedByteLimit = 1e9 // 1G -) - -var ( - // ErrOverflow indicates that Bundler's stored bytes exceeds its BufferedByteLimit. - ErrOverflow = errors.New("bundler reached buffered byte limit") - - // ErrOversizedItem indicates that an item's size exceeds the maximum bundle size. - ErrOversizedItem = errors.New("item size exceeds bundle byte limit") -) - -// A Bundler collects items added to it into a bundle until the bundle -// exceeds a given size, then calls a user-provided function to handle the bundle. -type Bundler struct { - // Starting from the time that the first message is added to a bundle, once - // this delay has passed, handle the bundle. The default is DefaultDelayThreshold. - DelayThreshold time.Duration - - // Once a bundle has this many items, handle the bundle. Since only one - // item at a time is added to a bundle, no bundle will exceed this - // threshold, so it also serves as a limit. The default is - // DefaultBundleCountThreshold. - BundleCountThreshold int - - // Once the number of bytes in current bundle reaches this threshold, handle - // the bundle. The default is DefaultBundleByteThreshold. This triggers handling, - // but does not cap the total size of a bundle. - BundleByteThreshold int - - // The maximum size of a bundle, in bytes. Zero means unlimited. - BundleByteLimit int - - // The maximum number of bytes that the Bundler will keep in memory before - // returning ErrOverflow. The default is DefaultBufferedByteLimit. - BufferedByteLimit int - - // The maximum number of handler invocations that can be running at once. - // The default is 1. - HandlerLimit int - - handler func(interface{}) // called to handle a bundle - itemSliceZero reflect.Value // nil (zero value) for slice of items - flushTimer *time.Timer // implements DelayThreshold - - mu sync.Mutex - sem *semaphore.Weighted // enforces BufferedByteLimit - semOnce sync.Once - curBundle bundle // incoming items added to this bundle - - // Each bundle is assigned a unique ticket that determines the order in which the - // handler is called. The ticket is assigned with mu locked, but waiting for tickets - // to be handled is done via mu2 and cond, below. - nextTicket uint64 // next ticket to be assigned - - mu2 sync.Mutex - cond *sync.Cond - nextHandled uint64 // next ticket to be handled - - // In this implementation, active uses space proportional to HandlerLimit, and - // waitUntilAllHandled takes time proportional to HandlerLimit each time an acquire - // or release occurs, so large values of HandlerLimit max may cause performance - // issues. - active map[uint64]bool // tickets of bundles actively being handled -} - -type bundle struct { - items reflect.Value // slice of item type - size int // size in bytes of all items -} - -// NewBundler creates a new Bundler. -// -// itemExample is a value of the type that will be bundled. For example, if you -// want to create bundles of *Entry, you could pass &Entry{} for itemExample. -// -// handler is a function that will be called on each bundle. If itemExample is -// of type T, the argument to handler is of type []T. handler is always called -// sequentially for each bundle, and never in parallel. -// -// Configure the Bundler by setting its thresholds and limits before calling -// any of its methods. -func NewBundler(itemExample interface{}, handler func(interface{})) *Bundler { - b := &Bundler{ - DelayThreshold: DefaultDelayThreshold, - BundleCountThreshold: DefaultBundleCountThreshold, - BundleByteThreshold: DefaultBundleByteThreshold, - BufferedByteLimit: DefaultBufferedByteLimit, - HandlerLimit: 1, - - handler: handler, - itemSliceZero: reflect.Zero(reflect.SliceOf(reflect.TypeOf(itemExample))), - active: map[uint64]bool{}, - } - b.curBundle.items = b.itemSliceZero - b.cond = sync.NewCond(&b.mu2) - return b -} - -func (b *Bundler) initSemaphores() { - // Create the semaphores lazily, because the user may set limits - // after NewBundler. - b.semOnce.Do(func() { - b.sem = semaphore.NewWeighted(int64(b.BufferedByteLimit)) - }) -} - -// Add adds item to the current bundle. It marks the bundle for handling and -// starts a new one if any of the thresholds or limits are exceeded. -// -// If the item's size exceeds the maximum bundle size (Bundler.BundleByteLimit), then -// the item can never be handled. Add returns ErrOversizedItem in this case. -// -// If adding the item would exceed the maximum memory allowed -// (Bundler.BufferedByteLimit) or an AddWait call is blocked waiting for -// memory, Add returns ErrOverflow. -// -// Add never blocks. -func (b *Bundler) Add(item interface{}, size int) error { - // If this item exceeds the maximum size of a bundle, - // we can never send it. - if b.BundleByteLimit > 0 && size > b.BundleByteLimit { - return ErrOversizedItem - } - // If adding this item would exceed our allotted memory - // footprint, we can't accept it. - // (TryAcquire also returns false if anything is waiting on the semaphore, - // so calls to Add and AddWait shouldn't be mixed.) - b.initSemaphores() - if !b.sem.TryAcquire(int64(size)) { - return ErrOverflow - } - b.add(item, size) - return nil -} - -// add adds item to the current bundle. It marks the bundle for handling and -// starts a new one if any of the thresholds or limits are exceeded. -func (b *Bundler) add(item interface{}, size int) { - b.mu.Lock() - defer b.mu.Unlock() - - // If adding this item to the current bundle would cause it to exceed the - // maximum bundle size, close the current bundle and start a new one. - if b.BundleByteLimit > 0 && b.curBundle.size+size > b.BundleByteLimit { - b.startFlushLocked() - } - // Add the item. - b.curBundle.items = reflect.Append(b.curBundle.items, reflect.ValueOf(item)) - b.curBundle.size += size - - // Start a timer to flush the item if one isn't already running. - // startFlushLocked clears the timer and closes the bundle at the same time, - // so we only allocate a new timer for the first item in each bundle. - // (We could try to call Reset on the timer instead, but that would add a lot - // of complexity to the code just to save one small allocation.) - if b.flushTimer == nil { - b.flushTimer = time.AfterFunc(b.DelayThreshold, b.Flush) - } - - // If the current bundle equals the count threshold, close it. - if b.curBundle.items.Len() == b.BundleCountThreshold { - b.startFlushLocked() - } - // If the current bundle equals or exceeds the byte threshold, close it. - if b.curBundle.size >= b.BundleByteThreshold { - b.startFlushLocked() - } -} - -// AddWait adds item to the current bundle. It marks the bundle for handling and -// starts a new one if any of the thresholds or limits are exceeded. -// -// If the item's size exceeds the maximum bundle size (Bundler.BundleByteLimit), then -// the item can never be handled. AddWait returns ErrOversizedItem in this case. -// -// If adding the item would exceed the maximum memory allowed (Bundler.BufferedByteLimit), -// AddWait blocks until space is available or ctx is done. -// -// Calls to Add and AddWait should not be mixed on the same Bundler. -func (b *Bundler) AddWait(ctx context.Context, item interface{}, size int) error { - // If this item exceeds the maximum size of a bundle, - // we can never send it. - if b.BundleByteLimit > 0 && size > b.BundleByteLimit { - return ErrOversizedItem - } - // If adding this item would exceed our allotted memory footprint, block - // until space is available. The semaphore is FIFO, so there will be no - // starvation. - b.initSemaphores() - if err := b.sem.Acquire(ctx, int64(size)); err != nil { - return err - } - // Here, we've reserved space for item. Other goroutines can call AddWait - // and even acquire space, but no one can take away our reservation - // (assuming sem.Release is used correctly). So there is no race condition - // resulting from locking the mutex after sem.Acquire returns. - b.add(item, size) - return nil -} - -// Flush invokes the handler for all remaining items in the Bundler and waits -// for it to return. -func (b *Bundler) Flush() { - b.mu.Lock() - b.startFlushLocked() - // Here, all bundles with tickets < b.nextTicket are - // either finished or active. Those are the ones - // we want to wait for. - t := b.nextTicket - b.mu.Unlock() - b.initSemaphores() - b.waitUntilAllHandled(t) -} - -func (b *Bundler) startFlushLocked() { - if b.flushTimer != nil { - b.flushTimer.Stop() - b.flushTimer = nil - } - if b.curBundle.items.Len() == 0 { - return - } - // Here, both semaphores must have been initialized. - bun := b.curBundle - b.curBundle = bundle{items: b.itemSliceZero} - ticket := b.nextTicket - b.nextTicket++ - go func() { - defer func() { - b.sem.Release(int64(bun.size)) - b.release(ticket) - }() - b.acquire(ticket) - b.handler(bun.items.Interface()) - }() -} - -// acquire blocks until ticket is the next to be served, then returns. In order for N -// acquire calls to return, the tickets must be in the range [0, N). A ticket must -// not be presented to acquire more than once. -func (b *Bundler) acquire(ticket uint64) { - b.mu2.Lock() - defer b.mu2.Unlock() - if ticket < b.nextHandled { - panic("bundler: acquire: arg too small") - } - for !(ticket == b.nextHandled && len(b.active) < b.HandlerLimit) { - b.cond.Wait() - } - // Here, - // ticket == b.nextHandled: the caller is the next one to be handled; - // and len(b.active) < b.HandlerLimit: there is space available. - b.active[ticket] = true - b.nextHandled++ - // Broadcast, not Signal: although at most one acquire waiter can make progress, - // there might be waiters in waitUntilAllHandled. - b.cond.Broadcast() -} - -// If a ticket is used for a call to acquire, it must later be passed to release. A -// ticket must not be presented to release more than once. -func (b *Bundler) release(ticket uint64) { - b.mu2.Lock() - defer b.mu2.Unlock() - if !b.active[ticket] { - panic("bundler: release: not an active ticket") - } - delete(b.active, ticket) - b.cond.Broadcast() -} - -// waitUntilAllHandled blocks until all tickets < n have called release, meaning -// all bundles with tickets < n have been handled. -func (b *Bundler) waitUntilAllHandled(n uint64) { - // Proof of correctness of this function. - // "N is acquired" means acquire(N) has returned. - // "N is released" means release(N) has returned. - // 1. If N is acquired, N-1 is acquired. - // Follows from the loop test in acquire, and the fact - // that nextHandled is incremented by 1. - // 2. If nextHandled >= N, then N-1 is acquired. - // Because we only increment nextHandled to N after N-1 is acquired. - // 3. If nextHandled >= N, then all n < N is acquired. - // Follows from #1 and #2. - // 4. If N is acquired and N is not in active, then N is released. - // Because we put N in active before acquire returns, and only - // remove it when it is released. - // Let min(active) be the smallest member of active, or infinity if active is empty. - // 5. If nextHandled >= N and N <= min(active), then all n < N is released. - // From nextHandled >= N and #3, all n < N is acquired. - // N <= min(active) implies n < min(active) for all n < N. So all n < N is not in active. - // So from #4, all n < N is released. - // The loop test below is the antecedent of #5. - b.mu2.Lock() - defer b.mu2.Unlock() - for !(b.nextHandled >= n && n <= min(b.active)) { - b.cond.Wait() - } -} - -// min returns the minimum value of the set s, or the largest uint64 if -// s is empty. -func min(s map[uint64]bool) uint64 { - var m uint64 = math.MaxUint64 - for n := range s { - if n < m { - m = n - } - } - return m -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/authorization_config.pb.go b/vendor/google.golang.org/genproto/googleapis/api/authorization_config.pb.go deleted file mode 100644 index eb5ad28..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/authorization_config.pb.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/experimental/authorization_config.proto - -package api // import "google.golang.org/genproto/googleapis/api" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// Configuration of authorization. -// -// This section determines the authorization provider, if unspecified, then no -// authorization check will be done. -// -// Example: -// -// experimental: -// authorization: -// provider: firebaserules.googleapis.com -type AuthorizationConfig struct { - // The name of the authorization provider, such as - // firebaserules.googleapis.com. - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthorizationConfig) Reset() { *m = AuthorizationConfig{} } -func (m *AuthorizationConfig) String() string { return proto.CompactTextString(m) } -func (*AuthorizationConfig) ProtoMessage() {} -func (*AuthorizationConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_authorization_config_201ba24923dedcb5, []int{0} -} -func (m *AuthorizationConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AuthorizationConfig.Unmarshal(m, b) -} -func (m *AuthorizationConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AuthorizationConfig.Marshal(b, m, deterministic) -} -func (dst *AuthorizationConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizationConfig.Merge(dst, src) -} -func (m *AuthorizationConfig) XXX_Size() int { - return xxx_messageInfo_AuthorizationConfig.Size(m) -} -func (m *AuthorizationConfig) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizationConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizationConfig proto.InternalMessageInfo - -func (m *AuthorizationConfig) GetProvider() string { - if m != nil { - return m.Provider - } - return "" -} - -func init() { - proto.RegisterType((*AuthorizationConfig)(nil), "google.api.AuthorizationConfig") -} - -func init() { - proto.RegisterFile("google/api/experimental/authorization_config.proto", fileDescriptor_authorization_config_201ba24923dedcb5) -} - -var fileDescriptor_authorization_config_201ba24923dedcb5 = []byte{ - // 180 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4a, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xad, 0x28, 0x48, 0x2d, 0xca, 0xcc, 0x4d, 0xcd, - 0x2b, 0x49, 0xcc, 0xd1, 0x4f, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0xac, 0x4a, 0x2c, 0xc9, 0xcc, - 0xcf, 0x8b, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0x82, 0xe8, 0xd1, 0x4b, 0x2c, 0xc8, 0x54, 0x32, 0xe4, 0x12, 0x76, 0x44, 0x56, 0xe9, 0x0c, 0x56, - 0x28, 0x24, 0xc5, 0xc5, 0x51, 0x50, 0x94, 0x5f, 0x96, 0x99, 0x92, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, - 0xa8, 0xc1, 0x19, 0x04, 0xe7, 0x3b, 0x25, 0x71, 0xf1, 0x25, 0xe7, 0xe7, 0xea, 0x21, 0x0c, 0x71, - 0x92, 0xc0, 0x62, 0x44, 0x00, 0xc8, 0xaa, 0x00, 0xc6, 0x28, 0x5d, 0xa8, 0xba, 0xf4, 0xfc, 0x9c, - 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, 0xfd, 0xf4, 0xd4, 0x3c, 0xb0, 0x43, 0xf4, 0x21, 0x52, - 0x89, 0x05, 0x99, 0xc5, 0x20, 0xf7, 0x5b, 0x27, 0x16, 0x64, 0x2e, 0x62, 0x62, 0x71, 0x77, 0x0c, - 0xf0, 0x4c, 0x62, 0x03, 0x2b, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x52, 0x27, 0x0c, 0xba, - 0xdf, 0x00, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/distribution/distribution.pb.go b/vendor/google.golang.org/genproto/googleapis/api/distribution/distribution.pb.go deleted file mode 100644 index 74f6809..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/distribution/distribution.pb.go +++ /dev/null @@ -1,714 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/distribution.proto - -package distribution // import "google.golang.org/genproto/googleapis/api/distribution" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import any "github.com/golang/protobuf/ptypes/any" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// `Distribution` contains summary statistics for a population of values. It -// optionally contains a histogram representing the distribution of those values -// across a set of buckets. -// -// The summary statistics are the count, mean, sum of the squared deviation from -// the mean, the minimum, and the maximum of the set of population of values. -// The histogram is based on a sequence of buckets and gives a count of values -// that fall into each bucket. The boundaries of the buckets are given either -// explicitly or by formulas for buckets of fixed or exponentially increasing -// widths. -// -// Although it is not forbidden, it is generally a bad idea to include -// non-finite values (infinities or NaNs) in the population of values, as this -// will render the `mean` and `sum_of_squared_deviation` fields meaningless. -type Distribution struct { - // The number of values in the population. Must be non-negative. This value - // must equal the sum of the values in `bucket_counts` if a histogram is - // provided. - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - // The arithmetic mean of the values in the population. If `count` is zero - // then this field must be zero. - Mean float64 `protobuf:"fixed64,2,opt,name=mean,proto3" json:"mean,omitempty"` - // The sum of squared deviations from the mean of the values in the - // population. For values x_i this is: - // - // Sum[i=1..n]((x_i - mean)^2) - // - // Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition - // describes Welford's method for accumulating this sum in one pass. - // - // If `count` is zero then this field must be zero. - SumOfSquaredDeviation float64 `protobuf:"fixed64,3,opt,name=sum_of_squared_deviation,json=sumOfSquaredDeviation,proto3" json:"sum_of_squared_deviation,omitempty"` - // If specified, contains the range of the population values. The field - // must not be present if the `count` is zero. - Range *Distribution_Range `protobuf:"bytes,4,opt,name=range,proto3" json:"range,omitempty"` - // Defines the histogram bucket boundaries. If the distribution does not - // contain a histogram, then omit this field. - BucketOptions *Distribution_BucketOptions `protobuf:"bytes,6,opt,name=bucket_options,json=bucketOptions,proto3" json:"bucket_options,omitempty"` - // The number of values in each bucket of the histogram, as described in - // `bucket_options`. If the distribution does not have a histogram, then omit - // this field. If there is a histogram, then the sum of the values in - // `bucket_counts` must equal the value in the `count` field of the - // distribution. - // - // If present, `bucket_counts` should contain N values, where N is the number - // of buckets specified in `bucket_options`. If you supply fewer than N - // values, the remaining values are assumed to be 0. - // - // The order of the values in `bucket_counts` follows the bucket numbering - // schemes described for the three bucket types. The first value must be the - // count for the underflow bucket (number 0). The next N-2 values are the - // counts for the finite buckets (number 1 through N-2). The N'th value in - // `bucket_counts` is the count for the overflow bucket (number N-1). - BucketCounts []int64 `protobuf:"varint,7,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` - // Must be in increasing order of `value` field. - Exemplars []*Distribution_Exemplar `protobuf:"bytes,10,rep,name=exemplars,proto3" json:"exemplars,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution) Reset() { *m = Distribution{} } -func (m *Distribution) String() string { return proto.CompactTextString(m) } -func (*Distribution) ProtoMessage() {} -func (*Distribution) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0} -} -func (m *Distribution) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution.Unmarshal(m, b) -} -func (m *Distribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution.Marshal(b, m, deterministic) -} -func (dst *Distribution) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution.Merge(dst, src) -} -func (m *Distribution) XXX_Size() int { - return xxx_messageInfo_Distribution.Size(m) -} -func (m *Distribution) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution proto.InternalMessageInfo - -func (m *Distribution) GetCount() int64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *Distribution) GetMean() float64 { - if m != nil { - return m.Mean - } - return 0 -} - -func (m *Distribution) GetSumOfSquaredDeviation() float64 { - if m != nil { - return m.SumOfSquaredDeviation - } - return 0 -} - -func (m *Distribution) GetRange() *Distribution_Range { - if m != nil { - return m.Range - } - return nil -} - -func (m *Distribution) GetBucketOptions() *Distribution_BucketOptions { - if m != nil { - return m.BucketOptions - } - return nil -} - -func (m *Distribution) GetBucketCounts() []int64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *Distribution) GetExemplars() []*Distribution_Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -// The range of the population values. -type Distribution_Range struct { - // The minimum of the population values. - Min float64 `protobuf:"fixed64,1,opt,name=min,proto3" json:"min,omitempty"` - // The maximum of the population values. - Max float64 `protobuf:"fixed64,2,opt,name=max,proto3" json:"max,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_Range) Reset() { *m = Distribution_Range{} } -func (m *Distribution_Range) String() string { return proto.CompactTextString(m) } -func (*Distribution_Range) ProtoMessage() {} -func (*Distribution_Range) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 0} -} -func (m *Distribution_Range) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_Range.Unmarshal(m, b) -} -func (m *Distribution_Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_Range.Marshal(b, m, deterministic) -} -func (dst *Distribution_Range) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_Range.Merge(dst, src) -} -func (m *Distribution_Range) XXX_Size() int { - return xxx_messageInfo_Distribution_Range.Size(m) -} -func (m *Distribution_Range) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_Range.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_Range proto.InternalMessageInfo - -func (m *Distribution_Range) GetMin() float64 { - if m != nil { - return m.Min - } - return 0 -} - -func (m *Distribution_Range) GetMax() float64 { - if m != nil { - return m.Max - } - return 0 -} - -// `BucketOptions` describes the bucket boundaries used to create a histogram -// for the distribution. The buckets can be in a linear sequence, an -// exponential sequence, or each bucket can be specified explicitly. -// `BucketOptions` does not include the number of values in each bucket. -// -// A bucket has an inclusive lower bound and exclusive upper bound for the -// values that are counted for that bucket. The upper bound of a bucket must -// be strictly greater than the lower bound. The sequence of N buckets for a -// distribution consists of an underflow bucket (number 0), zero or more -// finite buckets (number 1 through N - 2) and an overflow bucket (number N - -// 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the -// same as the upper bound of bucket i - 1. The buckets span the whole range -// of finite values: lower bound of the underflow bucket is -infinity and the -// upper bound of the overflow bucket is +infinity. The finite buckets are -// so-called because both bounds are finite. -type Distribution_BucketOptions struct { - // Exactly one of these three fields must be set. - // - // Types that are valid to be assigned to Options: - // *Distribution_BucketOptions_LinearBuckets - // *Distribution_BucketOptions_ExponentialBuckets - // *Distribution_BucketOptions_ExplicitBuckets - Options isDistribution_BucketOptions_Options `protobuf_oneof:"options"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_BucketOptions) Reset() { *m = Distribution_BucketOptions{} } -func (m *Distribution_BucketOptions) String() string { return proto.CompactTextString(m) } -func (*Distribution_BucketOptions) ProtoMessage() {} -func (*Distribution_BucketOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 1} -} -func (m *Distribution_BucketOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_BucketOptions.Unmarshal(m, b) -} -func (m *Distribution_BucketOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_BucketOptions.Marshal(b, m, deterministic) -} -func (dst *Distribution_BucketOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_BucketOptions.Merge(dst, src) -} -func (m *Distribution_BucketOptions) XXX_Size() int { - return xxx_messageInfo_Distribution_BucketOptions.Size(m) -} -func (m *Distribution_BucketOptions) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_BucketOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_BucketOptions proto.InternalMessageInfo - -type isDistribution_BucketOptions_Options interface { - isDistribution_BucketOptions_Options() -} - -type Distribution_BucketOptions_LinearBuckets struct { - LinearBuckets *Distribution_BucketOptions_Linear `protobuf:"bytes,1,opt,name=linear_buckets,json=linearBuckets,proto3,oneof"` -} - -type Distribution_BucketOptions_ExponentialBuckets struct { - ExponentialBuckets *Distribution_BucketOptions_Exponential `protobuf:"bytes,2,opt,name=exponential_buckets,json=exponentialBuckets,proto3,oneof"` -} - -type Distribution_BucketOptions_ExplicitBuckets struct { - ExplicitBuckets *Distribution_BucketOptions_Explicit `protobuf:"bytes,3,opt,name=explicit_buckets,json=explicitBuckets,proto3,oneof"` -} - -func (*Distribution_BucketOptions_LinearBuckets) isDistribution_BucketOptions_Options() {} - -func (*Distribution_BucketOptions_ExponentialBuckets) isDistribution_BucketOptions_Options() {} - -func (*Distribution_BucketOptions_ExplicitBuckets) isDistribution_BucketOptions_Options() {} - -func (m *Distribution_BucketOptions) GetOptions() isDistribution_BucketOptions_Options { - if m != nil { - return m.Options - } - return nil -} - -func (m *Distribution_BucketOptions) GetLinearBuckets() *Distribution_BucketOptions_Linear { - if x, ok := m.GetOptions().(*Distribution_BucketOptions_LinearBuckets); ok { - return x.LinearBuckets - } - return nil -} - -func (m *Distribution_BucketOptions) GetExponentialBuckets() *Distribution_BucketOptions_Exponential { - if x, ok := m.GetOptions().(*Distribution_BucketOptions_ExponentialBuckets); ok { - return x.ExponentialBuckets - } - return nil -} - -func (m *Distribution_BucketOptions) GetExplicitBuckets() *Distribution_BucketOptions_Explicit { - if x, ok := m.GetOptions().(*Distribution_BucketOptions_ExplicitBuckets); ok { - return x.ExplicitBuckets - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Distribution_BucketOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Distribution_BucketOptions_OneofMarshaler, _Distribution_BucketOptions_OneofUnmarshaler, _Distribution_BucketOptions_OneofSizer, []interface{}{ - (*Distribution_BucketOptions_LinearBuckets)(nil), - (*Distribution_BucketOptions_ExponentialBuckets)(nil), - (*Distribution_BucketOptions_ExplicitBuckets)(nil), - } -} - -func _Distribution_BucketOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Distribution_BucketOptions) - // options - switch x := m.Options.(type) { - case *Distribution_BucketOptions_LinearBuckets: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.LinearBuckets); err != nil { - return err - } - case *Distribution_BucketOptions_ExponentialBuckets: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ExponentialBuckets); err != nil { - return err - } - case *Distribution_BucketOptions_ExplicitBuckets: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ExplicitBuckets); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Distribution_BucketOptions.Options has unexpected type %T", x) - } - return nil -} - -func _Distribution_BucketOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Distribution_BucketOptions) - switch tag { - case 1: // options.linear_buckets - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Distribution_BucketOptions_Linear) - err := b.DecodeMessage(msg) - m.Options = &Distribution_BucketOptions_LinearBuckets{msg} - return true, err - case 2: // options.exponential_buckets - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Distribution_BucketOptions_Exponential) - err := b.DecodeMessage(msg) - m.Options = &Distribution_BucketOptions_ExponentialBuckets{msg} - return true, err - case 3: // options.explicit_buckets - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Distribution_BucketOptions_Explicit) - err := b.DecodeMessage(msg) - m.Options = &Distribution_BucketOptions_ExplicitBuckets{msg} - return true, err - default: - return false, nil - } -} - -func _Distribution_BucketOptions_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Distribution_BucketOptions) - // options - switch x := m.Options.(type) { - case *Distribution_BucketOptions_LinearBuckets: - s := proto.Size(x.LinearBuckets) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Distribution_BucketOptions_ExponentialBuckets: - s := proto.Size(x.ExponentialBuckets) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Distribution_BucketOptions_ExplicitBuckets: - s := proto.Size(x.ExplicitBuckets) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Specifies a linear sequence of buckets that all have the same width -// (except overflow and underflow). Each bucket represents a constant -// absolute uncertainty on the specific value in the bucket. -// -// There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the -// following boundaries: -// -// Upper bound (0 <= i < N-1): offset + (width * i). -// Lower bound (1 <= i < N): offset + (width * (i - 1)). -type Distribution_BucketOptions_Linear struct { - // Must be greater than 0. - NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"` - // Must be greater than 0. - Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"` - // Lower bound of the first bucket. - Offset float64 `protobuf:"fixed64,3,opt,name=offset,proto3" json:"offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_BucketOptions_Linear) Reset() { *m = Distribution_BucketOptions_Linear{} } -func (m *Distribution_BucketOptions_Linear) String() string { return proto.CompactTextString(m) } -func (*Distribution_BucketOptions_Linear) ProtoMessage() {} -func (*Distribution_BucketOptions_Linear) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 1, 0} -} -func (m *Distribution_BucketOptions_Linear) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_BucketOptions_Linear.Unmarshal(m, b) -} -func (m *Distribution_BucketOptions_Linear) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_BucketOptions_Linear.Marshal(b, m, deterministic) -} -func (dst *Distribution_BucketOptions_Linear) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_BucketOptions_Linear.Merge(dst, src) -} -func (m *Distribution_BucketOptions_Linear) XXX_Size() int { - return xxx_messageInfo_Distribution_BucketOptions_Linear.Size(m) -} -func (m *Distribution_BucketOptions_Linear) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_BucketOptions_Linear.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_BucketOptions_Linear proto.InternalMessageInfo - -func (m *Distribution_BucketOptions_Linear) GetNumFiniteBuckets() int32 { - if m != nil { - return m.NumFiniteBuckets - } - return 0 -} - -func (m *Distribution_BucketOptions_Linear) GetWidth() float64 { - if m != nil { - return m.Width - } - return 0 -} - -func (m *Distribution_BucketOptions_Linear) GetOffset() float64 { - if m != nil { - return m.Offset - } - return 0 -} - -// Specifies an exponential sequence of buckets that have a width that is -// proportional to the value of the lower bound. Each bucket represents a -// constant relative uncertainty on a specific value in the bucket. -// -// There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the -// following boundaries: -// -// Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). -// Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). -type Distribution_BucketOptions_Exponential struct { - // Must be greater than 0. - NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"` - // Must be greater than 1. - GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor,proto3" json:"growth_factor,omitempty"` - // Must be greater than 0. - Scale float64 `protobuf:"fixed64,3,opt,name=scale,proto3" json:"scale,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_BucketOptions_Exponential) Reset() { - *m = Distribution_BucketOptions_Exponential{} -} -func (m *Distribution_BucketOptions_Exponential) String() string { return proto.CompactTextString(m) } -func (*Distribution_BucketOptions_Exponential) ProtoMessage() {} -func (*Distribution_BucketOptions_Exponential) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 1, 1} -} -func (m *Distribution_BucketOptions_Exponential) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_BucketOptions_Exponential.Unmarshal(m, b) -} -func (m *Distribution_BucketOptions_Exponential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_BucketOptions_Exponential.Marshal(b, m, deterministic) -} -func (dst *Distribution_BucketOptions_Exponential) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_BucketOptions_Exponential.Merge(dst, src) -} -func (m *Distribution_BucketOptions_Exponential) XXX_Size() int { - return xxx_messageInfo_Distribution_BucketOptions_Exponential.Size(m) -} -func (m *Distribution_BucketOptions_Exponential) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_BucketOptions_Exponential.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_BucketOptions_Exponential proto.InternalMessageInfo - -func (m *Distribution_BucketOptions_Exponential) GetNumFiniteBuckets() int32 { - if m != nil { - return m.NumFiniteBuckets - } - return 0 -} - -func (m *Distribution_BucketOptions_Exponential) GetGrowthFactor() float64 { - if m != nil { - return m.GrowthFactor - } - return 0 -} - -func (m *Distribution_BucketOptions_Exponential) GetScale() float64 { - if m != nil { - return m.Scale - } - return 0 -} - -// Specifies a set of buckets with arbitrary widths. -// -// There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following -// boundaries: -// -// Upper bound (0 <= i < N-1): bounds[i] -// Lower bound (1 <= i < N); bounds[i - 1] -// -// The `bounds` field must contain at least one element. If `bounds` has -// only one element, then there are no finite buckets, and that single -// element is the common boundary of the overflow and underflow buckets. -type Distribution_BucketOptions_Explicit struct { - // The values must be monotonically increasing. - Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds,proto3" json:"bounds,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_BucketOptions_Explicit) Reset() { *m = Distribution_BucketOptions_Explicit{} } -func (m *Distribution_BucketOptions_Explicit) String() string { return proto.CompactTextString(m) } -func (*Distribution_BucketOptions_Explicit) ProtoMessage() {} -func (*Distribution_BucketOptions_Explicit) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 1, 2} -} -func (m *Distribution_BucketOptions_Explicit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_BucketOptions_Explicit.Unmarshal(m, b) -} -func (m *Distribution_BucketOptions_Explicit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_BucketOptions_Explicit.Marshal(b, m, deterministic) -} -func (dst *Distribution_BucketOptions_Explicit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_BucketOptions_Explicit.Merge(dst, src) -} -func (m *Distribution_BucketOptions_Explicit) XXX_Size() int { - return xxx_messageInfo_Distribution_BucketOptions_Explicit.Size(m) -} -func (m *Distribution_BucketOptions_Explicit) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_BucketOptions_Explicit.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_BucketOptions_Explicit proto.InternalMessageInfo - -func (m *Distribution_BucketOptions_Explicit) GetBounds() []float64 { - if m != nil { - return m.Bounds - } - return nil -} - -// Exemplars are example points that may be used to annotate aggregated -// distribution values. They are metadata that gives information about a -// particular value added to a Distribution bucket, such as a trace ID that -// was active when a value was added. They may contain further information, -// such as a example values and timestamps, origin, etc. -type Distribution_Exemplar struct { - // Value of the exemplar point. This value determines to which bucket the - // exemplar belongs. - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - // The observation (sampling) time of the above value. - Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Contextual information about the example value. Examples are: - // - // Trace: type.googleapis.com/google.monitoring.v3.SpanContext - // - // Literal string: type.googleapis.com/google.protobuf.StringValue - // - // Labels dropped during aggregation: - // type.googleapis.com/google.monitoring.v3.DroppedLabels - // - // There may be only a single attachment of any given message type in a - // single exemplar, and this is enforced by the system. - Attachments []*any.Any `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_Exemplar) Reset() { *m = Distribution_Exemplar{} } -func (m *Distribution_Exemplar) String() string { return proto.CompactTextString(m) } -func (*Distribution_Exemplar) ProtoMessage() {} -func (*Distribution_Exemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_distribution_0ca687210cf00797, []int{0, 2} -} -func (m *Distribution_Exemplar) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_Exemplar.Unmarshal(m, b) -} -func (m *Distribution_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_Exemplar.Marshal(b, m, deterministic) -} -func (dst *Distribution_Exemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_Exemplar.Merge(dst, src) -} -func (m *Distribution_Exemplar) XXX_Size() int { - return xxx_messageInfo_Distribution_Exemplar.Size(m) -} -func (m *Distribution_Exemplar) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_Exemplar.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_Exemplar proto.InternalMessageInfo - -func (m *Distribution_Exemplar) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *Distribution_Exemplar) GetTimestamp() *timestamp.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *Distribution_Exemplar) GetAttachments() []*any.Any { - if m != nil { - return m.Attachments - } - return nil -} - -func init() { - proto.RegisterType((*Distribution)(nil), "google.api.Distribution") - proto.RegisterType((*Distribution_Range)(nil), "google.api.Distribution.Range") - proto.RegisterType((*Distribution_BucketOptions)(nil), "google.api.Distribution.BucketOptions") - proto.RegisterType((*Distribution_BucketOptions_Linear)(nil), "google.api.Distribution.BucketOptions.Linear") - proto.RegisterType((*Distribution_BucketOptions_Exponential)(nil), "google.api.Distribution.BucketOptions.Exponential") - proto.RegisterType((*Distribution_BucketOptions_Explicit)(nil), "google.api.Distribution.BucketOptions.Explicit") - proto.RegisterType((*Distribution_Exemplar)(nil), "google.api.Distribution.Exemplar") -} - -func init() { - proto.RegisterFile("google/api/distribution.proto", fileDescriptor_distribution_0ca687210cf00797) -} - -var fileDescriptor_distribution_0ca687210cf00797 = []byte{ - // 631 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xed, 0x6a, 0xd4, 0x40, - 0x14, 0x6d, 0x9a, 0xdd, 0x6d, 0x7b, 0xb7, 0x5b, 0xeb, 0x58, 0x25, 0x06, 0xd4, 0xb5, 0x05, 0x59, - 0x50, 0xb3, 0xb0, 0x8a, 0x0a, 0xfe, 0x90, 0x6e, 0x3f, 0xac, 0xa0, 0xb4, 0x8c, 0xe2, 0x0f, 0x11, - 0xc2, 0x6c, 0x76, 0x92, 0x0e, 0x26, 0x33, 0x69, 0x32, 0x69, 0xb7, 0xaf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, - 0xef, 0xb7, 0x8f, 0x3e, 0x4c, 0x3a, 0xba, 0xec, 0xc5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, - 0xf1, 0xc2, 0x23, 0x3f, 0x05, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/experimental.pb.go b/vendor/google.golang.org/genproto/googleapis/api/experimental.pb.go deleted file mode 100644 index bee7322..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/experimental.pb.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/experimental/experimental.proto - -package api // import "google.golang.org/genproto/googleapis/api" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "google.golang.org/genproto/googleapis/api/annotations" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// Experimental service configuration. These configuration options can -// only be used by whitelisted users. -type Experimental struct { - // Authorization configuration. - Authorization *AuthorizationConfig `protobuf:"bytes,8,opt,name=authorization,proto3" json:"authorization,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Experimental) Reset() { *m = Experimental{} } -func (m *Experimental) String() string { return proto.CompactTextString(m) } -func (*Experimental) ProtoMessage() {} -func (*Experimental) Descriptor() ([]byte, []int) { - return fileDescriptor_experimental_7a347166b9461ea0, []int{0} -} -func (m *Experimental) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Experimental.Unmarshal(m, b) -} -func (m *Experimental) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Experimental.Marshal(b, m, deterministic) -} -func (dst *Experimental) XXX_Merge(src proto.Message) { - xxx_messageInfo_Experimental.Merge(dst, src) -} -func (m *Experimental) XXX_Size() int { - return xxx_messageInfo_Experimental.Size(m) -} -func (m *Experimental) XXX_DiscardUnknown() { - xxx_messageInfo_Experimental.DiscardUnknown(m) -} - -var xxx_messageInfo_Experimental proto.InternalMessageInfo - -func (m *Experimental) GetAuthorization() *AuthorizationConfig { - if m != nil { - return m.Authorization - } - return nil -} - -func init() { - proto.RegisterType((*Experimental)(nil), "google.api.Experimental") -} - -func init() { - proto.RegisterFile("google/api/experimental/experimental.proto", fileDescriptor_experimental_7a347166b9461ea0) -} - -var fileDescriptor_experimental_7a347166b9461ea0 = []byte{ - // 204 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4a, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xad, 0x28, 0x48, 0x2d, 0xca, 0xcc, 0x4d, 0xcd, - 0x2b, 0x49, 0xcc, 0x41, 0xe1, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x71, 0x41, 0xd4, 0xea, - 0x25, 0x16, 0x64, 0x4a, 0xc9, 0x20, 0xe9, 0x4b, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, - 0xcf, 0x2b, 0x86, 0xa8, 0x94, 0x32, 0xc2, 0x65, 0x6a, 0x62, 0x69, 0x49, 0x46, 0x7e, 0x51, 0x66, - 0x15, 0x58, 0x75, 0x7c, 0x72, 0x7e, 0x5e, 0x5a, 0x66, 0x3a, 0x44, 0x8f, 0x52, 0x28, 0x17, 0x8f, - 0x2b, 0x92, 0x52, 0x21, 0x57, 0x2e, 0x5e, 0x14, 0xd5, 0x12, 0x1c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, - 0xf2, 0x7a, 0x08, 0x57, 0xe8, 0x39, 0x22, 0x2b, 0x70, 0x06, 0x9b, 0x16, 0x84, 0xaa, 0xcb, 0x29, - 0x9a, 0x8b, 0x2f, 0x39, 0x3f, 0x17, 0x49, 0x93, 0x93, 0x20, 0xb2, 0x35, 0x01, 0x20, 0xbb, 0x03, - 0x18, 0xa3, 0x74, 0xa1, 0x0a, 0xd2, 0xf3, 0x73, 0x12, 0xf3, 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, - 0xd3, 0x53, 0xf3, 0xc0, 0x2e, 0xd3, 0x87, 0x48, 0x25, 0x16, 0x64, 0x16, 0x83, 0x3c, 0x64, 0x9d, - 0x58, 0x90, 0xb9, 0x88, 0x89, 0xc5, 0xdd, 0x31, 0xc0, 0x33, 0x89, 0x0d, 0xac, 0xc0, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0xa0, 0x95, 0x20, 0xe5, 0x46, 0x01, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/label/label.pb.go b/vendor/google.golang.org/genproto/googleapis/api/label/label.pb.go deleted file mode 100644 index 4fbffb3..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/label/label.pb.go +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/label.proto - -package label // import "google.golang.org/genproto/googleapis/api/label" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// Value types that can be used as label values. -type LabelDescriptor_ValueType int32 - -const ( - // A variable-length string. This is the default. - LabelDescriptor_STRING LabelDescriptor_ValueType = 0 - // Boolean; true or false. - LabelDescriptor_BOOL LabelDescriptor_ValueType = 1 - // A 64-bit signed integer. - LabelDescriptor_INT64 LabelDescriptor_ValueType = 2 -) - -var LabelDescriptor_ValueType_name = map[int32]string{ - 0: "STRING", - 1: "BOOL", - 2: "INT64", -} -var LabelDescriptor_ValueType_value = map[string]int32{ - "STRING": 0, - "BOOL": 1, - "INT64": 2, -} - -func (x LabelDescriptor_ValueType) String() string { - return proto.EnumName(LabelDescriptor_ValueType_name, int32(x)) -} -func (LabelDescriptor_ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_label_d86ce3ed040f9325, []int{0, 0} -} - -// A description of a label. -type LabelDescriptor struct { - // The label key. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The type of data that can be assigned to the label. - ValueType LabelDescriptor_ValueType `protobuf:"varint,2,opt,name=value_type,json=valueType,proto3,enum=google.api.LabelDescriptor_ValueType" json:"value_type,omitempty"` - // A human-readable description for the label. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LabelDescriptor) Reset() { *m = LabelDescriptor{} } -func (m *LabelDescriptor) String() string { return proto.CompactTextString(m) } -func (*LabelDescriptor) ProtoMessage() {} -func (*LabelDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_label_d86ce3ed040f9325, []int{0} -} -func (m *LabelDescriptor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LabelDescriptor.Unmarshal(m, b) -} -func (m *LabelDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LabelDescriptor.Marshal(b, m, deterministic) -} -func (dst *LabelDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_LabelDescriptor.Merge(dst, src) -} -func (m *LabelDescriptor) XXX_Size() int { - return xxx_messageInfo_LabelDescriptor.Size(m) -} -func (m *LabelDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_LabelDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_LabelDescriptor proto.InternalMessageInfo - -func (m *LabelDescriptor) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *LabelDescriptor) GetValueType() LabelDescriptor_ValueType { - if m != nil { - return m.ValueType - } - return LabelDescriptor_STRING -} - -func (m *LabelDescriptor) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func init() { - proto.RegisterType((*LabelDescriptor)(nil), "google.api.LabelDescriptor") - proto.RegisterEnum("google.api.LabelDescriptor_ValueType", LabelDescriptor_ValueType_name, LabelDescriptor_ValueType_value) -} - -func init() { proto.RegisterFile("google/api/label.proto", fileDescriptor_label_d86ce3ed040f9325) } - -var fileDescriptor_label_d86ce3ed040f9325 = []byte{ - // 252 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0xcf, 0x49, 0x4c, 0x4a, 0xcd, 0xd1, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x88, 0xeb, 0x25, 0x16, 0x64, 0x2a, 0xed, 0x64, 0xe4, 0xe2, 0xf7, - 0x01, 0xc9, 0xb9, 0xa4, 0x16, 0x27, 0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0x09, 0x09, 0x70, 0x31, - 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x2e, 0x5c, 0x5c, - 0x65, 0x89, 0x39, 0xa5, 0xa9, 0xf1, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x7c, - 0x46, 0xaa, 0x7a, 0x08, 0x63, 0xf4, 0xd0, 0x8c, 0xd0, 0x0b, 0x03, 0xa9, 0x0e, 0xa9, 0x2c, 0x48, - 0x0d, 0xe2, 0x2c, 0x83, 0x31, 0x85, 0x14, 0xb8, 0xb8, 0x53, 0xa0, 0x4a, 0x32, 0xf3, 0xf3, 0x24, - 0x98, 0xc1, 0xe6, 0x23, 0x0b, 0x29, 0xe9, 0x70, 0x71, 0xc2, 0x75, 0x0a, 0x71, 0x71, 0xb1, 0x05, - 0x87, 0x04, 0x79, 0xfa, 0xb9, 0x0b, 0x30, 0x08, 0x71, 0x70, 0xb1, 0x38, 0xf9, 0xfb, 0xfb, 0x08, - 0x30, 0x0a, 0x71, 0x72, 0xb1, 0x7a, 0xfa, 0x85, 0x98, 0x99, 0x08, 0x30, 0x39, 0xc5, 0x73, 0xf1, - 0x25, 0xe7, 0xe7, 0x22, 0x39, 0xc3, 0x89, 0x0b, 0xec, 0x8e, 0x00, 0x90, 0x2f, 0x03, 0x18, 0xa3, - 0x4c, 0xa1, 0x32, 0xe9, 0xf9, 0x39, 0x89, 0x79, 0xe9, 0x7a, 0xf9, 0x45, 0xe9, 0xfa, 0xe9, 0xa9, - 0x79, 0xe0, 0x30, 0xd0, 0x87, 0x48, 0x25, 0x16, 0x64, 0x16, 0x23, 0x82, 0xc7, 0x1a, 0x4c, 0xfe, - 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xe2, 0xee, 0x18, 0xe0, 0x99, 0xc4, 0x06, 0x56, 0x6b, 0x0c, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x57, 0x04, 0xaa, 0x1f, 0x49, 0x01, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go deleted file mode 100644 index ae29b20..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/launch_stage.proto - -package api // import "google.golang.org/genproto/googleapis/api" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// The launch stage as defined by [Google Cloud Platform -// Launch Stages](http://cloud.google.com/terms/launch-stages). -type LaunchStage int32 - -const ( - // Do not use this default value. - LaunchStage_LAUNCH_STAGE_UNSPECIFIED LaunchStage = 0 - // Early Access features are limited to a closed group of testers. To use - // these features, you must sign up in advance and sign a Trusted Tester - // agreement (which includes confidentiality provisions). These features may - // be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - LaunchStage_EARLY_ACCESS LaunchStage = 1 - // Alpha is a limited availability test for releases before they are cleared - // for widespread use. By Alpha, all significant design issues are resolved - // and we are in the process of verifying functionality. Alpha customers - // need to apply for access, agree to applicable terms, and have their - // projects whitelisted. Alpha releases don’t have to be feature complete, - // no SLAs are provided, and there are no technical support obligations, but - // they will be far enough along that customers can actually use them in - // test environments or for limited-use tests -- just like they would in - // normal production cases. - LaunchStage_ALPHA LaunchStage = 2 - // Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a - // Beta release. Products will be complete from a feature perspective, but - // may have some open outstanding issues. Beta releases are suitable for - // limited production use cases. - LaunchStage_BETA LaunchStage = 3 - // GA features are open to all developers and are considered stable and - // fully qualified for production use. - LaunchStage_GA LaunchStage = 4 - // Deprecated features are scheduled to be shut down and removed. For more - // information, see the “Deprecation Policy” section of our [Terms of - // Service](https://cloud.google.com/terms/) - // and the [Google Cloud Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage_DEPRECATED LaunchStage = 5 -) - -var LaunchStage_name = map[int32]string{ - 0: "LAUNCH_STAGE_UNSPECIFIED", - 1: "EARLY_ACCESS", - 2: "ALPHA", - 3: "BETA", - 4: "GA", - 5: "DEPRECATED", -} -var LaunchStage_value = map[string]int32{ - "LAUNCH_STAGE_UNSPECIFIED": 0, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5, -} - -func (x LaunchStage) String() string { - return proto.EnumName(LaunchStage_name, int32(x)) -} -func (LaunchStage) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_launch_stage_46ed64e66aa6329c, []int{0} -} - -func init() { - proto.RegisterEnum("google.api.LaunchStage", LaunchStage_name, LaunchStage_value) -} - -func init() { - proto.RegisterFile("google/api/launch_stage.proto", fileDescriptor_launch_stage_46ed64e66aa6329c) -} - -var fileDescriptor_launch_stage_46ed64e66aa6329c = []byte{ - // 225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xc1, 0x4a, 0xc3, 0x40, - 0x14, 0x45, 0x6d, 0x4c, 0x8b, 0x3e, 0xa5, 0x3c, 0x66, 0xe5, 0x42, 0x7f, 0x40, 0x30, 0x59, 0xb8, - 0x74, 0xf5, 0x32, 0x79, 0xa6, 0x81, 0x50, 0x86, 0x4e, 0xba, 0xb0, 0x9b, 0x30, 0x96, 0x30, 0x8e, - 0xc4, 0xcc, 0xd0, 0xd6, 0x1f, 0xf2, 0x4b, 0x25, 0x89, 0x60, 0xd7, 0xe7, 0xc0, 0x3d, 0x17, 0x1e, - 0xac, 0xf7, 0xb6, 0x6b, 0x53, 0x13, 0x5c, 0xda, 0x99, 0xef, 0x7e, 0xff, 0xd1, 0x1c, 0x4f, 0xc6, - 0xb6, 0x49, 0x38, 0xf8, 0x93, 0x17, 0x30, 0xe1, 0xc4, 0x04, 0xf7, 0xf8, 0x09, 0x37, 0xd5, 0x68, - 0xe8, 0x41, 0x10, 0xf7, 0x70, 0x57, 0xd1, 0x76, 0x2d, 0x57, 0x8d, 0xae, 0xa9, 0xe0, 0x66, 0xbb, - 0xd6, 0x8a, 0x65, 0xf9, 0x5a, 0x72, 0x8e, 0x17, 0x02, 0xe1, 0x96, 0x69, 0x53, 0xbd, 0x35, 0x24, - 0x25, 0x6b, 0x8d, 0x33, 0x71, 0x0d, 0x73, 0xaa, 0xd4, 0x8a, 0x30, 0x12, 0x57, 0x10, 0x67, 0x5c, - 0x13, 0x5e, 0x8a, 0x05, 0x44, 0x05, 0x61, 0x2c, 0x96, 0x00, 0x39, 0xab, 0x0d, 0x4b, 0xaa, 0x39, - 0xc7, 0x79, 0xb6, 0x83, 0xe5, 0xde, 0x7f, 0x25, 0xff, 0xeb, 0x19, 0x9e, 0x6d, 0xab, 0xa1, 0x4d, - 0xcd, 0x76, 0x4f, 0x7f, 0xdc, 0xfa, 0xce, 0xf4, 0x36, 0xf1, 0x07, 0x9b, 0xda, 0xb6, 0x1f, 0xcb, - 0xd3, 0x09, 0x99, 0xe0, 0x8e, 0xc3, 0xb7, 0x17, 0x13, 0xdc, 0x4f, 0x14, 0x17, 0xa4, 0xca, 0xf7, - 0xc5, 0x28, 0x3c, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xd5, 0x39, 0x1a, 0xfb, 0x00, 0x00, - 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/metric/metric.pb.go b/vendor/google.golang.org/genproto/googleapis/api/metric/metric.pb.go deleted file mode 100644 index e209dc5..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/metric/metric.pb.go +++ /dev/null @@ -1,476 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/metric.proto - -package metric // import "google.golang.org/genproto/googleapis/api/metric" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import duration "github.com/golang/protobuf/ptypes/duration" -import api "google.golang.org/genproto/googleapis/api" -import label "google.golang.org/genproto/googleapis/api/label" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// The kind of measurement. It describes how the data is reported. -type MetricDescriptor_MetricKind int32 - -const ( - // Do not use this default value. - MetricDescriptor_METRIC_KIND_UNSPECIFIED MetricDescriptor_MetricKind = 0 - // An instantaneous measurement of a value. - MetricDescriptor_GAUGE MetricDescriptor_MetricKind = 1 - // The change in a value during a time interval. - MetricDescriptor_DELTA MetricDescriptor_MetricKind = 2 - // A value accumulated over a time interval. Cumulative - // measurements in a time series should have the same start time - // and increasing end times, until an event resets the cumulative - // value to zero and sets a new start time for the following - // points. - MetricDescriptor_CUMULATIVE MetricDescriptor_MetricKind = 3 -) - -var MetricDescriptor_MetricKind_name = map[int32]string{ - 0: "METRIC_KIND_UNSPECIFIED", - 1: "GAUGE", - 2: "DELTA", - 3: "CUMULATIVE", -} -var MetricDescriptor_MetricKind_value = map[string]int32{ - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3, -} - -func (x MetricDescriptor_MetricKind) String() string { - return proto.EnumName(MetricDescriptor_MetricKind_name, int32(x)) -} -func (MetricDescriptor_MetricKind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_metric_6e51d2a4cf4adf4d, []int{0, 0} -} - -// The value type of a metric. -type MetricDescriptor_ValueType int32 - -const ( - // Do not use this default value. - MetricDescriptor_VALUE_TYPE_UNSPECIFIED MetricDescriptor_ValueType = 0 - // The value is a boolean. - // This value type can be used only if the metric kind is `GAUGE`. - MetricDescriptor_BOOL MetricDescriptor_ValueType = 1 - // The value is a signed 64-bit integer. - MetricDescriptor_INT64 MetricDescriptor_ValueType = 2 - // The value is a double precision floating point number. - MetricDescriptor_DOUBLE MetricDescriptor_ValueType = 3 - // The value is a text string. - // This value type can be used only if the metric kind is `GAUGE`. - MetricDescriptor_STRING MetricDescriptor_ValueType = 4 - // The value is a [`Distribution`][google.api.Distribution]. - MetricDescriptor_DISTRIBUTION MetricDescriptor_ValueType = 5 - // The value is money. - MetricDescriptor_MONEY MetricDescriptor_ValueType = 6 -) - -var MetricDescriptor_ValueType_name = map[int32]string{ - 0: "VALUE_TYPE_UNSPECIFIED", - 1: "BOOL", - 2: "INT64", - 3: "DOUBLE", - 4: "STRING", - 5: "DISTRIBUTION", - 6: "MONEY", -} -var MetricDescriptor_ValueType_value = map[string]int32{ - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6, -} - -func (x MetricDescriptor_ValueType) String() string { - return proto.EnumName(MetricDescriptor_ValueType_name, int32(x)) -} -func (MetricDescriptor_ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_metric_6e51d2a4cf4adf4d, []int{0, 1} -} - -// Defines a metric type and its schema. Once a metric descriptor is created, -// deleting or altering it stops data collection and makes the metric type's -// existing data unusable. -type MetricDescriptor struct { - // The resource name of the metric descriptor. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The metric type, including its DNS name prefix. The type is not - // URL-encoded. All user-defined metric types have the DNS name - // `custom.googleapis.com` or `external.googleapis.com`. Metric types should - // use a natural hierarchical grouping. For example: - // - // "custom.googleapis.com/invoice/paid/amount" - // "external.googleapis.com/prometheus/up" - // "appengine.googleapis.com/http/server/response_latencies" - Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"` - // The set of labels that can be used to describe a specific - // instance of this metric type. For example, the - // `appengine.googleapis.com/http/server/response_latencies` metric - // type has a label for the HTTP response code, `response_code`, so - // you can look at latencies for successful responses or just - // for responses that failed. - Labels []*label.LabelDescriptor `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` - // Whether the metric records instantaneous values, changes to a value, etc. - // Some combinations of `metric_kind` and `value_type` might not be supported. - MetricKind MetricDescriptor_MetricKind `protobuf:"varint,3,opt,name=metric_kind,json=metricKind,proto3,enum=google.api.MetricDescriptor_MetricKind" json:"metric_kind,omitempty"` - // Whether the measurement is an integer, a floating-point number, etc. - // Some combinations of `metric_kind` and `value_type` might not be supported. - ValueType MetricDescriptor_ValueType `protobuf:"varint,4,opt,name=value_type,json=valueType,proto3,enum=google.api.MetricDescriptor_ValueType" json:"value_type,omitempty"` - // The unit in which the metric value is reported. It is only applicable - // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The - // supported units are a subset of [The Unified Code for Units of - // Measure](http://unitsofmeasure.org/ucum.html) standard: - // - // **Basic units (UNIT)** - // - // * `bit` bit - // * `By` byte - // * `s` second - // * `min` minute - // * `h` hour - // * `d` day - // - // **Prefixes (PREFIX)** - // - // * `k` kilo (10**3) - // * `M` mega (10**6) - // * `G` giga (10**9) - // * `T` tera (10**12) - // * `P` peta (10**15) - // * `E` exa (10**18) - // * `Z` zetta (10**21) - // * `Y` yotta (10**24) - // * `m` milli (10**-3) - // * `u` micro (10**-6) - // * `n` nano (10**-9) - // * `p` pico (10**-12) - // * `f` femto (10**-15) - // * `a` atto (10**-18) - // * `z` zepto (10**-21) - // * `y` yocto (10**-24) - // * `Ki` kibi (2**10) - // * `Mi` mebi (2**20) - // * `Gi` gibi (2**30) - // * `Ti` tebi (2**40) - // - // **Grammar** - // - // The grammar also includes these connectors: - // - // * `/` division (as an infix operator, e.g. `1/s`). - // * `.` multiplication (as an infix operator, e.g. `GBy.d`) - // - // The grammar for a unit is as follows: - // - // Expression = Component { "." Component } { "/" Component } ; - // - // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - // | Annotation - // | "1" - // ; - // - // Annotation = "{" NAME "}" ; - // - // Notes: - // - // * `Annotation` is just a comment if it follows a `UNIT` and is - // equivalent to `1` if it is used alone. For examples, - // `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. - // * `NAME` is a sequence of non-blank printable ASCII characters not - // containing '{' or '}'. - // * `1` represents dimensionless value 1, such as in `1/s`. - // * `%` represents dimensionless value 1/100, and annotates values giving - // a percentage. - Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"` - // A detailed description of the metric, which can be used in documentation. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - // A concise name for the metric, which can be displayed in user interfaces. - // Use sentence case without an ending period, for example "Request count". - // This field is optional but it is recommended to be set for any metrics - // associated with user-visible concepts, such as Quota. - DisplayName string `protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // Optional. Metadata which can be used to guide usage of the metric. - Metadata *MetricDescriptor_MetricDescriptorMetadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricDescriptor) Reset() { *m = MetricDescriptor{} } -func (m *MetricDescriptor) String() string { return proto.CompactTextString(m) } -func (*MetricDescriptor) ProtoMessage() {} -func (*MetricDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_metric_6e51d2a4cf4adf4d, []int{0} -} -func (m *MetricDescriptor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MetricDescriptor.Unmarshal(m, b) -} -func (m *MetricDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MetricDescriptor.Marshal(b, m, deterministic) -} -func (dst *MetricDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricDescriptor.Merge(dst, src) -} -func (m *MetricDescriptor) XXX_Size() int { - return xxx_messageInfo_MetricDescriptor.Size(m) -} -func (m *MetricDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_MetricDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricDescriptor proto.InternalMessageInfo - -func (m *MetricDescriptor) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetricDescriptor) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *MetricDescriptor) GetLabels() []*label.LabelDescriptor { - if m != nil { - return m.Labels - } - return nil -} - -func (m *MetricDescriptor) GetMetricKind() MetricDescriptor_MetricKind { - if m != nil { - return m.MetricKind - } - return MetricDescriptor_METRIC_KIND_UNSPECIFIED -} - -func (m *MetricDescriptor) GetValueType() MetricDescriptor_ValueType { - if m != nil { - return m.ValueType - } - return MetricDescriptor_VALUE_TYPE_UNSPECIFIED -} - -func (m *MetricDescriptor) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *MetricDescriptor) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *MetricDescriptor) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *MetricDescriptor) GetMetadata() *MetricDescriptor_MetricDescriptorMetadata { - if m != nil { - return m.Metadata - } - return nil -} - -// Additional annotations that can be used to guide the usage of a metric. -type MetricDescriptor_MetricDescriptorMetadata struct { - // The launch stage of the metric definition. - LaunchStage api.LaunchStage `protobuf:"varint,1,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage" json:"launch_stage,omitempty"` - // The sampling period of metric data points. For metrics which are written - // periodically, consecutive data points are stored at this time interval, - // excluding data loss due to errors. Metrics with a higher granularity have - // a smaller sampling period. - SamplePeriod *duration.Duration `protobuf:"bytes,2,opt,name=sample_period,json=samplePeriod,proto3" json:"sample_period,omitempty"` - // The delay of data points caused by ingestion. Data points older than this - // age are guaranteed to be ingested and available to be read, excluding - // data loss due to errors. - IngestDelay *duration.Duration `protobuf:"bytes,3,opt,name=ingest_delay,json=ingestDelay,proto3" json:"ingest_delay,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricDescriptor_MetricDescriptorMetadata) Reset() { - *m = MetricDescriptor_MetricDescriptorMetadata{} -} -func (m *MetricDescriptor_MetricDescriptorMetadata) String() string { return proto.CompactTextString(m) } -func (*MetricDescriptor_MetricDescriptorMetadata) ProtoMessage() {} -func (*MetricDescriptor_MetricDescriptorMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_metric_6e51d2a4cf4adf4d, []int{0, 0} -} -func (m *MetricDescriptor_MetricDescriptorMetadata) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata.Unmarshal(m, b) -} -func (m *MetricDescriptor_MetricDescriptorMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata.Marshal(b, m, deterministic) -} -func (dst *MetricDescriptor_MetricDescriptorMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata.Merge(dst, src) -} -func (m *MetricDescriptor_MetricDescriptorMetadata) XXX_Size() int { - return xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata.Size(m) -} -func (m *MetricDescriptor_MetricDescriptorMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricDescriptor_MetricDescriptorMetadata proto.InternalMessageInfo - -func (m *MetricDescriptor_MetricDescriptorMetadata) GetLaunchStage() api.LaunchStage { - if m != nil { - return m.LaunchStage - } - return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED -} - -func (m *MetricDescriptor_MetricDescriptorMetadata) GetSamplePeriod() *duration.Duration { - if m != nil { - return m.SamplePeriod - } - return nil -} - -func (m *MetricDescriptor_MetricDescriptorMetadata) GetIngestDelay() *duration.Duration { - if m != nil { - return m.IngestDelay - } - return nil -} - -// A specific metric, identified by specifying values for all of the -// labels of a [`MetricDescriptor`][google.api.MetricDescriptor]. -type Metric struct { - // An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. - // For example, `custom.googleapis.com/invoice/paid/amount`. - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // The set of label values that uniquely identify this metric. All - // labels listed in the `MetricDescriptor` must be assigned values. - Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Metric) Reset() { *m = Metric{} } -func (m *Metric) String() string { return proto.CompactTextString(m) } -func (*Metric) ProtoMessage() {} -func (*Metric) Descriptor() ([]byte, []int) { - return fileDescriptor_metric_6e51d2a4cf4adf4d, []int{1} -} -func (m *Metric) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Metric.Unmarshal(m, b) -} -func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Metric.Marshal(b, m, deterministic) -} -func (dst *Metric) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metric.Merge(dst, src) -} -func (m *Metric) XXX_Size() int { - return xxx_messageInfo_Metric.Size(m) -} -func (m *Metric) XXX_DiscardUnknown() { - xxx_messageInfo_Metric.DiscardUnknown(m) -} - -var xxx_messageInfo_Metric proto.InternalMessageInfo - -func (m *Metric) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Metric) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func init() { - proto.RegisterType((*MetricDescriptor)(nil), "google.api.MetricDescriptor") - proto.RegisterType((*MetricDescriptor_MetricDescriptorMetadata)(nil), "google.api.MetricDescriptor.MetricDescriptorMetadata") - proto.RegisterType((*Metric)(nil), "google.api.Metric") - proto.RegisterMapType((map[string]string)(nil), "google.api.Metric.LabelsEntry") - proto.RegisterEnum("google.api.MetricDescriptor_MetricKind", MetricDescriptor_MetricKind_name, MetricDescriptor_MetricKind_value) - proto.RegisterEnum("google.api.MetricDescriptor_ValueType", MetricDescriptor_ValueType_name, MetricDescriptor_ValueType_value) -} - -func init() { proto.RegisterFile("google/api/metric.proto", fileDescriptor_metric_6e51d2a4cf4adf4d) } - -var fileDescriptor_metric_6e51d2a4cf4adf4d = []byte{ - // 648 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x5d, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xf9, 0x31, 0xcd, 0x38, 0x44, 0xd6, 0x0a, 0xb5, 0x26, 0x15, 0x55, 0xc8, 0x03, 0xe4, - 0x29, 0x91, 0x52, 0x28, 0x50, 0x10, 0x52, 0x52, 0x9b, 0x60, 0x35, 0x71, 0x82, 0x6b, 0x57, 0x2a, - 0x2f, 0xd6, 0x36, 0x5e, 0x8c, 0x55, 0xc7, 0x36, 0xb6, 0x53, 0x29, 0xa7, 0xe0, 0x0e, 0x5c, 0x86, - 0x0b, 0x70, 0x20, 0xb4, 0xbb, 0x4e, 0xe2, 0x06, 0x51, 0xf1, 0x94, 0x99, 0xf9, 0xbe, 0x99, 0x9d, - 0xf1, 0x37, 0x13, 0x38, 0xf0, 0xa2, 0xc8, 0x0b, 0x48, 0x0f, 0xc7, 0x7e, 0x6f, 0x41, 0xb2, 0xc4, - 0x9f, 0x77, 0xe3, 0x24, 0xca, 0x22, 0x04, 0x1c, 0xe8, 0xe2, 0xd8, 0x6f, 0xee, 0x17, 0x48, 0x01, - 0xbe, 0x26, 0x01, 0xe7, 0x34, 0x9f, 0xde, 0x89, 0x2f, 0xc3, 0xf9, 0x37, 0x27, 0xcd, 0xb0, 0x47, - 0x72, 0xf8, 0x28, 0x87, 0x99, 0x77, 0xbd, 0xfc, 0xda, 0x73, 0x97, 0x09, 0xce, 0xfc, 0x28, 0xe4, - 0x78, 0xfb, 0x97, 0x08, 0xf2, 0x84, 0xbd, 0xa9, 0x92, 0x74, 0x9e, 0xf8, 0x71, 0x16, 0x25, 0x08, - 0x41, 0x25, 0xc4, 0x0b, 0xa2, 0x08, 0x2d, 0x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c, 0x4a, 0xb9, 0x70, 0x2b, 0x27, 0x3b, 0xb7, 0x72, 0xf4, 0xf7, 0x2a, - 0xf0, 0x93, 0x49, 0xb5, 0x30, 0x4b, 0x56, 0xeb, 0x73, 0x69, 0xbe, 0x05, 0xa9, 0x10, 0x46, 0x32, - 0x94, 0x6f, 0xc8, 0x2a, 0xbf, 0x4c, 0x6a, 0xa2, 0xc7, 0x50, 0x65, 0xbb, 0xcc, 0x14, 0xab, 0x99, - 0xdc, 0x39, 0x2d, 0xbd, 0x11, 0x86, 0x0e, 0x34, 0xe6, 0xd1, 0xa2, 0xf0, 0xce, 0x50, 0xe2, 0x0f, - 0xcd, 0xa8, 0x1a, 0x33, 0xe1, 0xcb, 0xeb, 0x1c, 0xf2, 0xa2, 0x00, 0x87, 0x5e, 0x37, 0x4a, 0xbc, - 0x9e, 0x47, 0x42, 0xa6, 0x55, 0x8f, 0x43, 0x38, 0xf6, 0xd3, 0xc2, 0xff, 0xd2, 0x3b, 0xfe, 0xf3, - 0xb3, 0x54, 0x19, 0x0d, 0x66, 0xfa, 0xb5, 0xc8, 0xa8, 0xc7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, - 0xee, 0x00, 0xfa, 0x56, 0xc1, 0x04, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/monitoredres/monitored_resource.pb.go b/vendor/google.golang.org/genproto/googleapis/api/monitoredres/monitored_resource.pb.go deleted file mode 100644 index 3aa2fb1..0000000 --- a/vendor/google.golang.org/genproto/googleapis/api/monitoredres/monitored_resource.pb.go +++ /dev/null @@ -1,288 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/api/monitored_resource.proto - -package monitoredres // import "google.golang.org/genproto/googleapis/api/monitoredres" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _struct "github.com/golang/protobuf/ptypes/struct" -import label "google.golang.org/genproto/googleapis/api/label" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// An object that describes the schema of a [MonitoredResource][google.api.MonitoredResource] object using a -// type name and a set of labels. For example, the monitored resource -// descriptor for Google Compute Engine VM instances has a type of -// `"gce_instance"` and specifies the use of the labels `"instance_id"` and -// `"zone"` to identify particular VM instances. -// -// Different APIs can support different monitored resource types. APIs generally -// provide a `list` method that returns the monitored resource descriptors used -// by the API. -type MonitoredResourceDescriptor struct { - // Optional. The resource name of the monitored resource descriptor: - // `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where - // {type} is the value of the `type` field in this object and - // {project_id} is a project ID that provides API-specific context for - // accessing the type. APIs that do not use project information can use the - // resource name format `"monitoredResourceDescriptors/{type}"`. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // Required. The monitored resource type. For example, the type - // `"cloudsql_database"` represents databases in Google Cloud SQL. - // The maximum length of this value is 256 characters. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Optional. A concise name for the monitored resource type that might be - // displayed in user interfaces. It should be a Title Cased Noun Phrase, - // without any article or other determiners. For example, - // `"Google Cloud SQL Database"`. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // Optional. A detailed description of the monitored resource type that might - // be used in documentation. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // Required. A set of labels used to describe instances of this monitored - // resource type. For example, an individual Google Cloud SQL database is - // identified by values for the labels `"database_id"` and `"zone"`. - Labels []*label.LabelDescriptor `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MonitoredResourceDescriptor) Reset() { *m = MonitoredResourceDescriptor{} } -func (m *MonitoredResourceDescriptor) String() string { return proto.CompactTextString(m) } -func (*MonitoredResourceDescriptor) ProtoMessage() {} -func (*MonitoredResourceDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_monitored_resource_90111f8aabf551aa, []int{0} -} -func (m *MonitoredResourceDescriptor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MonitoredResourceDescriptor.Unmarshal(m, b) -} -func (m *MonitoredResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MonitoredResourceDescriptor.Marshal(b, m, deterministic) -} -func (dst *MonitoredResourceDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_MonitoredResourceDescriptor.Merge(dst, src) -} -func (m *MonitoredResourceDescriptor) XXX_Size() int { - return xxx_messageInfo_MonitoredResourceDescriptor.Size(m) -} -func (m *MonitoredResourceDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_MonitoredResourceDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_MonitoredResourceDescriptor proto.InternalMessageInfo - -func (m *MonitoredResourceDescriptor) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MonitoredResourceDescriptor) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *MonitoredResourceDescriptor) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *MonitoredResourceDescriptor) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *MonitoredResourceDescriptor) GetLabels() []*label.LabelDescriptor { - if m != nil { - return m.Labels - } - return nil -} - -// An object representing a resource that can be used for monitoring, logging, -// billing, or other purposes. Examples include virtual machine instances, -// databases, and storage devices such as disks. The `type` field identifies a -// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's -// schema. Information in the `labels` field identifies the actual resource and -// its attributes according to the schema. For example, a particular Compute -// Engine VM instance could be represented by the following object, because the -// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels -// `"instance_id"` and `"zone"`: -// -// { "type": "gce_instance", -// "labels": { "instance_id": "12345678901234", -// "zone": "us-central1-a" }} -type MonitoredResource struct { - // Required. The monitored resource type. This field must match - // the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For - // example, the type of a Compute Engine VM instance is `gce_instance`. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Required. Values for all of the labels listed in the associated monitored - // resource descriptor. For example, Compute Engine VM instances use the - // labels `"project_id"`, `"instance_id"`, and `"zone"`. - Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MonitoredResource) Reset() { *m = MonitoredResource{} } -func (m *MonitoredResource) String() string { return proto.CompactTextString(m) } -func (*MonitoredResource) ProtoMessage() {} -func (*MonitoredResource) Descriptor() ([]byte, []int) { - return fileDescriptor_monitored_resource_90111f8aabf551aa, []int{1} -} -func (m *MonitoredResource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MonitoredResource.Unmarshal(m, b) -} -func (m *MonitoredResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MonitoredResource.Marshal(b, m, deterministic) -} -func (dst *MonitoredResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_MonitoredResource.Merge(dst, src) -} -func (m *MonitoredResource) XXX_Size() int { - return xxx_messageInfo_MonitoredResource.Size(m) -} -func (m *MonitoredResource) XXX_DiscardUnknown() { - xxx_messageInfo_MonitoredResource.DiscardUnknown(m) -} - -var xxx_messageInfo_MonitoredResource proto.InternalMessageInfo - -func (m *MonitoredResource) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *MonitoredResource) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] object. -// [MonitoredResource][google.api.MonitoredResource] objects contain the minimum set of information to -// uniquely identify a monitored resource instance. There is some other useful -// auxiliary metadata. Monitoring and Logging use an ingestion -// pipeline to extract metadata for cloud resources of all types, and store -// the metadata in this message. -type MonitoredResourceMetadata struct { - // Output only. Values for predefined system metadata labels. - // System labels are a kind of metadata extracted by Google, including - // "machine_image", "vpc", "subnet_id", - // "security_group", "name", etc. - // System label values can be only strings, Boolean values, or a list of - // strings. For example: - // - // { "name": "my-test-instance", - // "security_group": ["a", "b", "c"], - // "spot_instance": false } - SystemLabels *_struct.Struct `protobuf:"bytes,1,opt,name=system_labels,json=systemLabels,proto3" json:"system_labels,omitempty"` - // Output only. A map of user-defined metadata labels. - UserLabels map[string]string `protobuf:"bytes,2,rep,name=user_labels,json=userLabels,proto3" json:"user_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MonitoredResourceMetadata) Reset() { *m = MonitoredResourceMetadata{} } -func (m *MonitoredResourceMetadata) String() string { return proto.CompactTextString(m) } -func (*MonitoredResourceMetadata) ProtoMessage() {} -func (*MonitoredResourceMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_monitored_resource_90111f8aabf551aa, []int{2} -} -func (m *MonitoredResourceMetadata) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MonitoredResourceMetadata.Unmarshal(m, b) -} -func (m *MonitoredResourceMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MonitoredResourceMetadata.Marshal(b, m, deterministic) -} -func (dst *MonitoredResourceMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_MonitoredResourceMetadata.Merge(dst, src) -} -func (m *MonitoredResourceMetadata) XXX_Size() int { - return xxx_messageInfo_MonitoredResourceMetadata.Size(m) -} -func (m *MonitoredResourceMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_MonitoredResourceMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_MonitoredResourceMetadata proto.InternalMessageInfo - -func (m *MonitoredResourceMetadata) GetSystemLabels() *_struct.Struct { - if m != nil { - return m.SystemLabels - } - return nil -} - -func (m *MonitoredResourceMetadata) GetUserLabels() map[string]string { - if m != nil { - return m.UserLabels - } - return nil -} - -func init() { - proto.RegisterType((*MonitoredResourceDescriptor)(nil), "google.api.MonitoredResourceDescriptor") - proto.RegisterType((*MonitoredResource)(nil), "google.api.MonitoredResource") - proto.RegisterMapType((map[string]string)(nil), "google.api.MonitoredResource.LabelsEntry") - proto.RegisterType((*MonitoredResourceMetadata)(nil), "google.api.MonitoredResourceMetadata") - proto.RegisterMapType((map[string]string)(nil), "google.api.MonitoredResourceMetadata.UserLabelsEntry") -} - -func init() { - proto.RegisterFile("google/api/monitored_resource.proto", fileDescriptor_monitored_resource_90111f8aabf551aa) -} - -var fileDescriptor_monitored_resource_90111f8aabf551aa = []byte{ - // 415 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0xab, 0xd3, 0x40, - 0x14, 0x65, 0xd2, 0x0f, 0xf0, 0xa6, 0x7e, 0x0d, 0x52, 0x63, 0xea, 0xa2, 0xd6, 0x4d, 0xdd, 0x24, - 0xd0, 0x22, 0xf8, 0xb9, 0x68, 0x55, 0x44, 0xb0, 0x52, 0x22, 0xba, 0x70, 0x13, 0xa6, 0xc9, 0x18, - 0x82, 0x49, 0x26, 0xcc, 0x4c, 0x84, 0xfc, 0x1d, 0xc1, 0xdf, 0xe1, 0x5f, 0x72, 0xe9, 0x52, 0x32, - 0x33, 0x69, 0xd3, 0x97, 0xc7, 0x83, 0xb7, 0xbb,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xc1, - 0x0f, 0x5a, 0x9b, 0x23, 0x4d, 0x89, 0xef, 0xc1, 0xe8, 0x27, 0xc9, 0xaa, 0xf6, 0x03, 0xe8, 0xe6, - 0x85, 0xf5, 0x0c, 0x2d, 0xfe, 0x22, 0x78, 0xd0, 0x3b, 0xb2, 0xa3, 0x92, 0xc4, 0x44, 0x12, 0xfc, - 0x0a, 0x6e, 0x8a, 0x5a, 0x48, 0x9a, 0x87, 0xc6, 0x62, 0xa3, 0x69, 0xaf, 0xee, 0xb7, 0x16, 0xdb, - 0xd7, 0xf3, 0x3e, 0xab, 0xd7, 0x0b, 0x26, 0x9a, 0xad, 0xcd, 0xe0, 0xaf, 0x60, 0x57, 0x82, 0xf2, - 0xf0, 0x2c, 0xde, 0xd3, 0x2b, 0xe3, 0xb5, 0x97, 0xbd, 0x2f, 0x82, 0xf2, 0x6e, 0x54, 0xa8, 0x8e, - 0x80, 0xfb, 0x1a, 0x6e, 0x5f, 0x18, 0x5f, 0x27, 0xf2, 0xb6, 0x86, 0x5b, 0x11, 0xcb, 0x3b, 0x36, - 0xb6, 0xd3, 0x9e, 0x8f, 0x7d, 0x13, 0x6c, 0x8f, 0xbe, 0xbd, 0x31, 0xac, 0x84, 0x65, 0xa4, 0x48, - 0x3c, 0xc6, 0x13, 0x3f, 0xa1, 0x85, 0x8a, 0xed, 0xeb, 0x11, 0x29, 0x53, 0x71, 0xfe, 0x3b, 0x70, - 0x2a, 0x5e, 0x76, 0x9b, 0x7f, 0x08, 0xfd, 0xb2, 0x86, 0xef, 0x37, 0xfb, 0x0f, 0x87, 0xb1, 0xda, - 0x5c, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x10, 0x16, 0x7c, 0xe9, 0x47, 0x03, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/logging/type/http_request.pb.go b/vendor/google.golang.org/genproto/googleapis/logging/type/http_request.pb.go deleted file mode 100644 index 6a7177d..0000000 --- a/vendor/google.golang.org/genproto/googleapis/logging/type/http_request.pb.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/logging/type/http_request.proto - -package ltype // import "google.golang.org/genproto/googleapis/logging/type" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import duration "github.com/golang/protobuf/ptypes/duration" -import _ "google.golang.org/genproto/googleapis/api/annotations" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// A common proto for logging HTTP requests. Only contains semantics -// defined by the HTTP specification. Product-specific logging -// information MUST be defined in a separate message. -type HttpRequest struct { - // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - RequestMethod string `protobuf:"bytes,1,opt,name=request_method,json=requestMethod,proto3" json:"request_method,omitempty"` - // The scheme (http, https), the host name, the path and the query - // portion of the URL that was requested. - // Example: `"http://example.com/some/info?color=red"`. - RequestUrl string `protobuf:"bytes,2,opt,name=request_url,json=requestUrl,proto3" json:"request_url,omitempty"` - // The size of the HTTP request message in bytes, including the request - // headers and the request body. - RequestSize int64 `protobuf:"varint,3,opt,name=request_size,json=requestSize,proto3" json:"request_size,omitempty"` - // The response code indicating the status of response. - // Examples: 200, 404. - Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` - // The size of the HTTP response message sent back to the client, in bytes, - // including the response headers and the response body. - ResponseSize int64 `protobuf:"varint,5,opt,name=response_size,json=responseSize,proto3" json:"response_size,omitempty"` - // The user agent sent by the client. Example: - // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET - // CLR 1.0.3705)"`. - UserAgent string `protobuf:"bytes,6,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` - // The IP address (IPv4 or IPv6) of the client that issued the HTTP - // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. - RemoteIp string `protobuf:"bytes,7,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"` - // The IP address (IPv4 or IPv6) of the origin server that the request was - // sent to. - ServerIp string `protobuf:"bytes,13,opt,name=server_ip,json=serverIp,proto3" json:"server_ip,omitempty"` - // The referer URL of the request, as defined in - // [HTTP/1.1 Header Field - // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - Referer string `protobuf:"bytes,8,opt,name=referer,proto3" json:"referer,omitempty"` - // The request processing latency on the server, from the time the request was - // received until the response was sent. - Latency *duration.Duration `protobuf:"bytes,14,opt,name=latency,proto3" json:"latency,omitempty"` - // Whether or not a cache lookup was attempted. - CacheLookup bool `protobuf:"varint,11,opt,name=cache_lookup,json=cacheLookup,proto3" json:"cache_lookup,omitempty"` - // Whether or not an entity was served from cache - // (with or without validation). - CacheHit bool `protobuf:"varint,9,opt,name=cache_hit,json=cacheHit,proto3" json:"cache_hit,omitempty"` - // Whether or not the response was validated with the origin server before - // being served from cache. This field is only meaningful if `cache_hit` is - // True. - CacheValidatedWithOriginServer bool `protobuf:"varint,10,opt,name=cache_validated_with_origin_server,json=cacheValidatedWithOriginServer,proto3" json:"cache_validated_with_origin_server,omitempty"` - // The number of HTTP response bytes inserted into cache. Set only when a - // cache fill was attempted. - CacheFillBytes int64 `protobuf:"varint,12,opt,name=cache_fill_bytes,json=cacheFillBytes,proto3" json:"cache_fill_bytes,omitempty"` - // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - Protocol string `protobuf:"bytes,15,opt,name=protocol,proto3" json:"protocol,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HttpRequest) Reset() { *m = HttpRequest{} } -func (m *HttpRequest) String() string { return proto.CompactTextString(m) } -func (*HttpRequest) ProtoMessage() {} -func (*HttpRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_http_request_8d63df88461f411e, []int{0} -} -func (m *HttpRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HttpRequest.Unmarshal(m, b) -} -func (m *HttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HttpRequest.Marshal(b, m, deterministic) -} -func (dst *HttpRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HttpRequest.Merge(dst, src) -} -func (m *HttpRequest) XXX_Size() int { - return xxx_messageInfo_HttpRequest.Size(m) -} -func (m *HttpRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HttpRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HttpRequest proto.InternalMessageInfo - -func (m *HttpRequest) GetRequestMethod() string { - if m != nil { - return m.RequestMethod - } - return "" -} - -func (m *HttpRequest) GetRequestUrl() string { - if m != nil { - return m.RequestUrl - } - return "" -} - -func (m *HttpRequest) GetRequestSize() int64 { - if m != nil { - return m.RequestSize - } - return 0 -} - -func (m *HttpRequest) GetStatus() int32 { - if m != nil { - return m.Status - } - return 0 -} - -func (m *HttpRequest) GetResponseSize() int64 { - if m != nil { - return m.ResponseSize - } - return 0 -} - -func (m *HttpRequest) GetUserAgent() string { - if m != nil { - return m.UserAgent - } - return "" -} - -func (m *HttpRequest) GetRemoteIp() string { - if m != nil { - return m.RemoteIp - } - return "" -} - -func (m *HttpRequest) GetServerIp() string { - if m != nil { - return m.ServerIp - } - return "" -} - -func (m *HttpRequest) GetReferer() string { - if m != nil { - return m.Referer - } - return "" -} - -func (m *HttpRequest) GetLatency() *duration.Duration { - if m != nil { - return m.Latency - } - return nil -} - -func (m *HttpRequest) GetCacheLookup() bool { - if m != nil { - return m.CacheLookup - } - return false -} - -func (m *HttpRequest) GetCacheHit() bool { - if m != nil { - return m.CacheHit - } - return false -} - -func (m *HttpRequest) GetCacheValidatedWithOriginServer() bool { - if m != nil { - return m.CacheValidatedWithOriginServer - } - return false -} - -func (m *HttpRequest) GetCacheFillBytes() int64 { - if m != nil { - return m.CacheFillBytes - } - return 0 -} - -func (m *HttpRequest) GetProtocol() string { - if m != nil { - return m.Protocol - } - return "" -} - -func init() { - proto.RegisterType((*HttpRequest)(nil), "google.logging.type.HttpRequest") -} - -func init() { - proto.RegisterFile("google/logging/type/http_request.proto", fileDescriptor_http_request_8d63df88461f411e) -} - -var fileDescriptor_http_request_8d63df88461f411e = []byte{ - // 511 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x5b, 0x6b, 0x14, 0x31, - 0x18, 0x86, 0x99, 0x1e, 0xf6, 0x90, 0x3d, 0x58, 0x22, 0x68, 0xba, 0x6a, 0x5d, 0x2b, 0xca, 0x5c, - 0xcd, 0x80, 0xbd, 0x11, 0xbc, 0x72, 0x15, 0x6d, 0xa5, 0x62, 0x99, 0x7a, 0x00, 0x59, 0x18, 0x66, - 0x77, 0xbf, 0x9d, 0x09, 0x66, 0x27, 0x31, 0xc9, 0x54, 0xb6, 0x7f, 0xc6, 0x7b, 0x6f, 0xfc, 0x1f, - 0xfe, 0x2a, 0xc9, 0x97, 0x0c, 0x28, 0xf4, 0x66, 0x21, 0xef, 0xf3, 0xbc, 0x49, 0xf6, 0x9b, 0x90, - 0xa7, 0xa5, 0x94, 0xa5, 0x80, 0x54, 0xc8, 0xb2, 0xe4, 0x75, 0x99, 0xda, 0xad, 0x82, 0xb4, 0xb2, - 0x56, 0xe5, 0x1a, 0xbe, 0x37, 0x60, 0x6c, 0xa2, 0xb4, 0xb4, 0x92, 0xde, 0xf6, 0x5e, 0x12, 0xbc, - 0xc4, 0x79, 0x93, 0xfb, 0xa1, 0x5c, 0x28, 0x9e, 0x16, 0x75, 0x2d, 0x6d, 0x61, 0xb9, 0xac, 0x8d, - 0xaf, 0x4c, 0x8e, 0x02, 0xc5, 0xd5, 0xa2, 0x59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0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x7d, 0xa3, 0x36, 0xbb, 0x57, 0x03, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/logging/type/log_severity.pb.go b/vendor/google.golang.org/genproto/googleapis/logging/type/log_severity.pb.go deleted file mode 100644 index 69b89a7..0000000 --- a/vendor/google.golang.org/genproto/googleapis/logging/type/log_severity.pb.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/logging/type/log_severity.proto - -package ltype // import "google.golang.org/genproto/googleapis/logging/type" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "google.golang.org/genproto/googleapis/api/annotations" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// The severity of the event described in a log entry, expressed as one of the -// standard severity levels listed below. For your reference, the levels are -// assigned the listed numeric values. The effect of using numeric values other -// than those listed is undefined. -// -// You can filter for log entries by severity. For example, the following -// filter expression will match log entries with severities `INFO`, `NOTICE`, -// and `WARNING`: -// -// severity > DEBUG AND severity <= WARNING -// -// If you are writing log entries, you should map other severity encodings to -// one of these standard levels. For example, you might map all of Java's FINE, -// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the -// original severity level in the log entry payload if you wish. -type LogSeverity int32 - -const ( - // (0) The log entry has no assigned severity level. - LogSeverity_DEFAULT LogSeverity = 0 - // (100) Debug or trace information. - LogSeverity_DEBUG LogSeverity = 100 - // (200) Routine information, such as ongoing status or performance. - LogSeverity_INFO LogSeverity = 200 - // (300) Normal but significant events, such as start up, shut down, or - // a configuration change. - LogSeverity_NOTICE LogSeverity = 300 - // (400) Warning events might cause problems. - LogSeverity_WARNING LogSeverity = 400 - // (500) Error events are likely to cause problems. - LogSeverity_ERROR LogSeverity = 500 - // (600) Critical events cause more severe problems or outages. - LogSeverity_CRITICAL LogSeverity = 600 - // (700) A person must take an action immediately. - LogSeverity_ALERT LogSeverity = 700 - // (800) One or more systems are unusable. - LogSeverity_EMERGENCY LogSeverity = 800 -) - -var LogSeverity_name = map[int32]string{ - 0: "DEFAULT", - 100: "DEBUG", - 200: "INFO", - 300: "NOTICE", - 400: "WARNING", - 500: "ERROR", - 600: "CRITICAL", - 700: "ALERT", - 800: "EMERGENCY", -} -var LogSeverity_value = map[string]int32{ - "DEFAULT": 0, - "DEBUG": 100, - "INFO": 200, - "NOTICE": 300, - "WARNING": 400, - "ERROR": 500, - "CRITICAL": 600, - "ALERT": 700, - "EMERGENCY": 800, -} - -func (x LogSeverity) String() string { - return proto.EnumName(LogSeverity_name, int32(x)) -} -func (LogSeverity) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_log_severity_8ce61232bc3e5482, []int{0} -} - -func init() { - proto.RegisterEnum("google.logging.type.LogSeverity", LogSeverity_name, LogSeverity_value) -} - -func init() { - proto.RegisterFile("google/logging/type/log_severity.proto", fileDescriptor_log_severity_8ce61232bc3e5482) -} - -var fileDescriptor_log_severity_8ce61232bc3e5482 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0xcf, 0xc9, 0x4f, 0x4f, 0xcf, 0xcc, 0x4b, 0xd7, 0x2f, 0xa9, 0x2c, 0x00, 0x73, - 0xe2, 0x8b, 0x53, 0xcb, 0x52, 0x8b, 0x32, 0x4b, 0x2a, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, - 0x84, 0x21, 0xea, 0xf4, 0xa0, 0xea, 0xf4, 0x40, 0xea, 0xa4, 0x64, 0xa0, 0x9a, 0x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0x81, 0x3d, 0xa4, 0x0f, 0x91, 0x4a, 0x2c, 0xc8, 0x2c, 0x46, 0x09, 0x2e, - 0xeb, 0x1c, 0x10, 0xb9, 0x8a, 0x49, 0xd2, 0x1d, 0xa2, 0xd5, 0x39, 0x27, 0xbf, 0x34, 0x45, 0xcf, - 0x07, 0x6a, 0x53, 0x48, 0x65, 0x41, 0xea, 0x29, 0x98, 0x5c, 0x0c, 0x58, 0x2e, 0x06, 0x2a, 0x17, - 0x03, 0x92, 0x4b, 0x62, 0x03, 0x1b, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xea, 0x8a, 0xa7, - 0x20, 0x8a, 0x01, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/logging/v2/log_entry.pb.go b/vendor/google.golang.org/genproto/googleapis/logging/v2/log_entry.pb.go deleted file mode 100644 index 140b8bc..0000000 --- a/vendor/google.golang.org/genproto/googleapis/logging/v2/log_entry.pb.go +++ /dev/null @@ -1,588 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/logging/v2/log_entry.proto - -package logging // import "google.golang.org/genproto/googleapis/logging/v2" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import any "github.com/golang/protobuf/ptypes/any" -import _struct "github.com/golang/protobuf/ptypes/struct" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" -import _ "google.golang.org/genproto/googleapis/api/annotations" -import monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" -import _type "google.golang.org/genproto/googleapis/logging/type" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// An individual entry in a log. -type LogEntry struct { - // Required. The resource name of the log to which this log entry belongs: - // - // "projects/[PROJECT_ID]/logs/[LOG_ID]" - // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - // "folders/[FOLDER_ID]/logs/[LOG_ID]" - // - // A project number may optionally be used in place of PROJECT_ID. The - // project number is translated to its corresponding PROJECT_ID internally - // and the `log_name` field will contain PROJECT_ID in queries and exports. - // - // `[LOG_ID]` must be URL-encoded within `log_name`. Example: - // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - // `[LOG_ID]` must be less than 512 characters long and can only include the - // following characters: upper and lower case alphanumeric characters, - // forward-slash, underscore, hyphen, and period. - // - // For backward compatibility, if `log_name` begins with a forward-slash, such - // as `/projects/...`, then the log entry is ingested as usual but the - // forward-slash is removed. Listing the log entry will not show the leading - // slash and filtering for a log name with a leading slash will never return - // any results. - LogName string `protobuf:"bytes,12,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` - // Required. The primary monitored resource associated with this log entry. - // Example: a log entry that reports a database error would be - // associated with the monitored resource designating the particular - // database that reported the error. - Resource *monitoredres.MonitoredResource `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` - // Optional. The log entry payload, which can be one of multiple types. - // - // Types that are valid to be assigned to Payload: - // *LogEntry_ProtoPayload - // *LogEntry_TextPayload - // *LogEntry_JsonPayload - Payload isLogEntry_Payload `protobuf_oneof:"payload"` - // Optional. The time the event described by the log entry occurred. - // This time is used to compute the log entry's age and to enforce - // the logs retention period. If this field is omitted in a new log - // entry, then Logging assigns it the current time. - // Timestamps have nanosecond accuracy, but trailing zeros in the fractional - // seconds might be omitted when the timestamp is displayed. - // - // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quotas) in the past, - // and no more than 24 hours in the future. Log entries outside those time - // boundaries will not be available when calling `entries.list`, but - // those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). - Timestamp *timestamp.Timestamp `protobuf:"bytes,9,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Output only. The time the log entry was received by Logging. - ReceiveTimestamp *timestamp.Timestamp `protobuf:"bytes,24,opt,name=receive_timestamp,json=receiveTimestamp,proto3" json:"receive_timestamp,omitempty"` - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - Severity _type.LogSeverity `protobuf:"varint,10,opt,name=severity,proto3,enum=google.logging.type.LogSeverity" json:"severity,omitempty"` - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, - // with the same `timestamp`, and with the same `insert_id` to be duplicates - // which can be removed. If omitted in new log entries, then - // Logging assigns its own unique identifier. The `insert_id` is also used - // to order log entries that have the same `timestamp` value. - InsertId string `protobuf:"bytes,4,opt,name=insert_id,json=insertId,proto3" json:"insert_id,omitempty"` - // Optional. Information about the HTTP request associated with this - // log entry, if applicable. - HttpRequest *_type.HttpRequest `protobuf:"bytes,7,opt,name=http_request,json=httpRequest,proto3" json:"http_request,omitempty"` - // Optional. A set of user-defined (key, value) data that provides additional - // information about the log entry. - Labels map[string]string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Output only. Additional metadata about the monitored resource. - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated. - Metadata *monitoredres.MonitoredResourceMetadata `protobuf:"bytes,25,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Optional. Information about an operation associated with the log entry, if - // applicable. - Operation *LogEntryOperation `protobuf:"bytes,15,opt,name=operation,proto3" json:"operation,omitempty"` - // Optional. Resource name of the trace associated with the log entry, if any. - // If it contains a relative resource name, the name is assumed to be relative - // to `//tracing.googleapis.com`. Example: - // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - Trace string `protobuf:"bytes,22,opt,name=trace,proto3" json:"trace,omitempty"` - // Optional. The span ID within the trace associated with the log entry. - // For Trace spans, this is the same format that the Trace - // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such - // as "000000000000004a". - SpanId string `protobuf:"bytes,27,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - // Optional. The sampling decision of the trace associated with the log entry. - // True means that the trace resource name in the `trace` field was sampled - // for storage in a trace backend. False means that the trace was not sampled - // for storage when this log entry was written, or the sampling decision was - // unknown at the time. A non-sampled `trace` value is still useful as a - // request correlation identifier. The default is False. - TraceSampled bool `protobuf:"varint,30,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` - // Optional. Source code location information associated with the log entry, - // if any. - SourceLocation *LogEntrySourceLocation `protobuf:"bytes,23,opt,name=source_location,json=sourceLocation,proto3" json:"source_location,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogEntry) Reset() { *m = LogEntry{} } -func (m *LogEntry) String() string { return proto.CompactTextString(m) } -func (*LogEntry) ProtoMessage() {} -func (*LogEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_log_entry_b0004bedc6419a9f, []int{0} -} -func (m *LogEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogEntry.Unmarshal(m, b) -} -func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogEntry.Marshal(b, m, deterministic) -} -func (dst *LogEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogEntry.Merge(dst, src) -} -func (m *LogEntry) XXX_Size() int { - return xxx_messageInfo_LogEntry.Size(m) -} -func (m *LogEntry) XXX_DiscardUnknown() { - xxx_messageInfo_LogEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_LogEntry proto.InternalMessageInfo - -func (m *LogEntry) GetLogName() string { - if m != nil { - return m.LogName - } - return "" -} - -func (m *LogEntry) GetResource() *monitoredres.MonitoredResource { - if m != nil { - return m.Resource - } - return nil -} - -type isLogEntry_Payload interface { - isLogEntry_Payload() -} - -type LogEntry_ProtoPayload struct { - ProtoPayload *any.Any `protobuf:"bytes,2,opt,name=proto_payload,json=protoPayload,proto3,oneof"` -} - -type LogEntry_TextPayload struct { - TextPayload string `protobuf:"bytes,3,opt,name=text_payload,json=textPayload,proto3,oneof"` -} - -type LogEntry_JsonPayload struct { - JsonPayload *_struct.Struct `protobuf:"bytes,6,opt,name=json_payload,json=jsonPayload,proto3,oneof"` -} - -func (*LogEntry_ProtoPayload) isLogEntry_Payload() {} - -func (*LogEntry_TextPayload) isLogEntry_Payload() {} - -func (*LogEntry_JsonPayload) isLogEntry_Payload() {} - -func (m *LogEntry) GetPayload() isLogEntry_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *LogEntry) GetProtoPayload() *any.Any { - if x, ok := m.GetPayload().(*LogEntry_ProtoPayload); ok { - return x.ProtoPayload - } - return nil -} - -func (m *LogEntry) GetTextPayload() string { - if x, ok := m.GetPayload().(*LogEntry_TextPayload); ok { - return x.TextPayload - } - return "" -} - -func (m *LogEntry) GetJsonPayload() *_struct.Struct { - if x, ok := m.GetPayload().(*LogEntry_JsonPayload); ok { - return x.JsonPayload - } - return nil -} - -func (m *LogEntry) GetTimestamp() *timestamp.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *LogEntry) GetReceiveTimestamp() *timestamp.Timestamp { - if m != nil { - return m.ReceiveTimestamp - } - return nil -} - -func (m *LogEntry) GetSeverity() _type.LogSeverity { - if m != nil { - return m.Severity - } - return _type.LogSeverity_DEFAULT -} - -func (m *LogEntry) GetInsertId() string { - if m != nil { - return m.InsertId - } - return "" -} - -func (m *LogEntry) GetHttpRequest() *_type.HttpRequest { - if m != nil { - return m.HttpRequest - } - return nil -} - -func (m *LogEntry) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func (m *LogEntry) GetMetadata() *monitoredres.MonitoredResourceMetadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *LogEntry) GetOperation() *LogEntryOperation { - if m != nil { - return m.Operation - } - return nil -} - -func (m *LogEntry) GetTrace() string { - if m != nil { - return m.Trace - } - return "" -} - -func (m *LogEntry) GetSpanId() string { - if m != nil { - return m.SpanId - } - return "" -} - -func (m *LogEntry) GetTraceSampled() bool { - if m != nil { - return m.TraceSampled - } - return false -} - -func (m *LogEntry) GetSourceLocation() *LogEntrySourceLocation { - if m != nil { - return m.SourceLocation - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*LogEntry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _LogEntry_OneofMarshaler, _LogEntry_OneofUnmarshaler, _LogEntry_OneofSizer, []interface{}{ - (*LogEntry_ProtoPayload)(nil), - (*LogEntry_TextPayload)(nil), - (*LogEntry_JsonPayload)(nil), - } -} - -func _LogEntry_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*LogEntry) - // payload - switch x := m.Payload.(type) { - case *LogEntry_ProtoPayload: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ProtoPayload); err != nil { - return err - } - case *LogEntry_TextPayload: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeStringBytes(x.TextPayload) - case *LogEntry_JsonPayload: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.JsonPayload); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("LogEntry.Payload has unexpected type %T", x) - } - return nil -} - -func _LogEntry_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*LogEntry) - switch tag { - case 2: // payload.proto_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(any.Any) - err := b.DecodeMessage(msg) - m.Payload = &LogEntry_ProtoPayload{msg} - return true, err - case 3: // payload.text_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Payload = &LogEntry_TextPayload{x} - return true, err - case 6: // payload.json_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(_struct.Struct) - err := b.DecodeMessage(msg) - m.Payload = &LogEntry_JsonPayload{msg} - return true, err - default: - return false, nil - } -} - -func _LogEntry_OneofSizer(msg proto.Message) (n int) { - m := msg.(*LogEntry) - // payload - switch x := m.Payload.(type) { - case *LogEntry_ProtoPayload: - s := proto.Size(x.ProtoPayload) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *LogEntry_TextPayload: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.TextPayload))) - n += len(x.TextPayload) - case *LogEntry_JsonPayload: - s := proto.Size(x.JsonPayload) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Additional information about a potentially long-running operation with which -// a log entry is associated. -type LogEntryOperation struct { - // Optional. An arbitrary operation identifier. Log entries with the - // same identifier are assumed to be part of the same operation. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Optional. An arbitrary producer identifier. The combination of - // `id` and `producer` must be globally unique. Examples for `producer`: - // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - Producer string `protobuf:"bytes,2,opt,name=producer,proto3" json:"producer,omitempty"` - // Optional. Set this to True if this is the first log entry in the operation. - First bool `protobuf:"varint,3,opt,name=first,proto3" json:"first,omitempty"` - // Optional. Set this to True if this is the last log entry in the operation. - Last bool `protobuf:"varint,4,opt,name=last,proto3" json:"last,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogEntryOperation) Reset() { *m = LogEntryOperation{} } -func (m *LogEntryOperation) String() string { return proto.CompactTextString(m) } -func (*LogEntryOperation) ProtoMessage() {} -func (*LogEntryOperation) Descriptor() ([]byte, []int) { - return fileDescriptor_log_entry_b0004bedc6419a9f, []int{1} -} -func (m *LogEntryOperation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogEntryOperation.Unmarshal(m, b) -} -func (m *LogEntryOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogEntryOperation.Marshal(b, m, deterministic) -} -func (dst *LogEntryOperation) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogEntryOperation.Merge(dst, src) -} -func (m *LogEntryOperation) XXX_Size() int { - return xxx_messageInfo_LogEntryOperation.Size(m) -} -func (m *LogEntryOperation) XXX_DiscardUnknown() { - xxx_messageInfo_LogEntryOperation.DiscardUnknown(m) -} - -var xxx_messageInfo_LogEntryOperation proto.InternalMessageInfo - -func (m *LogEntryOperation) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *LogEntryOperation) GetProducer() string { - if m != nil { - return m.Producer - } - return "" -} - -func (m *LogEntryOperation) GetFirst() bool { - if m != nil { - return m.First - } - return false -} - -func (m *LogEntryOperation) GetLast() bool { - if m != nil { - return m.Last - } - return false -} - -// Additional information about the source code location that produced the log -// entry. -type LogEntrySourceLocation struct { - // Optional. Source file name. Depending on the runtime environment, this - // might be a simple name or a fully-qualified name. - File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` - // Optional. Line within the source file. 1-based; 0 indicates no line number - // available. - Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` - // Optional. Human-readable name of the function or method being invoked, with - // optional context such as the class or package name. This information may be - // used in contexts such as the logs viewer, where a file and line number are - // less meaningful. The format can vary by language. For example: - // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - // (Python). - Function string `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogEntrySourceLocation) Reset() { *m = LogEntrySourceLocation{} } -func (m *LogEntrySourceLocation) String() string { return proto.CompactTextString(m) } -func (*LogEntrySourceLocation) ProtoMessage() {} -func (*LogEntrySourceLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_log_entry_b0004bedc6419a9f, []int{2} -} -func (m *LogEntrySourceLocation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogEntrySourceLocation.Unmarshal(m, b) -} -func (m *LogEntrySourceLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogEntrySourceLocation.Marshal(b, m, deterministic) -} -func (dst *LogEntrySourceLocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogEntrySourceLocation.Merge(dst, src) -} -func (m *LogEntrySourceLocation) XXX_Size() int { - return xxx_messageInfo_LogEntrySourceLocation.Size(m) -} -func (m *LogEntrySourceLocation) XXX_DiscardUnknown() { - xxx_messageInfo_LogEntrySourceLocation.DiscardUnknown(m) -} - -var xxx_messageInfo_LogEntrySourceLocation proto.InternalMessageInfo - -func (m *LogEntrySourceLocation) GetFile() string { - if m != nil { - return m.File - } - return "" -} - -func (m *LogEntrySourceLocation) GetLine() int64 { - if m != nil { - return m.Line - } - return 0 -} - -func (m *LogEntrySourceLocation) GetFunction() string { - if m != nil { - return m.Function - } - return "" -} - -func init() { - proto.RegisterType((*LogEntry)(nil), "google.logging.v2.LogEntry") - proto.RegisterMapType((map[string]string)(nil), "google.logging.v2.LogEntry.LabelsEntry") - proto.RegisterType((*LogEntryOperation)(nil), "google.logging.v2.LogEntryOperation") - proto.RegisterType((*LogEntrySourceLocation)(nil), "google.logging.v2.LogEntrySourceLocation") -} - -func init() { - proto.RegisterFile("google/logging/v2/log_entry.proto", fileDescriptor_log_entry_b0004bedc6419a9f) -} - -var fileDescriptor_log_entry_b0004bedc6419a9f = []byte{ - // 772 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xdd, 0x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x14, 0xee, 0x2d, 0xa6, 0x59, 0x8d, 0x70, 0x2e, - 0xd3, 0x85, 0xc3, 0x91, 0x86, 0x81, 0x1f, 0xa1, 0x2e, 0x17, 0x25, 0x53, 0x3a, 0xe2, 0x49, 0x70, - 0x17, 0xde, 0xcd, 0xb7, 0x81, 0xd7, 0x09, 0x7e, 0x89, 0xfa, 0xbb, 0x8b, 0x17, 0x74, 0x40, 0xde, - 0xed, 0xe5, 0xaf, 0xb5, 0x2e, 0x88, 0xc5, 0x91, 0xde, 0xfb, 0xad, 0x83, 0xbf, 0x47, 0x27, 0x19, - 0xbd, 0x61, 0x59, 0x19, 0xf4, 0x46, 0xed, 0x71, 0x6f, 0xfa, 0x75, 0x78, 0x70, 0x36, 0x61, 0xbd, - 0x45, 0xe1, 0x1c, 0x90, 0x60, 0x13, 0x47, 0xc3, 0x2f, 0x90, 0x9f, 0x33, 0x4d, 0x13, 0xaa, 0x69, - 0x70, 0x01, 0x0a, 0xbe, 0x3c, 0xba, 0x3e, 0x6f, 0x1c, 0x98, 0x34, 0x34, 0x3c, 0x43, 0x5d, 0x59, - 0x30, 0x05, 0xc7, 0x18, 0xdc, 0x83, 0x1a, 0x5f, 0x1c, 0x91, 0xf1, 0x53, 0x8d, 0x25, 0x5b, 0x1a, - 0x7e, 0x80, 0x3e, 0xd2, 0x8a, 0xc6, 0x2c, 0x78, 0x08, 0x53, 0xb2, 0x0e, 0x1e, 0xa0, 0x4e, 0x59, - 0x50, 0x61, 0xa6, 0xf7, 0x08, 0xe2, 0x27, 0xc6, 0x7d, 0x6d, 0x96, 0xef, 0x14, 0x10, 0x51, 0x49, - 0xf3, 0x22, 0x63, 0x49, 0xf0, 0xe9, 0xc8, 0x1b, 0xfb, 0xa4, 0x0f, 0xc1, 0x85, 0x8d, 0x61, 0x82, - 0xee, 0x59, 0xcd, 0x51, 0x26, 0x63, 0xab, 0x6e, 0x00, 0xea, 0xbe, 0x39, 0xa2, 0x6e, 0x01, 0x8c, - 0xb9, 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, 0xef, 0x3a, 0xb3, 0x84, 0xcc, 0xd2, 0x65, 0x96, 0xef, - 0xa6, 0x37, 0x27, 0x50, 0xfb, 0xdb, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x7b, 0xdc, 0xd5, - 0x6c, 0x06, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/logging/v2/logging.pb.go b/vendor/google.golang.org/genproto/googleapis/logging/v2/logging.pb.go deleted file mode 100644 index 995bd5b..0000000 --- a/vendor/google.golang.org/genproto/googleapis/logging/v2/logging.pb.go +++ /dev/null @@ -1,1031 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/logging/v2/logging.proto - -package logging // import "google.golang.org/genproto/googleapis/logging/v2" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/ptypes/duration" -import empty "github.com/golang/protobuf/ptypes/empty" -import _ "github.com/golang/protobuf/ptypes/timestamp" -import _ "google.golang.org/genproto/googleapis/api/annotations" -import monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" -import status "google.golang.org/genproto/googleapis/rpc/status" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// The parameters to DeleteLog. -type DeleteLogRequest struct { - // Required. The resource name of the log to delete: - // - // "projects/[PROJECT_ID]/logs/[LOG_ID]" - // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - // "folders/[FOLDER_ID]/logs/[LOG_ID]" - // - // `[LOG_ID]` must be URL-encoded. For example, - // `"projects/my-project-id/logs/syslog"`, - // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - // For more information about log names, see - // [LogEntry][google.logging.v2.LogEntry]. - LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteLogRequest) Reset() { *m = DeleteLogRequest{} } -func (m *DeleteLogRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteLogRequest) ProtoMessage() {} -func (*DeleteLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{0} -} -func (m *DeleteLogRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteLogRequest.Unmarshal(m, b) -} -func (m *DeleteLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteLogRequest.Marshal(b, m, deterministic) -} -func (dst *DeleteLogRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteLogRequest.Merge(dst, src) -} -func (m *DeleteLogRequest) XXX_Size() int { - return xxx_messageInfo_DeleteLogRequest.Size(m) -} -func (m *DeleteLogRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteLogRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteLogRequest proto.InternalMessageInfo - -func (m *DeleteLogRequest) GetLogName() string { - if m != nil { - return m.LogName - } - return "" -} - -// The parameters to WriteLogEntries. -type WriteLogEntriesRequest struct { - // Optional. A default log resource name that is assigned to all log entries - // in `entries` that do not specify a value for `log_name`: - // - // "projects/[PROJECT_ID]/logs/[LOG_ID]" - // "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - // "folders/[FOLDER_ID]/logs/[LOG_ID]" - // - // `[LOG_ID]` must be URL-encoded. For example: - // - // "projects/my-project-id/logs/syslog" - // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` - // Optional. A default monitored resource object that is assigned to all log - // entries in `entries` that do not specify a value for `resource`. Example: - // - // { "type": "gce_instance", - // "labels": { - // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - // - // See [LogEntry][google.logging.v2.LogEntry]. - Resource *monitoredres.MonitoredResource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - // Optional. Default labels that are added to the `labels` field of all log - // entries in `entries`. If a log entry already has a label with the same key - // as a label in this parameter, then the log entry's label is not changed. - // See [LogEntry][google.logging.v2.LogEntry]. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Required. The log entries to send to Logging. The order of log - // entries in this list does not matter. Values supplied in this method's - // `log_name`, `resource`, and `labels` fields are copied into those log - // entries in this list that do not include values for their corresponding - // fields. For more information, see the - // [LogEntry][google.logging.v2.LogEntry] type. - // - // If the `timestamp` or `insert_id` fields are missing in log entries, then - // this method supplies the current time or a unique identifier, respectively. - // The supplied values are chosen so that, among the log entries that did not - // supply their own values, the entries earlier in the list will sort before - // the entries later in the list. See the `entries.list` method. - // - // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than - // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). - // - // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, - // you should try to include several log entries in this list, - // rather than calling this method for each individual log entry. - Entries []*LogEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries,omitempty"` - // Optional. Whether valid entries should be written even if some other - // entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any - // entry is not written, then the response status is the error associated - // with one of the failed entries and the response includes error details - // keyed by the entries' zero-based index in the `entries.write` method. - PartialSuccess bool `protobuf:"varint,5,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success,omitempty"` - // Optional. If true, the request should expect normal response, but the - // entries won't be persisted nor exported. Useful for checking whether the - // logging API endpoints are working properly before sending valuable data. - DryRun bool `protobuf:"varint,6,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteLogEntriesRequest) Reset() { *m = WriteLogEntriesRequest{} } -func (m *WriteLogEntriesRequest) String() string { return proto.CompactTextString(m) } -func (*WriteLogEntriesRequest) ProtoMessage() {} -func (*WriteLogEntriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{1} -} -func (m *WriteLogEntriesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteLogEntriesRequest.Unmarshal(m, b) -} -func (m *WriteLogEntriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteLogEntriesRequest.Marshal(b, m, deterministic) -} -func (dst *WriteLogEntriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteLogEntriesRequest.Merge(dst, src) -} -func (m *WriteLogEntriesRequest) XXX_Size() int { - return xxx_messageInfo_WriteLogEntriesRequest.Size(m) -} -func (m *WriteLogEntriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WriteLogEntriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteLogEntriesRequest proto.InternalMessageInfo - -func (m *WriteLogEntriesRequest) GetLogName() string { - if m != nil { - return m.LogName - } - return "" -} - -func (m *WriteLogEntriesRequest) GetResource() *monitoredres.MonitoredResource { - if m != nil { - return m.Resource - } - return nil -} - -func (m *WriteLogEntriesRequest) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func (m *WriteLogEntriesRequest) GetEntries() []*LogEntry { - if m != nil { - return m.Entries - } - return nil -} - -func (m *WriteLogEntriesRequest) GetPartialSuccess() bool { - if m != nil { - return m.PartialSuccess - } - return false -} - -func (m *WriteLogEntriesRequest) GetDryRun() bool { - if m != nil { - return m.DryRun - } - return false -} - -// Result returned from WriteLogEntries. -// empty -type WriteLogEntriesResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteLogEntriesResponse) Reset() { *m = WriteLogEntriesResponse{} } -func (m *WriteLogEntriesResponse) String() string { return proto.CompactTextString(m) } -func (*WriteLogEntriesResponse) ProtoMessage() {} -func (*WriteLogEntriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{2} -} -func (m *WriteLogEntriesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteLogEntriesResponse.Unmarshal(m, b) -} -func (m *WriteLogEntriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteLogEntriesResponse.Marshal(b, m, deterministic) -} -func (dst *WriteLogEntriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteLogEntriesResponse.Merge(dst, src) -} -func (m *WriteLogEntriesResponse) XXX_Size() int { - return xxx_messageInfo_WriteLogEntriesResponse.Size(m) -} -func (m *WriteLogEntriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WriteLogEntriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteLogEntriesResponse proto.InternalMessageInfo - -// Error details for WriteLogEntries with partial success. -type WriteLogEntriesPartialErrors struct { - // When `WriteLogEntriesRequest.partial_success` is true, records the error - // status for entries that were not written due to a permanent error, keyed - // by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - // - // Failed requests for which no entries are written will not include - // per-entry errors. - LogEntryErrors map[int32]*status.Status `protobuf:"bytes,1,rep,name=log_entry_errors,json=logEntryErrors,proto3" json:"log_entry_errors,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteLogEntriesPartialErrors) Reset() { *m = WriteLogEntriesPartialErrors{} } -func (m *WriteLogEntriesPartialErrors) String() string { return proto.CompactTextString(m) } -func (*WriteLogEntriesPartialErrors) ProtoMessage() {} -func (*WriteLogEntriesPartialErrors) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{3} -} -func (m *WriteLogEntriesPartialErrors) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteLogEntriesPartialErrors.Unmarshal(m, b) -} -func (m *WriteLogEntriesPartialErrors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteLogEntriesPartialErrors.Marshal(b, m, deterministic) -} -func (dst *WriteLogEntriesPartialErrors) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteLogEntriesPartialErrors.Merge(dst, src) -} -func (m *WriteLogEntriesPartialErrors) XXX_Size() int { - return xxx_messageInfo_WriteLogEntriesPartialErrors.Size(m) -} -func (m *WriteLogEntriesPartialErrors) XXX_DiscardUnknown() { - xxx_messageInfo_WriteLogEntriesPartialErrors.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteLogEntriesPartialErrors proto.InternalMessageInfo - -func (m *WriteLogEntriesPartialErrors) GetLogEntryErrors() map[int32]*status.Status { - if m != nil { - return m.LogEntryErrors - } - return nil -} - -// The parameters to `ListLogEntries`. -type ListLogEntriesRequest struct { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. If present, these project identifiers are converted to - // resource name format and added to the list of resources in - // `resource_names`. - ProjectIds []string `protobuf:"bytes,1,rep,name=project_ids,json=projectIds,proto3" json:"project_ids,omitempty"` // Deprecated: Do not use. - // Required. Names of one or more parent resources from which to - // retrieve log entries: - // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" - // - // Projects listed in the `project_ids` field are added to this list. - ResourceNames []string `protobuf:"bytes,8,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` - // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Filters](/logging/docs/view/advanced_filters). Only log entries that - // match the filter are returned. An empty filter matches all log entries in - // the resources listed in `resource_names`. Referencing a parent resource - // that is not listed in `resource_names` will cause the filter to return no - // results. - // The maximum length of the filter is 20000 characters. - Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` - // Optional. How the results should be sorted. Presently, the only permitted - // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - // option returns entries in order of increasing values of - // `LogEntry.timestamp` (oldest first), and the second option returns entries - // in order of decreasing timestamps (newest first). Entries with equal - // timestamps are returned in order of their `insert_id` values. - OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `next_page_token` in the - // response indicates that more results might be available. - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `page_token` must be the value of - // `next_page_token` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogEntriesRequest) Reset() { *m = ListLogEntriesRequest{} } -func (m *ListLogEntriesRequest) String() string { return proto.CompactTextString(m) } -func (*ListLogEntriesRequest) ProtoMessage() {} -func (*ListLogEntriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{4} -} -func (m *ListLogEntriesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogEntriesRequest.Unmarshal(m, b) -} -func (m *ListLogEntriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogEntriesRequest.Marshal(b, m, deterministic) -} -func (dst *ListLogEntriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogEntriesRequest.Merge(dst, src) -} -func (m *ListLogEntriesRequest) XXX_Size() int { - return xxx_messageInfo_ListLogEntriesRequest.Size(m) -} -func (m *ListLogEntriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogEntriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogEntriesRequest proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *ListLogEntriesRequest) GetProjectIds() []string { - if m != nil { - return m.ProjectIds - } - return nil -} - -func (m *ListLogEntriesRequest) GetResourceNames() []string { - if m != nil { - return m.ResourceNames - } - return nil -} - -func (m *ListLogEntriesRequest) GetFilter() string { - if m != nil { - return m.Filter - } - return "" -} - -func (m *ListLogEntriesRequest) GetOrderBy() string { - if m != nil { - return m.OrderBy - } - return "" -} - -func (m *ListLogEntriesRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListLogEntriesRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// Result returned from `ListLogEntries`. -type ListLogEntriesResponse struct { - // A list of log entries. If `entries` is empty, `nextPageToken` may still be - // returned, indicating that more entries may exist. See `nextPageToken` for - // more information. - Entries []*LogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` - // If there might be more results than those appearing in this response, then - // `nextPageToken` is included. To get the next set of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - // - // If a value for `next_page_token` appears and the `entries` field is empty, - // it means that the search found no log entries so far but it did not have - // time to search all the possible log entries. Retry the method with this - // value for `page_token` to continue the search. Alternatively, consider - // speeding up the search by changing your filter to specify a single log name - // or resource type, or to narrow the time range of the search. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogEntriesResponse) Reset() { *m = ListLogEntriesResponse{} } -func (m *ListLogEntriesResponse) String() string { return proto.CompactTextString(m) } -func (*ListLogEntriesResponse) ProtoMessage() {} -func (*ListLogEntriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{5} -} -func (m *ListLogEntriesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogEntriesResponse.Unmarshal(m, b) -} -func (m *ListLogEntriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogEntriesResponse.Marshal(b, m, deterministic) -} -func (dst *ListLogEntriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogEntriesResponse.Merge(dst, src) -} -func (m *ListLogEntriesResponse) XXX_Size() int { - return xxx_messageInfo_ListLogEntriesResponse.Size(m) -} -func (m *ListLogEntriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogEntriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogEntriesResponse proto.InternalMessageInfo - -func (m *ListLogEntriesResponse) GetEntries() []*LogEntry { - if m != nil { - return m.Entries - } - return nil -} - -func (m *ListLogEntriesResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -// The parameters to ListMonitoredResourceDescriptors -type ListMonitoredResourceDescriptorsRequest struct { - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the - // response indicates that more results might be available. - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListMonitoredResourceDescriptorsRequest) Reset() { - *m = ListMonitoredResourceDescriptorsRequest{} -} -func (m *ListMonitoredResourceDescriptorsRequest) String() string { return proto.CompactTextString(m) } -func (*ListMonitoredResourceDescriptorsRequest) ProtoMessage() {} -func (*ListMonitoredResourceDescriptorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{6} -} -func (m *ListMonitoredResourceDescriptorsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListMonitoredResourceDescriptorsRequest.Unmarshal(m, b) -} -func (m *ListMonitoredResourceDescriptorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListMonitoredResourceDescriptorsRequest.Marshal(b, m, deterministic) -} -func (dst *ListMonitoredResourceDescriptorsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListMonitoredResourceDescriptorsRequest.Merge(dst, src) -} -func (m *ListMonitoredResourceDescriptorsRequest) XXX_Size() int { - return xxx_messageInfo_ListMonitoredResourceDescriptorsRequest.Size(m) -} -func (m *ListMonitoredResourceDescriptorsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListMonitoredResourceDescriptorsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListMonitoredResourceDescriptorsRequest proto.InternalMessageInfo - -func (m *ListMonitoredResourceDescriptorsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListMonitoredResourceDescriptorsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// Result returned from ListMonitoredResourceDescriptors. -type ListMonitoredResourceDescriptorsResponse struct { - // A list of resource descriptors. - ResourceDescriptors []*monitoredres.MonitoredResourceDescriptor `protobuf:"bytes,1,rep,name=resource_descriptors,json=resourceDescriptors,proto3" json:"resource_descriptors,omitempty"` - // If there might be more results than those appearing in this response, then - // `nextPageToken` is included. To get the next set of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListMonitoredResourceDescriptorsResponse) Reset() { - *m = ListMonitoredResourceDescriptorsResponse{} -} -func (m *ListMonitoredResourceDescriptorsResponse) String() string { return proto.CompactTextString(m) } -func (*ListMonitoredResourceDescriptorsResponse) ProtoMessage() {} -func (*ListMonitoredResourceDescriptorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{7} -} -func (m *ListMonitoredResourceDescriptorsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListMonitoredResourceDescriptorsResponse.Unmarshal(m, b) -} -func (m *ListMonitoredResourceDescriptorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListMonitoredResourceDescriptorsResponse.Marshal(b, m, deterministic) -} -func (dst *ListMonitoredResourceDescriptorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListMonitoredResourceDescriptorsResponse.Merge(dst, src) -} -func (m *ListMonitoredResourceDescriptorsResponse) XXX_Size() int { - return xxx_messageInfo_ListMonitoredResourceDescriptorsResponse.Size(m) -} -func (m *ListMonitoredResourceDescriptorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListMonitoredResourceDescriptorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListMonitoredResourceDescriptorsResponse proto.InternalMessageInfo - -func (m *ListMonitoredResourceDescriptorsResponse) GetResourceDescriptors() []*monitoredres.MonitoredResourceDescriptor { - if m != nil { - return m.ResourceDescriptors - } - return nil -} - -func (m *ListMonitoredResourceDescriptorsResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -// The parameters to ListLogs. -type ListLogsRequest struct { - // Required. The resource name that owns the logs: - // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the - // response indicates that more results might be available. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogsRequest) Reset() { *m = ListLogsRequest{} } -func (m *ListLogsRequest) String() string { return proto.CompactTextString(m) } -func (*ListLogsRequest) ProtoMessage() {} -func (*ListLogsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{8} -} -func (m *ListLogsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogsRequest.Unmarshal(m, b) -} -func (m *ListLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogsRequest.Marshal(b, m, deterministic) -} -func (dst *ListLogsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogsRequest.Merge(dst, src) -} -func (m *ListLogsRequest) XXX_Size() int { - return xxx_messageInfo_ListLogsRequest.Size(m) -} -func (m *ListLogsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogsRequest proto.InternalMessageInfo - -func (m *ListLogsRequest) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *ListLogsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListLogsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// Result returned from ListLogs. -type ListLogsResponse struct { - // A list of log names. For example, - // `"projects/my-project/syslog"` or - // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. - LogNames []string `protobuf:"bytes,3,rep,name=log_names,json=logNames,proto3" json:"log_names,omitempty"` - // If there might be more results than those appearing in this response, then - // `nextPageToken` is included. To get the next set of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogsResponse) Reset() { *m = ListLogsResponse{} } -func (m *ListLogsResponse) String() string { return proto.CompactTextString(m) } -func (*ListLogsResponse) ProtoMessage() {} -func (*ListLogsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_b5339a1842388fcc, []int{9} -} -func (m *ListLogsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogsResponse.Unmarshal(m, b) -} -func (m *ListLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogsResponse.Marshal(b, m, deterministic) -} -func (dst *ListLogsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogsResponse.Merge(dst, src) -} -func (m *ListLogsResponse) XXX_Size() int { - return xxx_messageInfo_ListLogsResponse.Size(m) -} -func (m *ListLogsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogsResponse proto.InternalMessageInfo - -func (m *ListLogsResponse) GetLogNames() []string { - if m != nil { - return m.LogNames - } - return nil -} - -func (m *ListLogsResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func init() { - proto.RegisterType((*DeleteLogRequest)(nil), "google.logging.v2.DeleteLogRequest") - proto.RegisterType((*WriteLogEntriesRequest)(nil), "google.logging.v2.WriteLogEntriesRequest") - proto.RegisterMapType((map[string]string)(nil), "google.logging.v2.WriteLogEntriesRequest.LabelsEntry") - proto.RegisterType((*WriteLogEntriesResponse)(nil), "google.logging.v2.WriteLogEntriesResponse") - proto.RegisterType((*WriteLogEntriesPartialErrors)(nil), "google.logging.v2.WriteLogEntriesPartialErrors") - proto.RegisterMapType((map[int32]*status.Status)(nil), "google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry") - proto.RegisterType((*ListLogEntriesRequest)(nil), "google.logging.v2.ListLogEntriesRequest") - proto.RegisterType((*ListLogEntriesResponse)(nil), "google.logging.v2.ListLogEntriesResponse") - proto.RegisterType((*ListMonitoredResourceDescriptorsRequest)(nil), "google.logging.v2.ListMonitoredResourceDescriptorsRequest") - proto.RegisterType((*ListMonitoredResourceDescriptorsResponse)(nil), "google.logging.v2.ListMonitoredResourceDescriptorsResponse") - proto.RegisterType((*ListLogsRequest)(nil), "google.logging.v2.ListLogsRequest") - proto.RegisterType((*ListLogsResponse)(nil), "google.logging.v2.ListLogsResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// LoggingServiceV2Client is the client API for LoggingServiceV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LoggingServiceV2Client interface { - // Deletes all the log entries in a log. - // The log reappears if it receives new entries. - // Log entries written shortly before the delete operation might not be - // deleted. - DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*empty.Empty, error) - // Writes log entries to Logging. This API method is the - // only way to send log entries to Logging. This method - // is used, directly or indirectly, by the Logging agent - // (fluentd) and all logging libraries configured to use Logging. - // A single request may contain log entries for a maximum of 1000 - // different resources (projects, organizations, billing accounts or - // folders) - WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) - // Lists log entries. Use this method to retrieve log entries from - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). - ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) - // Lists the descriptors for monitored resource types used by Logging. - ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) - // Lists the logs in projects, organizations, folders, or billing accounts. - // Only logs that have entries are listed. - ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) -} - -type loggingServiceV2Client struct { - cc *grpc.ClientConn -} - -func NewLoggingServiceV2Client(cc *grpc.ClientConn) LoggingServiceV2Client { - return &loggingServiceV2Client{cc} -} - -func (c *loggingServiceV2Client) DeleteLog(ctx context.Context, in *DeleteLogRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/DeleteLog", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) WriteLogEntries(ctx context.Context, in *WriteLogEntriesRequest, opts ...grpc.CallOption) (*WriteLogEntriesResponse, error) { - out := new(WriteLogEntriesResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/WriteLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListLogEntries(ctx context.Context, in *ListLogEntriesRequest, opts ...grpc.CallOption) (*ListLogEntriesResponse, error) { - out := new(ListLogEntriesResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { - out := new(ListMonitoredResourceDescriptorsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loggingServiceV2Client) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (*ListLogsResponse, error) { - out := new(ListLogsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.LoggingServiceV2/ListLogs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LoggingServiceV2Server is the server API for LoggingServiceV2 service. -type LoggingServiceV2Server interface { - // Deletes all the log entries in a log. - // The log reappears if it receives new entries. - // Log entries written shortly before the delete operation might not be - // deleted. - DeleteLog(context.Context, *DeleteLogRequest) (*empty.Empty, error) - // Writes log entries to Logging. This API method is the - // only way to send log entries to Logging. This method - // is used, directly or indirectly, by the Logging agent - // (fluentd) and all logging libraries configured to use Logging. - // A single request may contain log entries for a maximum of 1000 - // different resources (projects, organizations, billing accounts or - // folders) - WriteLogEntries(context.Context, *WriteLogEntriesRequest) (*WriteLogEntriesResponse, error) - // Lists log entries. Use this method to retrieve log entries from - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). - ListLogEntries(context.Context, *ListLogEntriesRequest) (*ListLogEntriesResponse, error) - // Lists the descriptors for monitored resource types used by Logging. - ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) - // Lists the logs in projects, organizations, folders, or billing accounts. - // Only logs that have entries are listed. - ListLogs(context.Context, *ListLogsRequest) (*ListLogsResponse, error) -} - -func RegisterLoggingServiceV2Server(s *grpc.Server, srv LoggingServiceV2Server) { - s.RegisterService(&_LoggingServiceV2_serviceDesc, srv) -} - -func _LoggingServiceV2_DeleteLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLogRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).DeleteLog(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/DeleteLog", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).DeleteLog(ctx, req.(*DeleteLogRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_WriteLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/WriteLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).WriteLogEntries(ctx, req.(*WriteLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListLogEntries(ctx, req.(*ListLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMonitoredResourceDescriptorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoggingServiceV2_ListLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoggingServiceV2Server).ListLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.LoggingServiceV2/ListLogs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoggingServiceV2Server).ListLogs(ctx, req.(*ListLogsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LoggingServiceV2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.logging.v2.LoggingServiceV2", - HandlerType: (*LoggingServiceV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteLog", - Handler: _LoggingServiceV2_DeleteLog_Handler, - }, - { - MethodName: "WriteLogEntries", - Handler: _LoggingServiceV2_WriteLogEntries_Handler, - }, - { - MethodName: "ListLogEntries", - Handler: _LoggingServiceV2_ListLogEntries_Handler, - }, - { - MethodName: "ListMonitoredResourceDescriptors", - Handler: _LoggingServiceV2_ListMonitoredResourceDescriptors_Handler, - }, - { - MethodName: "ListLogs", - Handler: _LoggingServiceV2_ListLogs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/logging/v2/logging.proto", -} - -func init() { - proto.RegisterFile("google/logging/v2/logging.proto", fileDescriptor_logging_b5339a1842388fcc) -} - -var fileDescriptor_logging_b5339a1842388fcc = []byte{ - // 1093 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xd7, 0x6c, 0x9a, 0xcd, 0xee, 0x84, 0x26, 0xdb, 0x69, 0xb3, 0x71, 0x77, 0x93, 0x66, 0xb3, - 0xab, 0x90, 0x8d, 0x25, 0x6c, 0x69, 0x51, 0xa5, 0x36, 0x55, 0x0f, 0xa4, 0x8d, 0x10, 0x52, 0x8a, - 0x22, 0x07, 0x52, 0x29, 0x8a, 0xb4, 0x72, 0xec, 0x89, 0x35, 0xd4, 0xeb, 0x31, 0x33, 0xe3, 0x94, - 0x0d, 0xea, 0xa5, 0x07, 0xbe, 0x00, 0x17, 0xb8, 0x21, 0x6e, 0x70, 0xe0, 0x5b, 0x70, 0xe1, 0x08, - 0x17, 0x3e, 0x40, 0x6f, 0x9c, 0xb8, 0x71, 0x03, 0x79, 0x66, 0xec, 0x78, 0xff, 0x34, 0x49, 0xb9, - 0x79, 0xde, 0xfb, 0xcd, 0xbc, 0xf7, 0x7b, 0xf3, 0x7b, 0x6f, 0x0c, 0xd7, 0x02, 0x4a, 0x83, 0x10, - 0xdb, 0x21, 0x0d, 0x02, 0x12, 0x05, 0xf6, 0x59, 0x2f, 0xfb, 0xb4, 0x62, 0x46, 0x05, 0x45, 0xb7, - 0x14, 0xc0, 0xca, 0xac, 0x67, 0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x1f, 0xe9, 0xcf, 0x7f, 0x00, 0xf8, 0xb9, 0xb4, 0xfc, 0xb1, 0xda, 0xfd, 0x24, 0xa4, - 0x89, 0x6f, 0xe9, 0xa3, 0xad, 0xc3, 0xde, 0x6f, 0x99, 0xe7, 0x58, 0x7a, 0x8e, 0xb5, 0xe7, 0xf8, - 0xb0, 0x77, 0x52, 0x96, 0x67, 0x7f, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xec, 0x91, - 0x2d, 0x5a, 0x0b, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/googleapis/logging/v2/logging_config.pb.go b/vendor/google.golang.org/genproto/googleapis/logging/v2/logging_config.pb.go deleted file mode 100644 index 5f42c33..0000000 --- a/vendor/google.golang.org/genproto/googleapis/logging/v2/logging_config.pb.go +++ /dev/null @@ -1,1557 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/logging/v2/logging_config.proto - -package logging // import "google.golang.org/genproto/googleapis/logging/v2" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import empty "github.com/golang/protobuf/ptypes/empty" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" -import _ "google.golang.org/genproto/googleapis/api/annotations" -import field_mask "google.golang.org/genproto/protobuf/field_mask" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// Available log entry formats. Log entries can be written to -// Logging in either format and can be exported in either format. -// Version 2 is the preferred format. -type LogSink_VersionFormat int32 - -const ( - // An unspecified format version that will default to V2. - LogSink_VERSION_FORMAT_UNSPECIFIED LogSink_VersionFormat = 0 - // `LogEntry` version 2 format. - LogSink_V2 LogSink_VersionFormat = 1 - // `LogEntry` version 1 format. - LogSink_V1 LogSink_VersionFormat = 2 -) - -var LogSink_VersionFormat_name = map[int32]string{ - 0: "VERSION_FORMAT_UNSPECIFIED", - 1: "V2", - 2: "V1", -} -var LogSink_VersionFormat_value = map[string]int32{ - "VERSION_FORMAT_UNSPECIFIED": 0, - "V2": 1, - "V1": 2, -} - -func (x LogSink_VersionFormat) String() string { - return proto.EnumName(LogSink_VersionFormat_name, int32(x)) -} -func (LogSink_VersionFormat) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{0, 0} -} - -// Describes a sink used to export log entries to one of the following -// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a -// Cloud Pub/Sub topic. A logs filter controls which log entries are -// exported. The sink must be created within a project, organization, billing -// account, or folder. -type LogSink struct { - // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are - // limited to 100 characters and can include only the following characters: - // upper and lower-case alphanumeric characters, underscores, hyphens, and - // periods. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. The export destination: - // - // "storage.googleapis.com/[GCS_BUCKET]" - // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - // "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - // - // The sink's `writer_identity`, set when the sink is created, must - // have permission to write to the destination or else the log - // entries are not exported. For more information, see - // [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). - Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"` - // Optional. - // An [advanced logs filter](/logging/docs/view/advanced_filters). The only - // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: - // - // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` - // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. - OutputVersionFormat LogSink_VersionFormat `protobuf:"varint,6,opt,name=output_version_format,json=outputVersionFormat,proto3,enum=google.logging.v2.LogSink_VersionFormat" json:"output_version_format,omitempty"` // Deprecated: Do not use. - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's - // destination. This field is set by - // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) - // and - // [sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update), - // based on the setting of `unique_writer_identity` in those methods. - // - // Until you grant this identity write-access to the destination, log entry - // exports from this sink will fail. For more information, - // see [Granting access for a - // resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - // Consult the destination service's documentation to determine the - // appropriate IAM roles to assign to the identity. - WriterIdentity string `protobuf:"bytes,8,opt,name=writer_identity,json=writerIdentity,proto3" json:"writer_identity,omitempty"` - // Optional. This field applies only to sinks owned by organizations and - // folders. If the field is false, the default, only the logs owned by the - // sink's parent resource are available for export. If the field is true, then - // logs from all the projects, folders, and billing accounts contained in the - // sink's parent resource are also available for export. Whether a particular - // log entry from the children is exported depends on the sink's filter - // expression. For example, if this field is true, then the filter - // `resource.type=gce_instance` would export all Compute Engine VM instance - // log entries from all projects in the sink's parent. To only export entries - // from certain child projects, filter on the project part of the log name: - // - // logName:("projects/test-project1/" OR "projects/test-project2/") AND - // resource.type=gce_instance - IncludeChildren bool `protobuf:"varint,9,opt,name=include_children,json=includeChildren,proto3" json:"include_children,omitempty"` - // Deprecated. This field is ignored when creating or updating sinks. - StartTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Deprecated: Do not use. - // Deprecated. This field is ignored when creating or updating sinks. - EndTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogSink) Reset() { *m = LogSink{} } -func (m *LogSink) String() string { return proto.CompactTextString(m) } -func (*LogSink) ProtoMessage() {} -func (*LogSink) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{0} -} -func (m *LogSink) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogSink.Unmarshal(m, b) -} -func (m *LogSink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogSink.Marshal(b, m, deterministic) -} -func (dst *LogSink) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSink.Merge(dst, src) -} -func (m *LogSink) XXX_Size() int { - return xxx_messageInfo_LogSink.Size(m) -} -func (m *LogSink) XXX_DiscardUnknown() { - xxx_messageInfo_LogSink.DiscardUnknown(m) -} - -var xxx_messageInfo_LogSink proto.InternalMessageInfo - -func (m *LogSink) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *LogSink) GetDestination() string { - if m != nil { - return m.Destination - } - return "" -} - -func (m *LogSink) GetFilter() string { - if m != nil { - return m.Filter - } - return "" -} - -// Deprecated: Do not use. -func (m *LogSink) GetOutputVersionFormat() LogSink_VersionFormat { - if m != nil { - return m.OutputVersionFormat - } - return LogSink_VERSION_FORMAT_UNSPECIFIED -} - -func (m *LogSink) GetWriterIdentity() string { - if m != nil { - return m.WriterIdentity - } - return "" -} - -func (m *LogSink) GetIncludeChildren() bool { - if m != nil { - return m.IncludeChildren - } - return false -} - -// Deprecated: Do not use. -func (m *LogSink) GetStartTime() *timestamp.Timestamp { - if m != nil { - return m.StartTime - } - return nil -} - -// Deprecated: Do not use. -func (m *LogSink) GetEndTime() *timestamp.Timestamp { - if m != nil { - return m.EndTime - } - return nil -} - -// The parameters to `ListSinks`. -type ListSinksRequest struct { - // Required. The parent resource whose sinks are to be listed: - // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the - // response indicates that more results might be available. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListSinksRequest) Reset() { *m = ListSinksRequest{} } -func (m *ListSinksRequest) String() string { return proto.CompactTextString(m) } -func (*ListSinksRequest) ProtoMessage() {} -func (*ListSinksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{1} -} -func (m *ListSinksRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListSinksRequest.Unmarshal(m, b) -} -func (m *ListSinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListSinksRequest.Marshal(b, m, deterministic) -} -func (dst *ListSinksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListSinksRequest.Merge(dst, src) -} -func (m *ListSinksRequest) XXX_Size() int { - return xxx_messageInfo_ListSinksRequest.Size(m) -} -func (m *ListSinksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListSinksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListSinksRequest proto.InternalMessageInfo - -func (m *ListSinksRequest) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *ListSinksRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -func (m *ListSinksRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -// Result returned from `ListSinks`. -type ListSinksResponse struct { - // A list of sinks. - Sinks []*LogSink `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` - // If there might be more results than appear in this response, then - // `nextPageToken` is included. To get the next set of results, call the same - // method again using the value of `nextPageToken` as `pageToken`. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListSinksResponse) Reset() { *m = ListSinksResponse{} } -func (m *ListSinksResponse) String() string { return proto.CompactTextString(m) } -func (*ListSinksResponse) ProtoMessage() {} -func (*ListSinksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{2} -} -func (m *ListSinksResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListSinksResponse.Unmarshal(m, b) -} -func (m *ListSinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListSinksResponse.Marshal(b, m, deterministic) -} -func (dst *ListSinksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListSinksResponse.Merge(dst, src) -} -func (m *ListSinksResponse) XXX_Size() int { - return xxx_messageInfo_ListSinksResponse.Size(m) -} -func (m *ListSinksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListSinksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListSinksResponse proto.InternalMessageInfo - -func (m *ListSinksResponse) GetSinks() []*LogSink { - if m != nil { - return m.Sinks - } - return nil -} - -func (m *ListSinksResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -// The parameters to `GetSink`. -type GetSinkRequest struct { - // Required. The resource name of the sink: - // - // "projects/[PROJECT_ID]/sinks/[SINK_ID]" - // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - // "folders/[FOLDER_ID]/sinks/[SINK_ID]" - // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetSinkRequest) Reset() { *m = GetSinkRequest{} } -func (m *GetSinkRequest) String() string { return proto.CompactTextString(m) } -func (*GetSinkRequest) ProtoMessage() {} -func (*GetSinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{3} -} -func (m *GetSinkRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSinkRequest.Unmarshal(m, b) -} -func (m *GetSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSinkRequest.Marshal(b, m, deterministic) -} -func (dst *GetSinkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSinkRequest.Merge(dst, src) -} -func (m *GetSinkRequest) XXX_Size() int { - return xxx_messageInfo_GetSinkRequest.Size(m) -} -func (m *GetSinkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetSinkRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetSinkRequest proto.InternalMessageInfo - -func (m *GetSinkRequest) GetSinkName() string { - if m != nil { - return m.SinkName - } - return "" -} - -// The parameters to `CreateSink`. -type CreateSinkRequest struct { - // Required. The resource in which to create the sink: - // - // "projects/[PROJECT_ID]" - // "organizations/[ORGANIZATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]" - // "folders/[FOLDER_ID]" - // - // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. The new sink, whose `name` parameter is a sink identifier that - // is not already in use. - Sink *LogSink `protobuf:"bytes,2,opt,name=sink,proto3" json:"sink,omitempty"` - // Optional. Determines the kind of IAM identity returned as `writer_identity` - // in the new sink. If this value is omitted or set to false, and if the - // sink's parent is a project, then the value returned as `writer_identity` is - // the same group or service account used by Logging before the - // addition of writer identities to this API. The sink's destination must be - // in the same project as the sink itself. - // - // If this field is set to true, or if the sink is owned by a non-project - // resource such as an organization, then the value of `writer_identity` will - // be a unique service account used only for exports from the new sink. For - // more information, see `writer_identity` in - // [LogSink][google.logging.v2.LogSink]. - UniqueWriterIdentity bool `protobuf:"varint,3,opt,name=unique_writer_identity,json=uniqueWriterIdentity,proto3" json:"unique_writer_identity,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateSinkRequest) Reset() { *m = CreateSinkRequest{} } -func (m *CreateSinkRequest) String() string { return proto.CompactTextString(m) } -func (*CreateSinkRequest) ProtoMessage() {} -func (*CreateSinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{4} -} -func (m *CreateSinkRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateSinkRequest.Unmarshal(m, b) -} -func (m *CreateSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateSinkRequest.Marshal(b, m, deterministic) -} -func (dst *CreateSinkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateSinkRequest.Merge(dst, src) -} -func (m *CreateSinkRequest) XXX_Size() int { - return xxx_messageInfo_CreateSinkRequest.Size(m) -} -func (m *CreateSinkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateSinkRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateSinkRequest proto.InternalMessageInfo - -func (m *CreateSinkRequest) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *CreateSinkRequest) GetSink() *LogSink { - if m != nil { - return m.Sink - } - return nil -} - -func (m *CreateSinkRequest) GetUniqueWriterIdentity() bool { - if m != nil { - return m.UniqueWriterIdentity - } - return false -} - -// The parameters to `UpdateSink`. -type UpdateSinkRequest struct { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: - // - // "projects/[PROJECT_ID]/sinks/[SINK_ID]" - // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - // "folders/[FOLDER_ID]/sinks/[SINK_ID]" - // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. - Sink *LogSink `protobuf:"bytes,2,opt,name=sink,proto3" json:"sink,omitempty"` - // Optional. See - // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) - // for a description of this field. When updating a sink, the effect of this - // field on the value of `writer_identity` in the updated sink depends on both - // the old and new values of this field: - // - // + If the old and new values of this field are both false or both true, - // then there is no change to the sink's `writer_identity`. - // + If the old value is false and the new value is true, then - // `writer_identity` is changed to a unique service account. - // + It is an error if the old value is true and the new value is - // set to false or defaulted to false. - UniqueWriterIdentity bool `protobuf:"varint,3,opt,name=unique_writer_identity,json=uniqueWriterIdentity,proto3" json:"unique_writer_identity,omitempty"` - // Optional. Field mask that specifies the fields in `sink` that need - // an update. A sink field will be overwritten if, and only if, it is - // in the update mask. `name` and output only fields cannot be updated. - // - // An empty updateMask is temporarily treated as using the following mask - // for backwards compatibility purposes: - // destination,filter,includeChildren - // At some point in the future, behavior will be removed and specifying an - // empty updateMask will be an error. - // - // For a detailed `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - // - // Example: `updateMask=filter`. - UpdateMask *field_mask.FieldMask `protobuf:"bytes,4,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpdateSinkRequest) Reset() { *m = UpdateSinkRequest{} } -func (m *UpdateSinkRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateSinkRequest) ProtoMessage() {} -func (*UpdateSinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{5} -} -func (m *UpdateSinkRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateSinkRequest.Unmarshal(m, b) -} -func (m *UpdateSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateSinkRequest.Marshal(b, m, deterministic) -} -func (dst *UpdateSinkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateSinkRequest.Merge(dst, src) -} -func (m *UpdateSinkRequest) XXX_Size() int { - return xxx_messageInfo_UpdateSinkRequest.Size(m) -} -func (m *UpdateSinkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateSinkRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateSinkRequest proto.InternalMessageInfo - -func (m *UpdateSinkRequest) GetSinkName() string { - if m != nil { - return m.SinkName - } - return "" -} - -func (m *UpdateSinkRequest) GetSink() *LogSink { - if m != nil { - return m.Sink - } - return nil -} - -func (m *UpdateSinkRequest) GetUniqueWriterIdentity() bool { - if m != nil { - return m.UniqueWriterIdentity - } - return false -} - -func (m *UpdateSinkRequest) GetUpdateMask() *field_mask.FieldMask { - if m != nil { - return m.UpdateMask - } - return nil -} - -// The parameters to `DeleteSink`. -type DeleteSinkRequest struct { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: - // - // "projects/[PROJECT_ID]/sinks/[SINK_ID]" - // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - // "folders/[FOLDER_ID]/sinks/[SINK_ID]" - // - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteSinkRequest) Reset() { *m = DeleteSinkRequest{} } -func (m *DeleteSinkRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteSinkRequest) ProtoMessage() {} -func (*DeleteSinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_config_3f1f3a18ccddda7f, []int{6} -} -func (m *DeleteSinkRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteSinkRequest.Unmarshal(m, b) -} -func (m *DeleteSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteSinkRequest.Marshal(b, m, deterministic) -} -func (dst *DeleteSinkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteSinkRequest.Merge(dst, src) -} -func (m *DeleteSinkRequest) XXX_Size() int { - return xxx_messageInfo_DeleteSinkRequest.Size(m) -} -func (m *DeleteSinkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteSinkRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteSinkRequest proto.InternalMessageInfo - -func (m *DeleteSinkRequest) GetSinkName() string { - if m != nil { - return m.SinkName - } - return "" -} - -// Specifies a set of log entries that are not to be stored in -// Logging. If your project receives a large volume of logs, you might be able -// to use exclusions to reduce your chargeable logs. Exclusions are processed -// after log sinks, so you can export log entries before they are excluded. -// Audit log entries and log entries from Amazon Web Services are never -// excluded. -type LogExclusion struct { - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. A description of this exclusion. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Required. - // An [advanced logs filter](/logging/docs/view/advanced_filters) - // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced_filters#sample), - // you can exclude less than 100% of the matching log entries. - // For example, the following filter matches 99% of low-severity log - // entries from load balancers: - // - // `"resource.type=http_load_balancer severity=ERROR" - // - // The maximum length of the filter is 20000 characters. - Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` - // Optional. The metric descriptor associated with the logs-based metric. - // If unspecified, it uses a default metric descriptor with a DELTA metric - // kind, INT64 value type, with no labels and a unit of "1". Such a metric - // counts the number of log entries matching the `filter` expression. - // - // The `name`, `type`, and `description` fields in the `metric_descriptor` - // are output only, and is constructed using the `name` and `description` - // field in the LogMetric. - // - // To create a logs-based metric that records a distribution of log values, a - // DELTA metric kind with a DISTRIBUTION value type must be used along with - // a `value_extractor` expression in the LogMetric. - // - // Each label in the metric descriptor must have a matching label - // name as the key and an extractor expression as the value in the - // `label_extractors` map. - // - // The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - // be updated once initially configured. New labels can be added in the - // `metric_descriptor`, but existing labels cannot be modified except for - // their description. - MetricDescriptor *metric.MetricDescriptor `protobuf:"bytes,5,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` - // Optional. A `value_extractor` is required when using a distribution - // logs-based metric to extract the values to record from a log entry. - // Two functions are supported for value extraction: `EXTRACT(field)` or - // `REGEXP_EXTRACT(field, regex)`. The argument are: - // 1. field: The name of the log entry field from which the value is to be - // extracted. - // 2. regex: A regular expression using the Google RE2 syntax - // (https://github.com/google/re2/wiki/Syntax) with a single capture - // group to extract data from the specified log entry field. The value - // of the field is converted to a string before applying the regex. - // It is an error to specify a regex that does not include exactly one - // capture group. - // - // The result of the extraction must be convertible to a double type, as the - // distribution always records double values. If either the extraction or - // the conversion to double fails, then those values are not recorded in the - // distribution. - // - // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - ValueExtractor string `protobuf:"bytes,6,opt,name=value_extractor,json=valueExtractor,proto3" json:"value_extractor,omitempty"` - // Optional. A map from a label key string to an extractor expression which is - // used to extract data from a log entry field and assign as the label value. - // Each label key specified in the LabelDescriptor must have an associated - // extractor expression in this map. The syntax of the extractor expression - // is the same as for the `value_extractor` field. - // - // The extracted value is converted to the type defined in the label - // descriptor. If the either the extraction or the type conversion fails, - // the label will have a default value. The default value for a string - // label is an empty string, for an integer label its 0, and for a boolean - // label its `false`. - // - // Note that there are upper bounds on the maximum number of labels and the - // number of active time series that are allowed in a project. - LabelExtractors map[string]string `protobuf:"bytes,7,rep,name=label_extractors,json=labelExtractors,proto3" json:"label_extractors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Optional. The `bucket_options` are required when the logs-based metric is - // using a DISTRIBUTION value type and it describes the bucket boundaries - // used to create a histogram of the extracted values. - BucketOptions *distribution.Distribution_BucketOptions `protobuf:"bytes,8,opt,name=bucket_options,json=bucketOptions,proto3" json:"bucket_options,omitempty"` - // Deprecated. The API version that created or updated this metric. - // The v2 format is used by default and cannot be changed. - Version LogMetric_ApiVersion `protobuf:"varint,4,opt,name=version,proto3,enum=google.logging.v2.LogMetric_ApiVersion" json:"version,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogMetric) Reset() { *m = LogMetric{} } -func (m *LogMetric) String() string { return proto.CompactTextString(m) } -func (*LogMetric) ProtoMessage() {} -func (*LogMetric) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{0} -} -func (m *LogMetric) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogMetric.Unmarshal(m, b) -} -func (m *LogMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogMetric.Marshal(b, m, deterministic) -} -func (dst *LogMetric) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogMetric.Merge(dst, src) -} -func (m *LogMetric) XXX_Size() int { - return xxx_messageInfo_LogMetric.Size(m) -} -func (m *LogMetric) XXX_DiscardUnknown() { - xxx_messageInfo_LogMetric.DiscardUnknown(m) -} - -var xxx_messageInfo_LogMetric proto.InternalMessageInfo - -func (m *LogMetric) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *LogMetric) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *LogMetric) GetFilter() string { - if m != nil { - return m.Filter - } - return "" -} - -func (m *LogMetric) GetMetricDescriptor() *metric.MetricDescriptor { - if m != nil { - return m.MetricDescriptor - } - return nil -} - -func (m *LogMetric) GetValueExtractor() string { - if m != nil { - return m.ValueExtractor - } - return "" -} - -func (m *LogMetric) GetLabelExtractors() map[string]string { - if m != nil { - return m.LabelExtractors - } - return nil -} - -func (m *LogMetric) GetBucketOptions() *distribution.Distribution_BucketOptions { - if m != nil { - return m.BucketOptions - } - return nil -} - -// Deprecated: Do not use. -func (m *LogMetric) GetVersion() LogMetric_ApiVersion { - if m != nil { - return m.Version - } - return LogMetric_V2 -} - -// The parameters to ListLogMetrics. -type ListLogMetricsRequest struct { - // Required. The name of the project containing the metrics: - // - // "projects/[PROJECT_ID]" - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the - // response indicates that more results might be available. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogMetricsRequest) Reset() { *m = ListLogMetricsRequest{} } -func (m *ListLogMetricsRequest) String() string { return proto.CompactTextString(m) } -func (*ListLogMetricsRequest) ProtoMessage() {} -func (*ListLogMetricsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{1} -} -func (m *ListLogMetricsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogMetricsRequest.Unmarshal(m, b) -} -func (m *ListLogMetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogMetricsRequest.Marshal(b, m, deterministic) -} -func (dst *ListLogMetricsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogMetricsRequest.Merge(dst, src) -} -func (m *ListLogMetricsRequest) XXX_Size() int { - return xxx_messageInfo_ListLogMetricsRequest.Size(m) -} -func (m *ListLogMetricsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogMetricsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogMetricsRequest proto.InternalMessageInfo - -func (m *ListLogMetricsRequest) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *ListLogMetricsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -func (m *ListLogMetricsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -// Result returned from ListLogMetrics. -type ListLogMetricsResponse struct { - // A list of logs-based metrics. - Metrics []*LogMetric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` - // If there might be more results than appear in this response, then - // `nextPageToken` is included. To get the next set of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListLogMetricsResponse) Reset() { *m = ListLogMetricsResponse{} } -func (m *ListLogMetricsResponse) String() string { return proto.CompactTextString(m) } -func (*ListLogMetricsResponse) ProtoMessage() {} -func (*ListLogMetricsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{2} -} -func (m *ListLogMetricsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListLogMetricsResponse.Unmarshal(m, b) -} -func (m *ListLogMetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListLogMetricsResponse.Marshal(b, m, deterministic) -} -func (dst *ListLogMetricsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListLogMetricsResponse.Merge(dst, src) -} -func (m *ListLogMetricsResponse) XXX_Size() int { - return xxx_messageInfo_ListLogMetricsResponse.Size(m) -} -func (m *ListLogMetricsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListLogMetricsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListLogMetricsResponse proto.InternalMessageInfo - -func (m *ListLogMetricsResponse) GetMetrics() []*LogMetric { - if m != nil { - return m.Metrics - } - return nil -} - -func (m *ListLogMetricsResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -// The parameters to GetLogMetric. -type GetLogMetricRequest struct { - // The resource name of the desired metric: - // - // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetLogMetricRequest) Reset() { *m = GetLogMetricRequest{} } -func (m *GetLogMetricRequest) String() string { return proto.CompactTextString(m) } -func (*GetLogMetricRequest) ProtoMessage() {} -func (*GetLogMetricRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{3} -} -func (m *GetLogMetricRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetLogMetricRequest.Unmarshal(m, b) -} -func (m *GetLogMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetLogMetricRequest.Marshal(b, m, deterministic) -} -func (dst *GetLogMetricRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetLogMetricRequest.Merge(dst, src) -} -func (m *GetLogMetricRequest) XXX_Size() int { - return xxx_messageInfo_GetLogMetricRequest.Size(m) -} -func (m *GetLogMetricRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetLogMetricRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetLogMetricRequest proto.InternalMessageInfo - -func (m *GetLogMetricRequest) GetMetricName() string { - if m != nil { - return m.MetricName - } - return "" -} - -// The parameters to CreateLogMetric. -type CreateLogMetricRequest struct { - // The resource name of the project in which to create the metric: - // - // "projects/[PROJECT_ID]" - // - // The new metric must be provided in the request. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // The new logs-based metric, which must not have an identifier that - // already exists. - Metric *LogMetric `protobuf:"bytes,2,opt,name=metric,proto3" json:"metric,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateLogMetricRequest) Reset() { *m = CreateLogMetricRequest{} } -func (m *CreateLogMetricRequest) String() string { return proto.CompactTextString(m) } -func (*CreateLogMetricRequest) ProtoMessage() {} -func (*CreateLogMetricRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{4} -} -func (m *CreateLogMetricRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateLogMetricRequest.Unmarshal(m, b) -} -func (m *CreateLogMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateLogMetricRequest.Marshal(b, m, deterministic) -} -func (dst *CreateLogMetricRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateLogMetricRequest.Merge(dst, src) -} -func (m *CreateLogMetricRequest) XXX_Size() int { - return xxx_messageInfo_CreateLogMetricRequest.Size(m) -} -func (m *CreateLogMetricRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateLogMetricRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateLogMetricRequest proto.InternalMessageInfo - -func (m *CreateLogMetricRequest) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *CreateLogMetricRequest) GetMetric() *LogMetric { - if m != nil { - return m.Metric - } - return nil -} - -// The parameters to UpdateLogMetric. -type UpdateLogMetricRequest struct { - // The resource name of the metric to update: - // - // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - // - // The updated metric must be provided in the request and it's - // `name` field must be the same as `[METRIC_ID]` If the metric - // does not exist in `[PROJECT_ID]`, then a new metric is created. - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` - // The updated metric. - Metric *LogMetric `protobuf:"bytes,2,opt,name=metric,proto3" json:"metric,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpdateLogMetricRequest) Reset() { *m = UpdateLogMetricRequest{} } -func (m *UpdateLogMetricRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateLogMetricRequest) ProtoMessage() {} -func (*UpdateLogMetricRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{5} -} -func (m *UpdateLogMetricRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateLogMetricRequest.Unmarshal(m, b) -} -func (m *UpdateLogMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateLogMetricRequest.Marshal(b, m, deterministic) -} -func (dst *UpdateLogMetricRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateLogMetricRequest.Merge(dst, src) -} -func (m *UpdateLogMetricRequest) XXX_Size() int { - return xxx_messageInfo_UpdateLogMetricRequest.Size(m) -} -func (m *UpdateLogMetricRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateLogMetricRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateLogMetricRequest proto.InternalMessageInfo - -func (m *UpdateLogMetricRequest) GetMetricName() string { - if m != nil { - return m.MetricName - } - return "" -} - -func (m *UpdateLogMetricRequest) GetMetric() *LogMetric { - if m != nil { - return m.Metric - } - return nil -} - -// The parameters to DeleteLogMetric. -type DeleteLogMetricRequest struct { - // The resource name of the metric to delete: - // - // "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteLogMetricRequest) Reset() { *m = DeleteLogMetricRequest{} } -func (m *DeleteLogMetricRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteLogMetricRequest) ProtoMessage() {} -func (*DeleteLogMetricRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_logging_metrics_c2eefe8f6ba831f8, []int{6} -} -func (m *DeleteLogMetricRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteLogMetricRequest.Unmarshal(m, b) -} -func (m *DeleteLogMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteLogMetricRequest.Marshal(b, m, deterministic) -} -func (dst *DeleteLogMetricRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteLogMetricRequest.Merge(dst, src) -} -func (m *DeleteLogMetricRequest) XXX_Size() int { - return xxx_messageInfo_DeleteLogMetricRequest.Size(m) -} -func (m *DeleteLogMetricRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteLogMetricRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteLogMetricRequest proto.InternalMessageInfo - -func (m *DeleteLogMetricRequest) GetMetricName() string { - if m != nil { - return m.MetricName - } - return "" -} - -func init() { - proto.RegisterType((*LogMetric)(nil), "google.logging.v2.LogMetric") - proto.RegisterMapType((map[string]string)(nil), "google.logging.v2.LogMetric.LabelExtractorsEntry") - proto.RegisterType((*ListLogMetricsRequest)(nil), "google.logging.v2.ListLogMetricsRequest") - proto.RegisterType((*ListLogMetricsResponse)(nil), "google.logging.v2.ListLogMetricsResponse") - proto.RegisterType((*GetLogMetricRequest)(nil), "google.logging.v2.GetLogMetricRequest") - proto.RegisterType((*CreateLogMetricRequest)(nil), "google.logging.v2.CreateLogMetricRequest") - proto.RegisterType((*UpdateLogMetricRequest)(nil), "google.logging.v2.UpdateLogMetricRequest") - proto.RegisterType((*DeleteLogMetricRequest)(nil), "google.logging.v2.DeleteLogMetricRequest") - proto.RegisterEnum("google.logging.v2.LogMetric_ApiVersion", LogMetric_ApiVersion_name, LogMetric_ApiVersion_value) -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MetricsServiceV2Client is the client API for MetricsServiceV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsServiceV2Client interface { - // Lists logs-based metrics. - ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) - // Gets a logs-based metric. - GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Creates a logs-based metric. - CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Creates or updates a logs-based metric. - UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) - // Deletes a logs-based metric. - DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*empty.Empty, error) -} - -type metricsServiceV2Client struct { - cc *grpc.ClientConn -} - -func NewMetricsServiceV2Client(cc *grpc.ClientConn) MetricsServiceV2Client { - return &metricsServiceV2Client{cc} -} - -func (c *metricsServiceV2Client) ListLogMetrics(ctx context.Context, in *ListLogMetricsRequest, opts ...grpc.CallOption) (*ListLogMetricsResponse, error) { - out := new(ListLogMetricsResponse) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/ListLogMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) GetLogMetric(ctx context.Context, in *GetLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/GetLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) CreateLogMetric(ctx context.Context, in *CreateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/CreateLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) UpdateLogMetric(ctx context.Context, in *UpdateLogMetricRequest, opts ...grpc.CallOption) (*LogMetric, error) { - out := new(LogMetric) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricsServiceV2Client) DeleteLogMetric(ctx context.Context, in *DeleteLogMetricRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetricsServiceV2Server is the server API for MetricsServiceV2 service. -type MetricsServiceV2Server interface { - // Lists logs-based metrics. - ListLogMetrics(context.Context, *ListLogMetricsRequest) (*ListLogMetricsResponse, error) - // Gets a logs-based metric. - GetLogMetric(context.Context, *GetLogMetricRequest) (*LogMetric, error) - // Creates a logs-based metric. - CreateLogMetric(context.Context, *CreateLogMetricRequest) (*LogMetric, error) - // Creates or updates a logs-based metric. - UpdateLogMetric(context.Context, *UpdateLogMetricRequest) (*LogMetric, error) - // Deletes a logs-based metric. - DeleteLogMetric(context.Context, *DeleteLogMetricRequest) (*empty.Empty, error) -} - -func RegisterMetricsServiceV2Server(s *grpc.Server, srv MetricsServiceV2Server) { - s.RegisterService(&_MetricsServiceV2_serviceDesc, srv) -} - -func _MetricsServiceV2_ListLogMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListLogMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/ListLogMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).ListLogMetrics(ctx, req.(*ListLogMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_GetLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).GetLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/GetLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).GetLogMetric(ctx, req.(*GetLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_CreateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/CreateLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).CreateLogMetric(ctx, req.(*CreateLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_UpdateLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).UpdateLogMetric(ctx, req.(*UpdateLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricsServiceV2_DeleteLogMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLogMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceV2Server).DeleteLogMetric(ctx, req.(*DeleteLogMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MetricsServiceV2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.logging.v2.MetricsServiceV2", - HandlerType: (*MetricsServiceV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListLogMetrics", - Handler: _MetricsServiceV2_ListLogMetrics_Handler, - }, - { - MethodName: "GetLogMetric", - Handler: _MetricsServiceV2_GetLogMetric_Handler, - }, - { - MethodName: "CreateLogMetric", - Handler: _MetricsServiceV2_CreateLogMetric_Handler, - }, - { - MethodName: "UpdateLogMetric", - Handler: _MetricsServiceV2_UpdateLogMetric_Handler, - }, - { - MethodName: "DeleteLogMetric", - Handler: _MetricsServiceV2_DeleteLogMetric_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/logging/v2/logging_metrics.proto", -} - -func init() { - proto.RegisterFile("google/logging/v2/logging_metrics.proto", fileDescriptor_logging_metrics_c2eefe8f6ba831f8) -} - -var fileDescriptor_logging_metrics_c2eefe8f6ba831f8 = []byte{ - // 861 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0x67, 0x9c, 0xc4, 0x69, 0x5e, 0x68, 0xec, 0x4e, 0x5b, 0xd7, 0x72, 0x53, 0xc5, 0xec, 0x21, - 0x71, 0x73, 0xd8, 0xa5, 0x0b, 0x8a, 0x4a, 0x11, 0x07, 0xdc, 0x44, 0x15, 0x52, 0x0a, 0x91, 0x0b, - 0x3e, 0xa0, 0x48, 0xab, 0xb1, 0xfd, 0xb2, 0x1a, 0xbc, 0xbb, 0xb3, 0xec, 0x8c, 0xad, 0xa4, 0xa8, - 0x17, 0xd4, 0x1b, 0x12, 0x07, 0xf8, 0x00, 0x1c, 0xb8, 0xf1, 0x51, 0xb8, 0xc2, 0x47, 0xe0, 0x43, - 0x70, 0x44, 0x3b, 0x3b, 0xeb, 0x6c, 0xed, 0x25, 0x8e, 0x72, 0xca, 0xcc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, 0xa3, 0xf2, 0xe0, 0x45, 0x96, 0xfd, 0x3c, 0x10, 0x93, 0x91, 0x6d, 0x14, 0xec, 0xbe, 0xfb, - 0x67, 0x8e, 0x9c, 0x6a, 0xe4, 0xd4, 0x20, 0xa7, 0x7d, 0x77, 0x50, 0xd5, 0x6f, 0x7f, 0xf4, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0x84, 0x19, 0x3d, 0xcc, 0x08, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go b/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go deleted file mode 100644 index 8688669..0000000 --- a/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/field_mask.proto - -package field_mask // import "google.golang.org/genproto/protobuf/field_mask" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// `FieldMask` represents a set of symbolic field paths, for example: -// -// paths: "f.a" -// paths: "f.b.d" -// -// Here `f` represents a field in some root message, `a` and `b` -// fields in the message found in `f`, and `d` a field found in the -// message in `f.b`. -// -// Field masks are used to specify a subset of fields that should be -// returned by a get operation or modified by an update operation. -// Field masks also have a custom JSON encoding (see below). -// -// # Field Masks in Projections -// -// When used in the context of a projection, a response message or -// sub-message is filtered by the API to only contain those fields as -// specified in the mask. For example, if the mask in the previous -// example is applied to a response message as follows: -// -// f { -// a : 22 -// b { -// d : 1 -// x : 2 -// } -// y : 13 -// } -// z: 8 -// -// The result will not contain specific values for fields x,y and z -// (their value will be set to the default, and omitted in proto text -// output): -// -// -// f { -// a : 22 -// b { -// d : 1 -// } -// } -// -// A repeated field is not allowed except at the last position of a -// paths string. -// -// If a FieldMask object is not present in a get operation, the -// operation applies to all fields (as if a FieldMask of all fields -// had been specified). -// -// Note that a field mask does not necessarily apply to the -// top-level response message. In case of a REST get operation, the -// field mask applies directly to the response, but in case of a REST -// list operation, the mask instead applies to each individual message -// in the returned resource list. In case of a REST custom method, -// other definitions may be used. Where the mask applies will be -// clearly documented together with its declaration in the API. In -// any case, the effect on the returned resource/resources is required -// behavior for APIs. -// -// # Field Masks in Update Operations -// -// A field mask in update operations specifies which fields of the -// targeted resource are going to be updated. The API is required -// to only change the values of the fields as specified in the mask -// and leave the others untouched. If a resource is passed in to -// describe the updated values, the API ignores the values of all -// fields not covered by the mask. -// -// If a repeated field is specified for an update operation, new values will -// be appended to the existing repeated field in the target resource. Note that -// a repeated field is only allowed in the last position of a `paths` string. -// -// If a sub-message is specified in the last position of the field mask for an -// update operation, then new value will be merged into the existing sub-message -// in the target resource. -// -// For example, given the target message: -// -// f { -// b { -// d: 1 -// x: 2 -// } -// c: [1] -// } -// -// And an update message: -// -// f { -// b { -// d: 10 -// } -// c: [2] -// } -// -// then if the field mask is: -// -// paths: ["f.b", "f.c"] -// -// then the result will be: -// -// f { -// b { -// d: 10 -// x: 2 -// } -// c: [1, 2] -// } -// -// An implementation may provide options to override this default behavior for -// repeated and message fields. -// -// In order to reset a field's value to the default, the field must -// be in the mask and set to the default value in the provided resource. -// Hence, in order to reset all fields of a resource, provide a default -// instance of the resource and set all fields in the mask, or do -// not provide a mask as described below. -// -// If a field mask is not present on update, the operation applies to -// all fields (as if a field mask of all fields has been specified). -// Note that in the presence of schema evolution, this may mean that -// fields the client does not know and has therefore not filled into -// the request will be reset to their default. If this is unwanted -// behavior, a specific service may require a client to always specify -// a field mask, producing an error if not. -// -// As with get operations, the location of the resource which -// describes the updated values in the request message depends on the -// operation kind. In any case, the effect of the field mask is -// required to be honored by the API. -// -// ## Considerations for HTTP REST -// -// The HTTP kind of an update operation which uses a field mask must -// be set to PATCH instead of PUT in order to satisfy HTTP semantics -// (PUT must only be used for full updates). -// -// # JSON Encoding of Field Masks -// -// In JSON, a field mask is encoded as a single string where paths are -// separated by a comma. Fields name in each path are converted -// to/from lower-camel naming conventions. -// -// As an example, consider the following message declarations: -// -// message Profile { -// User user = 1; -// Photo photo = 2; -// } -// message User { -// string display_name = 1; -// string address = 2; -// } -// -// In proto a field mask for `Profile` may look as such: -// -// mask { -// paths: "user.display_name" -// paths: "photo" -// } -// -// In JSON, the same mask is represented as below: -// -// { -// mask: "user.displayName,photo" -// } -// -// # Field Masks and Oneof Fields -// -// Field masks treat fields in oneofs just as regular fields. Consider the -// following message: -// -// message SampleMessage { -// oneof test_oneof { -// string name = 4; -// SubMessage sub_message = 9; -// } -// } -// -// The field mask can be: -// -// mask { -// paths: "name" -// } -// -// Or: -// -// mask { -// paths: "sub_message" -// } -// -// Note that oneof type names ("test_oneof" in this case) cannot be used in -// paths. -// -// ## Field Mask Verification -// -// The implementation of any API method which has a FieldMask type field in the -// request should verify the included field paths, and return an -// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. -type FieldMask struct { - // The set of field mask paths. - Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldMask) Reset() { *m = FieldMask{} } -func (m *FieldMask) String() string { return proto.CompactTextString(m) } -func (*FieldMask) ProtoMessage() {} -func (*FieldMask) Descriptor() ([]byte, []int) { - return fileDescriptor_field_mask_02a8b0c0831edcce, []int{0} -} -func (m *FieldMask) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldMask.Unmarshal(m, b) -} -func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic) -} -func (dst *FieldMask) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldMask.Merge(dst, src) -} -func (m *FieldMask) XXX_Size() int { - return xxx_messageInfo_FieldMask.Size(m) -} -func (m *FieldMask) XXX_DiscardUnknown() { - xxx_messageInfo_FieldMask.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldMask proto.InternalMessageInfo - -func (m *FieldMask) GetPaths() []string { - if m != nil { - return m.Paths - } - return nil -} - -func init() { - proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") -} - -func init() { - proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_field_mask_02a8b0c0831edcce) -} - -var fileDescriptor_field_mask_02a8b0c0831edcce = []byte{ - // 175 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, - 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54, - 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16, - 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x3d, 0x8c, - 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x5a, 0x9d, 0xf8, 0xe0, 0x1a, 0x03, 0x40, 0x42, 0x01, - 0x8c, 0x51, 0x96, 0x50, 0x25, 0xe9, 0xf9, 0x39, 0x89, 0x79, 0xe9, 0x7a, 0xf9, 0x45, 0xe9, 0xfa, - 0xe9, 0xa9, 0x79, 0x60, 0x0d, 0xd8, 0xdc, 0x64, 0x8d, 0x60, 0xfe, 0x60, 0x64, 0x5c, 0xc4, 0xc4, - 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x48, 0x00, 0x54, 0x83, 0x5e, 0x78, 0x6a, - 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x48, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x24, - 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xda, 0xb7, 0xa8, 0xed, 0x00, 0x00, 0x00, -}