vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood 2018-06-17 17:59:12 +01:00
parent 3f0789e2db
commit 08021c4636
2474 changed files with 435818 additions and 282709 deletions

View file

@ -1,18 +1,24 @@
language: go
go:
- 1.6.3
- 1.7.1
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
go_import_path: google.golang.org/appengine
install:
- go get -v -t -d google.golang.org/appengine/...
- mkdir sdk
- curl -o sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.40.zip"
- unzip -q sdk.zip -d sdk
- export APPENGINE_DEV_APPSERVER=$(pwd)/sdk/go_appengine/dev_appserver.py
- go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v appengine)
- mkdir /tmp/sdk
- curl -o /tmp/sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.40.zip"
- unzip -q /tmp/sdk.zip -d /tmp/sdk
- export PATH="$PATH:/tmp/sdk/go_appengine"
- export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py
script:
- goapp version
- go version
- go test -v google.golang.org/appengine/...
- go test -v -race google.golang.org/appengine/...
- sdk/go_appengine/goapp test -v google.golang.org/appengine/...
- goapp test -v google.golang.org/appengine/...

90
vendor/google.golang.org/appengine/CONTRIBUTING.md generated vendored Normal file
View file

@ -0,0 +1,90 @@
# Contributing
1. Sign one of the contributor license agreements below.
1. Get the package:
`go get -d google.golang.org/appengine`
1. Change into the checked out source:
`cd $GOPATH/src/google.golang.org/appengine`
1. Fork the repo.
1. Set your fork as a remote:
`git remote add fork git@github.com:GITHUB_USERNAME/appengine.git`
1. Make changes, commit to your fork.
1. Send a pull request with your changes.
The first line of your commit message is conventionally a one-line summary of the change, prefixed by the primary affected package, and is used as the title of your pull request.
# Testing
## Running system tests
Download and install the [Go App Engine SDK](https://cloud.google.com/appengine/docs/go/download). Make sure the `go_appengine` dir is in your `PATH`.
Set the `APPENGINE_DEV_APPSERVER` environment variable to `/path/to/go_appengine/dev_appserver.py`.
Run tests with `goapp test`:
```
goapp test -v google.golang.org/appengine/...
```
## Contributor License Agreements
Before we can accept your pull requests you'll need to sign a Contributor
License Agreement (CLA):
- **If you are an individual writing original source code** and **you own the
intellectual property**, then you'll need to sign an [individual CLA][indvcla].
- **If you work for a company that wants to allow you to contribute your work**,
then you'll need to sign a [corporate CLA][corpcla].
You can sign these electronically (just scroll to the bottom). After that,
we'll be able to accept your pull requests.
## Contributor Code of Conduct
As contributors and maintainers of this project,
and in the interest of fostering an open and welcoming community,
we pledge to respect all people who contribute through reporting issues,
posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.
We are committed to making participation in this project
a harassment-free experience for everyone,
regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information,
such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct.
By adopting this Code of Conduct,
project maintainers commit themselves to fairly and consistently
applying these principles to every aspect of managing this project.
Project maintainers who do not follow or enforce the Code of Conduct
may be permanently removed from the project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by opening an issue
or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
[indvcla]: https://developers.google.com/open-source/cla/individual
[corpcla]: https://developers.google.com/open-source/cla/corporate

View file

@ -2,19 +2,27 @@
[![Build Status](https://travis-ci.org/golang/appengine.svg)](https://travis-ci.org/golang/appengine)
This repository supports the Go runtime on App Engine,
including both the standard App Engine and the
"App Engine flexible environment" (formerly known as "Managed VMs").
This repository supports the Go runtime on *App Engine standard*.
It provides APIs for interacting with App Engine services.
Its canonical import path is `google.golang.org/appengine`.
See https://cloud.google.com/appengine/docs/go/
for more information.
File issue reports and feature requests on the [Google App Engine issue
tracker](https://code.google.com/p/googleappengine/issues/entry?template=Go%20defect).
File issue reports and feature requests on the [GitHub's issue
tracker](https://github.com/golang/appengine/issues).
## Upgrading an App Engine app to the flexible environment
This package does not work on *App Engine flexible*.
There are many differences between the App Engine standard environment and
the flexible environment.
See the [documentation on upgrading to the flexible environment](https://cloud.google.com/appengine/docs/flexible/go/upgrading).
## Directory structure
The top level directory of this repository is the `appengine` package. It
contains the
basic APIs (e.g. `appengine.NewContext`) that apply across APIs. Specific API
@ -24,32 +32,24 @@ There is an `internal` subdirectory that contains service protocol buffers,
plus packages required for connectivity to make API calls. App Engine apps
should not directly import any package under `internal`.
## Updating a Go App Engine app
## Updating from legacy (`import "appengine"`) packages
This section describes how to update an older Go App Engine app to use
these packages. A provided tool, `aefix`, can help automate steps 2 and 3
(run `go get google.golang.org/appengine/cmd/aefix` to install it), but
read the details below since `aefix` can't perform all the changes.
If you're currently using the bare `appengine` packages
(that is, not these ones, imported via `google.golang.org/appengine`),
then you can use the `aefix` tool to help automate an upgrade to these packages.
### 1. Update YAML files (App Engine flexible environment / Managed VMs only)
Run `go get google.golang.org/appengine/cmd/aefix` to install it.
The `app.yaml` file (and YAML files for modules) should have these new lines added:
```
vm: true
```
See https://cloud.google.com/appengine/docs/go/modules/#Go_Instance_scaling_and_class for details.
### 2. Update import paths
### 1. Update import paths
The import paths for App Engine packages are now fully qualified, based at `google.golang.org/appengine`.
You will need to update your code to use import paths starting with that; for instance,
code importing `appengine/datastore` will now need to import `google.golang.org/appengine/datastore`.
### 3. Update code using deprecated, removed or modified APIs
### 2. Update code using deprecated, removed or modified APIs
Most App Engine services are available with exactly the same API.
A few APIs were cleaned up, and some are not available yet.
This list summarises the differences:
A few APIs were cleaned up, and there are some differences:
* `appengine.Context` has been replaced with the `Context` type from `golang.org/x/net/context`.
* Logging methods that were on `appengine.Context` are now functions in `google.golang.org/appengine/log`.

View file

@ -3,6 +3,7 @@ package aetest
import (
"io"
"net/http"
"time"
"golang.org/x/net/context"
"google.golang.org/appengine"
@ -24,6 +25,12 @@ type Options struct {
// StronglyConsistentDatastore is whether the local datastore should be
// strongly consistent. This will diverge from production behaviour.
StronglyConsistentDatastore bool
// SuppressDevAppServerLog is whether the dev_appserver running in tests
// should output logs.
SuppressDevAppServerLog bool
// StartupTimeout is a duration to wait for instance startup.
// By default, 15 seconds.
StartupTimeout time.Duration
}
// NewContext starts an instance of the development API server, and returns

View file

@ -6,6 +6,7 @@ import (
"google.golang.org/appengine"
"google.golang.org/appengine/datastore"
"google.golang.org/appengine/internal"
"google.golang.org/appengine/memcache"
"google.golang.org/appengine/user"
)
@ -15,6 +16,8 @@ func TestBasicAPICalls(t *testing.T) {
if os.Getenv("APPENGINE_DEV_APPSERVER") == "" {
t.Skip("APPENGINE_DEV_APPSERVER not set")
}
resetEnv := internal.SetTestEnv()
defer resetEnv()
inst, err := NewInstance(nil)
if err != nil {

View file

@ -27,11 +27,17 @@ import (
// If opts is nil the default values are used.
func NewInstance(opts *Options) (Instance, error) {
i := &instance{
opts: opts,
appID: "testapp",
opts: opts,
appID: "testapp",
startupTimeout: 15 * time.Second,
}
if opts != nil && opts.AppID != "" {
i.appID = opts.AppID
if opts != nil {
if opts.AppID != "" {
i.appID = opts.AppID
}
if opts.StartupTimeout > 0 {
i.startupTimeout = opts.StartupTimeout
}
}
if err := i.startChild(); err != nil {
return nil, err
@ -47,13 +53,14 @@ func newSessionID() string {
// instance implements the Instance interface.
type instance struct {
opts *Options
child *exec.Cmd
apiURL *url.URL // base URL of API HTTP server
adminURL string // base URL of admin HTTP server
appDir string
appID string
relFuncs []func() // funcs to release any associated contexts
opts *Options
child *exec.Cmd
apiURL *url.URL // base URL of API HTTP server
adminURL string // base URL of admin HTTP server
appDir string
appID string
startupTimeout time.Duration
relFuncs []func() // funcs to release any associated contexts
}
// NewRequest returns an *http.Request associated with this instance.
@ -64,7 +71,7 @@ func (i *instance) NewRequest(method, urlStr string, body io.Reader) (*http.Requ
}
// Associate this request.
release := internal.RegisterTestRequest(req, i.apiURL, func(ctx context.Context) context.Context {
req, release := internal.RegisterTestRequest(req, i.apiURL, func(ctx context.Context) context.Context {
ctx = internal.WithAppIDOverride(ctx, "dev~"+i.appID)
return ctx
})
@ -79,7 +86,8 @@ func (i *instance) Close() (err error) {
rel()
}
i.relFuncs = nil
if i.child == nil {
child := i.child
if child == nil {
return nil
}
defer func() {
@ -90,10 +98,10 @@ func (i *instance) Close() (err error) {
}
}()
if p := i.child.Process; p != nil {
if p := child.Process; p != nil {
errc := make(chan error, 1)
go func() {
errc <- i.child.Wait()
errc <- child.Wait()
}()
// Call the quit handler on the admin server.
@ -103,7 +111,6 @@ func (i *instance) Close() (err error) {
return fmt.Errorf("unable to call /quit handler: %v", err)
}
res.Body.Close()
select {
case <-time.After(15 * time.Second):
p.Kill()
@ -205,7 +212,9 @@ func (i *instance) startChild() (err error) {
if err != nil {
return err
}
stderr = io.TeeReader(stderr, os.Stderr)
if !(i.opts != nil && i.opts.SuppressDevAppServerLog) {
stderr = io.TeeReader(stderr, os.Stderr)
}
if err = i.child.Start(); err != nil {
return err
}
@ -234,7 +243,7 @@ func (i *instance) startChild() (err error) {
}()
select {
case <-time.After(15 * time.Second):
case <-time.After(i.startupTimeout):
if p := i.child.Process; p != nil {
p.Kill()
}
@ -262,7 +271,6 @@ application: %s
version: 1
runtime: go
api_version: go1
vm: true
handlers:
- url: /.*

View file

@ -28,7 +28,8 @@ import (
// See https://cloud.google.com/appengine/docs/flexible/custom-runtimes#health_check_requests
// for details on how to do your own health checking.
//
// Main is not yet supported on App Engine Standard.
// On App Engine Standard it ensures the server has started and is prepared to
// receive requests.
//
// Main never returns.
//
@ -62,7 +63,7 @@ func IsDevAppServer() bool {
// NewContext returns a context for an in-flight HTTP request.
// This function is cheap.
func NewContext(req *http.Request) context.Context {
return WithContext(context.Background(), req)
return internal.ReqContext(req)
}
// WithContext returns a copy of the parent context

View file

@ -8,6 +8,7 @@ package blobstore // import "google.golang.org/appengine/blobstore"
import (
"bufio"
"bytes"
"encoding/base64"
"fmt"
"io"
@ -23,6 +24,7 @@ import (
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"golang.org/x/text/encoding/htmlindex"
"google.golang.org/appengine"
"google.golang.org/appengine/datastore"
@ -199,12 +201,40 @@ func ParseUpload(req *http.Request) (blobs map[string][]*BlobInfo, other url.Val
return nil, nil, err
}
bi.BlobKey = appengine.BlobKey(params["blob-key"])
charset := params["charset"]
if ctype != "message/external-body" || bi.BlobKey == "" {
if formKey != "" {
slurp, serr := ioutil.ReadAll(part)
if serr != nil {
return nil, nil, errorf("error reading %q MIME part", formKey)
}
// Handle base64 content transfer encoding. multipart.Part transparently
// handles quoted-printable, and no special handling is required for
// 7bit, 8bit, or binary.
ctype, params, err = mime.ParseMediaType(part.Header.Get("Content-Transfer-Encoding"))
if err == nil && ctype == "base64" {
slurp, serr = ioutil.ReadAll(base64.NewDecoder(
base64.StdEncoding, bytes.NewReader(slurp)))
if serr != nil {
return nil, nil, errorf("error %s decoding %q MIME part", ctype, formKey)
}
}
// Handle charset
if charset != "" {
encoding, err := htmlindex.Get(charset)
if err != nil {
return nil, nil, errorf("error getting decoder for charset %q", charset)
}
slurp, err = encoding.NewDecoder().Bytes(slurp)
if err != nil {
return nil, nil, errorf("error decoding from charset %q", charset)
}
}
other[formKey] = append(other[formKey], string(slurp))
}
continue

View file

@ -5,12 +5,21 @@
package blobstore
import (
"bytes"
"encoding/base64"
"fmt"
"io"
"mime/multipart"
"mime/quotedprintable"
"net/http"
"net/textproto"
"os"
"strconv"
"strings"
"testing"
"golang.org/x/text/encoding/htmlindex"
"google.golang.org/appengine"
"google.golang.org/appengine/internal/aetesting"
@ -19,6 +28,10 @@ import (
const rbs = readBufferSize
const charsetUTF8 = "utf-8"
const charsetISO2022JP = "iso-2022-jp"
const nonASCIIStr = "Hello, 世界"
func min(x, y int) int {
if x < y {
return x
@ -181,3 +194,96 @@ func TestReader(t *testing.T) {
}
}
}
// doPlainTextParseUploadTest tests ParseUpload's decoding of non-file form fields.
// It ensures that MIME multipart parts with Content-Type not equal to
// "message/external-body" (i.e. form fields that are not file uploads) are decoded
// correctly according to the value of their Content-Transfer-Encoding header field.
// If charset is not the empty string it will be set in the request's Content-Type
// header field, and if encoding is not the empty string then the Content-Transfer-Encoding
// header field will be set.
func doPlainTextParseUploadTest(t *testing.T, charset string, encoding string,
rawContent string, encodedContent string) {
bodyBuf := &bytes.Buffer{}
w := multipart.NewWriter(bodyBuf)
fieldName := "foo"
hdr := textproto.MIMEHeader{}
hdr.Set("Content-Disposition", fmt.Sprintf("form-data; name=%q", fieldName))
if charset != "" {
hdr.Set("Content-Type", fmt.Sprintf("text/plain; charset=%q", charset))
} else {
hdr.Set("Content-Type", "text/plain")
}
if encoding != "" {
hdr.Set("Content-Transfer-Encoding", encoding)
}
pw, err := w.CreatePart(hdr)
if err != nil {
t.Fatalf("error creating part: %v", err)
}
pw.Write([]byte(encodedContent))
if err := w.Close(); err != nil {
t.Fatalf("error closing multipart writer: %v\n", err)
}
req, err := http.NewRequest("POST", "/upload", bodyBuf)
if err != nil {
t.Fatalf("error creating request: %v", err)
}
req.Header.Set("Content-Type", w.FormDataContentType())
_, other, err := ParseUpload(req)
if err != nil {
t.Fatalf("error parsing upload: %v", err)
}
if other[fieldName][0] != rawContent {
t.Errorf("got %q expected %q", other[fieldName][0], rawContent)
}
}
func TestParseUploadUTF8Base64Encoding(t *testing.T) {
encoded := base64.StdEncoding.EncodeToString([]byte(nonASCIIStr))
doPlainTextParseUploadTest(t, charsetUTF8, "base64", nonASCIIStr, encoded)
}
func TestParseUploadUTF8Base64EncodingMultiline(t *testing.T) {
testStr := "words words words words words words words words words words words words"
encoded := "d29yZHMgd29yZHMgd29yZHMgd29yZHMgd29yZHMgd29yZHMgd29yZHMgd29yZHMgd29yZHMgd29y\r\nZHMgd29yZHMgd29yZHM="
doPlainTextParseUploadTest(t, charsetUTF8, "base64", testStr, encoded)
}
func TestParseUploadUTF8QuotedPrintableEncoding(t *testing.T) {
var encoded bytes.Buffer
writer := quotedprintable.NewWriter(&encoded)
writer.Write([]byte(nonASCIIStr))
writer.Close()
doPlainTextParseUploadTest(t, charsetUTF8, "quoted-printable", nonASCIIStr,
encoded.String())
}
func TestParseUploadISO2022JPBase64Encoding(t *testing.T) {
testStr := "こんにちは"
encoding, err := htmlindex.Get(charsetISO2022JP)
if err != nil {
t.Fatalf("error getting encoding: %v", err)
}
charsetEncoded, err := encoding.NewEncoder().String(testStr)
if err != nil {
t.Fatalf("error encoding string: %v", err)
}
base64Encoded := base64.StdEncoding.EncodeToString([]byte(charsetEncoded))
doPlainTextParseUploadTest(t, charsetISO2022JP, "base64", testStr, base64Encoded)
}
func TestParseUploadNoEncoding(t *testing.T) {
doPlainTextParseUploadTest(t, "", "", "Hello", "Hello")
}

View file

@ -17,6 +17,10 @@ which must be unique to the client that will use the returned token.
Send sends a message to the client over the channel identified by clientID.
channel.Send(c, "player1", "Game over!")
Deprecated: The Channel API feature has been deprecated and is going to be removed. See the Channel API Turndown document for details and timetable.
https://cloud.google.com/appengine/docs/deprecations/channel
*/
package channel // import "google.golang.org/appengine/channel"

View file

@ -8,7 +8,7 @@
// A main func is synthesized if one does not exist.
//
// A sample Dockerfile to be used with this bundler could look like this:
// FROM gcr.io/google_appengine/go-compat
// FROM gcr.io/google-appengine/go-compat
// ADD . /app
// RUN GOPATH=/app/_gopath go build -tags appenginevm -o /app/_ah/exe
package main

View file

@ -16,32 +16,29 @@ package main
import (
"flag"
"fmt"
"go/build"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
)
var (
skipFiles = map[string]bool{
".git": true,
".gitconfig": true,
".hg": true,
".travis.yml": true,
}
gopathCache = map[string]string{}
)
func usage() {
fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
fmt.Fprintf(os.Stderr, "\t%s gcloud --verbosity debug preview app deploy --version myversion ./app.yaml\tDeploy app to production\n", os.Args[0])
fmt.Fprintf(os.Stderr, "\t%s gcloud --verbosity debug app deploy --version myversion ./app.yaml\tDeploy app to production\n", os.Args[0])
}
var verbose bool
// vlogf logs to stderr if the "-v" flag is provided.
func vlogf(f string, v ...interface{}) {
if !verbose {
return
}
log.Printf("[aedeploy] "+f, v...)
}
func main() {
flag.BoolVar(&verbose, "v", false, "Verbose logging.")
flag.Usage = usage
flag.Parse()
if flag.NArg() < 1 {
@ -49,35 +46,23 @@ func main() {
os.Exit(1)
}
if err := aedeploy(); err != nil {
notice := func() {
fmt.Fprintln(os.Stderr, `NOTICE: aedeploy is deprecated. Just use "gcloud app deploy".`)
}
notice()
if err := deploy(); err != nil {
fmt.Fprintf(os.Stderr, os.Args[0]+": Error: %v\n", err)
notice()
fmt.Fprintln(os.Stderr, `You might need to update gcloud. Run "gcloud components update".`)
os.Exit(1)
}
}
func aedeploy() error {
tags := []string{"appenginevm"}
app, err := analyze(tags)
if err != nil {
return err
}
tmpDir, err := app.bundle()
if tmpDir != "" {
defer os.RemoveAll(tmpDir)
}
if err != nil {
return err
}
if err := os.Chdir(tmpDir); err != nil {
return fmt.Errorf("unable to chdir to %v: %v", tmpDir, err)
}
return deploy()
notice() // Make sure they see it at the end.
}
// deploy calls the provided command to deploy the app from the temporary directory.
func deploy() error {
vlogf("Running command %v", flag.Args())
cmd := exec.Command(flag.Arg(0), flag.Args()[1:]...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
if err := cmd.Run(); err != nil {
@ -85,184 +70,3 @@ func deploy() error {
}
return nil
}
type app struct {
appFiles []string
imports map[string]string
}
// analyze checks the app for building with the given build tags and returns
// app files, and a map of full directory import names to original import names.
func analyze(tags []string) (*app, error) {
ctxt := buildContext(tags)
appFiles, err := appFiles(ctxt)
if err != nil {
return nil, err
}
gopath := filepath.SplitList(ctxt.GOPATH)
im, err := imports(ctxt, ".", gopath)
return &app{
appFiles: appFiles,
imports: im,
}, err
}
// buildContext returns the context for building the source.
func buildContext(tags []string) *build.Context {
return &build.Context{
GOARCH: "amd64",
GOOS: "linux",
GOROOT: build.Default.GOROOT,
GOPATH: build.Default.GOPATH,
Compiler: build.Default.Compiler,
BuildTags: append(defaultBuildTags, tags...),
}
}
// All build tags except go1.7, since Go 1.6 is the runtime version.
var defaultBuildTags = []string{
"go1.1", "go1.2", "go1.3", "go1.4", "go1.5", "go1.6"}
// bundle bundles the app into a temporary directory.
func (s *app) bundle() (tmpdir string, err error) {
workDir, err := ioutil.TempDir("", "aedeploy")
if err != nil {
return "", fmt.Errorf("unable to create tmpdir: %v", err)
}
for srcDir, importName := range s.imports {
dstDir := "_gopath/src/" + importName
if err := copyTree(workDir, dstDir, srcDir); err != nil {
return workDir, fmt.Errorf("unable to copy directory %v to %v: %v", srcDir, dstDir, err)
}
}
if err := copyTree(workDir, ".", "."); err != nil {
return workDir, fmt.Errorf("unable to copy root directory to /app: %v", err)
}
return workDir, nil
}
// imports returns a map of all import directories (recursively) used by the app.
// The return value maps full directory names to original import names.
func imports(ctxt *build.Context, srcDir string, gopath []string) (map[string]string, error) {
pkg, err := ctxt.ImportDir(srcDir, 0)
if err != nil {
return nil, err
}
// Resolve all non-standard-library imports
result := make(map[string]string)
for _, v := range pkg.Imports {
if !strings.Contains(v, ".") {
continue
}
src, err := findInGopath(v, gopath)
if err != nil {
return nil, fmt.Errorf("unable to find import %v in gopath %v: %v", v, gopath, err)
}
if _, ok := result[src]; ok { // Already processed
continue
}
result[src] = v
im, err := imports(ctxt, src, gopath)
if err != nil {
return nil, fmt.Errorf("unable to parse package %v: %v", src, err)
}
for k, v := range im {
result[k] = v
}
}
return result, nil
}
// findInGopath searches the gopath for the named import directory.
func findInGopath(dir string, gopath []string) (string, error) {
if v, ok := gopathCache[dir]; ok {
return v, nil
}
for _, v := range gopath {
dst := filepath.Join(v, "src", dir)
if _, err := os.Stat(dst); err == nil {
gopathCache[dir] = dst
return dst, nil
}
}
return "", fmt.Errorf("unable to find package %v in gopath %v", dir, gopath)
}
// copyTree copies srcDir to dstDir relative to dstRoot, ignoring skipFiles.
func copyTree(dstRoot, dstDir, srcDir string) error {
d := filepath.Join(dstRoot, dstDir)
if err := os.MkdirAll(d, 0755); err != nil {
return fmt.Errorf("unable to create directory %q: %v", d, err)
}
entries, err := ioutil.ReadDir(srcDir)
if err != nil {
return fmt.Errorf("unable to read dir %q: %v", srcDir, err)
}
for _, entry := range entries {
n := entry.Name()
if skipFiles[n] {
continue
}
s := filepath.Join(srcDir, n)
if entry.Mode()&os.ModeSymlink == os.ModeSymlink {
if entry, err = os.Stat(s); err != nil {
return fmt.Errorf("unable to stat %v: %v", s, err)
}
}
d := filepath.Join(dstDir, n)
if entry.IsDir() {
if err := copyTree(dstRoot, d, s); err != nil {
return fmt.Errorf("unable to copy dir %q to %q: %v", s, d, err)
}
continue
}
if err := copyFile(dstRoot, d, s); err != nil {
return fmt.Errorf("unable to copy dir %q to %q: %v", s, d, err)
}
}
return nil
}
// copyFile copies src to dst relative to dstRoot.
func copyFile(dstRoot, dst, src string) error {
s, err := os.Open(src)
if err != nil {
return fmt.Errorf("unable to open %q: %v", src, err)
}
defer s.Close()
dst = filepath.Join(dstRoot, dst)
d, err := os.Create(dst)
if err != nil {
return fmt.Errorf("unable to create %q: %v", dst, err)
}
_, err = io.Copy(d, s)
if err != nil {
d.Close() // ignore error, copy already failed.
return fmt.Errorf("unable to copy %q to %q: %v", src, dst, err)
}
if err := d.Close(); err != nil {
return fmt.Errorf("unable to close %q: %v", dst, err)
}
return nil
}
// appFiles returns a list of all Go source files in the app.
func appFiles(ctxt *build.Context) ([]string, error) {
pkg, err := ctxt.ImportDir(".", 0)
if err != nil {
return nil, err
}
if !pkg.IsCommand() {
return nil, fmt.Errorf(`the root of your app needs to be package "main" (currently %q). Please see https://cloud.google.com/appengine/docs/flexible/go/ for more details on structuring your app.`, pkg.Name)
}
var appFiles []string
for _, f := range pkg.GoFiles {
n := filepath.Join(".", f)
appFiles = append(appFiles, n)
}
return appFiles, nil
}

View file

@ -43,7 +43,8 @@ func (e *ErrFieldMismatch) Error() string {
e.FieldName, e.StructType, e.Reason)
}
// protoToKey converts a Reference proto to a *Key.
// protoToKey converts a Reference proto to a *Key. If the key is invalid,
// protoToKey will return the invalid key along with ErrInvalidKey.
func protoToKey(r *pb.Reference) (k *Key, err error) {
appID := r.GetApp()
namespace := r.GetNameSpace()
@ -57,7 +58,7 @@ func protoToKey(r *pb.Reference) (k *Key, err error) {
namespace: namespace,
}
if !k.valid() {
return nil, ErrInvalidKey
return k, ErrInvalidKey
}
}
return

View file

@ -10,6 +10,7 @@ import (
"fmt"
"os"
"reflect"
"sort"
"strings"
"testing"
"time"
@ -70,6 +71,8 @@ var (
testGeoPt0 = appengine.GeoPoint{Lat: 1.2, Lng: 3.4}
testGeoPt1 = appengine.GeoPoint{Lat: 5, Lng: 10}
testBadGeoPt = appengine.GeoPoint{Lat: 1000, Lng: 34}
now = time.Unix(1e9, 0).UTC()
)
type B0 struct {
@ -133,6 +136,39 @@ type K1 struct {
K []*Key
}
type S struct {
St string
}
type NoOmit struct {
A string
B int `datastore:"Bb"`
C bool `datastore:",noindex"`
}
type OmitAll struct {
A string `datastore:",omitempty"`
B int `datastore:"Bb,omitempty"`
C bool `datastore:",omitempty,noindex"`
D time.Time `datastore:",omitempty"`
F []int `datastore:",omitempty"`
}
type Omit struct {
A string `datastore:",omitempty"`
B int `datastore:"Bb,omitempty"`
C bool `datastore:",omitempty,noindex"`
D time.Time `datastore:",omitempty"`
F []int `datastore:",omitempty"`
S `datastore:",omitempty"`
}
type NoOmits struct {
No []NoOmit `datastore:",omitempty"`
S `datastore:",omitempty"`
Ss S `datastore:",omitempty"`
}
type N0 struct {
X0
Nonymous X0
@ -306,10 +342,27 @@ type Doubler struct {
B bool
}
type Repeat struct {
Key string
Value []byte
}
type Repeated struct {
Repeats []Repeat
}
func (d *Doubler) Load(props []Property) error {
return LoadStruct(d, props)
}
type EmbeddedTime struct {
time.Time
}
type SpecialTime struct {
MyTime EmbeddedTime
}
func (d *Doubler) Save() ([]Property, error) {
// Save the default Property slice to an in-memory buffer (a PropertyList).
props, err := SaveStruct(d)
@ -475,6 +528,81 @@ var testCases = []testCase{
"",
"",
},
{
"omit empty, all",
&OmitAll{},
new(PropertyList),
"",
"",
},
{
"omit empty",
&Omit{},
&PropertyList{
Property{Name: "St", Value: "", NoIndex: false, Multiple: false},
},
"",
"",
},
{
"omit empty, fields populated",
&Omit{
A: "a",
B: 10,
C: true,
D: now,
F: []int{11},
},
&PropertyList{
Property{Name: "A", Value: "a", NoIndex: false, Multiple: false},
Property{Name: "Bb", Value: int64(10), NoIndex: false, Multiple: false},
Property{Name: "C", Value: true, NoIndex: true, Multiple: false},
Property{Name: "D", Value: now, NoIndex: false, Multiple: false},
Property{Name: "F", Value: int64(11), NoIndex: false, Multiple: true},
Property{Name: "St", Value: "", NoIndex: false, Multiple: false},
},
"",
"",
},
{
"omit empty, fields populated",
&Omit{
A: "a",
B: 10,
C: true,
D: now,
F: []int{11},
S: S{St: "string"},
},
&PropertyList{
Property{Name: "A", Value: "a", NoIndex: false, Multiple: false},
Property{Name: "Bb", Value: int64(10), NoIndex: false, Multiple: false},
Property{Name: "C", Value: true, NoIndex: true, Multiple: false},
Property{Name: "D", Value: now, NoIndex: false, Multiple: false},
Property{Name: "F", Value: int64(11), NoIndex: false, Multiple: true},
Property{Name: "St", Value: "string", NoIndex: false, Multiple: false},
},
"",
"",
},
{
"omit empty does not propagate",
&NoOmits{
No: []NoOmit{
NoOmit{},
},
S: S{},
Ss: S{},
},
&PropertyList{
Property{Name: "No.A", Value: "", NoIndex: false, Multiple: true},
Property{Name: "No.Bb", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "No.C", Value: false, NoIndex: true, Multiple: true},
Property{Name: "Ss.St", Value: "", NoIndex: false, Multiple: false},
Property{Name: "St", Value: "", NoIndex: false, Multiple: false}},
"",
"",
},
{
"key",
&K0{K: testKey1a},
@ -624,6 +752,35 @@ var testCases = []testCase{
"too many indexed properties",
"",
},
{
"slice of slices of bytes",
&Repeated{
Repeats: []Repeat{
{
Key: "key 1",
Value: []byte("value 1"),
},
{
Key: "key 2",
Value: []byte("value 2"),
},
},
},
&Repeated{
Repeats: []Repeat{
{
Key: "key 1",
Value: []byte("value 1"),
},
{
Key: "key 2",
Value: []byte("value 2"),
},
},
},
"",
"",
},
{
"long blob",
&B0{B: makeUint8Slice(maxIndexedProperties + 1)},
@ -727,16 +884,16 @@ var testCases = []testCase{
// A and B are renamed to a and b; A and C are noindex, I is ignored.
// Indexed properties are loaded before raw properties. Thus, the
// result is: b, b, b, D, E, a, c.
Property{Name: "C", Value: int64(3), NoIndex: true, Multiple: false},
Property{Name: "D", Value: int64(4), NoIndex: false, Multiple: false},
Property{Name: "E", Value: int64(5), NoIndex: false, Multiple: false},
Property{Name: "F", Value: int64(6), NoIndex: true, Multiple: false},
Property{Name: "G", Value: int64(7), NoIndex: false, Multiple: false},
Property{Name: "J", Value: int64(9), NoIndex: true, Multiple: false},
Property{Name: "a", Value: int64(1), NoIndex: true, Multiple: false},
Property{Name: "b", Value: int64(21), NoIndex: false, Multiple: true},
Property{Name: "b", Value: int64(22), NoIndex: false, Multiple: true},
Property{Name: "b", Value: int64(23), NoIndex: false, Multiple: true},
Property{Name: "D", Value: int64(4), NoIndex: false, Multiple: false},
Property{Name: "E", Value: int64(5), NoIndex: false, Multiple: false},
Property{Name: "G", Value: int64(7), NoIndex: false, Multiple: false},
Property{Name: "a", Value: int64(1), NoIndex: true, Multiple: false},
Property{Name: "C", Value: int64(3), NoIndex: true, Multiple: false},
Property{Name: "F", Value: int64(6), NoIndex: true, Multiple: false},
Property{Name: "J", Value: int64(9), NoIndex: true, Multiple: false},
},
"",
"",
@ -783,8 +940,8 @@ var testCases = []testCase{
"save struct load props",
&X0{S: "s", I: 1},
&PropertyList{
Property{Name: "S", Value: "s", NoIndex: false, Multiple: false},
Property{Name: "I", Value: int64(1), NoIndex: false, Multiple: false},
Property{Name: "S", Value: "s", NoIndex: false, Multiple: false},
},
"",
"",
@ -845,10 +1002,10 @@ var testCases = []testCase{
&PropertyList{
Property{Name: "A", Value: int64(1), NoIndex: false, Multiple: false},
Property{Name: "I.W", Value: int64(10), NoIndex: false, Multiple: true},
Property{Name: "I.X", Value: "ten", NoIndex: false, Multiple: true},
Property{Name: "I.W", Value: int64(20), NoIndex: false, Multiple: true},
Property{Name: "I.X", Value: "twenty", NoIndex: false, Multiple: true},
Property{Name: "I.W", Value: int64(30), NoIndex: false, Multiple: true},
Property{Name: "I.X", Value: "ten", NoIndex: false, Multiple: true},
Property{Name: "I.X", Value: "twenty", NoIndex: false, Multiple: true},
Property{Name: "I.X", Value: "thirty", NoIndex: false, Multiple: true},
Property{Name: "J.Y", Value: float64(3.14), NoIndex: false, Multiple: false},
Property{Name: "Z", Value: true, NoIndex: false, Multiple: false},
@ -1115,33 +1272,33 @@ var testCases = []testCase{
},
},
&PropertyList{
Property{Name: "red.S", Value: "rouge", NoIndex: false, Multiple: false},
Property{Name: "red.I", Value: int64(0), NoIndex: false, Multiple: false},
Property{Name: "red.Nonymous.S", Value: "rosso0", NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.S", Value: "rosso1", NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "red.Other", Value: "", NoIndex: false, Multiple: false},
Property{Name: "green.S", Value: "vert", NoIndex: false, Multiple: false},
Property{Name: "green.I", Value: int64(0), NoIndex: false, Multiple: false},
Property{Name: "green.Nonymous.S", Value: "verde0", NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.S", Value: "verde1", NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.S", Value: "verde2", NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Other", Value: "", NoIndex: false, Multiple: false},
Property{Name: "Blue.S", Value: "bleu", NoIndex: false, Multiple: false},
Property{Name: "Blue.I", Value: int64(0), NoIndex: false, Multiple: false},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.S", Value: "blu0", NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.S", Value: "blu1", NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.S", Value: "blu2", NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.S", Value: "blu3", NoIndex: false, Multiple: true},
Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "Blue.Other", Value: "", NoIndex: false, Multiple: false},
Property{Name: "Blue.S", Value: "bleu", NoIndex: false, Multiple: false},
Property{Name: "green.I", Value: int64(0), NoIndex: false, Multiple: false},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.S", Value: "verde0", NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.S", Value: "verde1", NoIndex: false, Multiple: true},
Property{Name: "green.Nonymous.S", Value: "verde2", NoIndex: false, Multiple: true},
Property{Name: "green.Other", Value: "", NoIndex: false, Multiple: false},
Property{Name: "green.S", Value: "vert", NoIndex: false, Multiple: false},
Property{Name: "red.I", Value: int64(0), NoIndex: false, Multiple: false},
Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.S", Value: "rosso0", NoIndex: false, Multiple: true},
Property{Name: "red.Nonymous.S", Value: "rosso1", NoIndex: false, Multiple: true},
Property{Name: "red.Other", Value: "", NoIndex: false, Multiple: false},
Property{Name: "red.S", Value: "rouge", NoIndex: false, Multiple: false},
},
"",
"",
@ -1196,10 +1353,10 @@ var testCases = []testCase{
}
}{},
&PropertyList{
Property{Name: "B.Y", Value: "", NoIndex: false, Multiple: false},
Property{Name: "A.X", Value: "", NoIndex: true, Multiple: false},
Property{Name: "A.Y", Value: "", NoIndex: true, Multiple: false},
Property{Name: "B.X", Value: "", NoIndex: true, Multiple: false},
Property{Name: "B.Y", Value: "", NoIndex: false, Multiple: false},
},
"",
"",
@ -1272,6 +1429,22 @@ var testCases = []testCase{
"",
"",
},
{
"embedded time field",
&SpecialTime{MyTime: EmbeddedTime{now}},
&SpecialTime{MyTime: EmbeddedTime{now}},
"",
"",
},
{
"embedded time load",
&PropertyList{
Property{Name: "MyTime.", Value: now, NoIndex: false, Multiple: false},
},
&SpecialTime{MyTime: EmbeddedTime{now}},
"",
"",
},
}
// checkErr returns the empty string if either both want and err are zero,
@ -1309,6 +1482,10 @@ func TestRoundTrip(t *testing.T) {
t.Errorf("%s: load: %s", tc.desc, s)
continue
}
if pl, ok := got.(*PropertyList); ok {
// Sort by name to make sure we have a deterministic order.
sort.Stable(byName(*pl))
}
equal := false
if gotT, ok := got.(*T); ok {
// Round tripping a time.Time can result in a different time.Location: Local instead of UTC.
@ -1324,6 +1501,12 @@ func TestRoundTrip(t *testing.T) {
}
}
type byName PropertyList
func (s byName) Len() int { return len(s) }
func (s byName) Less(i, j int) bool { return s[i].Name < s[j].Name }
func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func TestQueryConstruction(t *testing.T) {
tests := []struct {
q, exp *Query

View file

@ -87,7 +87,7 @@ behavior for struct pointers. Struct pointers are more strongly typed and are
easier to use; PropertyLoadSavers are more flexible.
The actual types passed do not have to match between Get and Put calls or even
across different App Engine requests. It is valid to put a *PropertyList and
across different calls to datastore. It is valid to put a *PropertyList and
get that same entity as a *myStruct, or put a *myStruct0 and get a *myStruct1.
Conceptually, any entity is saved as a sequence of properties, and is loaded
into the destination value on a property-by-property basis. When loading into
@ -97,18 +97,28 @@ caller whether this error is fatal, recoverable or ignorable.
By default, for struct pointers, all properties are potentially indexed, and
the property name is the same as the field name (and hence must start with an
upper case letter). Fields may have a `datastore:"name,options"` tag. The tag
name is the property name, which must be one or more valid Go identifiers
joined by ".", but may start with a lower case letter. An empty tag name means
to just use the field name. A "-" tag name means that the datastore will
ignore that field. If options is "noindex" then the field will not be indexed.
If the options is "" then the comma may be omitted. There are no other
recognized options.
upper case letter).
Fields (except for []byte) are indexed by default. Strings longer than 1500
bytes cannot be indexed; fields used to store long strings should be
tagged with "noindex". Similarly, ByteStrings longer than 1500 bytes cannot be
indexed.
Fields may have a `datastore:"name,options"` tag. The tag name is the
property name, which must be one or more valid Go identifiers joined by ".",
but may start with a lower case letter. An empty tag name means to just use the
field name. A "-" tag name means that the datastore will ignore that field.
The only valid options are "omitempty" and "noindex".
If the options include "omitempty" and the value of the field is empty, then the field will be omitted on Save.
The empty values are false, 0, any nil interface value, and any array, slice, map, or string of length zero.
Struct field values will never be empty.
If options include "noindex" then the field will not be indexed. All fields are indexed
by default. Strings or byte slices longer than 1500 bytes cannot be indexed;
fields used to store long strings and byte slices must be tagged with "noindex"
or they will cause Put operations to fail.
To use multiple options together, separate them by a comma.
The order does not matter.
If the options is "" then the comma may be omitted.
Example code:
@ -200,7 +210,7 @@ Example code:
func (x *CustomPropsExample) Save() ([]datastore.Property, error) {
// Validate the Sum field.
if x.Sum != x.I + x.J {
return errors.New("CustomPropsExample has inconsistent sum")
return nil, errors.New("CustomPropsExample has inconsistent sum")
}
// Save I and J as usual. The code below is equivalent to calling
// "return datastore.SaveStruct(x)", but is done manually for
@ -214,7 +224,7 @@ Example code:
Name: "J",
Value: int64(x.J),
},
}
}, nil
}
The *PropertyList type implements PropertyLoadSaver, and can therefore hold an
@ -343,7 +353,7 @@ Example code:
continue
}
for p, rep := range props {
fmt.Fprintf(w, "\t-%s (%s)\n", p, strings.Join(", ", rep))
fmt.Fprintf(w, "\t-%s (%s)\n", p, strings.Join(rep, ", "))
}
}
}

View file

@ -20,6 +20,26 @@ import (
pb "google.golang.org/appengine/internal/datastore"
)
type KeyRangeCollisionError struct {
start int64
end int64
}
func (e *KeyRangeCollisionError) Error() string {
return fmt.Sprintf("datastore: Collision when attempting to allocate range [%d, %d]",
e.start, e.end)
}
type KeyRangeContentionError struct {
start int64
end int64
}
func (e *KeyRangeContentionError) Error() string {
return fmt.Sprintf("datastore: Contention when attempting to allocate range [%d, %d]",
e.start, e.end)
}
// Key represents the datastore key for a stored entity, and is immutable.
type Key struct {
kind string
@ -307,3 +327,70 @@ func AllocateIDs(c context.Context, kind string, parent *Key, n int) (low, high
}
return low, high, nil
}
// AllocateIDRange allocates a range of IDs with specific endpoints.
// The range is inclusive at both the low and high end. Once these IDs have been
// allocated, you can manually assign them to newly created entities.
//
// The Datastore's automatic ID allocator never assigns a key that has already
// been allocated (either through automatic ID allocation or through an explicit
// AllocateIDs call). As a result, entities written to the given key range will
// never be overwritten. However, writing entities with manually assigned keys in
// this range may overwrite existing entities (or new entities written by a separate
// request), depending on the error returned.
//
// Use this only if you have an existing numeric ID range that you want to reserve
// (for example, bulk loading entities that already have IDs). If you don't care
// about which IDs you receive, use AllocateIDs instead.
//
// AllocateIDRange returns nil if the range is successfully allocated. If one or more
// entities with an ID in the given range already exist, it returns a KeyRangeCollisionError.
// If the Datastore has already cached IDs in this range (e.g. from a previous call to
// AllocateIDRange), it returns a KeyRangeContentionError. Errors of other types indicate
// problems with arguments or an error returned directly from the Datastore.
func AllocateIDRange(c context.Context, kind string, parent *Key, start, end int64) (err error) {
if kind == "" {
return errors.New("datastore: AllocateIDRange given an empty kind")
}
if start < 1 || end < 1 {
return errors.New("datastore: AllocateIDRange start and end must both be greater than 0")
}
if start > end {
return errors.New("datastore: AllocateIDRange start must be before end")
}
req := &pb.AllocateIdsRequest{
ModelKey: keyToProto("", NewIncompleteKey(c, kind, parent)),
Max: proto.Int64(end),
}
res := &pb.AllocateIdsResponse{}
if err := internal.Call(c, "datastore_v3", "AllocateIds", req, res); err != nil {
return err
}
// Check for collisions, i.e. existing entities with IDs in this range.
// We could do this before the allocation, but we'd still have to do it
// afterward as well to catch the race condition where an entity is inserted
// after that initial check but before the allocation. Skip the up-front check
// and just do it once.
q := NewQuery(kind).Filter("__key__ >=", NewKey(c, kind, "", start, parent)).
Filter("__key__ <=", NewKey(c, kind, "", end, parent)).KeysOnly().Limit(1)
keys, err := q.GetAll(c, nil)
if err != nil {
return err
}
if len(keys) != 0 {
return &KeyRangeCollisionError{start: start, end: end}
}
// Check for a race condition, i.e. cases where the datastore may have
// cached ID batches that contain IDs in this range.
if start < res.GetStart() {
return &KeyRangeContentionError{start: start, end: end}
}
return nil
}

View file

@ -7,8 +7,10 @@ package datastore
import (
"fmt"
"reflect"
"strings"
"time"
"github.com/golang/protobuf/proto"
"google.golang.org/appengine"
pb "google.golang.org/appengine/internal/datastore"
)
@ -19,13 +21,15 @@ var (
typeOfByteString = reflect.TypeOf(ByteString(nil))
typeOfGeoPoint = reflect.TypeOf(appengine.GeoPoint{})
typeOfTime = reflect.TypeOf(time.Time{})
typeOfKeyPtr = reflect.TypeOf(&Key{})
typeOfEntityPtr = reflect.TypeOf(&Entity{})
)
// typeMismatchReason returns a string explaining why the property p could not
// be stored in an entity field of type v.Type().
func typeMismatchReason(p Property, v reflect.Value) string {
func typeMismatchReason(pValue interface{}, v reflect.Value) string {
entityType := "empty"
switch p.Value.(type) {
switch pValue.(type) {
case int64:
entityType = "int"
case bool:
@ -58,13 +62,41 @@ type propertyLoader struct {
func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p Property, requireSlice bool) string {
var v reflect.Value
// Traverse a struct's struct-typed fields.
for name := p.Name; ; {
decoder, ok := codec.byName[name]
var sliceIndex int
name := p.Name
// If name ends with a '.', the last field is anonymous.
// In this case, strings.Split will give us "" as the
// last element of our fields slice, which will match the ""
// field name in the substruct codec.
fields := strings.Split(name, ".")
for len(fields) > 0 {
var decoder fieldCodec
var ok bool
// Cut off the last field (delimited by ".") and find its parent
// in the codec.
// eg. for name "A.B.C.D", split off "A.B.C" and try to
// find a field in the codec with this name.
// Loop again with "A.B", etc.
for i := len(fields); i > 0; i-- {
parent := strings.Join(fields[:i], ".")
decoder, ok = codec.fields[parent]
if ok {
fields = fields[i:]
break
}
}
// If we never found a matching field in the codec, return
// error message.
if !ok {
return "no such struct field"
}
v = structValue.Field(decoder.index)
v = initField(structValue, decoder.path)
if !v.IsValid() {
return "no such struct field"
}
@ -72,27 +104,23 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
return "cannot set struct field"
}
if decoder.substructCodec == nil {
break
if decoder.structCodec != nil {
codec = decoder.structCodec
structValue = v
}
if v.Kind() == reflect.Slice {
if v.Kind() == reflect.Slice && v.Type() != typeOfByteSlice {
if l.m == nil {
l.m = make(map[string]int)
}
index := l.m[p.Name]
l.m[p.Name] = index + 1
for v.Len() <= index {
sliceIndex = l.m[p.Name]
l.m[p.Name] = sliceIndex + 1
for v.Len() <= sliceIndex {
v.Set(reflect.Append(v, reflect.New(v.Type().Elem()).Elem()))
}
structValue = v.Index(index)
structValue = v.Index(sliceIndex)
requireSlice = false
} else {
structValue = v
}
// Strip the "I." from "I.X".
name = name[len(codec.byIndex[decoder.index].name):]
codec = decoder.substructCodec
}
var slice reflect.Value
@ -119,6 +147,8 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
meaning = pb.Property_GEORSS_POINT
case typeOfTime:
meaning = pb.Property_GD_WHEN
case typeOfEntityPtr:
meaning = pb.Property_ENTITY_PROTO
}
var err error
pValue, err = propValue(iv.value, meaning)
@ -127,11 +157,28 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
}
}
if errReason := setVal(v, pValue); errReason != "" {
// Set the slice back to its zero value.
if slice.IsValid() {
slice.Set(reflect.Zero(slice.Type()))
}
return errReason
}
if slice.IsValid() {
slice.Index(sliceIndex).Set(v)
}
return ""
}
// setVal sets v to the value pValue.
func setVal(v reflect.Value, pValue interface{}) string {
switch v.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
x, ok := pValue.(int64)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
if v.OverflowInt(x) {
return fmt.Sprintf("value %v overflows struct field of type %v", x, v.Type())
@ -140,7 +187,7 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
case reflect.Bool:
x, ok := pValue.(bool)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
v.SetBool(x)
case reflect.String:
@ -153,13 +200,13 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
v.SetString(x)
default:
if pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
}
case reflect.Float32, reflect.Float64:
x, ok := pValue.(float64)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
if v.OverflowFloat(x) {
return fmt.Sprintf("value %v overflows struct field of type %v", x, v.Type())
@ -168,10 +215,10 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
case reflect.Ptr:
x, ok := pValue.(*Key)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
if _, ok := v.Interface().(*Key); !ok {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
v.Set(reflect.ValueOf(x))
case reflect.Struct:
@ -179,17 +226,38 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
case typeOfTime:
x, ok := pValue.(time.Time)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
v.Set(reflect.ValueOf(x))
case typeOfGeoPoint:
x, ok := pValue.(appengine.GeoPoint)
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
v.Set(reflect.ValueOf(x))
default:
return typeMismatchReason(p, v)
ent, ok := pValue.(*Entity)
if !ok {
return typeMismatchReason(pValue, v)
}
// Recursively load nested struct
pls, err := newStructPLS(v.Addr().Interface())
if err != nil {
return err.Error()
}
// if ent has a Key value and our struct has a Key field,
// load the Entity's Key value into the Key field on the struct.
if ent.Key != nil && pls.codec.keyField != -1 {
pls.v.Field(pls.codec.keyField).Set(reflect.ValueOf(ent.Key))
}
err = pls.Load(ent.Properties)
if err != nil {
return err.Error()
}
}
case reflect.Slice:
x, ok := pValue.([]byte)
@ -199,31 +267,44 @@ func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p P
}
}
if !ok && pValue != nil {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
if v.Type().Elem().Kind() != reflect.Uint8 {
return typeMismatchReason(p, v)
return typeMismatchReason(pValue, v)
}
v.SetBytes(x)
default:
return typeMismatchReason(p, v)
}
if slice.IsValid() {
slice.Set(reflect.Append(slice, v))
return typeMismatchReason(pValue, v)
}
return ""
}
// initField is similar to reflect's Value.FieldByIndex, in that it
// returns the nested struct field corresponding to index, but it
// initialises any nil pointers encountered when traversing the structure.
func initField(val reflect.Value, index []int) reflect.Value {
for _, i := range index[:len(index)-1] {
val = val.Field(i)
if val.Kind() == reflect.Ptr {
if val.IsNil() {
val.Set(reflect.New(val.Type().Elem()))
}
val = val.Elem()
}
}
return val.Field(index[len(index)-1])
}
// loadEntity loads an EntityProto into PropertyLoadSaver or struct pointer.
func loadEntity(dst interface{}, src *pb.EntityProto) (err error) {
props, err := protoToProperties(src)
ent, err := protoToEntity(src)
if err != nil {
return err
}
if e, ok := dst.(PropertyLoadSaver); ok {
return e.Load(props)
return e.Load(ent.Properties)
}
return LoadStruct(dst, props)
return LoadStruct(dst, ent.Properties)
}
func (s structPLS) Load(props []Property) error {
@ -247,9 +328,9 @@ func (s structPLS) Load(props []Property) error {
return nil
}
func protoToProperties(src *pb.EntityProto) ([]Property, error) {
func protoToEntity(src *pb.EntityProto) (*Entity, error) {
props, rawProps := src.Property, src.RawProperty
out := make([]Property, 0, len(props)+len(rawProps))
outProps := make([]Property, 0, len(props)+len(rawProps))
for {
var (
x *pb.Property
@ -274,14 +355,21 @@ func protoToProperties(src *pb.EntityProto) ([]Property, error) {
return nil, err
}
}
out = append(out, Property{
outProps = append(outProps, Property{
Name: x.GetName(),
Value: value,
NoIndex: noIndex,
Multiple: x.GetMultiple(),
})
}
return out, nil
var key *Key
if src.Key != nil {
// Ignore any error, since nested entity values
// are allowed to have an invalid key.
key, _ = protoToKey(src.Key)
}
return &Entity{key, outProps}, nil
}
// propValue returns a Go value that combines the raw PropertyValue with a
@ -303,6 +391,13 @@ func propValue(v *pb.PropertyValue, m pb.Property_Meaning) (interface{}, error)
return appengine.BlobKey(*v.StringValue), nil
} else if m == pb.Property_BYTESTRING {
return ByteString(*v.StringValue), nil
} else if m == pb.Property_ENTITY_PROTO {
var ent pb.EntityProto
err := proto.Unmarshal([]byte(*v.StringValue), &ent)
if err != nil {
return nil, err
}
return protoToEntity(&ent)
} else {
return *v.StringValue, nil
}

View file

@ -0,0 +1,656 @@
// Copyright 2016 Google Inc. All Rights Reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package datastore
import (
"reflect"
"testing"
proto "github.com/golang/protobuf/proto"
pb "google.golang.org/appengine/internal/datastore"
)
type Simple struct {
I int64
}
type SimpleWithTag struct {
I int64 `datastore:"II"`
}
type NestedSimpleWithTag struct {
A SimpleWithTag `datastore:"AA"`
}
type NestedSliceOfSimple struct {
A []Simple
}
type SimpleTwoFields struct {
S string
SS string
}
type NestedSimpleAnonymous struct {
Simple
X string
}
type NestedSimple struct {
A Simple
I int64
}
type NestedSimple1 struct {
A Simple
X string
}
type NestedSimple2X struct {
AA NestedSimple
A SimpleTwoFields
S string
}
type BDotB struct {
B string `datastore:"B.B"`
}
type ABDotB struct {
A BDotB
}
type MultiAnonymous struct {
Simple
SimpleTwoFields
X string
}
var (
// these values need to be addressable
testString2 = "two"
testString3 = "three"
testInt64 = int64(2)
fieldNameI = "I"
fieldNameX = "X"
fieldNameS = "S"
fieldNameSS = "SS"
fieldNameADotI = "A.I"
fieldNameAADotII = "AA.II"
fieldNameADotBDotB = "A.B.B"
)
func TestLoadEntityNestedLegacy(t *testing.T) {
testCases := []struct {
desc string
src *pb.EntityProto
want interface{}
}{
{
"nested",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
&pb.Property{
Name: &fieldNameADotI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
},
},
&NestedSimple1{
A: Simple{I: testInt64},
X: testString2,
},
},
{
"nested with tag",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameAADotII,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
},
},
&NestedSimpleWithTag{
A: SimpleWithTag{I: testInt64},
},
},
{
"nested with anonymous struct field",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
},
},
&NestedSimpleAnonymous{
Simple: Simple{I: testInt64},
X: testString2,
},
},
{
"nested with dotted field tag",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameADotBDotB,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
},
},
&ABDotB{
A: BDotB{
B: testString2,
},
},
},
{
"nested with dotted field tag",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
&pb.Property{
Name: &fieldNameS,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
&pb.Property{
Name: &fieldNameSS,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
},
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
},
},
},
&MultiAnonymous{
Simple: Simple{I: testInt64},
SimpleTwoFields: SimpleTwoFields{S: "two", SS: "three"},
X: "three",
},
},
}
for _, tc := range testCases {
dst := reflect.New(reflect.TypeOf(tc.want).Elem()).Interface()
err := loadEntity(dst, tc.src)
if err != nil {
t.Errorf("loadEntity: %s: %v", tc.desc, err)
continue
}
if !reflect.DeepEqual(tc.want, dst) {
t.Errorf("%s: compare:\ngot: %#v\nwant: %#v", tc.desc, dst, tc.want)
}
}
}
type WithKey struct {
X string
I int64
K *Key `datastore:"__key__"`
}
type NestedWithKey struct {
N WithKey
Y string
}
var (
incompleteKey = newKey("", nil)
invalidKey = newKey("s", incompleteKey)
// these values need to be addressable
fieldNameA = "A"
fieldNameK = "K"
fieldNameN = "N"
fieldNameY = "Y"
fieldNameAA = "AA"
fieldNameII = "II"
fieldNameBDotB = "B.B"
entityProtoMeaning = pb.Property_ENTITY_PROTO
TRUE = true
FALSE = false
)
var (
simpleEntityProto, nestedSimpleEntityProto,
simpleTwoFieldsEntityProto, simpleWithTagEntityProto,
bDotBEntityProto, withKeyEntityProto string
)
func init() {
// simpleEntityProto corresponds to:
// Simple{I: testInt64}
simpleEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", incompleteKey),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
simpleEntityProto = string(simpleEntityProtob)
// nestedSimpleEntityProto corresponds to:
// NestedSimple{
// A: Simple{I: testInt64},
// I: testInt64,
// }
nestedSimpleEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", incompleteKey),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &simpleEntityProto,
},
Multiple: &FALSE,
},
&pb.Property{
Name: &fieldNameI,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
nestedSimpleEntityProto = string(nestedSimpleEntityProtob)
// simpleTwoFieldsEntityProto corresponds to:
// SimpleTwoFields{S: testString2, SS: testString3}
simpleTwoFieldsEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", incompleteKey),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameS,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
Multiple: &FALSE,
},
&pb.Property{
Name: &fieldNameSS,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
simpleTwoFieldsEntityProto = string(simpleTwoFieldsEntityProtob)
// simpleWithTagEntityProto corresponds to:
// SimpleWithTag{I: testInt64}
simpleWithTagEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", incompleteKey),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameII,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
simpleWithTagEntityProto = string(simpleWithTagEntityProtob)
// bDotBEntityProto corresponds to:
// BDotB{
// B: testString2,
// }
bDotBEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", incompleteKey),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameBDotB,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
bDotBEntityProto = string(bDotBEntityProtob)
// withKeyEntityProto corresponds to:
// WithKey{
// X: testString3,
// I: testInt64,
// K: testKey1a,
// }
withKeyEntityProtob, err := proto.Marshal(&pb.EntityProto{
Key: keyToProto("", testKey1a),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
Multiple: &FALSE,
},
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
Multiple: &FALSE,
},
},
EntityGroup: &pb.Path{},
})
if err != nil {
panic(err)
}
withKeyEntityProto = string(withKeyEntityProtob)
}
func TestLoadEntityNested(t *testing.T) {
testCases := []struct {
desc string
src *pb.EntityProto
want interface{}
}{
{
"nested basic",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &simpleEntityProto,
},
},
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
},
},
&NestedSimple{
A: Simple{I: 2},
I: 2,
},
},
{
"nested with struct tags",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameAA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &simpleWithTagEntityProto,
},
},
},
},
&NestedSimpleWithTag{
A: SimpleWithTag{I: testInt64},
},
},
{
"nested 2x",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameAA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &nestedSimpleEntityProto,
},
},
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &simpleTwoFieldsEntityProto,
},
},
&pb.Property{
Name: &fieldNameS,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
},
},
},
&NestedSimple2X{
AA: NestedSimple{
A: Simple{I: testInt64},
I: testInt64,
},
A: SimpleTwoFields{S: testString2, SS: testString3},
S: testString3,
},
},
{
"nested anonymous",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
},
},
&NestedSimpleAnonymous{
Simple: Simple{I: testInt64},
X: testString2,
},
},
{
"nested simple with slice",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Multiple: &TRUE,
Value: &pb.PropertyValue{
StringValue: &simpleEntityProto,
},
},
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Multiple: &TRUE,
Value: &pb.PropertyValue{
StringValue: &simpleEntityProto,
},
},
},
},
&NestedSliceOfSimple{
A: []Simple{Simple{I: testInt64}, Simple{I: testInt64}},
},
},
{
"nested with multiple anonymous fields",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameI,
Value: &pb.PropertyValue{
Int64Value: &testInt64,
},
},
&pb.Property{
Name: &fieldNameS,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
&pb.Property{
Name: &fieldNameSS,
Value: &pb.PropertyValue{
StringValue: &testString3,
},
},
&pb.Property{
Name: &fieldNameX,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
},
},
&MultiAnonymous{
Simple: Simple{I: testInt64},
SimpleTwoFields: SimpleTwoFields{S: testString2, SS: testString3},
X: testString2,
},
},
{
"nested with dotted field tag",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameA,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &bDotBEntityProto,
},
},
},
},
&ABDotB{
A: BDotB{
B: testString2,
},
},
},
{
"nested entity with key",
&pb.EntityProto{
Key: keyToProto("some-app-id", testKey0),
Property: []*pb.Property{
&pb.Property{
Name: &fieldNameY,
Value: &pb.PropertyValue{
StringValue: &testString2,
},
},
&pb.Property{
Name: &fieldNameN,
Meaning: &entityProtoMeaning,
Value: &pb.PropertyValue{
StringValue: &withKeyEntityProto,
},
},
},
},
&NestedWithKey{
Y: testString2,
N: WithKey{
X: testString3,
I: testInt64,
K: testKey1a,
},
},
},
}
for _, tc := range testCases {
dst := reflect.New(reflect.TypeOf(tc.want).Elem()).Interface()
err := loadEntity(dst, tc.src)
if err != nil {
t.Errorf("loadEntity: %s: %v", tc.desc, err)
continue
}
if !reflect.DeepEqual(tc.want, dst) {
t.Errorf("%s: compare:\ngot: %#v\nwant: %#v", tc.desc, dst, tc.want)
}
}
}

View file

@ -64,7 +64,7 @@ func KindProperties(ctx context.Context, kind string) (map[string][]string, erro
propMap := map[string][]string{}
props := []struct {
Repr []string `datastore:property_representation`
Repr []string `datastore:"property_representation"`
}{}
keys, err := q.GetAll(ctx, &props)

View file

@ -36,6 +36,7 @@ type Property struct {
// - appengine.BlobKey
// - appengine.GeoPoint
// - []byte (up to 1 megabyte in length)
// - *Entity (representing a nested struct)
// This set is smaller than the set of valid struct field types that the
// datastore can load and save. A Property Value cannot be a slice (apart
// from []byte); use multiple Properties instead. Also, a Value's type
@ -63,6 +64,13 @@ type Property struct {
Multiple bool
}
// An Entity is the value type for a nested struct.
// This type is only used for a Property's Value.
type Entity struct {
Key *Key
Properties []Property
}
// ByteString is a short byte slice (up to 1500 bytes) that can be indexed.
type ByteString []byte
@ -119,25 +127,18 @@ func validPropertyName(name string) bool {
return true
}
// structTag is the parsed `datastore:"name,options"` tag of a struct field.
// If a field has no tag, or the tag has an empty name, then the structTag's
// name is just the field name. A "-" name means that the datastore ignores
// that field.
type structTag struct {
name string
noIndex bool
}
// structCodec describes how to convert a struct to and from a sequence of
// properties.
type structCodec struct {
// byIndex gives the structTag for the i'th field.
byIndex []structTag
// byName gives the field codec for the structTag with the given name.
byName map[string]fieldCodec
// fields gives the field codec for the structTag with the given name.
fields map[string]fieldCodec
// hasSlice is whether a struct or any of its nested or embedded structs
// has a slice-typed field (other than []byte).
hasSlice bool
// keyField is the index of a *Key field with structTag __key__.
// This field is not relevant for the top level struct, only for
// nested structs.
keyField int
// complete is whether the structCodec is complete. An incomplete
// structCodec may be encountered when walking a recursive struct.
complete bool
@ -146,8 +147,15 @@ type structCodec struct {
// fieldCodec is a struct field's index and, if that struct field's type is
// itself a struct, that substruct's structCodec.
type fieldCodec struct {
index int
substructCodec *structCodec
// path is the index path to the field
path []int
noIndex bool
// omitEmpty indicates that the field should be omitted on save
// if empty.
omitEmpty bool
// structCodec is the codec fot the struct field at index 'path',
// or nil if the field is not a struct.
structCodec *structCodec
}
// structCodecs collects the structCodecs that have already been calculated.
@ -171,8 +179,10 @@ func getStructCodecLocked(t reflect.Type) (ret *structCodec, retErr error) {
return c, nil
}
c = &structCodec{
byIndex: make([]structTag, t.NumField()),
byName: make(map[string]fieldCodec),
fields: make(map[string]fieldCodec),
// We initialize keyField to -1 so that the zero-value is not
// misinterpreted as index 0.
keyField: -1,
}
// Add c to the structCodecs map before we are sure it is good. If t is
@ -185,22 +195,34 @@ func getStructCodecLocked(t reflect.Type) (ret *structCodec, retErr error) {
}
}()
for i := range c.byIndex {
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
// Skip unexported fields.
// Note that if f is an anonymous, unexported struct field,
// we will promote its fields.
if f.PkgPath != "" && !f.Anonymous {
continue
}
tags := strings.Split(f.Tag.Get("datastore"), ",")
name := tags[0]
opts := make(map[string]bool)
for _, t := range tags[1:] {
opts[t] = true
}
if name == "" {
switch {
case name == "":
if !f.Anonymous {
name = f.Name
}
} else if name == "-" {
c.byIndex[i] = structTag{name: name}
case name == "-":
continue
} else if !validPropertyName(name) {
case name == "__key__":
if f.Type != typeOfKeyPtr {
return nil, fmt.Errorf("datastore: __key__ field on struct %v is not a *datastore.Key", t)
}
c.keyField = i
case !validPropertyName(name):
return nil, fmt.Errorf("datastore: struct tag has invalid property name: %q", name)
}
@ -216,11 +238,10 @@ func getStructCodecLocked(t reflect.Type) (ret *structCodec, retErr error) {
c.hasSlice = c.hasSlice || fIsSlice
}
var sub *structCodec
if substructType != nil && substructType != typeOfTime && substructType != typeOfGeoPoint {
if name != "" {
name = name + "."
}
sub, err := getStructCodecLocked(substructType)
var err error
sub, err = getStructCodecLocked(substructType)
if err != nil {
return nil, err
}
@ -232,23 +253,35 @@ func getStructCodecLocked(t reflect.Type) (ret *structCodec, retErr error) {
"datastore: flattening nested structs leads to a slice of slices: field %q", f.Name)
}
c.hasSlice = c.hasSlice || sub.hasSlice
for relName := range sub.byName {
absName := name + relName
if _, ok := c.byName[absName]; ok {
return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", absName)
// If f is an anonymous struct field, we promote the substruct's fields up to this level
// in the linked list of struct codecs.
if f.Anonymous {
for subname, subfield := range sub.fields {
if name != "" {
subname = name + "." + subname
}
if _, ok := c.fields[subname]; ok {
return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", subname)
}
c.fields[subname] = fieldCodec{
path: append([]int{i}, subfield.path...),
noIndex: subfield.noIndex || opts["noindex"],
omitEmpty: subfield.omitEmpty,
structCodec: subfield.structCodec,
}
}
c.byName[absName] = fieldCodec{index: i, substructCodec: sub}
continue
}
} else {
if _, ok := c.byName[name]; ok {
return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", name)
}
c.byName[name] = fieldCodec{index: i}
}
c.byIndex[i] = structTag{
name: name,
noIndex: opts["noindex"],
if _, ok := c.fields[name]; ok {
return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", name)
}
c.fields[name] = fieldCodec{
path: []int{i},
noIndex: opts["noindex"],
omitEmpty: opts["omitempty"],
structCodec: sub,
}
}
c.complete = true
@ -261,8 +294,9 @@ type structPLS struct {
codec *structCodec
}
// newStructPLS returns a PropertyLoadSaver for the struct pointer p.
func newStructPLS(p interface{}) (PropertyLoadSaver, error) {
// newStructPLS returns a structPLS, which implements the
// PropertyLoadSaver interface, for the struct pointer p.
func newStructPLS(p interface{}) (*structPLS, error) {
v := reflect.ValueOf(p)
if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct {
return nil, ErrInvalidEntityType
@ -272,7 +306,7 @@ func newStructPLS(p interface{}) (PropertyLoadSaver, error) {
if err != nil {
return nil, err
}
return structPLS{v, codec}, nil
return &structPLS{v, codec}, nil
}
// LoadStruct loads the properties from p to dst.

View file

@ -6,6 +6,7 @@ package datastore
import (
"reflect"
"sort"
"testing"
"time"
@ -80,58 +81,36 @@ func TestStructCodec(t *testing.T) {
V string `datastore:",noindex"`
}
oStructCodec := &structCodec{
byIndex: []structTag{
{name: "O"},
},
byName: map[string]fieldCodec{
"O": {index: 0},
fields: map[string]fieldCodec{
"O": {path: []int{0}},
},
complete: true,
}
pStructCodec := &structCodec{
byIndex: []structTag{
{name: "P"},
{name: "Q"},
},
byName: map[string]fieldCodec{
"P": {index: 0},
"Q": {index: 1},
fields: map[string]fieldCodec{
"P": {path: []int{0}},
"Q": {path: []int{1}},
},
complete: true,
}
rStructCodec := &structCodec{
byIndex: []structTag{
{name: "R"},
{name: "S."},
{name: "T."},
{name: ""},
},
byName: map[string]fieldCodec{
"R": {index: 0},
"S.P": {index: 1, substructCodec: pStructCodec},
"S.Q": {index: 1, substructCodec: pStructCodec},
"T.O": {index: 2, substructCodec: oStructCodec},
"O": {index: 3, substructCodec: oStructCodec},
fields: map[string]fieldCodec{
"R": {path: []int{0}},
"S": {path: []int{1}, structCodec: pStructCodec},
"T": {path: []int{2}, structCodec: oStructCodec},
"O": {path: []int{3, 0}},
},
complete: true,
}
uStructCodec := &structCodec{
byIndex: []structTag{
{name: "U"},
{name: "v"},
},
byName: map[string]fieldCodec{
"U": {index: 0},
"v": {index: 1},
fields: map[string]fieldCodec{
"U": {path: []int{0}},
},
complete: true,
}
vStructCodec := &structCodec{
byIndex: []structTag{
{name: "V", noIndex: true},
},
byName: map[string]fieldCodec{
"V": {index: 0},
fields: map[string]fieldCodec{
"V": {path: []int{0}, noIndex: true},
},
complete: true,
}
@ -169,15 +148,10 @@ func TestStructCodec(t *testing.T) {
T time.Time
}{},
&structCodec{
byIndex: []structTag{
{name: "B"},
{name: "K"},
{name: "T"},
},
byName: map[string]fieldCodec{
"B": {index: 0},
"K": {index: 1},
"T": {index: 2},
fields: map[string]fieldCodec{
"B": {path: []int{0}},
"K": {path: []int{1}},
"T": {path: []int{2}},
},
complete: true,
},
@ -195,23 +169,13 @@ func TestStructCodec(t *testing.T) {
oStruct `datastore:"-"`
}{},
&structCodec{
byIndex: []structTag{
{name: "a", noIndex: true},
{name: "b", noIndex: false},
{name: "C", noIndex: true},
{name: "D", noIndex: false},
{name: "E", noIndex: false},
{name: "-", noIndex: false},
{name: "J", noIndex: true},
{name: "-", noIndex: false},
},
byName: map[string]fieldCodec{
"a": {index: 0},
"b": {index: 1},
"C": {index: 2},
"D": {index: 3},
"E": {index: 4},
"J": {index: 6},
fields: map[string]fieldCodec{
"a": {path: []int{0}, noIndex: true},
"b": {path: []int{1}},
"C": {path: []int{2}, noIndex: true},
"D": {path: []int{3}},
"E": {path: []int{4}},
"J": {path: []int{6}, noIndex: true},
},
complete: true,
},
@ -225,17 +189,9 @@ func TestStructCodec(t *testing.T) {
d int `datastore:"Y"`
}{},
&structCodec{
byIndex: []structTag{
{name: "A"},
{name: "b"},
{name: "x"},
{name: "Y"},
},
byName: map[string]fieldCodec{
"A": {index: 0},
"b": {index: 1},
"x": {index: 2},
"Y": {index: 3},
fields: map[string]fieldCodec{
"A": {path: []int{0}},
"x": {path: []int{2}},
},
complete: true,
},
@ -250,23 +206,12 @@ func TestStructCodec(t *testing.T) {
oStruct
}{},
&structCodec{
byIndex: []structTag{
{name: "A"},
{name: "B"},
{name: "CC."},
{name: "DDD."},
{name: ""},
},
byName: map[string]fieldCodec{
"A": {index: 0},
"B": {index: 1},
"CC.O": {index: 2, substructCodec: oStructCodec},
"DDD.R": {index: 3, substructCodec: rStructCodec},
"DDD.S.P": {index: 3, substructCodec: rStructCodec},
"DDD.S.Q": {index: 3, substructCodec: rStructCodec},
"DDD.T.O": {index: 3, substructCodec: rStructCodec},
"DDD.O": {index: 3, substructCodec: rStructCodec},
"O": {index: 4, substructCodec: oStructCodec},
fields: map[string]fieldCodec{
"A": {path: []int{0}},
"B": {path: []int{1}},
"CC": {path: []int{2}, structCodec: oStructCodec},
"DDD": {path: []int{3}, structCodec: rStructCodec},
"O": {path: []int{4, 0}},
},
complete: true,
},
@ -281,22 +226,11 @@ func TestStructCodec(t *testing.T) {
oStruct `datastore:"z"`
}{},
&structCodec{
byIndex: []structTag{
{name: "-"},
{name: "w"},
{name: "xx."},
{name: "y."},
{name: "z."},
},
byName: map[string]fieldCodec{
"w": {index: 1},
"xx.O": {index: 2, substructCodec: oStructCodec},
"y.R": {index: 3, substructCodec: rStructCodec},
"y.S.P": {index: 3, substructCodec: rStructCodec},
"y.S.Q": {index: 3, substructCodec: rStructCodec},
"y.T.O": {index: 3, substructCodec: rStructCodec},
"y.O": {index: 3, substructCodec: rStructCodec},
"z.O": {index: 4, substructCodec: oStructCodec},
fields: map[string]fieldCodec{
"w": {path: []int{1}},
"xx": {path: []int{2}, structCodec: oStructCodec},
"y": {path: []int{3}, structCodec: rStructCodec},
"z.O": {path: []int{4, 0}},
},
complete: true,
},
@ -311,22 +245,10 @@ func TestStructCodec(t *testing.T) {
uStruct
}{},
&structCodec{
byIndex: []structTag{
{name: "a"},
{name: "B"},
{name: "c."},
{name: "D."},
{name: ""},
},
byName: map[string]fieldCodec{
"a": {index: 0},
"B": {index: 1},
"c.U": {index: 2, substructCodec: uStructCodec},
"c.v": {index: 2, substructCodec: uStructCodec},
"D.U": {index: 3, substructCodec: uStructCodec},
"D.v": {index: 3, substructCodec: uStructCodec},
"U": {index: 4, substructCodec: uStructCodec},
"v": {index: 4, substructCodec: uStructCodec},
fields: map[string]fieldCodec{
"B": {path: []int{1}},
"D": {path: []int{3}, structCodec: uStructCodec},
"U": {path: []int{4, 0}},
},
complete: true,
},
@ -337,11 +259,8 @@ func TestStructCodec(t *testing.T) {
A oStruct `datastore:",noindex"`
}{},
&structCodec{
byIndex: []structTag{
{name: "A.", noIndex: true},
},
byName: map[string]fieldCodec{
"A.O": {index: 0, substructCodec: oStructCodec},
fields: map[string]fieldCodec{
"A": {path: []int{0}, structCodec: oStructCodec, noIndex: true},
},
complete: true,
},
@ -352,11 +271,8 @@ func TestStructCodec(t *testing.T) {
A []string `datastore:",noindex"`
}{},
&structCodec{
byIndex: []structTag{
{name: "A", noIndex: true},
},
byName: map[string]fieldCodec{
"A": {index: 0},
fields: map[string]fieldCodec{
"A": {path: []int{0}, noIndex: true},
},
hasSlice: true,
complete: true,
@ -369,11 +285,8 @@ func TestStructCodec(t *testing.T) {
A []vStruct `datastore:",noindex"`
}{},
&structCodec{
byIndex: []structTag{
{name: "A.", noIndex: true},
},
byName: map[string]fieldCodec{
"A.V": {index: 0, substructCodec: vStructCodec},
fields: map[string]fieldCodec{
"A": {path: []int{0}, structCodec: vStructCodec, noIndex: true},
},
hasSlice: true,
complete: true,
@ -387,13 +300,44 @@ func TestStructCodec(t *testing.T) {
t.Errorf("%s: getStructCodec: %v", tc.desc, err)
continue
}
if !reflect.DeepEqual(got, tc.want) {
// can't reflect.DeepEqual b/c element order in fields map may differ
if !isEqualStructCodec(got, tc.want) {
t.Errorf("%s\ngot %+v\nwant %+v\n", tc.desc, got, tc.want)
continue
}
}
}
func isEqualStructCodec(got, want *structCodec) bool {
if got.complete != want.complete {
return false
}
if got.hasSlice != want.hasSlice {
return false
}
if len(got.fields) != len(want.fields) {
return false
}
for name, wantF := range want.fields {
gotF := got.fields[name]
if !reflect.DeepEqual(wantF.path, gotF.path) {
return false
}
if wantF.noIndex != gotF.noIndex {
return false
}
if wantF.structCodec != nil {
if gotF.structCodec == nil {
return false
}
if !isEqualStructCodec(gotF.structCodec, wantF.structCodec) {
return false
}
}
}
return true
}
func TestRepeatedPropertyName(t *testing.T) {
good := []interface{}{
struct {
@ -453,7 +397,7 @@ func TestRepeatedPropertyName(t *testing.T) {
}
func TestFlatteningNestedStructs(t *testing.T) {
type deepGood struct {
type DeepGood struct {
A struct {
B []struct {
C struct {
@ -462,7 +406,7 @@ func TestFlatteningNestedStructs(t *testing.T) {
}
}
}
type deepBad struct {
type DeepBad struct {
A struct {
B []struct {
C struct {
@ -471,16 +415,16 @@ func TestFlatteningNestedStructs(t *testing.T) {
}
}
}
type iSay struct {
type ISay struct {
Tomato int
}
type youSay struct {
type YouSay struct {
Tomato int
}
type tweedledee struct {
type Tweedledee struct {
Dee int `datastore:"D"`
}
type tweedledum struct {
type Tweedledum struct {
Dum int `datastore:"D"`
}
@ -515,18 +459,18 @@ func TestFlatteningNestedStructs(t *testing.T) {
Q []int
}{},
struct {
deepGood
DeepGood
}{},
struct {
DG deepGood
DG DeepGood
}{},
struct {
Foo struct {
Z int `datastore:"X"`
Z int
} `datastore:"A"`
Bar struct {
Z int `datastore:"Y"`
} `datastore:"A"`
Z int
} `datastore:"B"`
}{},
}
bad := []interface{}{
@ -541,18 +485,18 @@ func TestFlatteningNestedStructs(t *testing.T) {
}
}{},
struct {
deepBad
DeepBad
}{},
struct {
DB deepBad
DB DeepBad
}{},
struct {
iSay
youSay
ISay
YouSay
}{},
struct {
tweedledee
tweedledum
Tweedledee
Tweedledum
}{},
struct {
Foo struct {
@ -602,3 +546,127 @@ func TestNilKeyIsStored(t *testing.T) {
t.Errorf("I field was not zero")
}
}
func TestSaveStructOmitEmpty(t *testing.T) {
// Expected props names are sorted alphabetically
expectedPropNamesForSingles := []string{"EmptyValue", "NonEmptyValue", "OmitEmptyWithValue"}
expectedPropNamesForSlices := []string{"NonEmptyValue", "NonEmptyValue", "OmitEmptyWithValue", "OmitEmptyWithValue"}
testOmitted := func(expectedPropNames []string, src interface{}) {
// t.Helper() - this is available from Go version 1.9, but we also support Go versions 1.6, 1.7, 1.8
if props, err := SaveStruct(src); err != nil {
t.Fatal(err)
} else {
// Collect names for reporting if diffs from expected and for easier sorting
actualPropNames := make([]string, len(props))
for i := range props {
actualPropNames[i] = props[i].Name
}
// Sort actuals for comparing with already sorted expected names
sort.Sort(sort.StringSlice(actualPropNames))
if !reflect.DeepEqual(actualPropNames, expectedPropNames) {
t.Errorf("Expected this properties: %v, got: %v", expectedPropNames, actualPropNames)
}
}
}
testOmitted(expectedPropNamesForSingles, &struct {
EmptyValue int
NonEmptyValue int
OmitEmptyNoValue int `datastore:",omitempty"`
OmitEmptyWithValue int `datastore:",omitempty"`
}{
NonEmptyValue: 1,
OmitEmptyWithValue: 2,
})
testOmitted(expectedPropNamesForSlices, &struct {
EmptyValue []int
NonEmptyValue []int
OmitEmptyNoValue []int `datastore:",omitempty"`
OmitEmptyWithValue []int `datastore:",omitempty"`
}{
NonEmptyValue: []int{1, 2},
OmitEmptyWithValue: []int{3, 4},
})
testOmitted(expectedPropNamesForSingles, &struct {
EmptyValue bool
NonEmptyValue bool
OmitEmptyNoValue bool `datastore:",omitempty"`
OmitEmptyWithValue bool `datastore:",omitempty"`
}{
NonEmptyValue: true,
OmitEmptyWithValue: true,
})
testOmitted(expectedPropNamesForSlices, &struct {
EmptyValue []bool
NonEmptyValue []bool
OmitEmptyNoValue []bool `datastore:",omitempty"`
OmitEmptyWithValue []bool `datastore:",omitempty"`
}{
NonEmptyValue: []bool{true, true},
OmitEmptyWithValue: []bool{true, true},
})
testOmitted(expectedPropNamesForSingles, &struct {
EmptyValue string
NonEmptyValue string
OmitEmptyNoValue string `datastore:",omitempty"`
OmitEmptyWithValue string `datastore:",omitempty"`
}{
NonEmptyValue: "s",
OmitEmptyWithValue: "s",
})
testOmitted(expectedPropNamesForSlices, &struct {
EmptyValue []string
NonEmptyValue []string
OmitEmptyNoValue []string `datastore:",omitempty"`
OmitEmptyWithValue []string `datastore:",omitempty"`
}{
NonEmptyValue: []string{"s1", "s2"},
OmitEmptyWithValue: []string{"s3", "s4"},
})
testOmitted(expectedPropNamesForSingles, &struct {
EmptyValue float32
NonEmptyValue float32
OmitEmptyNoValue float32 `datastore:",omitempty"`
OmitEmptyWithValue float32 `datastore:",omitempty"`
}{
NonEmptyValue: 1.1,
OmitEmptyWithValue: 1.2,
})
testOmitted(expectedPropNamesForSlices, &struct {
EmptyValue []float32
NonEmptyValue []float32
OmitEmptyNoValue []float32 `datastore:",omitempty"`
OmitEmptyWithValue []float32 `datastore:",omitempty"`
}{
NonEmptyValue: []float32{1.1, 2.2},
OmitEmptyWithValue: []float32{3.3, 4.4},
})
testOmitted(expectedPropNamesForSingles, &struct {
EmptyValue time.Time
NonEmptyValue time.Time
OmitEmptyNoValue time.Time `datastore:",omitempty"`
OmitEmptyWithValue time.Time `datastore:",omitempty"`
}{
NonEmptyValue: now,
OmitEmptyWithValue: now,
})
testOmitted(expectedPropNamesForSlices, &struct {
EmptyValue []time.Time
NonEmptyValue []time.Time
OmitEmptyNoValue []time.Time `datastore:",omitempty"`
OmitEmptyWithValue []time.Time `datastore:",omitempty"`
}{
NonEmptyValue: []time.Time{now, now},
OmitEmptyWithValue: []time.Time{now, now},
})
}

View file

@ -87,6 +87,7 @@ type Query struct {
eventual bool
limit int32
offset int32
count int32
start *pb.CompiledCursor
end *pb.CompiledCursor
@ -241,6 +242,19 @@ func (q *Query) Offset(offset int) *Query {
return q
}
// BatchSize returns a derivative query to fetch the supplied number of results
// at once. This value should be greater than zero, and equal to or less than
// the Limit.
func (q *Query) BatchSize(size int) *Query {
q = q.clone()
if size <= 0 || size > math.MaxInt32 {
q.err = errors.New("datastore: query batch size overflow")
return q
}
q.count = int32(size)
return q
}
// Start returns a derivative query with the given start point.
func (q *Query) Start(c Cursor) *Query {
q = q.clone()
@ -325,6 +339,9 @@ func (q *Query) toProto(dst *pb.Query, appID string) error {
if q.offset != 0 {
dst.Offset = proto.Int32(q.offset)
}
if q.count != 0 {
dst.Count = proto.Int32(q.count)
}
dst.CompiledCursor = q.start
dst.EndCompiledCursor = q.end
dst.Compile = proto.Bool(true)
@ -394,7 +411,7 @@ func (q *Query) Count(c context.Context) (int, error) {
if !res.GetMoreResults() {
break
}
if err := callNext(c, res, newQ.offset-n, 0); err != nil {
if err := callNext(c, res, newQ.offset-n, q.count); err != nil {
return 0, err
}
}
@ -409,15 +426,15 @@ func (q *Query) Count(c context.Context) (int, error) {
// callNext issues a datastore_v3/Next RPC to advance a cursor, such as that
// returned by a query with more results.
func callNext(c context.Context, res *pb.QueryResult, offset, limit int32) error {
func callNext(c context.Context, res *pb.QueryResult, offset, count int32) error {
if res.Cursor == nil {
return errors.New("datastore: internal error: server did not return a cursor")
}
req := &pb.NextRequest{
Cursor: res.Cursor,
}
if limit >= 0 {
req.Count = proto.Int32(limit)
if count >= 0 {
req.Count = proto.Int32(count)
}
if offset != 0 {
req.Offset = proto.Int32(offset)
@ -445,7 +462,7 @@ func callNext(c context.Context, res *pb.QueryResult, offset, limit int32) error
// If q is a ``keys-only'' query, GetAll ignores dst and only returns the keys.
//
// The running time and number of API calls made by GetAll scale linearly with
// with the sum of the query's offset and limit. Unless the result count is
// the sum of the query's offset and limit. Unless the result count is
// expected to be small, it is best to specify a limit; otherwise GetAll will
// continue until it finishes collecting results or the provided context
// expires.
@ -523,6 +540,7 @@ func (q *Query) Run(c context.Context) *Iterator {
t := &Iterator{
c: c,
limit: q.limit,
count: q.count,
q: q,
prevCC: q.start,
}
@ -536,9 +554,15 @@ func (q *Query) Run(c context.Context) *Iterator {
return t
}
offset := q.offset - t.res.GetSkippedResults()
var count int32
if t.count > 0 && (t.limit < 0 || t.count < t.limit) {
count = t.count
} else {
count = t.limit
}
for offset > 0 && t.res.GetMoreResults() {
t.prevCC = t.res.CompiledCursor
if err := callNext(t.c, &t.res, offset, t.limit); err != nil {
if err := callNext(t.c, &t.res, offset, count); err != nil {
t.err = err
break
}
@ -566,6 +590,9 @@ type Iterator struct {
// limit is the limit on the number of results this iterator should return.
// A negative value means unlimited.
limit int32
// count is the number of results this iterator should fetch at once. This
// should be equal to or greater than zero.
count int32
// q is the original query which yielded this iterator.
q *Query
// prevCC is the compiled cursor that marks the end of the previous batch
@ -605,7 +632,13 @@ func (t *Iterator) next() (*Key, *pb.EntityProto, error) {
return nil, nil, t.err
}
t.prevCC = t.res.CompiledCursor
if err := callNext(t.c, &t.res, 0, t.limit); err != nil {
var count int32
if t.count > 0 && (t.limit < 0 || t.count < t.limit) {
count = t.count
} else {
count = t.limit
}
if err := callNext(t.c, &t.res, 0, count); err != nil {
t.err = err
return nil, nil, t.err
}

View file

@ -464,7 +464,7 @@ func TestQueryToProto(t *testing.T) {
},
{
desc: "standard query",
query: NewQuery("kind").Order("-I").Filter("I >", 17).Filter("U =", "Dave").Limit(7).Offset(42),
query: NewQuery("kind").Order("-I").Filter("I >", 17).Filter("U =", "Dave").Limit(7).Offset(42).BatchSize(5),
want: &pb.Query{
Kind: proto.String("kind"),
Filter: []*pb.Query_Filter{
@ -497,6 +497,7 @@ func TestQueryToProto(t *testing.T) {
},
Limit: proto.Int32(7),
Offset: proto.Int32(42),
Count: proto.Int32(5),
},
},
{

View file

@ -111,6 +111,12 @@ func valueToProto(defaultAppID, name string, v reflect.Value, multiple bool) (p
return p, ""
}
type saveOpts struct {
noIndex bool
multiple bool
omitEmpty bool
}
// saveEntity saves an EntityProto into a PropertyLoadSaver or struct pointer.
func saveEntity(defaultAppID string, key *Key, src interface{}) (*pb.EntityProto, error) {
var err error
@ -126,11 +132,14 @@ func saveEntity(defaultAppID string, key *Key, src interface{}) (*pb.EntityProto
return propertiesToProto(defaultAppID, key, props)
}
func saveStructProperty(props *[]Property, name string, noIndex, multiple bool, v reflect.Value) error {
func saveStructProperty(props *[]Property, name string, opts saveOpts, v reflect.Value) error {
if opts.omitEmpty && isEmptyValue(v) {
return nil
}
p := Property{
Name: name,
NoIndex: noIndex,
Multiple: multiple,
NoIndex: opts.noIndex,
Multiple: opts.multiple,
}
switch x := v.Interface().(type) {
case *Key:
@ -166,7 +175,7 @@ func saveStructProperty(props *[]Property, name string, noIndex, multiple bool,
if err != nil {
return fmt.Errorf("datastore: unsupported struct field: %v", err)
}
return sub.(structPLS).save(props, name, noIndex, multiple)
return sub.save(props, name+".", opts)
}
}
if p.Value == nil {
@ -178,37 +187,35 @@ func saveStructProperty(props *[]Property, name string, noIndex, multiple bool,
func (s structPLS) Save() ([]Property, error) {
var props []Property
if err := s.save(&props, "", false, false); err != nil {
if err := s.save(&props, "", saveOpts{}); err != nil {
return nil, err
}
return props, nil
}
func (s structPLS) save(props *[]Property, prefix string, noIndex, multiple bool) error {
for i, t := range s.codec.byIndex {
if t.name == "-" {
continue
}
name := t.name
if prefix != "" {
name = prefix + name
}
v := s.v.Field(i)
func (s structPLS) save(props *[]Property, prefix string, opts saveOpts) error {
for name, f := range s.codec.fields {
name = prefix + name
v := s.v.FieldByIndex(f.path)
if !v.IsValid() || !v.CanSet() {
continue
}
noIndex1 := noIndex || t.noIndex
var opts1 saveOpts
opts1.noIndex = opts.noIndex || f.noIndex
opts1.multiple = opts.multiple
opts1.omitEmpty = f.omitEmpty // don't propagate
// For slice fields that aren't []byte, save each element.
if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 {
opts1.multiple = true
for j := 0; j < v.Len(); j++ {
if err := saveStructProperty(props, name, noIndex1, true, v.Index(j)); err != nil {
if err := saveStructProperty(props, name, opts1, v.Index(j)); err != nil {
return err
}
}
continue
}
// Otherwise, save the field itself.
if err := saveStructProperty(props, name, noIndex1, multiple, v); err != nil {
if err := saveStructProperty(props, name, opts1, v); err != nil {
return err
}
}
@ -298,3 +305,29 @@ func propertiesToProto(defaultAppID string, key *Key, props []Property) (*pb.Ent
}
return e, nil
}
// isEmptyValue is taken from the encoding/json package in the standard library.
func isEmptyValue(v reflect.Value) bool {
switch v.Kind() {
case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
// TODO(perfomance): Only reflect.String needed, other property types are not supported (copy/paste from json package)
return v.Len() == 0
case reflect.Bool:
return !v.Bool()
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return v.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
// TODO(perfomance): Uint* are unsupported property types - should be removed (copy/paste from json package)
return v.Uint() == 0
case reflect.Float32, reflect.Float64:
return v.Float() == 0
case reflect.Interface, reflect.Ptr:
return v.IsNil()
case reflect.Struct:
switch x := v.Interface().(type) {
case time.Time:
return x.IsZero()
}
}
return false
}

View file

@ -58,12 +58,18 @@ func RunInTransaction(c context.Context, f func(tc context.Context) error, opts
if opts != nil {
xg = opts.XG
}
readOnly := false
if opts != nil {
readOnly = opts.ReadOnly
}
attempts := 3
if opts != nil && opts.Attempts > 0 {
attempts = opts.Attempts
}
var t *pb.Transaction
var err error
for i := 0; i < attempts; i++ {
if err := internal.RunTransactionOnce(c, f, xg); err != internal.ErrConcurrentTransaction {
if t, err = internal.RunTransactionOnce(c, f, xg, readOnly, t); err != internal.ErrConcurrentTransaction {
return err
}
}
@ -84,4 +90,7 @@ type TransactionOptions struct {
// Attempts controls the number of retries to perform when commits fail
// due to a conflicting transaction. If omitted, it defaults to 3.
Attempts int
// ReadOnly controls whether the transaction is a read only transaction.
// Read only transactions are potentially more efficient.
ReadOnly bool
}

View file

@ -9,6 +9,7 @@ user request by using the taskqueue API.
To declare a function that may be executed later, call Func
in a top-level assignment context, passing it an arbitrary string key
and a function whose first argument is of type context.Context.
The key is used to look up the function so it can be called later.
var laterFunc = delay.Func("key", myFunc)
It is also possible to use a function literal.
var laterFunc = delay.Func("key", func(c context.Context, x string) {
@ -73,16 +74,21 @@ const (
queue = ""
)
type contextKey int
var (
// registry of all delayed functions
funcs = make(map[string]*Function)
// precomputed types
contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
errorType = reflect.TypeOf((*error)(nil)).Elem()
errorType = reflect.TypeOf((*error)(nil)).Elem()
// errors
errFirstArg = errors.New("first argument must be context.Context")
errFirstArg = errors.New("first argument must be context.Context")
errOutsideDelayFunc = errors.New("request headers are only available inside a delay.Func")
// context keys
headersContextKey contextKey = 0
)
// Func declares a new Function. The second argument must be a function with a
@ -105,7 +111,7 @@ func Func(key string, i interface{}) *Function {
f.err = errors.New("not a function")
return f
}
if t.NumIn() == 0 || t.In(0) != contextType {
if t.NumIn() == 0 || !isContext(t.In(0)) {
f.err = errFirstArg
return f
}
@ -221,6 +227,15 @@ func (f *Function) Task(args ...interface{}) (*taskqueue.Task, error) {
}, nil
}
// Request returns the special task-queue HTTP request headers for the current
// task queue handler. Returns an error if called from outside a delay.Func.
func RequestHeaders(c context.Context) (*taskqueue.RequestHeaders, error) {
if ret, ok := c.Value(headersContextKey).(*taskqueue.RequestHeaders); ok {
return ret, nil
}
return nil, errOutsideDelayFunc
}
var taskqueueAdder = taskqueue.Add // for testing
func init() {
@ -232,6 +247,8 @@ func init() {
func runFunc(c context.Context, w http.ResponseWriter, req *http.Request) {
defer req.Body.Close()
c = context.WithValue(c, headersContextKey, taskqueue.ParseRequestHeaders(req.Header))
var inv invocation
if err := gob.NewDecoder(req.Body).Decode(&inv); err != nil {
log.Errorf(c, "delay: failed decoding task payload: %v", err)

23
vendor/google.golang.org/appengine/delay/delay_go17.go generated vendored Normal file
View file

@ -0,0 +1,23 @@
// Copyright 2017 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
//+build go1.7
package delay
import (
stdctx "context"
"reflect"
netctx "golang.org/x/net/context"
)
var (
stdContextType = reflect.TypeOf((*stdctx.Context)(nil)).Elem()
netContextType = reflect.TypeOf((*netctx.Context)(nil)).Elem()
)
func isContext(t reflect.Type) bool {
return t == stdContextType || t == netContextType
}

View file

@ -0,0 +1,55 @@
// Copyright 2017 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
//+build go1.7
package delay
import (
"bytes"
stdctx "context"
"net/http"
"net/http/httptest"
"testing"
netctx "golang.org/x/net/context"
"google.golang.org/appengine/taskqueue"
)
var (
stdCtxRuns = 0
stdCtxFunc = Func("stdctx", func(c stdctx.Context) {
stdCtxRuns++
})
)
func TestStandardContext(t *testing.T) {
// Fake out the adding of a task.
var task *taskqueue.Task
taskqueueAdder = func(_ netctx.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) {
if queue != "" {
t.Errorf(`Got queue %q, expected ""`, queue)
}
task = tk
return tk, nil
}
c := newFakeContext()
stdCtxRuns = 0 // reset state
if err := stdCtxFunc.Call(c.ctx); err != nil {
t.Fatal("Function.Call:", err)
}
// Simulate the Task Queue service.
req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload))
if err != nil {
t.Fatalf("Failed making http.Request: %v", err)
}
rw := httptest.NewRecorder()
runFunc(c.ctx, rw, req)
if stdCtxRuns != 1 {
t.Errorf("stdCtxRuns: got %d, want 1", stdCtxRuns)
}
}

View file

@ -0,0 +1,19 @@
// Copyright 2017 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
//+build !go1.7
package delay
import (
"reflect"
"golang.org/x/net/context"
)
var contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
func isContext(t reflect.Type) bool {
return t == contextType
}

View file

@ -94,6 +94,14 @@ var (
dupeWhich = 2
}
})
reqFuncRuns = 0
reqFuncHeaders *taskqueue.RequestHeaders
reqFuncErr error
reqFunc = Func("req", func(c context.Context) {
reqFuncRuns++
reqFuncHeaders, reqFuncErr = RequestHeaders(c)
})
)
type fakeContext struct {
@ -373,3 +381,48 @@ func TestDuplicateFunction(t *testing.T) {
t.Errorf("dupeWhich = %d; want 2", dupeWhich)
}
}
func TestGetRequestHeadersFromContext(t *testing.T) {
c := newFakeContext()
// Outside a delay.Func should return an error.
headers, err := RequestHeaders(c.ctx)
if headers != nil {
t.Errorf("RequestHeaders outside Func, got %v, want nil", headers)
}
if err != errOutsideDelayFunc {
t.Errorf("RequestHeaders outside Func err, got %v, want %v", err, errOutsideDelayFunc)
}
// Fake out the adding of a task.
var task *taskqueue.Task
taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) {
if queue != "" {
t.Errorf(`Got queue %q, expected ""`, queue)
}
task = tk
return tk, nil
}
reqFunc.Call(c.ctx)
reqFuncRuns, reqFuncHeaders = 0, nil // reset state
// Simulate the Task Queue service.
req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload))
req.Header.Set("x-appengine-taskname", "foobar")
if err != nil {
t.Fatalf("Failed making http.Request: %v", err)
}
rw := httptest.NewRecorder()
runFunc(c.ctx, rw, req)
if reqFuncRuns != 1 {
t.Errorf("reqFuncRuns: got %d, want 1", reqFuncRuns)
}
if reqFuncHeaders.TaskName != "foobar" {
t.Errorf("reqFuncHeaders.TaskName: got %v, want 'foobar'", reqFuncHeaders.TaskName)
}
if reqFuncErr != nil {
t.Errorf("reqFuncErr: got %v, want nil", reqFuncErr)
}
}

View file

@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build !appengine
// +build go1.7
package internal
@ -32,7 +33,8 @@ import (
)
const (
apiPath = "/rpc_http"
apiPath = "/rpc_http"
defaultTicketSuffix = "/default.20150612t184001.0"
)
var (
@ -60,6 +62,11 @@ var (
Dial: limitDial,
},
}
defaultTicketOnce sync.Once
defaultTicket string
backgroundContextOnce sync.Once
backgroundContext netcontext.Context
)
func apiURL() *url.URL {
@ -83,16 +90,10 @@ func handleHTTP(w http.ResponseWriter, r *http.Request) {
outHeader: w.Header(),
apiURL: apiURL(),
}
stopFlushing := make(chan int)
r = r.WithContext(withContext(r.Context(), c))
c.req = r
ctxs.Lock()
ctxs.m[r] = c
ctxs.Unlock()
defer func() {
ctxs.Lock()
delete(ctxs.m, r)
ctxs.Unlock()
}()
stopFlushing := make(chan int)
// Patch up RemoteAddr so it looks reasonable.
if addr := r.Header.Get(userIPHeader); addr != "" {
@ -191,18 +192,6 @@ func renderPanic(x interface{}) string {
return string(buf)
}
var ctxs = struct {
sync.Mutex
m map[*http.Request]*context
bg *context // background context, lazily initialized
// dec is used by tests to decorate the netcontext.Context returned
// for a given request. This allows tests to add overrides (such as
// WithAppIDOverride) to the context. The map is nil outside tests.
dec map[*http.Request]func(netcontext.Context) netcontext.Context
}{
m: make(map[*http.Request]*context),
}
// context represents the context of an in-flight HTTP request.
// It implements the appengine.Context and http.ResponseWriter interfaces.
type context struct {
@ -223,6 +212,34 @@ type context struct {
var contextKey = "holds a *context"
// jointContext joins two contexts in a superficial way.
// It takes values and timeouts from a base context, and only values from another context.
type jointContext struct {
base netcontext.Context
valuesOnly netcontext.Context
}
func (c jointContext) Deadline() (time.Time, bool) {
return c.base.Deadline()
}
func (c jointContext) Done() <-chan struct{} {
return c.base.Done()
}
func (c jointContext) Err() error {
return c.base.Err()
}
func (c jointContext) Value(key interface{}) interface{} {
if val := c.base.Value(key); val != nil {
return val
}
return c.valuesOnly.Value(key)
}
// fromContext returns the App Engine context or nil if ctx is not
// derived from an App Engine context.
func fromContext(ctx netcontext.Context) *context {
c, _ := ctx.Value(&contextKey).(*context)
return c
@ -247,86 +264,70 @@ func IncomingHeaders(ctx netcontext.Context) http.Header {
return nil
}
func ReqContext(req *http.Request) netcontext.Context {
return req.Context()
}
func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
ctxs.Lock()
c := ctxs.m[req]
d := ctxs.dec[req]
ctxs.Unlock()
if d != nil {
parent = d(parent)
return jointContext{
base: parent,
valuesOnly: req.Context(),
}
}
if c == nil {
// Someone passed in an http.Request that is not in-flight.
// We panic here rather than panicking at a later point
// so that stack traces will be more sensible.
log.Panic("appengine: NewContext passed an unknown http.Request")
}
return withContext(parent, c)
// DefaultTicket returns a ticket used for background context or dev_appserver.
func DefaultTicket() string {
defaultTicketOnce.Do(func() {
if IsDevAppServer() {
defaultTicket = "testapp" + defaultTicketSuffix
return
}
appID := partitionlessAppID()
escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1)
majVersion := VersionID(nil)
if i := strings.Index(majVersion, "."); i > 0 {
majVersion = majVersion[:i]
}
defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID())
})
return defaultTicket
}
func BackgroundContext() netcontext.Context {
ctxs.Lock()
defer ctxs.Unlock()
backgroundContextOnce.Do(func() {
// Compute background security ticket.
ticket := DefaultTicket()
if ctxs.bg != nil {
return toContext(ctxs.bg)
}
// Compute background security ticket.
appID := partitionlessAppID()
escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1)
majVersion := VersionID(nil)
if i := strings.Index(majVersion, "."); i > 0 {
majVersion = majVersion[:i]
}
ticket := fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID())
ctxs.bg = &context{
req: &http.Request{
Header: http.Header{
ticketHeader: []string{ticket},
c := &context{
req: &http.Request{
Header: http.Header{
ticketHeader: []string{ticket},
},
},
},
apiURL: apiURL(),
}
apiURL: apiURL(),
}
backgroundContext = toContext(c)
// TODO(dsymonds): Wire up the shutdown handler to do a final flush.
go ctxs.bg.logFlusher(make(chan int))
// TODO(dsymonds): Wire up the shutdown handler to do a final flush.
go c.logFlusher(make(chan int))
})
return toContext(ctxs.bg)
return backgroundContext
}
// RegisterTestRequest registers the HTTP request req for testing, such that
// any API calls are sent to the provided URL. It returns a closure to delete
// the registration.
// It should only be used by aetest package.
func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) func() {
func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) {
c := &context{
req: req,
apiURL: apiURL,
}
ctxs.Lock()
defer ctxs.Unlock()
if _, ok := ctxs.m[req]; ok {
log.Panic("req already associated with context")
}
if _, ok := ctxs.dec[req]; ok {
log.Panic("req already associated with context")
}
if ctxs.dec == nil {
ctxs.dec = make(map[*http.Request]func(netcontext.Context) netcontext.Context)
}
ctxs.m[req] = c
ctxs.dec[req] = decorate
return func() {
ctxs.Lock()
delete(ctxs.m, req)
delete(ctxs.dec, req)
ctxs.Unlock()
}
ctx := withContext(decorate(req.Context()), c)
req = req.WithContext(ctx)
c.req = req
return req, func() {}
}
var errTimeout = &CallError{
@ -452,7 +453,7 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message)
c := fromContext(ctx)
if c == nil {
// Give a good error message rather than a panic lower down.
return errors.New("not an App Engine context")
return errNotAppEngineContext
}
// Apply transaction modifications if we're in a transaction.
@ -475,6 +476,16 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message)
}
ticket := c.req.Header.Get(ticketHeader)
// Use a test ticket under test environment.
if ticket == "" {
if appid := ctx.Value(&appIDOverrideKey); appid != nil {
ticket = appid.(string) + defaultTicketSuffix
}
}
// Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver.
if ticket == "" {
ticket = DefaultTicket()
}
req := &remotepb.Request{
ServiceName: &service,
Method: &method,
@ -550,6 +561,9 @@ var logLevelName = map[int64]string{
}
func logf(c *context, level int64, format string, args ...interface{}) {
if c == nil {
panic("not an App Engine context")
}
s := fmt.Sprintf(format, args...)
s = strings.TrimRight(s, "\n") // Remove any trailing newline characters.
c.addLogLine(&logpb.UserAppLogLine{

View file

@ -22,14 +22,20 @@ import (
var contextKey = "holds an appengine.Context"
// fromContext returns the App Engine context or nil if ctx is not
// derived from an App Engine context.
func fromContext(ctx netcontext.Context) appengine.Context {
c, _ := ctx.Value(&contextKey).(appengine.Context)
return c
}
// This is only for classic App Engine adapters.
func ClassicContextFromContext(ctx netcontext.Context) appengine.Context {
return fromContext(ctx)
func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) {
c := fromContext(ctx)
if c == nil {
return nil, errNotAppEngineContext
}
return c, nil
}
func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context {
@ -53,6 +59,10 @@ func IncomingHeaders(ctx netcontext.Context) http.Header {
return nil
}
func ReqContext(req *http.Request) netcontext.Context {
return WithContext(netcontext.Background(), req)
}
func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
c := appengine.NewContext(req)
return withContext(parent, c)
@ -98,7 +108,7 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message)
c := fromContext(ctx)
if c == nil {
// Give a good error message rather than a panic lower down.
return errors.New("not an App Engine context")
return errNotAppEngineContext
}
// Apply transaction modifications if we're in a transaction.

View file

@ -5,10 +5,15 @@
package internal
import (
"errors"
"os"
"github.com/golang/protobuf/proto"
netcontext "golang.org/x/net/context"
)
var errNotAppEngineContext = errors.New("not an App Engine context")
type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error
var callOverrideKey = "holds []CallOverrideFunc"
@ -77,10 +82,42 @@ func Logf(ctx netcontext.Context, level int64, format string, args ...interface{
f(level, format, args...)
return
}
logf(fromContext(ctx), level, format, args...)
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
logf(c, level, format, args...)
}
// NamespacedContext wraps a Context to support namespaces.
func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context {
return withNamespace(ctx, namespace)
}
// SetTestEnv sets the env variables for testing background ticket in Flex.
func SetTestEnv() func() {
var environ = []struct {
key, value string
}{
{"GAE_LONG_APP_ID", "my-app-id"},
{"GAE_MINOR_VERSION", "067924799508853122"},
{"GAE_MODULE_INSTANCE", "0"},
{"GAE_MODULE_NAME", "default"},
{"GAE_MODULE_VERSION", "20150612t184001"},
}
for _, v := range environ {
old := os.Getenv(v.key)
os.Setenv(v.key, v.value)
v.value = old
}
return func() { // Restore old environment after the test completes.
for _, v := range environ {
if v.value == "" {
os.Unsetenv(v.key)
continue
}
os.Setenv(v.key, v.value)
}
}
}

View file

@ -0,0 +1,682 @@
// Copyright 2011 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// +build !appengine
// +build !go1.7
package internal
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
"os"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/golang/protobuf/proto"
netcontext "golang.org/x/net/context"
basepb "google.golang.org/appengine/internal/base"
logpb "google.golang.org/appengine/internal/log"
remotepb "google.golang.org/appengine/internal/remote_api"
)
const (
apiPath = "/rpc_http"
defaultTicketSuffix = "/default.20150612t184001.0"
)
var (
// Incoming headers.
ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket")
dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo")
traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context")
curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace")
userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP")
remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr")
// Outgoing headers.
apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint")
apiEndpointHeaderValue = []string{"app-engine-apis"}
apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method")
apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"}
apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline")
apiContentType = http.CanonicalHeaderKey("Content-Type")
apiContentTypeValue = []string{"application/octet-stream"}
logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count")
apiHTTPClient = &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: limitDial,
},
}
defaultTicketOnce sync.Once
defaultTicket string
)
func apiURL() *url.URL {
host, port := "appengine.googleapis.internal", "10001"
if h := os.Getenv("API_HOST"); h != "" {
host = h
}
if p := os.Getenv("API_PORT"); p != "" {
port = p
}
return &url.URL{
Scheme: "http",
Host: host + ":" + port,
Path: apiPath,
}
}
func handleHTTP(w http.ResponseWriter, r *http.Request) {
c := &context{
req: r,
outHeader: w.Header(),
apiURL: apiURL(),
}
stopFlushing := make(chan int)
ctxs.Lock()
ctxs.m[r] = c
ctxs.Unlock()
defer func() {
ctxs.Lock()
delete(ctxs.m, r)
ctxs.Unlock()
}()
// Patch up RemoteAddr so it looks reasonable.
if addr := r.Header.Get(userIPHeader); addr != "" {
r.RemoteAddr = addr
} else if addr = r.Header.Get(remoteAddrHeader); addr != "" {
r.RemoteAddr = addr
} else {
// Should not normally reach here, but pick a sensible default anyway.
r.RemoteAddr = "127.0.0.1"
}
// The address in the headers will most likely be of these forms:
// 123.123.123.123
// 2001:db8::1
// net/http.Request.RemoteAddr is specified to be in "IP:port" form.
if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil {
// Assume the remote address is only a host; add a default port.
r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80")
}
// Start goroutine responsible for flushing app logs.
// This is done after adding c to ctx.m (and stopped before removing it)
// because flushing logs requires making an API call.
go c.logFlusher(stopFlushing)
executeRequestSafely(c, r)
c.outHeader = nil // make sure header changes aren't respected any more
stopFlushing <- 1 // any logging beyond this point will be dropped
// Flush any pending logs asynchronously.
c.pendingLogs.Lock()
flushes := c.pendingLogs.flushes
if len(c.pendingLogs.lines) > 0 {
flushes++
}
c.pendingLogs.Unlock()
go c.flushLog(false)
w.Header().Set(logFlushHeader, strconv.Itoa(flushes))
// Avoid nil Write call if c.Write is never called.
if c.outCode != 0 {
w.WriteHeader(c.outCode)
}
if c.outBody != nil {
w.Write(c.outBody)
}
}
func executeRequestSafely(c *context, r *http.Request) {
defer func() {
if x := recover(); x != nil {
logf(c, 4, "%s", renderPanic(x)) // 4 == critical
c.outCode = 500
}
}()
http.DefaultServeMux.ServeHTTP(c, r)
}
func renderPanic(x interface{}) string {
buf := make([]byte, 16<<10) // 16 KB should be plenty
buf = buf[:runtime.Stack(buf, false)]
// Remove the first few stack frames:
// this func
// the recover closure in the caller
// That will root the stack trace at the site of the panic.
const (
skipStart = "internal.renderPanic"
skipFrames = 2
)
start := bytes.Index(buf, []byte(skipStart))
p := start
for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ {
p = bytes.IndexByte(buf[p+1:], '\n') + p + 1
if p < 0 {
break
}
}
if p >= 0 {
// buf[start:p+1] is the block to remove.
// Copy buf[p+1:] over buf[start:] and shrink buf.
copy(buf[start:], buf[p+1:])
buf = buf[:len(buf)-(p+1-start)]
}
// Add panic heading.
head := fmt.Sprintf("panic: %v\n\n", x)
if len(head) > len(buf) {
// Extremely unlikely to happen.
return head
}
copy(buf[len(head):], buf)
copy(buf, head)
return string(buf)
}
var ctxs = struct {
sync.Mutex
m map[*http.Request]*context
bg *context // background context, lazily initialized
// dec is used by tests to decorate the netcontext.Context returned
// for a given request. This allows tests to add overrides (such as
// WithAppIDOverride) to the context. The map is nil outside tests.
dec map[*http.Request]func(netcontext.Context) netcontext.Context
}{
m: make(map[*http.Request]*context),
}
// context represents the context of an in-flight HTTP request.
// It implements the appengine.Context and http.ResponseWriter interfaces.
type context struct {
req *http.Request
outCode int
outHeader http.Header
outBody []byte
pendingLogs struct {
sync.Mutex
lines []*logpb.UserAppLogLine
flushes int
}
apiURL *url.URL
}
var contextKey = "holds a *context"
// fromContext returns the App Engine context or nil if ctx is not
// derived from an App Engine context.
func fromContext(ctx netcontext.Context) *context {
c, _ := ctx.Value(&contextKey).(*context)
return c
}
func withContext(parent netcontext.Context, c *context) netcontext.Context {
ctx := netcontext.WithValue(parent, &contextKey, c)
if ns := c.req.Header.Get(curNamespaceHeader); ns != "" {
ctx = withNamespace(ctx, ns)
}
return ctx
}
func toContext(c *context) netcontext.Context {
return withContext(netcontext.Background(), c)
}
func IncomingHeaders(ctx netcontext.Context) http.Header {
if c := fromContext(ctx); c != nil {
return c.req.Header
}
return nil
}
func ReqContext(req *http.Request) netcontext.Context {
return WithContext(netcontext.Background(), req)
}
func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context {
ctxs.Lock()
c := ctxs.m[req]
d := ctxs.dec[req]
ctxs.Unlock()
if d != nil {
parent = d(parent)
}
if c == nil {
// Someone passed in an http.Request that is not in-flight.
// We panic here rather than panicking at a later point
// so that stack traces will be more sensible.
log.Panic("appengine: NewContext passed an unknown http.Request")
}
return withContext(parent, c)
}
// DefaultTicket returns a ticket used for background context or dev_appserver.
func DefaultTicket() string {
defaultTicketOnce.Do(func() {
if IsDevAppServer() {
defaultTicket = "testapp" + defaultTicketSuffix
return
}
appID := partitionlessAppID()
escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1)
majVersion := VersionID(nil)
if i := strings.Index(majVersion, "."); i > 0 {
majVersion = majVersion[:i]
}
defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID())
})
return defaultTicket
}
func BackgroundContext() netcontext.Context {
ctxs.Lock()
defer ctxs.Unlock()
if ctxs.bg != nil {
return toContext(ctxs.bg)
}
// Compute background security ticket.
ticket := DefaultTicket()
ctxs.bg = &context{
req: &http.Request{
Header: http.Header{
ticketHeader: []string{ticket},
},
},
apiURL: apiURL(),
}
// TODO(dsymonds): Wire up the shutdown handler to do a final flush.
go ctxs.bg.logFlusher(make(chan int))
return toContext(ctxs.bg)
}
// RegisterTestRequest registers the HTTP request req for testing, such that
// any API calls are sent to the provided URL. It returns a closure to delete
// the registration.
// It should only be used by aetest package.
func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) {
c := &context{
req: req,
apiURL: apiURL,
}
ctxs.Lock()
defer ctxs.Unlock()
if _, ok := ctxs.m[req]; ok {
log.Panic("req already associated with context")
}
if _, ok := ctxs.dec[req]; ok {
log.Panic("req already associated with context")
}
if ctxs.dec == nil {
ctxs.dec = make(map[*http.Request]func(netcontext.Context) netcontext.Context)
}
ctxs.m[req] = c
ctxs.dec[req] = decorate
return req, func() {
ctxs.Lock()
delete(ctxs.m, req)
delete(ctxs.dec, req)
ctxs.Unlock()
}
}
var errTimeout = &CallError{
Detail: "Deadline exceeded",
Code: int32(remotepb.RpcError_CANCELLED),
Timeout: true,
}
func (c *context) Header() http.Header { return c.outHeader }
// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status
// codes do not permit a response body (nor response entity headers such as
// Content-Length, Content-Type, etc).
func bodyAllowedForStatus(status int) bool {
switch {
case status >= 100 && status <= 199:
return false
case status == 204:
return false
case status == 304:
return false
}
return true
}
func (c *context) Write(b []byte) (int, error) {
if c.outCode == 0 {
c.WriteHeader(http.StatusOK)
}
if len(b) > 0 && !bodyAllowedForStatus(c.outCode) {
return 0, http.ErrBodyNotAllowed
}
c.outBody = append(c.outBody, b...)
return len(b), nil
}
func (c *context) WriteHeader(code int) {
if c.outCode != 0 {
logf(c, 3, "WriteHeader called multiple times on request.") // error level
return
}
c.outCode = code
}
func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) {
hreq := &http.Request{
Method: "POST",
URL: c.apiURL,
Header: http.Header{
apiEndpointHeader: apiEndpointHeaderValue,
apiMethodHeader: apiMethodHeaderValue,
apiContentType: apiContentTypeValue,
apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)},
},
Body: ioutil.NopCloser(bytes.NewReader(body)),
ContentLength: int64(len(body)),
Host: c.apiURL.Host,
}
if info := c.req.Header.Get(dapperHeader); info != "" {
hreq.Header.Set(dapperHeader, info)
}
if info := c.req.Header.Get(traceHeader); info != "" {
hreq.Header.Set(traceHeader, info)
}
tr := apiHTTPClient.Transport.(*http.Transport)
var timedOut int32 // atomic; set to 1 if timed out
t := time.AfterFunc(timeout, func() {
atomic.StoreInt32(&timedOut, 1)
tr.CancelRequest(hreq)
})
defer t.Stop()
defer func() {
// Check if timeout was exceeded.
if atomic.LoadInt32(&timedOut) != 0 {
err = errTimeout
}
}()
hresp, err := apiHTTPClient.Do(hreq)
if err != nil {
return nil, &CallError{
Detail: fmt.Sprintf("service bridge HTTP failed: %v", err),
Code: int32(remotepb.RpcError_UNKNOWN),
}
}
defer hresp.Body.Close()
hrespBody, err := ioutil.ReadAll(hresp.Body)
if hresp.StatusCode != 200 {
return nil, &CallError{
Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody),
Code: int32(remotepb.RpcError_UNKNOWN),
}
}
if err != nil {
return nil, &CallError{
Detail: fmt.Sprintf("service bridge response bad: %v", err),
Code: int32(remotepb.RpcError_UNKNOWN),
}
}
return hrespBody, nil
}
func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error {
if ns := NamespaceFromContext(ctx); ns != "" {
if fn, ok := NamespaceMods[service]; ok {
fn(in, ns)
}
}
if f, ctx, ok := callOverrideFromContext(ctx); ok {
return f(ctx, service, method, in, out)
}
// Handle already-done contexts quickly.
select {
case <-ctx.Done():
return ctx.Err()
default:
}
c := fromContext(ctx)
if c == nil {
// Give a good error message rather than a panic lower down.
return errNotAppEngineContext
}
// Apply transaction modifications if we're in a transaction.
if t := transactionFromContext(ctx); t != nil {
if t.finished {
return errors.New("transaction context has expired")
}
applyTransaction(in, &t.transaction)
}
// Default RPC timeout is 60s.
timeout := 60 * time.Second
if deadline, ok := ctx.Deadline(); ok {
timeout = deadline.Sub(time.Now())
}
data, err := proto.Marshal(in)
if err != nil {
return err
}
ticket := c.req.Header.Get(ticketHeader)
// Use a test ticket under test environment.
if ticket == "" {
if appid := ctx.Value(&appIDOverrideKey); appid != nil {
ticket = appid.(string) + defaultTicketSuffix
}
}
// Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver.
if ticket == "" {
ticket = DefaultTicket()
}
req := &remotepb.Request{
ServiceName: &service,
Method: &method,
Request: data,
RequestId: &ticket,
}
hreqBody, err := proto.Marshal(req)
if err != nil {
return err
}
hrespBody, err := c.post(hreqBody, timeout)
if err != nil {
return err
}
res := &remotepb.Response{}
if err := proto.Unmarshal(hrespBody, res); err != nil {
return err
}
if res.RpcError != nil {
ce := &CallError{
Detail: res.RpcError.GetDetail(),
Code: *res.RpcError.Code,
}
switch remotepb.RpcError_ErrorCode(ce.Code) {
case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED:
ce.Timeout = true
}
return ce
}
if res.ApplicationError != nil {
return &APIError{
Service: *req.ServiceName,
Detail: res.ApplicationError.GetDetail(),
Code: *res.ApplicationError.Code,
}
}
if res.Exception != nil || res.JavaException != nil {
// This shouldn't happen, but let's be defensive.
return &CallError{
Detail: "service bridge returned exception",
Code: int32(remotepb.RpcError_UNKNOWN),
}
}
return proto.Unmarshal(res.Response, out)
}
func (c *context) Request() *http.Request {
return c.req
}
func (c *context) addLogLine(ll *logpb.UserAppLogLine) {
// Truncate long log lines.
// TODO(dsymonds): Check if this is still necessary.
const lim = 8 << 10
if len(*ll.Message) > lim {
suffix := fmt.Sprintf("...(length %d)", len(*ll.Message))
ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix)
}
c.pendingLogs.Lock()
c.pendingLogs.lines = append(c.pendingLogs.lines, ll)
c.pendingLogs.Unlock()
}
var logLevelName = map[int64]string{
0: "DEBUG",
1: "INFO",
2: "WARNING",
3: "ERROR",
4: "CRITICAL",
}
func logf(c *context, level int64, format string, args ...interface{}) {
if c == nil {
panic("not an App Engine context")
}
s := fmt.Sprintf(format, args...)
s = strings.TrimRight(s, "\n") // Remove any trailing newline characters.
c.addLogLine(&logpb.UserAppLogLine{
TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3),
Level: &level,
Message: &s,
})
log.Print(logLevelName[level] + ": " + s)
}
// flushLog attempts to flush any pending logs to the appserver.
// It should not be called concurrently.
func (c *context) flushLog(force bool) (flushed bool) {
c.pendingLogs.Lock()
// Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious.
n, rem := 0, 30<<20
for ; n < len(c.pendingLogs.lines); n++ {
ll := c.pendingLogs.lines[n]
// Each log line will require about 3 bytes of overhead.
nb := proto.Size(ll) + 3
if nb > rem {
break
}
rem -= nb
}
lines := c.pendingLogs.lines[:n]
c.pendingLogs.lines = c.pendingLogs.lines[n:]
c.pendingLogs.Unlock()
if len(lines) == 0 && !force {
// Nothing to flush.
return false
}
rescueLogs := false
defer func() {
if rescueLogs {
c.pendingLogs.Lock()
c.pendingLogs.lines = append(lines, c.pendingLogs.lines...)
c.pendingLogs.Unlock()
}
}()
buf, err := proto.Marshal(&logpb.UserAppLogGroup{
LogLine: lines,
})
if err != nil {
log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err)
rescueLogs = true
return false
}
req := &logpb.FlushRequest{
Logs: buf,
}
res := &basepb.VoidProto{}
c.pendingLogs.Lock()
c.pendingLogs.flushes++
c.pendingLogs.Unlock()
if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil {
log.Printf("internal.flushLog: Flush RPC: %v", err)
rescueLogs = true
return false
}
return true
}
const (
// Log flushing parameters.
flushInterval = 1 * time.Second
forceFlushInterval = 60 * time.Second
)
func (c *context) logFlusher(stop <-chan int) {
lastFlush := time.Now()
tick := time.NewTicker(flushInterval)
for {
select {
case <-stop:
// Request finished.
tick.Stop()
return
case <-tick.C:
force := time.Now().Sub(lastFlush) > forceFlushInterval
if c.flushLog(force) {
lastFlush = time.Now()
}
}
}
}
func ContextForTesting(req *http.Request) netcontext.Context {
return toContext(&context{req: req})
}

View file

@ -65,7 +65,7 @@ func (f *fakeAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.Error(w, fmt.Sprintf("Bad encoded API request: %v", err), 500)
return
}
if *apiReq.RequestId != "s3cr3t" {
if *apiReq.RequestId != "s3cr3t" && *apiReq.RequestId != DefaultTicket() {
writeResponse(&remotepb.Response{
RpcError: &remotepb.RpcError{
Code: proto.Int32(int32(remotepb.RpcError_SECURITY_VIOLATION)),
@ -176,6 +176,26 @@ func TestAPICall(t *testing.T) {
}
}
func TestAPICallTicketUnavailable(t *testing.T) {
resetEnv := SetTestEnv()
defer resetEnv()
_, c, cleanup := setup()
defer cleanup()
c.req.Header.Set(ticketHeader, "")
req := &basepb.StringProto{
Value: proto.String("Doctor Who"),
}
res := &basepb.StringProto{}
err := Call(toContext(c), "actordb", "LookupActor", req, res)
if err != nil {
t.Fatalf("API call failed: %v", err)
}
if got, want := *res.Value, "David Tennant"; got != want {
t.Errorf("Response is %q, want %q", got, want)
}
}
func TestAPICallRPCFailure(t *testing.T) {
f, c, cleanup := setup()
defer cleanup()
@ -361,7 +381,7 @@ func TestAPICallAllocations(t *testing.T) {
// Lots of room for improvement...
// TODO(djd): Reduce maximum to 85 once the App Engine SDK is based on 1.6.
const min, max float64 = 70, 90
const min, max float64 = 70, 100
if avg < min || max < avg {
t.Errorf("Allocations per API call = %g, want in [%g,%g]", avg, min, max)
}
@ -429,29 +449,8 @@ func TestHelperProcess(*testing.T) {
}
func TestBackgroundContext(t *testing.T) {
environ := []struct {
key, value string
}{
{"GAE_LONG_APP_ID", "my-app-id"},
{"GAE_MINOR_VERSION", "067924799508853122"},
{"GAE_MODULE_INSTANCE", "0"},
{"GAE_MODULE_NAME", "default"},
{"GAE_MODULE_VERSION", "20150612t184001"},
}
for _, v := range environ {
old := os.Getenv(v.key)
os.Setenv(v.key, v.value)
v.value = old
}
defer func() { // Restore old environment after the test completes.
for _, v := range environ {
if v.value == "" {
os.Unsetenv(v.key)
continue
}
os.Setenv(v.key, v.value)
}
}()
resetEnv := SetTestEnv()
defer resetEnv()
ctx, key := fromContext(BackgroundContext()), "X-Magic-Ticket-Header"
if g, w := ctx.req.Header.Get(key), "my-app-id/default.20150612t184001.0"; g != w {

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/app_identity/app_identity_service.proto
// DO NOT EDIT!
/*
Package app_identity is a generated protocol buffer package.
@ -33,6 +32,12 @@ 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
type AppIdentityServiceError_ErrorCode int32
const (
@ -83,23 +88,28 @@ func (x *AppIdentityServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = AppIdentityServiceError_ErrorCode(value)
return nil
}
func (AppIdentityServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type AppIdentityServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *AppIdentityServiceError) Reset() { *m = AppIdentityServiceError{} }
func (m *AppIdentityServiceError) String() string { return proto.CompactTextString(m) }
func (*AppIdentityServiceError) ProtoMessage() {}
func (m *AppIdentityServiceError) Reset() { *m = AppIdentityServiceError{} }
func (m *AppIdentityServiceError) String() string { return proto.CompactTextString(m) }
func (*AppIdentityServiceError) ProtoMessage() {}
func (*AppIdentityServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type SignForAppRequest struct {
BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign" json:"bytes_to_sign,omitempty"`
BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign,json=bytesToSign" json:"bytes_to_sign,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SignForAppRequest) Reset() { *m = SignForAppRequest{} }
func (m *SignForAppRequest) String() string { return proto.CompactTextString(m) }
func (*SignForAppRequest) ProtoMessage() {}
func (m *SignForAppRequest) Reset() { *m = SignForAppRequest{} }
func (m *SignForAppRequest) String() string { return proto.CompactTextString(m) }
func (*SignForAppRequest) ProtoMessage() {}
func (*SignForAppRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *SignForAppRequest) GetBytesToSign() []byte {
if m != nil {
@ -109,14 +119,15 @@ func (m *SignForAppRequest) GetBytesToSign() []byte {
}
type SignForAppResponse struct {
KeyName *string `protobuf:"bytes,1,opt,name=key_name" json:"key_name,omitempty"`
SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes" json:"signature_bytes,omitempty"`
KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"`
SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes,json=signatureBytes" json:"signature_bytes,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SignForAppResponse) Reset() { *m = SignForAppResponse{} }
func (m *SignForAppResponse) String() string { return proto.CompactTextString(m) }
func (*SignForAppResponse) ProtoMessage() {}
func (m *SignForAppResponse) Reset() { *m = SignForAppResponse{} }
func (m *SignForAppResponse) String() string { return proto.CompactTextString(m) }
func (*SignForAppResponse) ProtoMessage() {}
func (*SignForAppResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *SignForAppResponse) GetKeyName() string {
if m != nil && m.KeyName != nil {
@ -139,16 +150,20 @@ type GetPublicCertificateForAppRequest struct {
func (m *GetPublicCertificateForAppRequest) Reset() { *m = GetPublicCertificateForAppRequest{} }
func (m *GetPublicCertificateForAppRequest) String() string { return proto.CompactTextString(m) }
func (*GetPublicCertificateForAppRequest) ProtoMessage() {}
func (*GetPublicCertificateForAppRequest) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{3}
}
type PublicCertificate struct {
KeyName *string `protobuf:"bytes,1,opt,name=key_name" json:"key_name,omitempty"`
X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem" json:"x509_certificate_pem,omitempty"`
KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"`
X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem,json=x509CertificatePem" json:"x509_certificate_pem,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PublicCertificate) Reset() { *m = PublicCertificate{} }
func (m *PublicCertificate) String() string { return proto.CompactTextString(m) }
func (*PublicCertificate) ProtoMessage() {}
func (m *PublicCertificate) Reset() { *m = PublicCertificate{} }
func (m *PublicCertificate) String() string { return proto.CompactTextString(m) }
func (*PublicCertificate) ProtoMessage() {}
func (*PublicCertificate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *PublicCertificate) GetKeyName() string {
if m != nil && m.KeyName != nil {
@ -165,14 +180,17 @@ func (m *PublicCertificate) GetX509CertificatePem() string {
}
type GetPublicCertificateForAppResponse struct {
PublicCertificateList []*PublicCertificate `protobuf:"bytes,1,rep,name=public_certificate_list" json:"public_certificate_list,omitempty"`
MaxClientCacheTimeInSecond *int64 `protobuf:"varint,2,opt,name=max_client_cache_time_in_second" json:"max_client_cache_time_in_second,omitempty"`
PublicCertificateList []*PublicCertificate `protobuf:"bytes,1,rep,name=public_certificate_list,json=publicCertificateList" json:"public_certificate_list,omitempty"`
MaxClientCacheTimeInSecond *int64 `protobuf:"varint,2,opt,name=max_client_cache_time_in_second,json=maxClientCacheTimeInSecond" json:"max_client_cache_time_in_second,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetPublicCertificateForAppResponse) Reset() { *m = GetPublicCertificateForAppResponse{} }
func (m *GetPublicCertificateForAppResponse) String() string { return proto.CompactTextString(m) }
func (*GetPublicCertificateForAppResponse) ProtoMessage() {}
func (*GetPublicCertificateForAppResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{5}
}
func (m *GetPublicCertificateForAppResponse) GetPublicCertificateList() []*PublicCertificate {
if m != nil {
@ -192,18 +210,20 @@ type GetServiceAccountNameRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetServiceAccountNameRequest) Reset() { *m = GetServiceAccountNameRequest{} }
func (m *GetServiceAccountNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetServiceAccountNameRequest) ProtoMessage() {}
func (m *GetServiceAccountNameRequest) Reset() { *m = GetServiceAccountNameRequest{} }
func (m *GetServiceAccountNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetServiceAccountNameRequest) ProtoMessage() {}
func (*GetServiceAccountNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
type GetServiceAccountNameResponse struct {
ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name" json:"service_account_name,omitempty"`
ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetServiceAccountNameResponse) Reset() { *m = GetServiceAccountNameResponse{} }
func (m *GetServiceAccountNameResponse) String() string { return proto.CompactTextString(m) }
func (*GetServiceAccountNameResponse) ProtoMessage() {}
func (m *GetServiceAccountNameResponse) Reset() { *m = GetServiceAccountNameResponse{} }
func (m *GetServiceAccountNameResponse) String() string { return proto.CompactTextString(m) }
func (*GetServiceAccountNameResponse) ProtoMessage() {}
func (*GetServiceAccountNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetServiceAccountNameResponse) GetServiceAccountName() string {
if m != nil && m.ServiceAccountName != nil {
@ -214,14 +234,15 @@ func (m *GetServiceAccountNameResponse) GetServiceAccountName() string {
type GetAccessTokenRequest struct {
Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"`
ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id" json:"service_account_id,omitempty"`
ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name" json:"service_account_name,omitempty"`
ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id,json=serviceAccountId" json:"service_account_id,omitempty"`
ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetAccessTokenRequest) Reset() { *m = GetAccessTokenRequest{} }
func (m *GetAccessTokenRequest) String() string { return proto.CompactTextString(m) }
func (*GetAccessTokenRequest) ProtoMessage() {}
func (m *GetAccessTokenRequest) Reset() { *m = GetAccessTokenRequest{} }
func (m *GetAccessTokenRequest) String() string { return proto.CompactTextString(m) }
func (*GetAccessTokenRequest) ProtoMessage() {}
func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *GetAccessTokenRequest) GetScope() []string {
if m != nil {
@ -245,14 +266,15 @@ func (m *GetAccessTokenRequest) GetServiceAccountName() string {
}
type GetAccessTokenResponse struct {
AccessToken *string `protobuf:"bytes,1,opt,name=access_token" json:"access_token,omitempty"`
ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time" json:"expiration_time,omitempty"`
AccessToken *string `protobuf:"bytes,1,opt,name=access_token,json=accessToken" json:"access_token,omitempty"`
ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time,json=expirationTime" json:"expiration_time,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetAccessTokenResponse) Reset() { *m = GetAccessTokenResponse{} }
func (m *GetAccessTokenResponse) String() string { return proto.CompactTextString(m) }
func (*GetAccessTokenResponse) ProtoMessage() {}
func (m *GetAccessTokenResponse) Reset() { *m = GetAccessTokenResponse{} }
func (m *GetAccessTokenResponse) String() string { return proto.CompactTextString(m) }
func (*GetAccessTokenResponse) ProtoMessage() {}
func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *GetAccessTokenResponse) GetAccessToken() string {
if m != nil && m.AccessToken != nil {
@ -272,18 +294,22 @@ type GetDefaultGcsBucketNameRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} }
func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {}
func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} }
func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {}
func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
type GetDefaultGcsBucketNameResponse struct {
DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name" json:"default_gcs_bucket_name,omitempty"`
DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetDefaultGcsBucketNameResponse) Reset() { *m = GetDefaultGcsBucketNameResponse{} }
func (m *GetDefaultGcsBucketNameResponse) String() string { return proto.CompactTextString(m) }
func (*GetDefaultGcsBucketNameResponse) ProtoMessage() {}
func (*GetDefaultGcsBucketNameResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{11}
}
func (m *GetDefaultGcsBucketNameResponse) GetDefaultGcsBucketName() string {
if m != nil && m.DefaultGcsBucketName != nil {
@ -293,4 +319,67 @@ func (m *GetDefaultGcsBucketNameResponse) GetDefaultGcsBucketName() string {
}
func init() {
proto.RegisterType((*AppIdentityServiceError)(nil), "appengine.AppIdentityServiceError")
proto.RegisterType((*SignForAppRequest)(nil), "appengine.SignForAppRequest")
proto.RegisterType((*SignForAppResponse)(nil), "appengine.SignForAppResponse")
proto.RegisterType((*GetPublicCertificateForAppRequest)(nil), "appengine.GetPublicCertificateForAppRequest")
proto.RegisterType((*PublicCertificate)(nil), "appengine.PublicCertificate")
proto.RegisterType((*GetPublicCertificateForAppResponse)(nil), "appengine.GetPublicCertificateForAppResponse")
proto.RegisterType((*GetServiceAccountNameRequest)(nil), "appengine.GetServiceAccountNameRequest")
proto.RegisterType((*GetServiceAccountNameResponse)(nil), "appengine.GetServiceAccountNameResponse")
proto.RegisterType((*GetAccessTokenRequest)(nil), "appengine.GetAccessTokenRequest")
proto.RegisterType((*GetAccessTokenResponse)(nil), "appengine.GetAccessTokenResponse")
proto.RegisterType((*GetDefaultGcsBucketNameRequest)(nil), "appengine.GetDefaultGcsBucketNameRequest")
proto.RegisterType((*GetDefaultGcsBucketNameResponse)(nil), "appengine.GetDefaultGcsBucketNameResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/app_identity/app_identity_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 676 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xdb, 0x6e, 0xda, 0x58,
0x14, 0x1d, 0x26, 0x1a, 0x31, 0x6c, 0x12, 0x62, 0xce, 0x90, 0xcb, 0x8c, 0x32, 0xb9, 0x78, 0x1e,
0x26, 0x0f, 0x15, 0x89, 0x2a, 0x45, 0x55, 0x1f, 0x8d, 0xed, 0x22, 0x54, 0x07, 0x53, 0x43, 0x9a,
0xa8, 0x2f, 0xa7, 0xce, 0x61, 0xc7, 0x3d, 0x02, 0x9f, 0xe3, 0xda, 0x87, 0x0a, 0x3e, 0xa2, 0x3f,
0xd2, 0x9f, 0xe8, 0x5b, 0xbf, 0xa5, 0x17, 0xb5, 0xdf, 0x50, 0xd9, 0x38, 0x5c, 0x92, 0x92, 0x37,
0xbc, 0xf6, 0x5a, 0xcb, 0x6b, 0x2f, 0x6d, 0x0c, 0x4e, 0x20, 0x65, 0x30, 0xc4, 0x7a, 0x20, 0x87,
0xbe, 0x08, 0xea, 0x32, 0x0e, 0x4e, 0xfc, 0x28, 0x42, 0x11, 0x70, 0x81, 0x27, 0x5c, 0x28, 0x8c,
0x85, 0x3f, 0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x37, 0x4c, 0x56, 0x38,
0xf3, 0x04, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/base/api_base.proto
// DO NOT EDIT!
/*
Package base is a generated protocol buffer package.
@ -28,14 +27,21 @@ 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
type StringProto struct {
Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StringProto) Reset() { *m = StringProto{} }
func (m *StringProto) String() string { return proto.CompactTextString(m) }
func (*StringProto) ProtoMessage() {}
func (m *StringProto) Reset() { *m = StringProto{} }
func (m *StringProto) String() string { return proto.CompactTextString(m) }
func (*StringProto) ProtoMessage() {}
func (*StringProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *StringProto) GetValue() string {
if m != nil && m.Value != nil {
@ -49,9 +55,10 @@ type Integer32Proto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *Integer32Proto) Reset() { *m = Integer32Proto{} }
func (m *Integer32Proto) String() string { return proto.CompactTextString(m) }
func (*Integer32Proto) ProtoMessage() {}
func (m *Integer32Proto) Reset() { *m = Integer32Proto{} }
func (m *Integer32Proto) String() string { return proto.CompactTextString(m) }
func (*Integer32Proto) ProtoMessage() {}
func (*Integer32Proto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Integer32Proto) GetValue() int32 {
if m != nil && m.Value != nil {
@ -65,9 +72,10 @@ type Integer64Proto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *Integer64Proto) Reset() { *m = Integer64Proto{} }
func (m *Integer64Proto) String() string { return proto.CompactTextString(m) }
func (*Integer64Proto) ProtoMessage() {}
func (m *Integer64Proto) Reset() { *m = Integer64Proto{} }
func (m *Integer64Proto) String() string { return proto.CompactTextString(m) }
func (*Integer64Proto) ProtoMessage() {}
func (*Integer64Proto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Integer64Proto) GetValue() int64 {
if m != nil && m.Value != nil {
@ -81,9 +89,10 @@ type BoolProto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *BoolProto) Reset() { *m = BoolProto{} }
func (m *BoolProto) String() string { return proto.CompactTextString(m) }
func (*BoolProto) ProtoMessage() {}
func (m *BoolProto) Reset() { *m = BoolProto{} }
func (m *BoolProto) String() string { return proto.CompactTextString(m) }
func (*BoolProto) ProtoMessage() {}
func (*BoolProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *BoolProto) GetValue() bool {
if m != nil && m.Value != nil {
@ -97,9 +106,10 @@ type DoubleProto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *DoubleProto) Reset() { *m = DoubleProto{} }
func (m *DoubleProto) String() string { return proto.CompactTextString(m) }
func (*DoubleProto) ProtoMessage() {}
func (m *DoubleProto) Reset() { *m = DoubleProto{} }
func (m *DoubleProto) String() string { return proto.CompactTextString(m) }
func (*DoubleProto) ProtoMessage() {}
func (*DoubleProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *DoubleProto) GetValue() float64 {
if m != nil && m.Value != nil {
@ -113,9 +123,10 @@ type BytesProto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *BytesProto) Reset() { *m = BytesProto{} }
func (m *BytesProto) String() string { return proto.CompactTextString(m) }
func (*BytesProto) ProtoMessage() {}
func (m *BytesProto) Reset() { *m = BytesProto{} }
func (m *BytesProto) String() string { return proto.CompactTextString(m) }
func (*BytesProto) ProtoMessage() {}
func (*BytesProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *BytesProto) GetValue() []byte {
if m != nil {
@ -128,6 +139,38 @@ type VoidProto struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *VoidProto) Reset() { *m = VoidProto{} }
func (m *VoidProto) String() string { return proto.CompactTextString(m) }
func (*VoidProto) ProtoMessage() {}
func (m *VoidProto) Reset() { *m = VoidProto{} }
func (m *VoidProto) String() string { return proto.CompactTextString(m) }
func (*VoidProto) ProtoMessage() {}
func (*VoidProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func init() {
proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto")
proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto")
proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto")
proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto")
proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto")
proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto")
proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 199 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30,
0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40,
0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6,
0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62,
0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71,
0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe,
0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1,
0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71,
0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d,
0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff,
0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d,
0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba,
0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/blobstore/blobstore_service.proto
// DO NOT EDIT!
/*
Package blobstore is a generated protocol buffer package.
@ -33,6 +32,12 @@ 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
type BlobstoreServiceError_ErrorCode int32
const (
@ -86,27 +91,32 @@ func (x *BlobstoreServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = BlobstoreServiceError_ErrorCode(value)
return nil
}
func (BlobstoreServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type BlobstoreServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *BlobstoreServiceError) Reset() { *m = BlobstoreServiceError{} }
func (m *BlobstoreServiceError) String() string { return proto.CompactTextString(m) }
func (*BlobstoreServiceError) ProtoMessage() {}
func (m *BlobstoreServiceError) Reset() { *m = BlobstoreServiceError{} }
func (m *BlobstoreServiceError) String() string { return proto.CompactTextString(m) }
func (*BlobstoreServiceError) ProtoMessage() {}
func (*BlobstoreServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type CreateUploadURLRequest struct {
SuccessPath *string `protobuf:"bytes,1,req,name=success_path" json:"success_path,omitempty"`
MaxUploadSizeBytes *int64 `protobuf:"varint,2,opt,name=max_upload_size_bytes" json:"max_upload_size_bytes,omitempty"`
MaxUploadSizePerBlobBytes *int64 `protobuf:"varint,3,opt,name=max_upload_size_per_blob_bytes" json:"max_upload_size_per_blob_bytes,omitempty"`
GsBucketName *string `protobuf:"bytes,4,opt,name=gs_bucket_name" json:"gs_bucket_name,omitempty"`
UrlExpiryTimeSeconds *int32 `protobuf:"varint,5,opt,name=url_expiry_time_seconds" json:"url_expiry_time_seconds,omitempty"`
SuccessPath *string `protobuf:"bytes,1,req,name=success_path,json=successPath" json:"success_path,omitempty"`
MaxUploadSizeBytes *int64 `protobuf:"varint,2,opt,name=max_upload_size_bytes,json=maxUploadSizeBytes" json:"max_upload_size_bytes,omitempty"`
MaxUploadSizePerBlobBytes *int64 `protobuf:"varint,3,opt,name=max_upload_size_per_blob_bytes,json=maxUploadSizePerBlobBytes" json:"max_upload_size_per_blob_bytes,omitempty"`
GsBucketName *string `protobuf:"bytes,4,opt,name=gs_bucket_name,json=gsBucketName" json:"gs_bucket_name,omitempty"`
UrlExpiryTimeSeconds *int32 `protobuf:"varint,5,opt,name=url_expiry_time_seconds,json=urlExpiryTimeSeconds" json:"url_expiry_time_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateUploadURLRequest) Reset() { *m = CreateUploadURLRequest{} }
func (m *CreateUploadURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateUploadURLRequest) ProtoMessage() {}
func (m *CreateUploadURLRequest) Reset() { *m = CreateUploadURLRequest{} }
func (m *CreateUploadURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateUploadURLRequest) ProtoMessage() {}
func (*CreateUploadURLRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *CreateUploadURLRequest) GetSuccessPath() string {
if m != nil && m.SuccessPath != nil {
@ -148,9 +158,10 @@ type CreateUploadURLResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateUploadURLResponse) Reset() { *m = CreateUploadURLResponse{} }
func (m *CreateUploadURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateUploadURLResponse) ProtoMessage() {}
func (m *CreateUploadURLResponse) Reset() { *m = CreateUploadURLResponse{} }
func (m *CreateUploadURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateUploadURLResponse) ProtoMessage() {}
func (*CreateUploadURLResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *CreateUploadURLResponse) GetUrl() string {
if m != nil && m.Url != nil {
@ -160,14 +171,15 @@ func (m *CreateUploadURLResponse) GetUrl() string {
}
type DeleteBlobRequest struct {
BlobKey []string `protobuf:"bytes,1,rep,name=blob_key" json:"blob_key,omitempty"`
BlobKey []string `protobuf:"bytes,1,rep,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
Token *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *DeleteBlobRequest) Reset() { *m = DeleteBlobRequest{} }
func (m *DeleteBlobRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteBlobRequest) ProtoMessage() {}
func (m *DeleteBlobRequest) Reset() { *m = DeleteBlobRequest{} }
func (m *DeleteBlobRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteBlobRequest) ProtoMessage() {}
func (*DeleteBlobRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *DeleteBlobRequest) GetBlobKey() []string {
if m != nil {
@ -184,15 +196,16 @@ func (m *DeleteBlobRequest) GetToken() string {
}
type FetchDataRequest struct {
BlobKey *string `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
StartIndex *int64 `protobuf:"varint,2,req,name=start_index" json:"start_index,omitempty"`
EndIndex *int64 `protobuf:"varint,3,req,name=end_index" json:"end_index,omitempty"`
BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
StartIndex *int64 `protobuf:"varint,2,req,name=start_index,json=startIndex" json:"start_index,omitempty"`
EndIndex *int64 `protobuf:"varint,3,req,name=end_index,json=endIndex" json:"end_index,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *FetchDataRequest) Reset() { *m = FetchDataRequest{} }
func (m *FetchDataRequest) String() string { return proto.CompactTextString(m) }
func (*FetchDataRequest) ProtoMessage() {}
func (m *FetchDataRequest) Reset() { *m = FetchDataRequest{} }
func (m *FetchDataRequest) String() string { return proto.CompactTextString(m) }
func (*FetchDataRequest) ProtoMessage() {}
func (*FetchDataRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *FetchDataRequest) GetBlobKey() string {
if m != nil && m.BlobKey != nil {
@ -220,9 +233,10 @@ type FetchDataResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *FetchDataResponse) Reset() { *m = FetchDataResponse{} }
func (m *FetchDataResponse) String() string { return proto.CompactTextString(m) }
func (*FetchDataResponse) ProtoMessage() {}
func (m *FetchDataResponse) Reset() { *m = FetchDataResponse{} }
func (m *FetchDataResponse) String() string { return proto.CompactTextString(m) }
func (*FetchDataResponse) ProtoMessage() {}
func (*FetchDataResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *FetchDataResponse) GetData() []byte {
if m != nil {
@ -232,15 +246,16 @@ func (m *FetchDataResponse) GetData() []byte {
}
type CloneBlobRequest struct {
BlobKey []byte `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
MimeType []byte `protobuf:"bytes,2,req,name=mime_type" json:"mime_type,omitempty"`
TargetAppId []byte `protobuf:"bytes,3,req,name=target_app_id" json:"target_app_id,omitempty"`
BlobKey []byte `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
MimeType []byte `protobuf:"bytes,2,req,name=mime_type,json=mimeType" json:"mime_type,omitempty"`
TargetAppId []byte `protobuf:"bytes,3,req,name=target_app_id,json=targetAppId" json:"target_app_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CloneBlobRequest) Reset() { *m = CloneBlobRequest{} }
func (m *CloneBlobRequest) String() string { return proto.CompactTextString(m) }
func (*CloneBlobRequest) ProtoMessage() {}
func (m *CloneBlobRequest) Reset() { *m = CloneBlobRequest{} }
func (m *CloneBlobRequest) String() string { return proto.CompactTextString(m) }
func (*CloneBlobRequest) ProtoMessage() {}
func (*CloneBlobRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *CloneBlobRequest) GetBlobKey() []byte {
if m != nil {
@ -264,13 +279,14 @@ func (m *CloneBlobRequest) GetTargetAppId() []byte {
}
type CloneBlobResponse struct {
BlobKey []byte `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
BlobKey []byte `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CloneBlobResponse) Reset() { *m = CloneBlobResponse{} }
func (m *CloneBlobResponse) String() string { return proto.CompactTextString(m) }
func (*CloneBlobResponse) ProtoMessage() {}
func (m *CloneBlobResponse) Reset() { *m = CloneBlobResponse{} }
func (m *CloneBlobResponse) String() string { return proto.CompactTextString(m) }
func (*CloneBlobResponse) ProtoMessage() {}
func (*CloneBlobResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *CloneBlobResponse) GetBlobKey() []byte {
if m != nil {
@ -280,13 +296,14 @@ func (m *CloneBlobResponse) GetBlobKey() []byte {
}
type DecodeBlobKeyRequest struct {
BlobKey []string `protobuf:"bytes,1,rep,name=blob_key" json:"blob_key,omitempty"`
BlobKey []string `protobuf:"bytes,1,rep,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *DecodeBlobKeyRequest) Reset() { *m = DecodeBlobKeyRequest{} }
func (m *DecodeBlobKeyRequest) String() string { return proto.CompactTextString(m) }
func (*DecodeBlobKeyRequest) ProtoMessage() {}
func (m *DecodeBlobKeyRequest) Reset() { *m = DecodeBlobKeyRequest{} }
func (m *DecodeBlobKeyRequest) String() string { return proto.CompactTextString(m) }
func (*DecodeBlobKeyRequest) ProtoMessage() {}
func (*DecodeBlobKeyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *DecodeBlobKeyRequest) GetBlobKey() []string {
if m != nil {
@ -300,9 +317,10 @@ type DecodeBlobKeyResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *DecodeBlobKeyResponse) Reset() { *m = DecodeBlobKeyResponse{} }
func (m *DecodeBlobKeyResponse) String() string { return proto.CompactTextString(m) }
func (*DecodeBlobKeyResponse) ProtoMessage() {}
func (m *DecodeBlobKeyResponse) Reset() { *m = DecodeBlobKeyResponse{} }
func (m *DecodeBlobKeyResponse) String() string { return proto.CompactTextString(m) }
func (*DecodeBlobKeyResponse) ProtoMessage() {}
func (*DecodeBlobKeyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *DecodeBlobKeyResponse) GetDecoded() []string {
if m != nil {
@ -319,6 +337,9 @@ type CreateEncodedGoogleStorageKeyRequest struct {
func (m *CreateEncodedGoogleStorageKeyRequest) Reset() { *m = CreateEncodedGoogleStorageKeyRequest{} }
func (m *CreateEncodedGoogleStorageKeyRequest) String() string { return proto.CompactTextString(m) }
func (*CreateEncodedGoogleStorageKeyRequest) ProtoMessage() {}
func (*CreateEncodedGoogleStorageKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{10}
}
func (m *CreateEncodedGoogleStorageKeyRequest) GetFilename() string {
if m != nil && m.Filename != nil {
@ -328,13 +349,16 @@ func (m *CreateEncodedGoogleStorageKeyRequest) GetFilename() string {
}
type CreateEncodedGoogleStorageKeyResponse struct {
BlobKey *string `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateEncodedGoogleStorageKeyResponse) Reset() { *m = CreateEncodedGoogleStorageKeyResponse{} }
func (m *CreateEncodedGoogleStorageKeyResponse) String() string { return proto.CompactTextString(m) }
func (*CreateEncodedGoogleStorageKeyResponse) ProtoMessage() {}
func (*CreateEncodedGoogleStorageKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{11}
}
func (m *CreateEncodedGoogleStorageKeyResponse) GetBlobKey() string {
if m != nil && m.BlobKey != nil {
@ -344,4 +368,71 @@ func (m *CreateEncodedGoogleStorageKeyResponse) GetBlobKey() string {
}
func init() {
proto.RegisterType((*BlobstoreServiceError)(nil), "appengine.BlobstoreServiceError")
proto.RegisterType((*CreateUploadURLRequest)(nil), "appengine.CreateUploadURLRequest")
proto.RegisterType((*CreateUploadURLResponse)(nil), "appengine.CreateUploadURLResponse")
proto.RegisterType((*DeleteBlobRequest)(nil), "appengine.DeleteBlobRequest")
proto.RegisterType((*FetchDataRequest)(nil), "appengine.FetchDataRequest")
proto.RegisterType((*FetchDataResponse)(nil), "appengine.FetchDataResponse")
proto.RegisterType((*CloneBlobRequest)(nil), "appengine.CloneBlobRequest")
proto.RegisterType((*CloneBlobResponse)(nil), "appengine.CloneBlobResponse")
proto.RegisterType((*DecodeBlobKeyRequest)(nil), "appengine.DecodeBlobKeyRequest")
proto.RegisterType((*DecodeBlobKeyResponse)(nil), "appengine.DecodeBlobKeyResponse")
proto.RegisterType((*CreateEncodedGoogleStorageKeyRequest)(nil), "appengine.CreateEncodedGoogleStorageKeyRequest")
proto.RegisterType((*CreateEncodedGoogleStorageKeyResponse)(nil), "appengine.CreateEncodedGoogleStorageKeyResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/blobstore/blobstore_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 737 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xe1, 0x6e, 0xe3, 0x44,
0x10, 0xc6, 0x4e, 0x7b, 0x8d, 0xa7, 0xe1, 0xe4, 0xae, 0x1a, 0x9a, 0x52, 0x01, 0xc1, 0x3a, 0xa4,
0x48, 0xa0, 0x56, 0xfd, 0xc1, 0x03, 0xd8, 0xb5, 0x13, 0xac, 0xe6, 0xec, 0x6a, 0xe3, 0x20, 0xb8,
0x3f, 0xab, 0x6d, 0x3c, 0xb8, 0x56, 0x1d, 0xaf, 0x59, 0x6f, 0x50, 0x73, 0x0f, 0xc1, 0xbb, 0xf1,
0x16, 0x48, 0xbc, 0x04, 0xf2, 0xda, 0x6d, 0x73, 0x07, 0x77, 0xf7, 0x6f, 0xe7, 0xfb, 0xf6, 0x9b,
0xf9, 0x66, 0x66, 0xb5, 0x30, 0xcd, 0x84, 0xc8, 0x0a, 0x3c, 0xcf, 0x44, 0xc1, 0xcb, 0xec, 0x5c,
0xc8, 0xec, 0x82, 0x57, 0x15, 0x96, 0x59, 0x5e, 0xe2, 0x45, 0x5e, 0x2a, 0x94, 0x25, 0x2f, 0x2e,
0x6e, 0x0b, 0x71, 0x5b, 0x2b, 0x21, 0xf1, 0xf9, 0xc4, 0x6a, 0x94, 0x7f, 0xe4, 0x2b, 0x3c, 0xaf,
0xa4, 0x50, 0x82,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 0xa6, 0x3f, 0x9d, 0x85,
0x12, 0x92, 0x67, 0xb8, 0x53, 0xf5, 0x4b, 0xe8, 0xff, 0x96, 0x17, 0xa8, 0x9f, 0x64, 0xbb, 0xb4,
0xa7, 0xd8, 0xf1, 0xe0, 0xbb, 0x4f, 0xe4, 0xf8, 0x40, 0xb7, 0xcf, 0xd6, 0xbd, 0xc3, 0x37, 0xd6,
0xd3, 0x07, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xfb, 0x81, 0x94, 0xfb, 0x04, 0x00,
0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/capability/capability_service.proto
// DO NOT EDIT!
/*
Package capability is a generated protocol buffer package.
@ -23,6 +22,12 @@ 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
type IsEnabledResponse_SummaryStatus int32
const (
@ -67,6 +72,9 @@ func (x *IsEnabledResponse_SummaryStatus) UnmarshalJSON(data []byte) error {
*x = IsEnabledResponse_SummaryStatus(value)
return nil
}
func (IsEnabledResponse_SummaryStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0}
}
type IsEnabledRequest struct {
Package *string `protobuf:"bytes,1,req,name=package" json:"package,omitempty"`
@ -75,9 +83,10 @@ type IsEnabledRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *IsEnabledRequest) Reset() { *m = IsEnabledRequest{} }
func (m *IsEnabledRequest) String() string { return proto.CompactTextString(m) }
func (*IsEnabledRequest) ProtoMessage() {}
func (m *IsEnabledRequest) Reset() { *m = IsEnabledRequest{} }
func (m *IsEnabledRequest) String() string { return proto.CompactTextString(m) }
func (*IsEnabledRequest) ProtoMessage() {}
func (*IsEnabledRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *IsEnabledRequest) GetPackage() string {
if m != nil && m.Package != nil {
@ -101,14 +110,15 @@ func (m *IsEnabledRequest) GetCall() []string {
}
type IsEnabledResponse struct {
SummaryStatus *IsEnabledResponse_SummaryStatus `protobuf:"varint,1,opt,name=summary_status,enum=appengine.IsEnabledResponse_SummaryStatus" json:"summary_status,omitempty"`
TimeUntilScheduled *int64 `protobuf:"varint,2,opt,name=time_until_scheduled" json:"time_until_scheduled,omitempty"`
SummaryStatus *IsEnabledResponse_SummaryStatus `protobuf:"varint,1,opt,name=summary_status,json=summaryStatus,enum=appengine.IsEnabledResponse_SummaryStatus" json:"summary_status,omitempty"`
TimeUntilScheduled *int64 `protobuf:"varint,2,opt,name=time_until_scheduled,json=timeUntilScheduled" json:"time_until_scheduled,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *IsEnabledResponse) Reset() { *m = IsEnabledResponse{} }
func (m *IsEnabledResponse) String() string { return proto.CompactTextString(m) }
func (*IsEnabledResponse) ProtoMessage() {}
func (m *IsEnabledResponse) Reset() { *m = IsEnabledResponse{} }
func (m *IsEnabledResponse) String() string { return proto.CompactTextString(m) }
func (*IsEnabledResponse) ProtoMessage() {}
func (*IsEnabledResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *IsEnabledResponse) GetSummaryStatus() IsEnabledResponse_SummaryStatus {
if m != nil && m.SummaryStatus != nil {
@ -123,3 +133,39 @@ func (m *IsEnabledResponse) GetTimeUntilScheduled() int64 {
}
return 0
}
func init() {
proto.RegisterType((*IsEnabledRequest)(nil), "appengine.IsEnabledRequest")
proto.RegisterType((*IsEnabledResponse)(nil), "appengine.IsEnabledResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/capability/capability_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 359 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x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x71,
0x81, 0x45, 0xc5, 0x75, 0xc9, 0x90, 0xac, 0xf1, 0xfc, 0xbb, 0xdd, 0xfe, 0xcd, 0x7e, 0x45, 0xd9,
0xc1, 0x15, 0x09, 0x1a, 0xc2, 0x1f, 0xf1, 0x6e, 0x8b, 0x7e, 0xc0, 0x54, 0xa4, 0x19, 0x89, 0x2a,
0x26, 0x52, 0x1a, 0xf1, 0xf8, 0x1f, 0x39, 0x57, 0x94, 0x9c, 0x75, 0xd9, 0x90, 0x2c, 0xc5, 0x47,
0xb5, 0x16, 0xd6, 0x52, 0x70, 0x53, 0xcc, 0x0c, 0x46, 0x2f, 0x1c, 0xd1, 0x27, 0x18, 0x38, 0xee,
0x7a, 0x11, 0xee, 0x0e, 0x5a, 0xaf, 0x6e, 0x5c, 0x6f, 0xb1, 0xdc, 0xb9, 0x8e, 0x26, 0xa1, 0x29,
0x68, 0xc1, 0x6a, 0xe3, 0x3a, 0xe1, 0xce, 0x75, 0xa2, 0x75, 0x78, 0x08, 0x7d, 0x57, 0x93, 0xd1,
0x04, 0x46, 0xf7, 0xa9, 0xb7, 0x3f, 0x6a, 0x0a, 0x1a, 0xc2, 0x47, 0x67, 0x1b, 0x5c, 0xb1, 0x7e,
0xed, 0x11, 0x7a, 0x3f, 0xbd, 0xfd, 0xd1, 0xd3, 0x3e, 0xcc, 0xff, 0xc0, 0x64, 0xd5, 0xde, 0x2a,
0xb8, 0x26, 0x82, 0x36, 0xa0, 0xb6, 0x7b, 0xa2, 0x2f, 0x6f, 0x6f, 0xdf, 0xc4, 0xf2, 0xf9, 0xeb,
0x7b, 0xa7, 0x31, 0x7b, 0xcb, 0xe1, 0xef, 0x4e, 0x14, 0xcf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0,
0x03, 0x26, 0x25, 0x2e, 0x02, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/channel/channel_service.proto
// DO NOT EDIT!
/*
Package channel is a generated protocol buffer package.
@ -25,6 +24,12 @@ 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
type ChannelServiceError_ErrorCode int32
const (
@ -69,24 +74,29 @@ func (x *ChannelServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = ChannelServiceError_ErrorCode(value)
return nil
}
func (ChannelServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type ChannelServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ChannelServiceError) Reset() { *m = ChannelServiceError{} }
func (m *ChannelServiceError) String() string { return proto.CompactTextString(m) }
func (*ChannelServiceError) ProtoMessage() {}
func (m *ChannelServiceError) Reset() { *m = ChannelServiceError{} }
func (m *ChannelServiceError) String() string { return proto.CompactTextString(m) }
func (*ChannelServiceError) ProtoMessage() {}
func (*ChannelServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type CreateChannelRequest struct {
ApplicationKey *string `protobuf:"bytes,1,req,name=application_key" json:"application_key,omitempty"`
DurationMinutes *int32 `protobuf:"varint,2,opt,name=duration_minutes" json:"duration_minutes,omitempty"`
ApplicationKey *string `protobuf:"bytes,1,req,name=application_key,json=applicationKey" json:"application_key,omitempty"`
DurationMinutes *int32 `protobuf:"varint,2,opt,name=duration_minutes,json=durationMinutes" json:"duration_minutes,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateChannelRequest) Reset() { *m = CreateChannelRequest{} }
func (m *CreateChannelRequest) String() string { return proto.CompactTextString(m) }
func (*CreateChannelRequest) ProtoMessage() {}
func (m *CreateChannelRequest) Reset() { *m = CreateChannelRequest{} }
func (m *CreateChannelRequest) String() string { return proto.CompactTextString(m) }
func (*CreateChannelRequest) ProtoMessage() {}
func (*CreateChannelRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *CreateChannelRequest) GetApplicationKey() string {
if m != nil && m.ApplicationKey != nil {
@ -104,13 +114,14 @@ func (m *CreateChannelRequest) GetDurationMinutes() int32 {
type CreateChannelResponse struct {
Token *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
DurationMinutes *int32 `protobuf:"varint,3,opt,name=duration_minutes" json:"duration_minutes,omitempty"`
DurationMinutes *int32 `protobuf:"varint,3,opt,name=duration_minutes,json=durationMinutes" json:"duration_minutes,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateChannelResponse) Reset() { *m = CreateChannelResponse{} }
func (m *CreateChannelResponse) String() string { return proto.CompactTextString(m) }
func (*CreateChannelResponse) ProtoMessage() {}
func (m *CreateChannelResponse) Reset() { *m = CreateChannelResponse{} }
func (m *CreateChannelResponse) String() string { return proto.CompactTextString(m) }
func (*CreateChannelResponse) ProtoMessage() {}
func (*CreateChannelResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *CreateChannelResponse) GetToken() string {
if m != nil && m.Token != nil {
@ -127,14 +138,15 @@ func (m *CreateChannelResponse) GetDurationMinutes() int32 {
}
type SendMessageRequest struct {
ApplicationKey *string `protobuf:"bytes,1,req,name=application_key" json:"application_key,omitempty"`
ApplicationKey *string `protobuf:"bytes,1,req,name=application_key,json=applicationKey" json:"application_key,omitempty"`
Message *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SendMessageRequest) Reset() { *m = SendMessageRequest{} }
func (m *SendMessageRequest) String() string { return proto.CompactTextString(m) }
func (*SendMessageRequest) ProtoMessage() {}
func (m *SendMessageRequest) Reset() { *m = SendMessageRequest{} }
func (m *SendMessageRequest) String() string { return proto.CompactTextString(m) }
func (*SendMessageRequest) ProtoMessage() {}
func (*SendMessageRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *SendMessageRequest) GetApplicationKey() string {
if m != nil && m.ApplicationKey != nil {
@ -151,4 +163,39 @@ func (m *SendMessageRequest) GetMessage() string {
}
func init() {
proto.RegisterType((*ChannelServiceError)(nil), "appengine.ChannelServiceError")
proto.RegisterType((*CreateChannelRequest)(nil), "appengine.CreateChannelRequest")
proto.RegisterType((*CreateChannelResponse)(nil), "appengine.CreateChannelResponse")
proto.RegisterType((*SendMessageRequest)(nil), "appengine.SendMessageRequest")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/channel/channel_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 355 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xcd, 0xee, 0xd2, 0x40,
0x14, 0xc5, 0x6d, 0xff, 0x22, 0xe9, 0x35, 0x81, 0x66, 0xc0, 0xd8, 0x95, 0x21, 0xdd, 0x88, 0x1b,
0x78, 0x86, 0xa1, 0x9d, 0x68, 0xd3, 0xd2, 0xe2, 0x14, 0xfc, 0xda, 0x4c, 0x26, 0x70, 0x53, 0x2b,
0x65, 0xa6, 0x4e, 0x8b, 0x09, 0x4f, 0xe1, 0x63, 0xf8, 0x9a, 0x26, 0x14, 0x88, 0x21, 0x6c, 0x5c,
0xcd, 0x9c, 0x93, 0xdf, 0x39, 0x33, 0x37, 0x17, 0x16, 0x85, 0xd6, 0x45, 0x85, 0xb3, 0x42, 0x57,
0x52, 0x15, 0x33, 0x6d, 0x8a, 0xb9, 0xac, 0x6b, 0x54, 0x45, 0xa9, 0x70, 0x5e, 0xaa, 0x16, 0x8d,
0x92, 0xd5, 0x7c, 0xfb, 0x5d, 0x2a, 0x85, 0xb7, 0x53, 0x34, 0x68, 0x7e, 0x95, 0x5b, 0x9c, 0xd5,
0x46, 0xb7, 0x9a, 0x38, 0xb7, 0x84, 0xff, 0xc7, 0x82, 0x51, 0xd0, 0x41, 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c3, 0xe6, 0xa7, 0xc7, 0xcd, 0x9f, 0x81, 0xe4, 0xa8, 0x76, 0x4b, 0x6c,
0x1a, 0x59, 0xe0, 0x7f, 0xcf, 0xe0, 0x41, 0xff, 0xd0, 0x45, 0x3d, 0xfb, 0x0c, 0x5c, 0xe5, 0xc2,
0xf9, 0xd6, 0xbf, 0x2c, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x0a, 0x77, 0x06, 0x23,
0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -529,6 +529,16 @@ message BeginTransactionRequest {
required string app = 1;
optional bool allow_multiple_eg = 2 [default = false];
optional string database_id = 4;
enum TransactionMode {
UNKNOWN = 0;
READ_ONLY = 1;
READ_WRITE = 2;
}
optional TransactionMode mode = 5 [default = UNKNOWN];
optional Transaction previous_transaction = 7;
}
message CommitResponse {

View file

@ -13,15 +13,45 @@ import (
)
func DefaultVersionHostname(ctx netcontext.Context) string {
return appengine.DefaultVersionHostname(fromContext(ctx))
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
return appengine.DefaultVersionHostname(c)
}
func RequestID(ctx netcontext.Context) string { return appengine.RequestID(fromContext(ctx)) }
func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() }
func ServerSoftware() string { return appengine.ServerSoftware() }
func ModuleName(ctx netcontext.Context) string { return appengine.ModuleName(fromContext(ctx)) }
func VersionID(ctx netcontext.Context) string { return appengine.VersionID(fromContext(ctx)) }
func InstanceID() string { return appengine.InstanceID() }
func IsDevAppServer() bool { return appengine.IsDevAppServer() }
func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() }
func ServerSoftware() string { return appengine.ServerSoftware() }
func InstanceID() string { return appengine.InstanceID() }
func IsDevAppServer() bool { return appengine.IsDevAppServer() }
func fullyQualifiedAppID(ctx netcontext.Context) string { return fromContext(ctx).FullyQualifiedAppID() }
func RequestID(ctx netcontext.Context) string {
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
return appengine.RequestID(c)
}
func ModuleName(ctx netcontext.Context) string {
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
return appengine.ModuleName(c)
}
func VersionID(ctx netcontext.Context) string {
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
return appengine.VersionID(c)
}
func fullyQualifiedAppID(ctx netcontext.Context) string {
c := fromContext(ctx)
if c == nil {
panic(errNotAppEngineContext)
}
return c.FullyQualifiedAppID()
}

View file

@ -23,7 +23,11 @@ const (
)
func ctxHeaders(ctx netcontext.Context) http.Header {
return fromContext(ctx).Request().Header
c := fromContext(ctx)
if c == nil {
return nil
}
return c.Request().Header
}
func DefaultVersionHostname(ctx netcontext.Context) string {

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/image/images_service.proto
// DO NOT EDIT!
/*
Package image is a generated protocol buffer package.
@ -40,6 +39,12 @@ 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
type ImagesServiceError_ErrorCode int32
const (
@ -90,6 +95,9 @@ func (x *ImagesServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = ImagesServiceError_ErrorCode(value)
return nil
}
func (ImagesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type ImagesServiceTransform_Type int32
@ -135,6 +143,9 @@ func (x *ImagesServiceTransform_Type) UnmarshalJSON(data []byte) error {
*x = ImagesServiceTransform_Type(value)
return nil
}
func (ImagesServiceTransform_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0}
}
type InputSettings_ORIENTATION_CORRECTION_TYPE int32
@ -168,6 +179,9 @@ func (x *InputSettings_ORIENTATION_CORRECTION_TYPE) UnmarshalJSON(data []byte) e
*x = InputSettings_ORIENTATION_CORRECTION_TYPE(value)
return nil
}
func (InputSettings_ORIENTATION_CORRECTION_TYPE) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{4, 0}
}
type OutputSettings_MIME_TYPE int32
@ -204,6 +218,7 @@ func (x *OutputSettings_MIME_TYPE) UnmarshalJSON(data []byte) error {
*x = OutputSettings_MIME_TYPE(value)
return nil
}
func (OutputSettings_MIME_TYPE) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{5, 0} }
type CompositeImageOptions_ANCHOR int32
@ -258,44 +273,50 @@ func (x *CompositeImageOptions_ANCHOR) UnmarshalJSON(data []byte) error {
*x = CompositeImageOptions_ANCHOR(value)
return nil
}
func (CompositeImageOptions_ANCHOR) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{8, 0}
}
type ImagesServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesServiceError) Reset() { *m = ImagesServiceError{} }
func (m *ImagesServiceError) String() string { return proto.CompactTextString(m) }
func (*ImagesServiceError) ProtoMessage() {}
func (m *ImagesServiceError) Reset() { *m = ImagesServiceError{} }
func (m *ImagesServiceError) String() string { return proto.CompactTextString(m) }
func (*ImagesServiceError) ProtoMessage() {}
func (*ImagesServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type ImagesServiceTransform struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesServiceTransform) Reset() { *m = ImagesServiceTransform{} }
func (m *ImagesServiceTransform) String() string { return proto.CompactTextString(m) }
func (*ImagesServiceTransform) ProtoMessage() {}
func (m *ImagesServiceTransform) Reset() { *m = ImagesServiceTransform{} }
func (m *ImagesServiceTransform) String() string { return proto.CompactTextString(m) }
func (*ImagesServiceTransform) ProtoMessage() {}
func (*ImagesServiceTransform) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type Transform struct {
Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"`
Height *int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"`
CropToFit *bool `protobuf:"varint,11,opt,name=crop_to_fit,def=0" json:"crop_to_fit,omitempty"`
CropOffsetX *float32 `protobuf:"fixed32,12,opt,name=crop_offset_x,def=0.5" json:"crop_offset_x,omitempty"`
CropOffsetY *float32 `protobuf:"fixed32,13,opt,name=crop_offset_y,def=0.5" json:"crop_offset_y,omitempty"`
CropToFit *bool `protobuf:"varint,11,opt,name=crop_to_fit,json=cropToFit,def=0" json:"crop_to_fit,omitempty"`
CropOffsetX *float32 `protobuf:"fixed32,12,opt,name=crop_offset_x,json=cropOffsetX,def=0.5" json:"crop_offset_x,omitempty"`
CropOffsetY *float32 `protobuf:"fixed32,13,opt,name=crop_offset_y,json=cropOffsetY,def=0.5" json:"crop_offset_y,omitempty"`
Rotate *int32 `protobuf:"varint,3,opt,name=rotate,def=0" json:"rotate,omitempty"`
HorizontalFlip *bool `protobuf:"varint,4,opt,name=horizontal_flip,def=0" json:"horizontal_flip,omitempty"`
VerticalFlip *bool `protobuf:"varint,5,opt,name=vertical_flip,def=0" json:"vertical_flip,omitempty"`
CropLeftX *float32 `protobuf:"fixed32,6,opt,name=crop_left_x,def=0" json:"crop_left_x,omitempty"`
CropTopY *float32 `protobuf:"fixed32,7,opt,name=crop_top_y,def=0" json:"crop_top_y,omitempty"`
CropRightX *float32 `protobuf:"fixed32,8,opt,name=crop_right_x,def=1" json:"crop_right_x,omitempty"`
CropBottomY *float32 `protobuf:"fixed32,9,opt,name=crop_bottom_y,def=1" json:"crop_bottom_y,omitempty"`
HorizontalFlip *bool `protobuf:"varint,4,opt,name=horizontal_flip,json=horizontalFlip,def=0" json:"horizontal_flip,omitempty"`
VerticalFlip *bool `protobuf:"varint,5,opt,name=vertical_flip,json=verticalFlip,def=0" json:"vertical_flip,omitempty"`
CropLeftX *float32 `protobuf:"fixed32,6,opt,name=crop_left_x,json=cropLeftX,def=0" json:"crop_left_x,omitempty"`
CropTopY *float32 `protobuf:"fixed32,7,opt,name=crop_top_y,json=cropTopY,def=0" json:"crop_top_y,omitempty"`
CropRightX *float32 `protobuf:"fixed32,8,opt,name=crop_right_x,json=cropRightX,def=1" json:"crop_right_x,omitempty"`
CropBottomY *float32 `protobuf:"fixed32,9,opt,name=crop_bottom_y,json=cropBottomY,def=1" json:"crop_bottom_y,omitempty"`
Autolevels *bool `protobuf:"varint,10,opt,name=autolevels,def=0" json:"autolevels,omitempty"`
AllowStretch *bool `protobuf:"varint,14,opt,name=allow_stretch,def=0" json:"allow_stretch,omitempty"`
AllowStretch *bool `protobuf:"varint,14,opt,name=allow_stretch,json=allowStretch,def=0" json:"allow_stretch,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Transform) Reset() { *m = Transform{} }
func (m *Transform) String() string { return proto.CompactTextString(m) }
func (*Transform) ProtoMessage() {}
func (m *Transform) Reset() { *m = Transform{} }
func (m *Transform) String() string { return proto.CompactTextString(m) }
func (*Transform) ProtoMessage() {}
func (*Transform) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
const Default_Transform_CropToFit bool = false
const Default_Transform_CropOffsetX float32 = 0.5
@ -410,15 +431,16 @@ func (m *Transform) GetAllowStretch() bool {
type ImageData struct {
Content []byte `protobuf:"bytes,1,req,name=content" json:"content,omitempty"`
BlobKey *string `protobuf:"bytes,2,opt,name=blob_key" json:"blob_key,omitempty"`
BlobKey *string `protobuf:"bytes,2,opt,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
Width *int32 `protobuf:"varint,3,opt,name=width" json:"width,omitempty"`
Height *int32 `protobuf:"varint,4,opt,name=height" json:"height,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ImageData) Reset() { *m = ImageData{} }
func (m *ImageData) String() string { return proto.CompactTextString(m) }
func (*ImageData) ProtoMessage() {}
func (m *ImageData) Reset() { *m = ImageData{} }
func (m *ImageData) String() string { return proto.CompactTextString(m) }
func (*ImageData) ProtoMessage() {}
func (*ImageData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *ImageData) GetContent() []byte {
if m != nil {
@ -449,15 +471,16 @@ func (m *ImageData) GetHeight() int32 {
}
type InputSettings struct {
CorrectExifOrientation *InputSettings_ORIENTATION_CORRECTION_TYPE `protobuf:"varint,1,opt,name=correct_exif_orientation,enum=appengine.InputSettings_ORIENTATION_CORRECTION_TYPE,def=0" json:"correct_exif_orientation,omitempty"`
ParseMetadata *bool `protobuf:"varint,2,opt,name=parse_metadata,def=0" json:"parse_metadata,omitempty"`
TransparentSubstitutionRgb *int32 `protobuf:"varint,3,opt,name=transparent_substitution_rgb" json:"transparent_substitution_rgb,omitempty"`
CorrectExifOrientation *InputSettings_ORIENTATION_CORRECTION_TYPE `protobuf:"varint,1,opt,name=correct_exif_orientation,json=correctExifOrientation,enum=appengine.InputSettings_ORIENTATION_CORRECTION_TYPE,def=0" json:"correct_exif_orientation,omitempty"`
ParseMetadata *bool `protobuf:"varint,2,opt,name=parse_metadata,json=parseMetadata,def=0" json:"parse_metadata,omitempty"`
TransparentSubstitutionRgb *int32 `protobuf:"varint,3,opt,name=transparent_substitution_rgb,json=transparentSubstitutionRgb" json:"transparent_substitution_rgb,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *InputSettings) Reset() { *m = InputSettings{} }
func (m *InputSettings) String() string { return proto.CompactTextString(m) }
func (*InputSettings) ProtoMessage() {}
func (m *InputSettings) Reset() { *m = InputSettings{} }
func (m *InputSettings) String() string { return proto.CompactTextString(m) }
func (*InputSettings) ProtoMessage() {}
func (*InputSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
const Default_InputSettings_CorrectExifOrientation InputSettings_ORIENTATION_CORRECTION_TYPE = InputSettings_UNCHANGED_ORIENTATION
const Default_InputSettings_ParseMetadata bool = false
@ -484,14 +507,15 @@ func (m *InputSettings) GetTransparentSubstitutionRgb() int32 {
}
type OutputSettings struct {
MimeType *OutputSettings_MIME_TYPE `protobuf:"varint,1,opt,name=mime_type,enum=appengine.OutputSettings_MIME_TYPE,def=0" json:"mime_type,omitempty"`
MimeType *OutputSettings_MIME_TYPE `protobuf:"varint,1,opt,name=mime_type,json=mimeType,enum=appengine.OutputSettings_MIME_TYPE,def=0" json:"mime_type,omitempty"`
Quality *int32 `protobuf:"varint,2,opt,name=quality" json:"quality,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *OutputSettings) Reset() { *m = OutputSettings{} }
func (m *OutputSettings) String() string { return proto.CompactTextString(m) }
func (*OutputSettings) ProtoMessage() {}
func (m *OutputSettings) Reset() { *m = OutputSettings{} }
func (m *OutputSettings) String() string { return proto.CompactTextString(m) }
func (*OutputSettings) ProtoMessage() {}
func (*OutputSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
const Default_OutputSettings_MimeType OutputSettings_MIME_TYPE = OutputSettings_PNG
@ -517,9 +541,10 @@ type ImagesTransformRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesTransformRequest) Reset() { *m = ImagesTransformRequest{} }
func (m *ImagesTransformRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesTransformRequest) ProtoMessage() {}
func (m *ImagesTransformRequest) Reset() { *m = ImagesTransformRequest{} }
func (m *ImagesTransformRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesTransformRequest) ProtoMessage() {}
func (*ImagesTransformRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *ImagesTransformRequest) GetImage() *ImageData {
if m != nil {
@ -551,13 +576,14 @@ func (m *ImagesTransformRequest) GetInput() *InputSettings {
type ImagesTransformResponse struct {
Image *ImageData `protobuf:"bytes,1,req,name=image" json:"image,omitempty"`
SourceMetadata *string `protobuf:"bytes,2,opt,name=source_metadata" json:"source_metadata,omitempty"`
SourceMetadata *string `protobuf:"bytes,2,opt,name=source_metadata,json=sourceMetadata" json:"source_metadata,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesTransformResponse) Reset() { *m = ImagesTransformResponse{} }
func (m *ImagesTransformResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesTransformResponse) ProtoMessage() {}
func (m *ImagesTransformResponse) Reset() { *m = ImagesTransformResponse{} }
func (m *ImagesTransformResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesTransformResponse) ProtoMessage() {}
func (*ImagesTransformResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *ImagesTransformResponse) GetImage() *ImageData {
if m != nil {
@ -574,17 +600,18 @@ func (m *ImagesTransformResponse) GetSourceMetadata() string {
}
type CompositeImageOptions struct {
SourceIndex *int32 `protobuf:"varint,1,req,name=source_index" json:"source_index,omitempty"`
XOffset *int32 `protobuf:"varint,2,req,name=x_offset" json:"x_offset,omitempty"`
YOffset *int32 `protobuf:"varint,3,req,name=y_offset" json:"y_offset,omitempty"`
SourceIndex *int32 `protobuf:"varint,1,req,name=source_index,json=sourceIndex" json:"source_index,omitempty"`
XOffset *int32 `protobuf:"varint,2,req,name=x_offset,json=xOffset" json:"x_offset,omitempty"`
YOffset *int32 `protobuf:"varint,3,req,name=y_offset,json=yOffset" json:"y_offset,omitempty"`
Opacity *float32 `protobuf:"fixed32,4,req,name=opacity" json:"opacity,omitempty"`
Anchor *CompositeImageOptions_ANCHOR `protobuf:"varint,5,req,name=anchor,enum=appengine.CompositeImageOptions_ANCHOR" json:"anchor,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CompositeImageOptions) Reset() { *m = CompositeImageOptions{} }
func (m *CompositeImageOptions) String() string { return proto.CompactTextString(m) }
func (*CompositeImageOptions) ProtoMessage() {}
func (m *CompositeImageOptions) Reset() { *m = CompositeImageOptions{} }
func (m *CompositeImageOptions) String() string { return proto.CompactTextString(m) }
func (*CompositeImageOptions) ProtoMessage() {}
func (*CompositeImageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *CompositeImageOptions) GetSourceIndex() int32 {
if m != nil && m.SourceIndex != nil {
@ -629,9 +656,10 @@ type ImagesCanvas struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesCanvas) Reset() { *m = ImagesCanvas{} }
func (m *ImagesCanvas) String() string { return proto.CompactTextString(m) }
func (*ImagesCanvas) ProtoMessage() {}
func (m *ImagesCanvas) Reset() { *m = ImagesCanvas{} }
func (m *ImagesCanvas) String() string { return proto.CompactTextString(m) }
func (*ImagesCanvas) ProtoMessage() {}
func (*ImagesCanvas) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
const Default_ImagesCanvas_Color int32 = -1
@ -670,9 +698,10 @@ type ImagesCompositeRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesCompositeRequest) Reset() { *m = ImagesCompositeRequest{} }
func (m *ImagesCompositeRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesCompositeRequest) ProtoMessage() {}
func (m *ImagesCompositeRequest) Reset() { *m = ImagesCompositeRequest{} }
func (m *ImagesCompositeRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesCompositeRequest) ProtoMessage() {}
func (*ImagesCompositeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *ImagesCompositeRequest) GetImage() []*ImageData {
if m != nil {
@ -700,9 +729,10 @@ type ImagesCompositeResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesCompositeResponse) Reset() { *m = ImagesCompositeResponse{} }
func (m *ImagesCompositeResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesCompositeResponse) ProtoMessage() {}
func (m *ImagesCompositeResponse) Reset() { *m = ImagesCompositeResponse{} }
func (m *ImagesCompositeResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesCompositeResponse) ProtoMessage() {}
func (*ImagesCompositeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *ImagesCompositeResponse) GetImage() *ImageData {
if m != nil {
@ -716,9 +746,10 @@ type ImagesHistogramRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesHistogramRequest) Reset() { *m = ImagesHistogramRequest{} }
func (m *ImagesHistogramRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogramRequest) ProtoMessage() {}
func (m *ImagesHistogramRequest) Reset() { *m = ImagesHistogramRequest{} }
func (m *ImagesHistogramRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogramRequest) ProtoMessage() {}
func (*ImagesHistogramRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *ImagesHistogramRequest) GetImage() *ImageData {
if m != nil {
@ -734,9 +765,10 @@ type ImagesHistogram struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesHistogram) Reset() { *m = ImagesHistogram{} }
func (m *ImagesHistogram) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogram) ProtoMessage() {}
func (m *ImagesHistogram) Reset() { *m = ImagesHistogram{} }
func (m *ImagesHistogram) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogram) ProtoMessage() {}
func (*ImagesHistogram) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *ImagesHistogram) GetRed() []int32 {
if m != nil {
@ -764,9 +796,10 @@ type ImagesHistogramResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesHistogramResponse) Reset() { *m = ImagesHistogramResponse{} }
func (m *ImagesHistogramResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogramResponse) ProtoMessage() {}
func (m *ImagesHistogramResponse) Reset() { *m = ImagesHistogramResponse{} }
func (m *ImagesHistogramResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesHistogramResponse) ProtoMessage() {}
func (*ImagesHistogramResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *ImagesHistogramResponse) GetHistogram() *ImagesHistogram {
if m != nil {
@ -776,14 +809,15 @@ func (m *ImagesHistogramResponse) GetHistogram() *ImagesHistogram {
}
type ImagesGetUrlBaseRequest struct {
BlobKey *string `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
CreateSecureUrl *bool `protobuf:"varint,2,opt,name=create_secure_url,def=0" json:"create_secure_url,omitempty"`
BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
CreateSecureUrl *bool `protobuf:"varint,2,opt,name=create_secure_url,json=createSecureUrl,def=0" json:"create_secure_url,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesGetUrlBaseRequest) Reset() { *m = ImagesGetUrlBaseRequest{} }
func (m *ImagesGetUrlBaseRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesGetUrlBaseRequest) ProtoMessage() {}
func (m *ImagesGetUrlBaseRequest) Reset() { *m = ImagesGetUrlBaseRequest{} }
func (m *ImagesGetUrlBaseRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesGetUrlBaseRequest) ProtoMessage() {}
func (*ImagesGetUrlBaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
const Default_ImagesGetUrlBaseRequest_CreateSecureUrl bool = false
@ -806,9 +840,10 @@ type ImagesGetUrlBaseResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesGetUrlBaseResponse) Reset() { *m = ImagesGetUrlBaseResponse{} }
func (m *ImagesGetUrlBaseResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesGetUrlBaseResponse) ProtoMessage() {}
func (m *ImagesGetUrlBaseResponse) Reset() { *m = ImagesGetUrlBaseResponse{} }
func (m *ImagesGetUrlBaseResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesGetUrlBaseResponse) ProtoMessage() {}
func (*ImagesGetUrlBaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *ImagesGetUrlBaseResponse) GetUrl() string {
if m != nil && m.Url != nil {
@ -818,13 +853,14 @@ func (m *ImagesGetUrlBaseResponse) GetUrl() string {
}
type ImagesDeleteUrlBaseRequest struct {
BlobKey *string `protobuf:"bytes,1,req,name=blob_key" json:"blob_key,omitempty"`
BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesDeleteUrlBaseRequest) Reset() { *m = ImagesDeleteUrlBaseRequest{} }
func (m *ImagesDeleteUrlBaseRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesDeleteUrlBaseRequest) ProtoMessage() {}
func (m *ImagesDeleteUrlBaseRequest) Reset() { *m = ImagesDeleteUrlBaseRequest{} }
func (m *ImagesDeleteUrlBaseRequest) String() string { return proto.CompactTextString(m) }
func (*ImagesDeleteUrlBaseRequest) ProtoMessage() {}
func (*ImagesDeleteUrlBaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
func (m *ImagesDeleteUrlBaseRequest) GetBlobKey() string {
if m != nil && m.BlobKey != nil {
@ -837,9 +873,129 @@ type ImagesDeleteUrlBaseResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ImagesDeleteUrlBaseResponse) Reset() { *m = ImagesDeleteUrlBaseResponse{} }
func (m *ImagesDeleteUrlBaseResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesDeleteUrlBaseResponse) ProtoMessage() {}
func (m *ImagesDeleteUrlBaseResponse) Reset() { *m = ImagesDeleteUrlBaseResponse{} }
func (m *ImagesDeleteUrlBaseResponse) String() string { return proto.CompactTextString(m) }
func (*ImagesDeleteUrlBaseResponse) ProtoMessage() {}
func (*ImagesDeleteUrlBaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func init() {
proto.RegisterType((*ImagesServiceError)(nil), "appengine.ImagesServiceError")
proto.RegisterType((*ImagesServiceTransform)(nil), "appengine.ImagesServiceTransform")
proto.RegisterType((*Transform)(nil), "appengine.Transform")
proto.RegisterType((*ImageData)(nil), "appengine.ImageData")
proto.RegisterType((*InputSettings)(nil), "appengine.InputSettings")
proto.RegisterType((*OutputSettings)(nil), "appengine.OutputSettings")
proto.RegisterType((*ImagesTransformRequest)(nil), "appengine.ImagesTransformRequest")
proto.RegisterType((*ImagesTransformResponse)(nil), "appengine.ImagesTransformResponse")
proto.RegisterType((*CompositeImageOptions)(nil), "appengine.CompositeImageOptions")
proto.RegisterType((*ImagesCanvas)(nil), "appengine.ImagesCanvas")
proto.RegisterType((*ImagesCompositeRequest)(nil), "appengine.ImagesCompositeRequest")
proto.RegisterType((*ImagesCompositeResponse)(nil), "appengine.ImagesCompositeResponse")
proto.RegisterType((*ImagesHistogramRequest)(nil), "appengine.ImagesHistogramRequest")
proto.RegisterType((*ImagesHistogram)(nil), "appengine.ImagesHistogram")
proto.RegisterType((*ImagesHistogramResponse)(nil), "appengine.ImagesHistogramResponse")
proto.RegisterType((*ImagesGetUrlBaseRequest)(nil), "appengine.ImagesGetUrlBaseRequest")
proto.RegisterType((*ImagesGetUrlBaseResponse)(nil), "appengine.ImagesGetUrlBaseResponse")
proto.RegisterType((*ImagesDeleteUrlBaseRequest)(nil), "appengine.ImagesDeleteUrlBaseRequest")
proto.RegisterType((*ImagesDeleteUrlBaseResponse)(nil), "appengine.ImagesDeleteUrlBaseResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/image/images_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 1460 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0xe3, 0xc6,
0x15, 0x5e, 0x52, 0xff, 0xc7, 0xb2, 0xcc, 0x9d, 0xec, 0x0f, 0x77, 0x93, 0xa2, 0x0a, 0x83, 0xc5,
0x1a, 0x41, 0x2a, 0xaf, 0x8d, 0x16, 0x2d, 0x7c, 0x93, 0xea, 0x87, 0x92, 0x99, 0x95, 0x44, 0x75,
0x44, 0xa7, 0xeb, 0xbd, 0x19, 0xd0, 0xf2, 0x48, 0x26, 0x4a, 0x73, 0x98, 0xe1, 0xc8, 0xb1, 0x7a,
0x51, 0xf4, 0xa6, 0x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, 0x5e, 0x7e, 0xd0, 0xaa, 0x5b, 0xb3, 0x5b,
0xb0, 0xb5, 0xca, 0x9d, 0x8e, 0xa8, 0x38, 0xe5, 0x61, 0xcf, 0x4f, 0xb6, 0x8f, 0x5c, 0xdc, 0xb5,
0xd2, 0x67, 0x61, 0xd7, 0x1e, 0xc2, 0xe3, 0x05, 0xa7, 0xbe, 0xa0, 0x24, 0xa1, 0x8b, 0x35, 0xa7,
0x64, 0xcd, 0xc3, 0xbb, 0x6b, 0x6a, 0x2f, 0xd5, 0xcf, 0x95, 0xfa, 0x94, 0x87, 0xd6, 0x57, 0x60,
0x7e, 0x18, 0x28, 0x4b, 0xdf, 0x80, 0x92, 0x74, 0x90, 0x06, 0x91, 0x47, 0xeb, 0xd7, 0xf0, 0x32,
0x45, 0x0f, 0x68, 0x48, 0x05, 0xfd, 0xbf, 0x33, 0xb3, 0x7e, 0x06, 0x9f, 0x3e, 0x68, 0x98, 0x46,
0xea, 0xd5, 0xde, 0xa7, 0x6f, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x74, 0x30, 0x89,
0x1d, 0x0c, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/log/log_service.proto
// DO NOT EDIT!
/*
Package log is a generated protocol buffer package.
@ -35,6 +34,12 @@ 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
type LogServiceError_ErrorCode int32
const (
@ -70,25 +75,28 @@ func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = LogServiceError_ErrorCode(value)
return nil
}
func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
type LogServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *LogServiceError) Reset() { *m = LogServiceError{} }
func (m *LogServiceError) String() string { return proto.CompactTextString(m) }
func (*LogServiceError) ProtoMessage() {}
func (m *LogServiceError) Reset() { *m = LogServiceError{} }
func (m *LogServiceError) String() string { return proto.CompactTextString(m) }
func (*LogServiceError) ProtoMessage() {}
func (*LogServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type UserAppLogLine struct {
TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec" json:"timestamp_usec,omitempty"`
TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"`
Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} }
func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) }
func (*UserAppLogLine) ProtoMessage() {}
func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} }
func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) }
func (*UserAppLogLine) ProtoMessage() {}
func (*UserAppLogLine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *UserAppLogLine) GetTimestampUsec() int64 {
if m != nil && m.TimestampUsec != nil {
@ -112,13 +120,14 @@ func (m *UserAppLogLine) GetMessage() string {
}
type UserAppLogGroup struct {
LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line" json:"log_line,omitempty"`
LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} }
func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) }
func (*UserAppLogGroup) ProtoMessage() {}
func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} }
func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) }
func (*UserAppLogGroup) ProtoMessage() {}
func (*UserAppLogGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine {
if m != nil {
@ -132,9 +141,10 @@ type FlushRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *FlushRequest) Reset() { *m = FlushRequest{} }
func (m *FlushRequest) String() string { return proto.CompactTextString(m) }
func (*FlushRequest) ProtoMessage() {}
func (m *FlushRequest) Reset() { *m = FlushRequest{} }
func (m *FlushRequest) String() string { return proto.CompactTextString(m) }
func (*FlushRequest) ProtoMessage() {}
func (*FlushRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *FlushRequest) GetLogs() []byte {
if m != nil {
@ -148,9 +158,10 @@ type SetStatusRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} }
func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) }
func (*SetStatusRequest) ProtoMessage() {}
func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} }
func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) }
func (*SetStatusRequest) ProtoMessage() {}
func (*SetStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *SetStatusRequest) GetStatus() string {
if m != nil && m.Status != nil {
@ -160,13 +171,14 @@ func (m *SetStatusRequest) GetStatus() string {
}
type LogOffset struct {
RequestId []byte `protobuf:"bytes,1,opt,name=request_id" json:"request_id,omitempty"`
RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogOffset) Reset() { *m = LogOffset{} }
func (m *LogOffset) String() string { return proto.CompactTextString(m) }
func (*LogOffset) ProtoMessage() {}
func (m *LogOffset) Reset() { *m = LogOffset{} }
func (m *LogOffset) String() string { return proto.CompactTextString(m) }
func (*LogOffset) ProtoMessage() {}
func (*LogOffset) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *LogOffset) GetRequestId() []byte {
if m != nil {
@ -178,13 +190,14 @@ func (m *LogOffset) GetRequestId() []byte {
type LogLine struct {
Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"`
Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"`
LogMessage *string `protobuf:"bytes,3,req,name=log_message" json:"log_message,omitempty"`
LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogLine) Reset() { *m = LogLine{} }
func (m *LogLine) String() string { return proto.CompactTextString(m) }
func (*LogLine) ProtoMessage() {}
func (m *LogLine) Reset() { *m = LogLine{} }
func (m *LogLine) String() string { return proto.CompactTextString(m) }
func (*LogLine) ProtoMessage() {}
func (*LogLine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *LogLine) GetTime() int64 {
if m != nil && m.Time != nil {
@ -208,50 +221,51 @@ func (m *LogLine) GetLogMessage() string {
}
type RequestLog struct {
AppId *string `protobuf:"bytes,1,req,name=app_id" json:"app_id,omitempty"`
ModuleId *string `protobuf:"bytes,37,opt,name=module_id,def=default" json:"module_id,omitempty"`
VersionId *string `protobuf:"bytes,2,req,name=version_id" json:"version_id,omitempty"`
RequestId []byte `protobuf:"bytes,3,req,name=request_id" json:"request_id,omitempty"`
AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"`
RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"`
Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"`
Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"`
Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"`
StartTime *int64 `protobuf:"varint,6,req,name=start_time" json:"start_time,omitempty"`
EndTime *int64 `protobuf:"varint,7,req,name=end_time" json:"end_time,omitempty"`
StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"`
EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"`
Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"`
Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"`
Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"`
Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"`
HttpVersion *string `protobuf:"bytes,12,req,name=http_version" json:"http_version,omitempty"`
HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"`
Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"`
ResponseSize *int64 `protobuf:"varint,14,req,name=response_size" json:"response_size,omitempty"`
ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"`
Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"`
UserAgent *string `protobuf:"bytes,16,opt,name=user_agent" json:"user_agent,omitempty"`
UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry" json:"url_map_entry,omitempty"`
UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"`
UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"`
Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"`
ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles" json:"api_mcycles,omitempty"`
ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"`
Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"`
Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"`
TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name" json:"task_queue_name,omitempty"`
TaskName *string `protobuf:"bytes,23,opt,name=task_name" json:"task_name,omitempty"`
WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request" json:"was_loading_request,omitempty"`
PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time" json:"pending_time,omitempty"`
ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,def=-1" json:"replica_index,omitempty"`
TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"`
TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"`
WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"`
PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"`
ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"`
Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"`
CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key" json:"clone_key,omitempty"`
CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"`
Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"`
LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete" json:"lines_incomplete,omitempty"`
AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release" json:"app_engine_release,omitempty"`
ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason" json:"exit_reason,omitempty"`
WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time" json:"was_throttled_for_time,omitempty"`
WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests" json:"was_throttled_for_requests,omitempty"`
ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time" json:"throttled_time,omitempty"`
ServerName []byte `protobuf:"bytes,34,opt,name=server_name" json:"server_name,omitempty"`
LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"`
AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"`
ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"`
WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"`
WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"`
ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"`
ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *RequestLog) Reset() { *m = RequestLog{} }
func (m *RequestLog) String() string { return proto.CompactTextString(m) }
func (*RequestLog) ProtoMessage() {}
func (m *RequestLog) Reset() { *m = RequestLog{} }
func (m *RequestLog) String() string { return proto.CompactTextString(m) }
func (*RequestLog) ProtoMessage() {}
func (*RequestLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
const Default_RequestLog_ModuleId string = "default"
const Default_RequestLog_ReplicaIndex int32 = -1
@ -524,14 +538,15 @@ func (m *RequestLog) GetServerName() []byte {
}
type LogModuleVersion struct {
ModuleId *string `protobuf:"bytes,1,opt,name=module_id,def=default" json:"module_id,omitempty"`
VersionId *string `protobuf:"bytes,2,opt,name=version_id" json:"version_id,omitempty"`
ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"`
VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} }
func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) }
func (*LogModuleVersion) ProtoMessage() {}
func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} }
func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) }
func (*LogModuleVersion) ProtoMessage() {}
func (*LogModuleVersion) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
const Default_LogModuleVersion_ModuleId string = "default"
@ -550,31 +565,32 @@ func (m *LogModuleVersion) GetVersionId() string {
}
type LogReadRequest struct {
AppId *string `protobuf:"bytes,1,req,name=app_id" json:"app_id,omitempty"`
VersionId []string `protobuf:"bytes,2,rep,name=version_id" json:"version_id,omitempty"`
ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version" json:"module_version,omitempty"`
StartTime *int64 `protobuf:"varint,3,opt,name=start_time" json:"start_time,omitempty"`
EndTime *int64 `protobuf:"varint,4,opt,name=end_time" json:"end_time,omitempty"`
AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"`
StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"`
RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id" json:"request_id,omitempty"`
MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level" json:"minimum_log_level,omitempty"`
IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete" json:"include_incomplete,omitempty"`
RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"`
MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"`
IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"`
Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"`
CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex" json:"combined_log_regex,omitempty"`
HostRegex *string `protobuf:"bytes,15,opt,name=host_regex" json:"host_regex,omitempty"`
ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index" json:"replica_index,omitempty"`
IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs" json:"include_app_logs,omitempty"`
AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request" json:"app_logs_per_request,omitempty"`
IncludeHost *bool `protobuf:"varint,11,opt,name=include_host" json:"include_host,omitempty"`
IncludeAll *bool `protobuf:"varint,12,opt,name=include_all" json:"include_all,omitempty"`
CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator" json:"cache_iterator,omitempty"`
NumShards *int32 `protobuf:"varint,18,opt,name=num_shards" json:"num_shards,omitempty"`
CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"`
HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"`
ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"`
IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"`
AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"`
IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"`
IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"`
CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"`
NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogReadRequest) Reset() { *m = LogReadRequest{} }
func (m *LogReadRequest) String() string { return proto.CompactTextString(m) }
func (*LogReadRequest) ProtoMessage() {}
func (m *LogReadRequest) Reset() { *m = LogReadRequest{} }
func (m *LogReadRequest) String() string { return proto.CompactTextString(m) }
func (*LogReadRequest) ProtoMessage() {}
func (*LogReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *LogReadRequest) GetAppId() string {
if m != nil && m.AppId != nil {
@ -712,13 +728,14 @@ func (m *LogReadRequest) GetNumShards() int32 {
type LogReadResponse struct {
Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"`
Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"`
LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time" json:"last_end_time,omitempty"`
LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogReadResponse) Reset() { *m = LogReadResponse{} }
func (m *LogReadResponse) String() string { return proto.CompactTextString(m) }
func (*LogReadResponse) ProtoMessage() {}
func (m *LogReadResponse) Reset() { *m = LogReadResponse{} }
func (m *LogReadResponse) String() string { return proto.CompactTextString(m) }
func (*LogReadResponse) ProtoMessage() {}
func (*LogReadResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *LogReadResponse) GetLog() []*RequestLog {
if m != nil {
@ -742,18 +759,19 @@ func (m *LogReadResponse) GetLastEndTime() int64 {
}
type LogUsageRecord struct {
VersionId *string `protobuf:"bytes,1,opt,name=version_id" json:"version_id,omitempty"`
StartTime *int32 `protobuf:"varint,2,opt,name=start_time" json:"start_time,omitempty"`
EndTime *int32 `protobuf:"varint,3,opt,name=end_time" json:"end_time,omitempty"`
VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"`
StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
TotalSize *int64 `protobuf:"varint,5,opt,name=total_size" json:"total_size,omitempty"`
TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"`
Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} }
func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) }
func (*LogUsageRecord) ProtoMessage() {}
func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} }
func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) }
func (*LogUsageRecord) ProtoMessage() {}
func (*LogUsageRecord) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *LogUsageRecord) GetVersionId() string {
if m != nil && m.VersionId != nil {
@ -798,20 +816,21 @@ func (m *LogUsageRecord) GetRecords() int32 {
}
type LogUsageRequest struct {
AppId *string `protobuf:"bytes,1,req,name=app_id" json:"app_id,omitempty"`
VersionId []string `protobuf:"bytes,2,rep,name=version_id" json:"version_id,omitempty"`
StartTime *int32 `protobuf:"varint,3,opt,name=start_time" json:"start_time,omitempty"`
EndTime *int32 `protobuf:"varint,4,opt,name=end_time" json:"end_time,omitempty"`
ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,def=1" json:"resolution_hours,omitempty"`
CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions" json:"combine_versions,omitempty"`
UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version" json:"usage_version,omitempty"`
VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only" json:"versions_only,omitempty"`
AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"`
StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"`
CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"`
UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"`
VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} }
func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) }
func (*LogUsageRequest) ProtoMessage() {}
func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} }
func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) }
func (*LogUsageRequest) ProtoMessage() {}
func (*LogUsageRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
const Default_LogUsageRequest_ResolutionHours uint32 = 1
@ -877,9 +896,10 @@ type LogUsageResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} }
func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) }
func (*LogUsageResponse) ProtoMessage() {}
func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} }
func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) }
func (*LogUsageResponse) ProtoMessage() {}
func (*LogUsageResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *LogUsageResponse) GetUsage() []*LogUsageRecord {
if m != nil {
@ -896,4 +916,124 @@ func (m *LogUsageResponse) GetSummary() *LogUsageRecord {
}
func init() {
proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError")
proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine")
proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup")
proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest")
proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest")
proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset")
proto.RegisterType((*LogLine)(nil), "appengine.LogLine")
proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog")
proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion")
proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest")
proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse")
proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord")
proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest")
proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 1553 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6,
0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e,
0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40,
0x72, 0x3a, 0xd3, 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d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05,
0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd,
0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00,
0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/mail/mail_service.proto
// DO NOT EDIT!
/*
Package mail is a generated protocol buffer package.
@ -25,6 +24,12 @@ 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
type MailServiceError_ErrorCode int32
const (
@ -72,14 +77,18 @@ func (x *MailServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = MailServiceError_ErrorCode(value)
return nil
}
func (MailServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type MailServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MailServiceError) Reset() { *m = MailServiceError{} }
func (m *MailServiceError) String() string { return proto.CompactTextString(m) }
func (*MailServiceError) ProtoMessage() {}
func (m *MailServiceError) Reset() { *m = MailServiceError{} }
func (m *MailServiceError) String() string { return proto.CompactTextString(m) }
func (*MailServiceError) ProtoMessage() {}
func (*MailServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type MailAttachment struct {
FileName *string `protobuf:"bytes,1,req,name=FileName" json:"FileName,omitempty"`
@ -88,9 +97,10 @@ type MailAttachment struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MailAttachment) Reset() { *m = MailAttachment{} }
func (m *MailAttachment) String() string { return proto.CompactTextString(m) }
func (*MailAttachment) ProtoMessage() {}
func (m *MailAttachment) Reset() { *m = MailAttachment{} }
func (m *MailAttachment) String() string { return proto.CompactTextString(m) }
func (*MailAttachment) ProtoMessage() {}
func (*MailAttachment) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *MailAttachment) GetFileName() string {
if m != nil && m.FileName != nil {
@ -119,9 +129,10 @@ type MailHeader struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MailHeader) Reset() { *m = MailHeader{} }
func (m *MailHeader) String() string { return proto.CompactTextString(m) }
func (*MailHeader) ProtoMessage() {}
func (m *MailHeader) Reset() { *m = MailHeader{} }
func (m *MailHeader) String() string { return proto.CompactTextString(m) }
func (*MailHeader) ProtoMessage() {}
func (*MailHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *MailHeader) GetName() string {
if m != nil && m.Name != nil {
@ -151,9 +162,10 @@ type MailMessage struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MailMessage) Reset() { *m = MailMessage{} }
func (m *MailMessage) String() string { return proto.CompactTextString(m) }
func (*MailMessage) ProtoMessage() {}
func (m *MailMessage) Reset() { *m = MailMessage{} }
func (m *MailMessage) String() string { return proto.CompactTextString(m) }
func (*MailMessage) ProtoMessage() {}
func (*MailMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *MailMessage) GetSender() string {
if m != nil && m.Sender != nil {
@ -226,4 +238,46 @@ func (m *MailMessage) GetHeader() []*MailHeader {
}
func init() {
proto.RegisterType((*MailServiceError)(nil), "appengine.MailServiceError")
proto.RegisterType((*MailAttachment)(nil), "appengine.MailAttachment")
proto.RegisterType((*MailHeader)(nil), "appengine.MailHeader")
proto.RegisterType((*MailMessage)(nil), "appengine.MailMessage")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/mail/mail_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 480 bytes of a gzipped FileDescriptorProto
0x1f, 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e5, 0x56, 0xc3, 0x41, 0x4a, 0xbb, 0x0d, 0x07, 0x29, 0xf1, 0xc0, 0x9e, 0xa5,
0x29, 0xed, 0xd5, 0x0f, 0xa6, 0x34, 0xb3, 0x56, 0x37, 0xdf, 0x7e, 0x60, 0xaa, 0xa9, 0x53, 0x2f,
0x69, 0xd1, 0x64, 0x22, 0xf0, 0xa7, 0x9e, 0xa9, 0xcd, 0x1d, 0x3d, 0xab, 0xd7, 0x1c, 0xd9, 0x68,
0x73, 0xbd, 0x2d, 0x6a, 0xed, 0xbc, 0xd1, 0x5a, 0x26, 0x6f, 0x01, 0x4e, 0xc9, 0x52, 0x77, 0x68,
0x8f, 0xfb, 0xaf, 0x9f, 0x4d, 0x8e, 0x47, 0x33, 0xf9, 0x3f, 0x7a, 0xfe, 0x4f, 0x33, 0x79, 0x05,
0x4e, 0x13, 0x1a, 0x85, 0xda, 0xf6, 0xf4, 0x9e, 0xad, 0x11, 0xf9, 0xa1, 0x69, 0xe6, 0x5c, 0x77,
0xcd, 0x7d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xd3, 0x01, 0x27, 0xd0, 0x02, 0x00, 0x00,
}

View file

@ -22,7 +22,11 @@ func Main() {
port = s
}
if err := http.ListenAndServe(":"+port, http.HandlerFunc(handleHTTP)); err != nil {
host := ""
if IsDevAppServer() {
host = "127.0.0.1"
}
if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil {
log.Fatalf("http.ListenAndServe: %v", err)
}
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/memcache/memcache_service.proto
// DO NOT EDIT!
/*
Package memcache is a generated protocol buffer package.
@ -40,6 +39,12 @@ 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
type MemcacheServiceError_ErrorCode int32
const (
@ -81,6 +86,9 @@ func (x *MemcacheServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = MemcacheServiceError_ErrorCode(value)
return nil
}
func (MemcacheServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type MemcacheSetRequest_SetPolicy int32
@ -120,6 +128,9 @@ func (x *MemcacheSetRequest_SetPolicy) UnmarshalJSON(data []byte) error {
*x = MemcacheSetRequest_SetPolicy(value)
return nil
}
func (MemcacheSetRequest_SetPolicy) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{4, 0}
}
type MemcacheSetResponse_SetStatusCode int32
@ -159,6 +170,9 @@ func (x *MemcacheSetResponse_SetStatusCode) UnmarshalJSON(data []byte) error {
*x = MemcacheSetResponse_SetStatusCode(value)
return nil
}
func (MemcacheSetResponse_SetStatusCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{5, 0}
}
type MemcacheDeleteResponse_DeleteStatusCode int32
@ -192,6 +206,9 @@ func (x *MemcacheDeleteResponse_DeleteStatusCode) UnmarshalJSON(data []byte) err
*x = MemcacheDeleteResponse_DeleteStatusCode(value)
return nil
}
func (MemcacheDeleteResponse_DeleteStatusCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{7, 0}
}
type MemcacheIncrementRequest_Direction int32
@ -225,6 +242,9 @@ func (x *MemcacheIncrementRequest_Direction) UnmarshalJSON(data []byte) error {
*x = MemcacheIncrementRequest_Direction(value)
return nil
}
func (MemcacheIncrementRequest_Direction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{8, 0}
}
type MemcacheIncrementResponse_IncrementStatusCode int32
@ -261,27 +281,32 @@ func (x *MemcacheIncrementResponse_IncrementStatusCode) UnmarshalJSON(data []byt
*x = MemcacheIncrementResponse_IncrementStatusCode(value)
return nil
}
func (MemcacheIncrementResponse_IncrementStatusCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{9, 0}
}
type MemcacheServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheServiceError) Reset() { *m = MemcacheServiceError{} }
func (m *MemcacheServiceError) String() string { return proto.CompactTextString(m) }
func (*MemcacheServiceError) ProtoMessage() {}
func (m *MemcacheServiceError) Reset() { *m = MemcacheServiceError{} }
func (m *MemcacheServiceError) String() string { return proto.CompactTextString(m) }
func (*MemcacheServiceError) ProtoMessage() {}
func (*MemcacheServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type AppOverride struct {
AppId *string `protobuf:"bytes,1,req,name=app_id" json:"app_id,omitempty"`
NumMemcachegBackends *int32 `protobuf:"varint,2,opt,name=num_memcacheg_backends" json:"num_memcacheg_backends,omitempty"`
IgnoreShardlock *bool `protobuf:"varint,3,opt,name=ignore_shardlock" json:"ignore_shardlock,omitempty"`
MemcachePoolHint *string `protobuf:"bytes,4,opt,name=memcache_pool_hint" json:"memcache_pool_hint,omitempty"`
MemcacheShardingStrategy []byte `protobuf:"bytes,5,opt,name=memcache_sharding_strategy" json:"memcache_sharding_strategy,omitempty"`
AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"`
NumMemcachegBackends *int32 `protobuf:"varint,2,opt,name=num_memcacheg_backends,json=numMemcachegBackends" json:"num_memcacheg_backends,omitempty"`
IgnoreShardlock *bool `protobuf:"varint,3,opt,name=ignore_shardlock,json=ignoreShardlock" json:"ignore_shardlock,omitempty"`
MemcachePoolHint *string `protobuf:"bytes,4,opt,name=memcache_pool_hint,json=memcachePoolHint" json:"memcache_pool_hint,omitempty"`
MemcacheShardingStrategy []byte `protobuf:"bytes,5,opt,name=memcache_sharding_strategy,json=memcacheShardingStrategy" json:"memcache_sharding_strategy,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AppOverride) Reset() { *m = AppOverride{} }
func (m *AppOverride) String() string { return proto.CompactTextString(m) }
func (*AppOverride) ProtoMessage() {}
func (m *AppOverride) Reset() { *m = AppOverride{} }
func (m *AppOverride) String() string { return proto.CompactTextString(m) }
func (*AppOverride) ProtoMessage() {}
func (*AppOverride) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *AppOverride) GetAppId() string {
if m != nil && m.AppId != nil {
@ -320,15 +345,16 @@ func (m *AppOverride) GetMemcacheShardingStrategy() []byte {
type MemcacheGetRequest struct {
Key [][]byte `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
NameSpace *string `protobuf:"bytes,2,opt,name=name_space,def=" json:"name_space,omitempty"`
ForCas *bool `protobuf:"varint,4,opt,name=for_cas" json:"for_cas,omitempty"`
NameSpace *string `protobuf:"bytes,2,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
ForCas *bool `protobuf:"varint,4,opt,name=for_cas,json=forCas" json:"for_cas,omitempty"`
Override *AppOverride `protobuf:"bytes,5,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheGetRequest) Reset() { *m = MemcacheGetRequest{} }
func (m *MemcacheGetRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetRequest) ProtoMessage() {}
func (m *MemcacheGetRequest) Reset() { *m = MemcacheGetRequest{} }
func (m *MemcacheGetRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetRequest) ProtoMessage() {}
func (*MemcacheGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *MemcacheGetRequest) GetKey() [][]byte {
if m != nil {
@ -359,13 +385,14 @@ func (m *MemcacheGetRequest) GetOverride() *AppOverride {
}
type MemcacheGetResponse struct {
Item []*MemcacheGetResponse_Item `protobuf:"group,1,rep,name=Item" json:"item,omitempty"`
Item []*MemcacheGetResponse_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheGetResponse) Reset() { *m = MemcacheGetResponse{} }
func (m *MemcacheGetResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetResponse) ProtoMessage() {}
func (m *MemcacheGetResponse) Reset() { *m = MemcacheGetResponse{} }
func (m *MemcacheGetResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetResponse) ProtoMessage() {}
func (*MemcacheGetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *MemcacheGetResponse) GetItem() []*MemcacheGetResponse_Item {
if m != nil {
@ -378,14 +405,15 @@ type MemcacheGetResponse_Item struct {
Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"`
Flags *uint32 `protobuf:"fixed32,4,opt,name=flags" json:"flags,omitempty"`
CasId *uint64 `protobuf:"fixed64,5,opt,name=cas_id" json:"cas_id,omitempty"`
ExpiresInSeconds *int32 `protobuf:"varint,6,opt,name=expires_in_seconds" json:"expires_in_seconds,omitempty"`
CasId *uint64 `protobuf:"fixed64,5,opt,name=cas_id,json=casId" json:"cas_id,omitempty"`
ExpiresInSeconds *int32 `protobuf:"varint,6,opt,name=expires_in_seconds,json=expiresInSeconds" json:"expires_in_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheGetResponse_Item) Reset() { *m = MemcacheGetResponse_Item{} }
func (m *MemcacheGetResponse_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetResponse_Item) ProtoMessage() {}
func (m *MemcacheGetResponse_Item) Reset() { *m = MemcacheGetResponse_Item{} }
func (m *MemcacheGetResponse_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheGetResponse_Item) ProtoMessage() {}
func (*MemcacheGetResponse_Item) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
func (m *MemcacheGetResponse_Item) GetKey() []byte {
if m != nil {
@ -423,15 +451,16 @@ func (m *MemcacheGetResponse_Item) GetExpiresInSeconds() int32 {
}
type MemcacheSetRequest struct {
Item []*MemcacheSetRequest_Item `protobuf:"group,1,rep,name=Item" json:"item,omitempty"`
NameSpace *string `protobuf:"bytes,7,opt,name=name_space,def=" json:"name_space,omitempty"`
Item []*MemcacheSetRequest_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"`
NameSpace *string `protobuf:"bytes,7,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
Override *AppOverride `protobuf:"bytes,10,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheSetRequest) Reset() { *m = MemcacheSetRequest{} }
func (m *MemcacheSetRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetRequest) ProtoMessage() {}
func (m *MemcacheSetRequest) Reset() { *m = MemcacheSetRequest{} }
func (m *MemcacheSetRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetRequest) ProtoMessage() {}
func (*MemcacheSetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *MemcacheSetRequest) GetItem() []*MemcacheSetRequest_Item {
if m != nil {
@ -458,16 +487,17 @@ type MemcacheSetRequest_Item struct {
Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"`
Flags *uint32 `protobuf:"fixed32,4,opt,name=flags" json:"flags,omitempty"`
SetPolicy *MemcacheSetRequest_SetPolicy `protobuf:"varint,5,opt,name=set_policy,enum=appengine.MemcacheSetRequest_SetPolicy,def=1" json:"set_policy,omitempty"`
ExpirationTime *uint32 `protobuf:"fixed32,6,opt,name=expiration_time,def=0" json:"expiration_time,omitempty"`
CasId *uint64 `protobuf:"fixed64,8,opt,name=cas_id" json:"cas_id,omitempty"`
ForCas *bool `protobuf:"varint,9,opt,name=for_cas" json:"for_cas,omitempty"`
SetPolicy *MemcacheSetRequest_SetPolicy `protobuf:"varint,5,opt,name=set_policy,json=setPolicy,enum=appengine.MemcacheSetRequest_SetPolicy,def=1" json:"set_policy,omitempty"`
ExpirationTime *uint32 `protobuf:"fixed32,6,opt,name=expiration_time,json=expirationTime,def=0" json:"expiration_time,omitempty"`
CasId *uint64 `protobuf:"fixed64,8,opt,name=cas_id,json=casId" json:"cas_id,omitempty"`
ForCas *bool `protobuf:"varint,9,opt,name=for_cas,json=forCas" json:"for_cas,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheSetRequest_Item) Reset() { *m = MemcacheSetRequest_Item{} }
func (m *MemcacheSetRequest_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetRequest_Item) ProtoMessage() {}
func (m *MemcacheSetRequest_Item) Reset() { *m = MemcacheSetRequest_Item{} }
func (m *MemcacheSetRequest_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetRequest_Item) ProtoMessage() {}
func (*MemcacheSetRequest_Item) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
const Default_MemcacheSetRequest_Item_SetPolicy MemcacheSetRequest_SetPolicy = MemcacheSetRequest_SET
const Default_MemcacheSetRequest_Item_ExpirationTime uint32 = 0
@ -522,13 +552,14 @@ func (m *MemcacheSetRequest_Item) GetForCas() bool {
}
type MemcacheSetResponse struct {
SetStatus []MemcacheSetResponse_SetStatusCode `protobuf:"varint,1,rep,name=set_status,enum=appengine.MemcacheSetResponse_SetStatusCode" json:"set_status,omitempty"`
SetStatus []MemcacheSetResponse_SetStatusCode `protobuf:"varint,1,rep,name=set_status,json=setStatus,enum=appengine.MemcacheSetResponse_SetStatusCode" json:"set_status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheSetResponse) Reset() { *m = MemcacheSetResponse{} }
func (m *MemcacheSetResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetResponse) ProtoMessage() {}
func (m *MemcacheSetResponse) Reset() { *m = MemcacheSetResponse{} }
func (m *MemcacheSetResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheSetResponse) ProtoMessage() {}
func (*MemcacheSetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *MemcacheSetResponse) GetSetStatus() []MemcacheSetResponse_SetStatusCode {
if m != nil {
@ -538,15 +569,16 @@ func (m *MemcacheSetResponse) GetSetStatus() []MemcacheSetResponse_SetStatusCode
}
type MemcacheDeleteRequest struct {
Item []*MemcacheDeleteRequest_Item `protobuf:"group,1,rep,name=Item" json:"item,omitempty"`
NameSpace *string `protobuf:"bytes,4,opt,name=name_space,def=" json:"name_space,omitempty"`
Item []*MemcacheDeleteRequest_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"`
NameSpace *string `protobuf:"bytes,4,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
Override *AppOverride `protobuf:"bytes,5,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheDeleteRequest) Reset() { *m = MemcacheDeleteRequest{} }
func (m *MemcacheDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteRequest) ProtoMessage() {}
func (m *MemcacheDeleteRequest) Reset() { *m = MemcacheDeleteRequest{} }
func (m *MemcacheDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteRequest) ProtoMessage() {}
func (*MemcacheDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *MemcacheDeleteRequest) GetItem() []*MemcacheDeleteRequest_Item {
if m != nil {
@ -571,13 +603,14 @@ func (m *MemcacheDeleteRequest) GetOverride() *AppOverride {
type MemcacheDeleteRequest_Item struct {
Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
DeleteTime *uint32 `protobuf:"fixed32,3,opt,name=delete_time,def=0" json:"delete_time,omitempty"`
DeleteTime *uint32 `protobuf:"fixed32,3,opt,name=delete_time,json=deleteTime,def=0" json:"delete_time,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheDeleteRequest_Item) Reset() { *m = MemcacheDeleteRequest_Item{} }
func (m *MemcacheDeleteRequest_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteRequest_Item) ProtoMessage() {}
func (m *MemcacheDeleteRequest_Item) Reset() { *m = MemcacheDeleteRequest_Item{} }
func (m *MemcacheDeleteRequest_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteRequest_Item) ProtoMessage() {}
func (*MemcacheDeleteRequest_Item) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} }
const Default_MemcacheDeleteRequest_Item_DeleteTime uint32 = 0
@ -596,13 +629,14 @@ func (m *MemcacheDeleteRequest_Item) GetDeleteTime() uint32 {
}
type MemcacheDeleteResponse struct {
DeleteStatus []MemcacheDeleteResponse_DeleteStatusCode `protobuf:"varint,1,rep,name=delete_status,enum=appengine.MemcacheDeleteResponse_DeleteStatusCode" json:"delete_status,omitempty"`
DeleteStatus []MemcacheDeleteResponse_DeleteStatusCode `protobuf:"varint,1,rep,name=delete_status,json=deleteStatus,enum=appengine.MemcacheDeleteResponse_DeleteStatusCode" json:"delete_status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheDeleteResponse) Reset() { *m = MemcacheDeleteResponse{} }
func (m *MemcacheDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteResponse) ProtoMessage() {}
func (m *MemcacheDeleteResponse) Reset() { *m = MemcacheDeleteResponse{} }
func (m *MemcacheDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheDeleteResponse) ProtoMessage() {}
func (*MemcacheDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *MemcacheDeleteResponse) GetDeleteStatus() []MemcacheDeleteResponse_DeleteStatusCode {
if m != nil {
@ -613,18 +647,19 @@ func (m *MemcacheDeleteResponse) GetDeleteStatus() []MemcacheDeleteResponse_Dele
type MemcacheIncrementRequest struct {
Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
NameSpace *string `protobuf:"bytes,4,opt,name=name_space,def=" json:"name_space,omitempty"`
NameSpace *string `protobuf:"bytes,4,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
Delta *uint64 `protobuf:"varint,2,opt,name=delta,def=1" json:"delta,omitempty"`
Direction *MemcacheIncrementRequest_Direction `protobuf:"varint,3,opt,name=direction,enum=appengine.MemcacheIncrementRequest_Direction,def=1" json:"direction,omitempty"`
InitialValue *uint64 `protobuf:"varint,5,opt,name=initial_value" json:"initial_value,omitempty"`
InitialFlags *uint32 `protobuf:"fixed32,6,opt,name=initial_flags" json:"initial_flags,omitempty"`
InitialValue *uint64 `protobuf:"varint,5,opt,name=initial_value,json=initialValue" json:"initial_value,omitempty"`
InitialFlags *uint32 `protobuf:"fixed32,6,opt,name=initial_flags,json=initialFlags" json:"initial_flags,omitempty"`
Override *AppOverride `protobuf:"bytes,7,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheIncrementRequest) Reset() { *m = MemcacheIncrementRequest{} }
func (m *MemcacheIncrementRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheIncrementRequest) ProtoMessage() {}
func (m *MemcacheIncrementRequest) Reset() { *m = MemcacheIncrementRequest{} }
func (m *MemcacheIncrementRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheIncrementRequest) ProtoMessage() {}
func (*MemcacheIncrementRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
const Default_MemcacheIncrementRequest_Delta uint64 = 1
const Default_MemcacheIncrementRequest_Direction MemcacheIncrementRequest_Direction = MemcacheIncrementRequest_INCREMENT
@ -679,14 +714,15 @@ func (m *MemcacheIncrementRequest) GetOverride() *AppOverride {
}
type MemcacheIncrementResponse struct {
NewValue *uint64 `protobuf:"varint,1,opt,name=new_value" json:"new_value,omitempty"`
IncrementStatus *MemcacheIncrementResponse_IncrementStatusCode `protobuf:"varint,2,opt,name=increment_status,enum=appengine.MemcacheIncrementResponse_IncrementStatusCode" json:"increment_status,omitempty"`
NewValue *uint64 `protobuf:"varint,1,opt,name=new_value,json=newValue" json:"new_value,omitempty"`
IncrementStatus *MemcacheIncrementResponse_IncrementStatusCode `protobuf:"varint,2,opt,name=increment_status,json=incrementStatus,enum=appengine.MemcacheIncrementResponse_IncrementStatusCode" json:"increment_status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheIncrementResponse) Reset() { *m = MemcacheIncrementResponse{} }
func (m *MemcacheIncrementResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheIncrementResponse) ProtoMessage() {}
func (m *MemcacheIncrementResponse) Reset() { *m = MemcacheIncrementResponse{} }
func (m *MemcacheIncrementResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheIncrementResponse) ProtoMessage() {}
func (*MemcacheIncrementResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *MemcacheIncrementResponse) GetNewValue() uint64 {
if m != nil && m.NewValue != nil {
@ -703,15 +739,16 @@ func (m *MemcacheIncrementResponse) GetIncrementStatus() MemcacheIncrementRespon
}
type MemcacheBatchIncrementRequest struct {
NameSpace *string `protobuf:"bytes,1,opt,name=name_space,def=" json:"name_space,omitempty"`
NameSpace *string `protobuf:"bytes,1,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
Item []*MemcacheIncrementRequest `protobuf:"bytes,2,rep,name=item" json:"item,omitempty"`
Override *AppOverride `protobuf:"bytes,3,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheBatchIncrementRequest) Reset() { *m = MemcacheBatchIncrementRequest{} }
func (m *MemcacheBatchIncrementRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheBatchIncrementRequest) ProtoMessage() {}
func (m *MemcacheBatchIncrementRequest) Reset() { *m = MemcacheBatchIncrementRequest{} }
func (m *MemcacheBatchIncrementRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheBatchIncrementRequest) ProtoMessage() {}
func (*MemcacheBatchIncrementRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *MemcacheBatchIncrementRequest) GetNameSpace() string {
if m != nil && m.NameSpace != nil {
@ -739,9 +776,10 @@ type MemcacheBatchIncrementResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheBatchIncrementResponse) Reset() { *m = MemcacheBatchIncrementResponse{} }
func (m *MemcacheBatchIncrementResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheBatchIncrementResponse) ProtoMessage() {}
func (m *MemcacheBatchIncrementResponse) Reset() { *m = MemcacheBatchIncrementResponse{} }
func (m *MemcacheBatchIncrementResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheBatchIncrementResponse) ProtoMessage() {}
func (*MemcacheBatchIncrementResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *MemcacheBatchIncrementResponse) GetItem() []*MemcacheIncrementResponse {
if m != nil {
@ -755,9 +793,10 @@ type MemcacheFlushRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheFlushRequest) Reset() { *m = MemcacheFlushRequest{} }
func (m *MemcacheFlushRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheFlushRequest) ProtoMessage() {}
func (m *MemcacheFlushRequest) Reset() { *m = MemcacheFlushRequest{} }
func (m *MemcacheFlushRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheFlushRequest) ProtoMessage() {}
func (*MemcacheFlushRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *MemcacheFlushRequest) GetOverride() *AppOverride {
if m != nil {
@ -770,18 +809,20 @@ type MemcacheFlushResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheFlushResponse) Reset() { *m = MemcacheFlushResponse{} }
func (m *MemcacheFlushResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheFlushResponse) ProtoMessage() {}
func (m *MemcacheFlushResponse) Reset() { *m = MemcacheFlushResponse{} }
func (m *MemcacheFlushResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheFlushResponse) ProtoMessage() {}
func (*MemcacheFlushResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
type MemcacheStatsRequest struct {
Override *AppOverride `protobuf:"bytes,1,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheStatsRequest) Reset() { *m = MemcacheStatsRequest{} }
func (m *MemcacheStatsRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheStatsRequest) ProtoMessage() {}
func (m *MemcacheStatsRequest) Reset() { *m = MemcacheStatsRequest{} }
func (m *MemcacheStatsRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheStatsRequest) ProtoMessage() {}
func (*MemcacheStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *MemcacheStatsRequest) GetOverride() *AppOverride {
if m != nil {
@ -793,16 +834,17 @@ func (m *MemcacheStatsRequest) GetOverride() *AppOverride {
type MergedNamespaceStats struct {
Hits *uint64 `protobuf:"varint,1,req,name=hits" json:"hits,omitempty"`
Misses *uint64 `protobuf:"varint,2,req,name=misses" json:"misses,omitempty"`
ByteHits *uint64 `protobuf:"varint,3,req,name=byte_hits" json:"byte_hits,omitempty"`
ByteHits *uint64 `protobuf:"varint,3,req,name=byte_hits,json=byteHits" json:"byte_hits,omitempty"`
Items *uint64 `protobuf:"varint,4,req,name=items" json:"items,omitempty"`
Bytes *uint64 `protobuf:"varint,5,req,name=bytes" json:"bytes,omitempty"`
OldestItemAge *uint32 `protobuf:"fixed32,6,req,name=oldest_item_age" json:"oldest_item_age,omitempty"`
OldestItemAge *uint32 `protobuf:"fixed32,6,req,name=oldest_item_age,json=oldestItemAge" json:"oldest_item_age,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MergedNamespaceStats) Reset() { *m = MergedNamespaceStats{} }
func (m *MergedNamespaceStats) String() string { return proto.CompactTextString(m) }
func (*MergedNamespaceStats) ProtoMessage() {}
func (m *MergedNamespaceStats) Reset() { *m = MergedNamespaceStats{} }
func (m *MergedNamespaceStats) String() string { return proto.CompactTextString(m) }
func (*MergedNamespaceStats) ProtoMessage() {}
func (*MergedNamespaceStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
func (m *MergedNamespaceStats) GetHits() uint64 {
if m != nil && m.Hits != nil {
@ -851,9 +893,10 @@ type MemcacheStatsResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheStatsResponse) Reset() { *m = MemcacheStatsResponse{} }
func (m *MemcacheStatsResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheStatsResponse) ProtoMessage() {}
func (m *MemcacheStatsResponse) Reset() { *m = MemcacheStatsResponse{} }
func (m *MemcacheStatsResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheStatsResponse) ProtoMessage() {}
func (*MemcacheStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *MemcacheStatsResponse) GetStats() *MergedNamespaceStats {
if m != nil {
@ -863,15 +906,16 @@ func (m *MemcacheStatsResponse) GetStats() *MergedNamespaceStats {
}
type MemcacheGrabTailRequest struct {
ItemCount *int32 `protobuf:"varint,1,req,name=item_count" json:"item_count,omitempty"`
NameSpace *string `protobuf:"bytes,2,opt,name=name_space,def=" json:"name_space,omitempty"`
ItemCount *int32 `protobuf:"varint,1,req,name=item_count,json=itemCount" json:"item_count,omitempty"`
NameSpace *string `protobuf:"bytes,2,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"`
Override *AppOverride `protobuf:"bytes,3,opt,name=override" json:"override,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheGrabTailRequest) Reset() { *m = MemcacheGrabTailRequest{} }
func (m *MemcacheGrabTailRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheGrabTailRequest) ProtoMessage() {}
func (m *MemcacheGrabTailRequest) Reset() { *m = MemcacheGrabTailRequest{} }
func (m *MemcacheGrabTailRequest) String() string { return proto.CompactTextString(m) }
func (*MemcacheGrabTailRequest) ProtoMessage() {}
func (*MemcacheGrabTailRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
func (m *MemcacheGrabTailRequest) GetItemCount() int32 {
if m != nil && m.ItemCount != nil {
@ -895,13 +939,14 @@ func (m *MemcacheGrabTailRequest) GetOverride() *AppOverride {
}
type MemcacheGrabTailResponse struct {
Item []*MemcacheGrabTailResponse_Item `protobuf:"group,1,rep,name=Item" json:"item,omitempty"`
Item []*MemcacheGrabTailResponse_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MemcacheGrabTailResponse) Reset() { *m = MemcacheGrabTailResponse{} }
func (m *MemcacheGrabTailResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheGrabTailResponse) ProtoMessage() {}
func (m *MemcacheGrabTailResponse) Reset() { *m = MemcacheGrabTailResponse{} }
func (m *MemcacheGrabTailResponse) String() string { return proto.CompactTextString(m) }
func (*MemcacheGrabTailResponse) ProtoMessage() {}
func (*MemcacheGrabTailResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func (m *MemcacheGrabTailResponse) GetItem() []*MemcacheGrabTailResponse_Item {
if m != nil {
@ -919,6 +964,9 @@ type MemcacheGrabTailResponse_Item struct {
func (m *MemcacheGrabTailResponse_Item) Reset() { *m = MemcacheGrabTailResponse_Item{} }
func (m *MemcacheGrabTailResponse_Item) String() string { return proto.CompactTextString(m) }
func (*MemcacheGrabTailResponse_Item) ProtoMessage() {}
func (*MemcacheGrabTailResponse_Item) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{18, 0}
}
func (m *MemcacheGrabTailResponse_Item) GetValue() []byte {
if m != nil {
@ -935,4 +983,122 @@ func (m *MemcacheGrabTailResponse_Item) GetFlags() uint32 {
}
func init() {
proto.RegisterType((*MemcacheServiceError)(nil), "appengine.MemcacheServiceError")
proto.RegisterType((*AppOverride)(nil), "appengine.AppOverride")
proto.RegisterType((*MemcacheGetRequest)(nil), "appengine.MemcacheGetRequest")
proto.RegisterType((*MemcacheGetResponse)(nil), "appengine.MemcacheGetResponse")
proto.RegisterType((*MemcacheGetResponse_Item)(nil), "appengine.MemcacheGetResponse.Item")
proto.RegisterType((*MemcacheSetRequest)(nil), "appengine.MemcacheSetRequest")
proto.RegisterType((*MemcacheSetRequest_Item)(nil), "appengine.MemcacheSetRequest.Item")
proto.RegisterType((*MemcacheSetResponse)(nil), "appengine.MemcacheSetResponse")
proto.RegisterType((*MemcacheDeleteRequest)(nil), "appengine.MemcacheDeleteRequest")
proto.RegisterType((*MemcacheDeleteRequest_Item)(nil), "appengine.MemcacheDeleteRequest.Item")
proto.RegisterType((*MemcacheDeleteResponse)(nil), "appengine.MemcacheDeleteResponse")
proto.RegisterType((*MemcacheIncrementRequest)(nil), "appengine.MemcacheIncrementRequest")
proto.RegisterType((*MemcacheIncrementResponse)(nil), "appengine.MemcacheIncrementResponse")
proto.RegisterType((*MemcacheBatchIncrementRequest)(nil), "appengine.MemcacheBatchIncrementRequest")
proto.RegisterType((*MemcacheBatchIncrementResponse)(nil), "appengine.MemcacheBatchIncrementResponse")
proto.RegisterType((*MemcacheFlushRequest)(nil), "appengine.MemcacheFlushRequest")
proto.RegisterType((*MemcacheFlushResponse)(nil), "appengine.MemcacheFlushResponse")
proto.RegisterType((*MemcacheStatsRequest)(nil), "appengine.MemcacheStatsRequest")
proto.RegisterType((*MergedNamespaceStats)(nil), "appengine.MergedNamespaceStats")
proto.RegisterType((*MemcacheStatsResponse)(nil), "appengine.MemcacheStatsResponse")
proto.RegisterType((*MemcacheGrabTailRequest)(nil), "appengine.MemcacheGrabTailRequest")
proto.RegisterType((*MemcacheGrabTailResponse)(nil), "appengine.MemcacheGrabTailResponse")
proto.RegisterType((*MemcacheGrabTailResponse_Item)(nil), "appengine.MemcacheGrabTailResponse.Item")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/memcache/memcache_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 1379 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x92, 0xdb, 0xc4,
0x16, 0x8e, 0x24, 0xff, 0xe9, 0x78, 0x7e, 0x94, 0xce, 0x64, 0xe2, 0x3b, 0xb7, 0x72, 0xe3, 0x52,
0xee, 0xbd, 0x18, 0x2a, 0x71, 0x82, 0x29, 0x20, 0x99, 0xca, 0x02, 0x8f, 0xad, 0x49, 0x44, 0x66,
0xec, 0xa9, 0x96, 0x33, 0x50, 0xd9, 0xa8, 0x3a, 0x72, 0x47, 0xa3, 0x1a, 0x59, 0x12, 0x6a, 0x39,
0x21, 0x4b, 0x8a, 0x15, 0x55, 0xb0, 0xe3, 0x05, 0xd8, 0xb0, 0x63, 0xc5, 0x3b, 0xf0, 0x0c, 0x14,
0x7b, 0x8a, 0x15, 0xef, 0x40, 0x75, 0x4b, 0xb2, 0x65, 0x8f, 0x67, 0x98, 0x02, 0x76, 0x3a, 0xa7,
0x4f, 0xab, 0xcf, 0x77, 0xbe, 0xaf, 0x4f, 0x1f, 0xe8, 0xbb, 0x61, 0xe8, 0xfa, 0xb4, 0xed, 0x86,
0x3e, 0x09, 0xdc, 0x76, 0x18, 0xbb, 0xf7, 0x48, 0x14, 0xd1, 0xc0, 0xf5, 0x02, 0x7a, 0xcf, 0x0b,
0x12, 0x1a, 0x07, 0xc4, 0xbf, 0x37, 0xa1, 0x13, 0x87, 0x38, 0x27, 0x74, 0xf6, 0x61, 0x33, 0x1a,
0xbf, 0xf2, 0x1c, 0xda, 0x8e, 0xe2, 0x30, 0x09, 0x91, 0x3a, 0xdb, 0xa3, 0x7f, 0x29, 0xc1, 0xd6,
0x61, 0x16, 0x65, 0xa5, 0x41, 0x46, 0x1c, 0x87, 0xb1, 0x7e, 0x0a, 0xaa, 0xf8, 0xe8, 0x85, 0x63,
0x8a, 0x2a, 0x20, 0x0f, 0x9f, 0x6a, 0x57, 0xd0, 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x66, 0x43, 0x5b, 0x4c,
0x5e, 0x8c, 0x88, 0xe7, 0xe7, 0x55, 0xbd, 0x09, 0x20, 0x92, 0x71, 0xc2, 0x69, 0x90, 0x88, 0x72,
0x94, 0xb1, 0xca, 0x3d, 0x3d, 0xee, 0xf8, 0xf3, 0x59, 0xf4, 0xaf, 0x48, 0xf4, 0x6b, 0x69, 0xde,
0x97, 0xe7, 0xf9, 0x64, 0x18, 0x1f, 0x2d, 0x3c, 0x93, 0xad, 0x55, 0x73, 0xe7, 0xd2, 0x96, 0xe2,
0xf0, 0xd9, 0xc9, 0x1e, 0xb5, 0xd9, 0xe4, 0x24, 0xaf, 0x9c, 0x9c, 0x94, 0xc2, 0xe4, 0xb4, 0x07,
0xcf, 0x6b, 0xf9, 0xd0, 0xfe, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0x8b, 0xe6, 0x6b, 0x80,
0x0d, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/modules/modules_service.proto
// DO NOT EDIT!
/*
Package modules is a generated protocol buffer package.
@ -38,6 +37,12 @@ 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
type ModulesServiceError_ErrorCode int32
const (
@ -82,31 +87,37 @@ func (x *ModulesServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = ModulesServiceError_ErrorCode(value)
return nil
}
func (ModulesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type ModulesServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ModulesServiceError) Reset() { *m = ModulesServiceError{} }
func (m *ModulesServiceError) String() string { return proto.CompactTextString(m) }
func (*ModulesServiceError) ProtoMessage() {}
func (m *ModulesServiceError) Reset() { *m = ModulesServiceError{} }
func (m *ModulesServiceError) String() string { return proto.CompactTextString(m) }
func (*ModulesServiceError) ProtoMessage() {}
func (*ModulesServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type GetModulesRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetModulesRequest) Reset() { *m = GetModulesRequest{} }
func (m *GetModulesRequest) String() string { return proto.CompactTextString(m) }
func (*GetModulesRequest) ProtoMessage() {}
func (m *GetModulesRequest) Reset() { *m = GetModulesRequest{} }
func (m *GetModulesRequest) String() string { return proto.CompactTextString(m) }
func (*GetModulesRequest) ProtoMessage() {}
func (*GetModulesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type GetModulesResponse struct {
Module []string `protobuf:"bytes,1,rep,name=module" json:"module,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetModulesResponse) Reset() { *m = GetModulesResponse{} }
func (m *GetModulesResponse) String() string { return proto.CompactTextString(m) }
func (*GetModulesResponse) ProtoMessage() {}
func (m *GetModulesResponse) Reset() { *m = GetModulesResponse{} }
func (m *GetModulesResponse) String() string { return proto.CompactTextString(m) }
func (*GetModulesResponse) ProtoMessage() {}
func (*GetModulesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *GetModulesResponse) GetModule() []string {
if m != nil {
@ -120,9 +131,10 @@ type GetVersionsRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetVersionsRequest) Reset() { *m = GetVersionsRequest{} }
func (m *GetVersionsRequest) String() string { return proto.CompactTextString(m) }
func (*GetVersionsRequest) ProtoMessage() {}
func (m *GetVersionsRequest) Reset() { *m = GetVersionsRequest{} }
func (m *GetVersionsRequest) String() string { return proto.CompactTextString(m) }
func (*GetVersionsRequest) ProtoMessage() {}
func (*GetVersionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *GetVersionsRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -136,9 +148,10 @@ type GetVersionsResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetVersionsResponse) Reset() { *m = GetVersionsResponse{} }
func (m *GetVersionsResponse) String() string { return proto.CompactTextString(m) }
func (*GetVersionsResponse) ProtoMessage() {}
func (m *GetVersionsResponse) Reset() { *m = GetVersionsResponse{} }
func (m *GetVersionsResponse) String() string { return proto.CompactTextString(m) }
func (*GetVersionsResponse) ProtoMessage() {}
func (*GetVersionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *GetVersionsResponse) GetVersion() []string {
if m != nil {
@ -152,9 +165,10 @@ type GetDefaultVersionRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetDefaultVersionRequest) Reset() { *m = GetDefaultVersionRequest{} }
func (m *GetDefaultVersionRequest) String() string { return proto.CompactTextString(m) }
func (*GetDefaultVersionRequest) ProtoMessage() {}
func (m *GetDefaultVersionRequest) Reset() { *m = GetDefaultVersionRequest{} }
func (m *GetDefaultVersionRequest) String() string { return proto.CompactTextString(m) }
func (*GetDefaultVersionRequest) ProtoMessage() {}
func (*GetDefaultVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *GetDefaultVersionRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -168,9 +182,10 @@ type GetDefaultVersionResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetDefaultVersionResponse) Reset() { *m = GetDefaultVersionResponse{} }
func (m *GetDefaultVersionResponse) String() string { return proto.CompactTextString(m) }
func (*GetDefaultVersionResponse) ProtoMessage() {}
func (m *GetDefaultVersionResponse) Reset() { *m = GetDefaultVersionResponse{} }
func (m *GetDefaultVersionResponse) String() string { return proto.CompactTextString(m) }
func (*GetDefaultVersionResponse) ProtoMessage() {}
func (*GetDefaultVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *GetDefaultVersionResponse) GetVersion() string {
if m != nil && m.Version != nil {
@ -185,9 +200,10 @@ type GetNumInstancesRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetNumInstancesRequest) Reset() { *m = GetNumInstancesRequest{} }
func (m *GetNumInstancesRequest) String() string { return proto.CompactTextString(m) }
func (*GetNumInstancesRequest) ProtoMessage() {}
func (m *GetNumInstancesRequest) Reset() { *m = GetNumInstancesRequest{} }
func (m *GetNumInstancesRequest) String() string { return proto.CompactTextString(m) }
func (*GetNumInstancesRequest) ProtoMessage() {}
func (*GetNumInstancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetNumInstancesRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -208,9 +224,10 @@ type GetNumInstancesResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetNumInstancesResponse) Reset() { *m = GetNumInstancesResponse{} }
func (m *GetNumInstancesResponse) String() string { return proto.CompactTextString(m) }
func (*GetNumInstancesResponse) ProtoMessage() {}
func (m *GetNumInstancesResponse) Reset() { *m = GetNumInstancesResponse{} }
func (m *GetNumInstancesResponse) String() string { return proto.CompactTextString(m) }
func (*GetNumInstancesResponse) ProtoMessage() {}
func (*GetNumInstancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *GetNumInstancesResponse) GetInstances() int64 {
if m != nil && m.Instances != nil {
@ -226,9 +243,10 @@ type SetNumInstancesRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SetNumInstancesRequest) Reset() { *m = SetNumInstancesRequest{} }
func (m *SetNumInstancesRequest) String() string { return proto.CompactTextString(m) }
func (*SetNumInstancesRequest) ProtoMessage() {}
func (m *SetNumInstancesRequest) Reset() { *m = SetNumInstancesRequest{} }
func (m *SetNumInstancesRequest) String() string { return proto.CompactTextString(m) }
func (*SetNumInstancesRequest) ProtoMessage() {}
func (*SetNumInstancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *SetNumInstancesRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -255,9 +273,10 @@ type SetNumInstancesResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SetNumInstancesResponse) Reset() { *m = SetNumInstancesResponse{} }
func (m *SetNumInstancesResponse) String() string { return proto.CompactTextString(m) }
func (*SetNumInstancesResponse) ProtoMessage() {}
func (m *SetNumInstancesResponse) Reset() { *m = SetNumInstancesResponse{} }
func (m *SetNumInstancesResponse) String() string { return proto.CompactTextString(m) }
func (*SetNumInstancesResponse) ProtoMessage() {}
func (*SetNumInstancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
type StartModuleRequest struct {
Module *string `protobuf:"bytes,1,req,name=module" json:"module,omitempty"`
@ -265,9 +284,10 @@ type StartModuleRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *StartModuleRequest) Reset() { *m = StartModuleRequest{} }
func (m *StartModuleRequest) String() string { return proto.CompactTextString(m) }
func (*StartModuleRequest) ProtoMessage() {}
func (m *StartModuleRequest) Reset() { *m = StartModuleRequest{} }
func (m *StartModuleRequest) String() string { return proto.CompactTextString(m) }
func (*StartModuleRequest) ProtoMessage() {}
func (*StartModuleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *StartModuleRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -287,9 +307,10 @@ type StartModuleResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *StartModuleResponse) Reset() { *m = StartModuleResponse{} }
func (m *StartModuleResponse) String() string { return proto.CompactTextString(m) }
func (*StartModuleResponse) ProtoMessage() {}
func (m *StartModuleResponse) Reset() { *m = StartModuleResponse{} }
func (m *StartModuleResponse) String() string { return proto.CompactTextString(m) }
func (*StartModuleResponse) ProtoMessage() {}
func (*StartModuleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
type StopModuleRequest struct {
Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"`
@ -297,9 +318,10 @@ type StopModuleRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *StopModuleRequest) Reset() { *m = StopModuleRequest{} }
func (m *StopModuleRequest) String() string { return proto.CompactTextString(m) }
func (*StopModuleRequest) ProtoMessage() {}
func (m *StopModuleRequest) Reset() { *m = StopModuleRequest{} }
func (m *StopModuleRequest) String() string { return proto.CompactTextString(m) }
func (*StopModuleRequest) ProtoMessage() {}
func (*StopModuleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *StopModuleRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -319,9 +341,10 @@ type StopModuleResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *StopModuleResponse) Reset() { *m = StopModuleResponse{} }
func (m *StopModuleResponse) String() string { return proto.CompactTextString(m) }
func (*StopModuleResponse) ProtoMessage() {}
func (m *StopModuleResponse) Reset() { *m = StopModuleResponse{} }
func (m *StopModuleResponse) String() string { return proto.CompactTextString(m) }
func (*StopModuleResponse) ProtoMessage() {}
func (*StopModuleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
type GetHostnameRequest struct {
Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"`
@ -330,9 +353,10 @@ type GetHostnameRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetHostnameRequest) Reset() { *m = GetHostnameRequest{} }
func (m *GetHostnameRequest) String() string { return proto.CompactTextString(m) }
func (*GetHostnameRequest) ProtoMessage() {}
func (m *GetHostnameRequest) Reset() { *m = GetHostnameRequest{} }
func (m *GetHostnameRequest) String() string { return proto.CompactTextString(m) }
func (*GetHostnameRequest) ProtoMessage() {}
func (*GetHostnameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
func (m *GetHostnameRequest) GetModule() string {
if m != nil && m.Module != nil {
@ -360,9 +384,10 @@ type GetHostnameResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetHostnameResponse) Reset() { *m = GetHostnameResponse{} }
func (m *GetHostnameResponse) String() string { return proto.CompactTextString(m) }
func (*GetHostnameResponse) ProtoMessage() {}
func (m *GetHostnameResponse) Reset() { *m = GetHostnameResponse{} }
func (m *GetHostnameResponse) String() string { return proto.CompactTextString(m) }
func (*GetHostnameResponse) ProtoMessage() {}
func (*GetHostnameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *GetHostnameResponse) GetHostname() string {
if m != nil && m.Hostname != nil {
@ -372,4 +397,58 @@ func (m *GetHostnameResponse) GetHostname() string {
}
func init() {
proto.RegisterType((*ModulesServiceError)(nil), "appengine.ModulesServiceError")
proto.RegisterType((*GetModulesRequest)(nil), "appengine.GetModulesRequest")
proto.RegisterType((*GetModulesResponse)(nil), "appengine.GetModulesResponse")
proto.RegisterType((*GetVersionsRequest)(nil), "appengine.GetVersionsRequest")
proto.RegisterType((*GetVersionsResponse)(nil), "appengine.GetVersionsResponse")
proto.RegisterType((*GetDefaultVersionRequest)(nil), "appengine.GetDefaultVersionRequest")
proto.RegisterType((*GetDefaultVersionResponse)(nil), "appengine.GetDefaultVersionResponse")
proto.RegisterType((*GetNumInstancesRequest)(nil), "appengine.GetNumInstancesRequest")
proto.RegisterType((*GetNumInstancesResponse)(nil), "appengine.GetNumInstancesResponse")
proto.RegisterType((*SetNumInstancesRequest)(nil), "appengine.SetNumInstancesRequest")
proto.RegisterType((*SetNumInstancesResponse)(nil), "appengine.SetNumInstancesResponse")
proto.RegisterType((*StartModuleRequest)(nil), "appengine.StartModuleRequest")
proto.RegisterType((*StartModuleResponse)(nil), "appengine.StartModuleResponse")
proto.RegisterType((*StopModuleRequest)(nil), "appengine.StopModuleRequest")
proto.RegisterType((*StopModuleResponse)(nil), "appengine.StopModuleResponse")
proto.RegisterType((*GetHostnameRequest)(nil), "appengine.GetHostnameRequest")
proto.RegisterType((*GetHostnameResponse)(nil), "appengine.GetHostnameResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/modules/modules_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 457 bytes of a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x67, 0xd2, 0xdc,
0x81, 0x6d, 0x01, 0x9c, 0xfb, 0x02, 0x34, 0x26, 0x7a, 0x04, 0x41, 0x83, 0x63, 0xf0, 0x14, 0xda,
0x4c, 0x8b, 0xea, 0x7e, 0xfa, 0xbf, 0xcd, 0xf8, 0xf0, 0x2e, 0xe5, 0x1a, 0x63, 0xe0, 0xdf, 0xea,
0xfb, 0xf8, 0x41, 0x28, 0xcd, 0xb3, 0xf9, 0xff, 0xd3, 0xc9, 0x29, 0x1c, 0xd8, 0x59, 0x75, 0xdd,
0x7a, 0x69, 0x55, 0x87, 0xaf, 0xeb, 0x5b, 0xbc, 0xee, 0x61, 0xbe, 0xec, 0x29, 0x1c, 0xdc, 0x18,
0xcd, 0x8c, 0x68, 0x55, 0x9f, 0x79, 0x5f, 0xf7, 0xcd, 0x5f, 0xe2, 0x77, 0x00, 0x00, 0x00, 0xff,
0xff, 0x6e, 0xbc, 0xe0, 0x61, 0x5c, 0x04, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/remote_api/remote_api.proto
// DO NOT EDIT!
/*
Package remote_api is a generated protocol buffer package.
@ -25,6 +24,12 @@ 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
type RpcError_ErrorCode int32
const (
@ -90,18 +95,20 @@ func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = RpcError_ErrorCode(value)
return nil
}
func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
type Request struct {
ServiceName *string `protobuf:"bytes,2,req,name=service_name" json:"service_name,omitempty"`
ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"`
Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"`
Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"`
RequestId *string `protobuf:"bytes,5,opt,name=request_id" json:"request_id,omitempty"`
RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Request) GetServiceName() string {
if m != nil && m.ServiceName != nil {
@ -137,9 +144,10 @@ type ApplicationError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ApplicationError) Reset() { *m = ApplicationError{} }
func (m *ApplicationError) String() string { return proto.CompactTextString(m) }
func (*ApplicationError) ProtoMessage() {}
func (m *ApplicationError) Reset() { *m = ApplicationError{} }
func (m *ApplicationError) String() string { return proto.CompactTextString(m) }
func (*ApplicationError) ProtoMessage() {}
func (*ApplicationError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *ApplicationError) GetCode() int32 {
if m != nil && m.Code != nil {
@ -161,9 +169,10 @@ type RpcError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *RpcError) Reset() { *m = RpcError{} }
func (m *RpcError) String() string { return proto.CompactTextString(m) }
func (*RpcError) ProtoMessage() {}
func (m *RpcError) Reset() { *m = RpcError{} }
func (m *RpcError) String() string { return proto.CompactTextString(m) }
func (*RpcError) ProtoMessage() {}
func (*RpcError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *RpcError) GetCode() int32 {
if m != nil && m.Code != nil {
@ -182,15 +191,16 @@ func (m *RpcError) GetDetail() string {
type Response struct {
Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"`
Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"`
ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error" json:"application_error,omitempty"`
JavaException []byte `protobuf:"bytes,4,opt,name=java_exception" json:"java_exception,omitempty"`
RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error" json:"rpc_error,omitempty"`
ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"`
JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"`
RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Response) GetResponse() []byte {
if m != nil {
@ -228,4 +238,50 @@ func (m *Response) GetRpcError() *RpcError {
}
func init() {
proto.RegisterType((*Request)(nil), "remote_api.Request")
proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError")
proto.RegisterType((*RpcError)(nil), "remote_api.RpcError")
proto.RegisterType((*Response)(nil), "remote_api.Response")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 531 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40,
0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42,
0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x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xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64,
0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b,
0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5,
0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c,
0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf,
0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7,
0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e,
0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f,
0x03, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -99,6 +99,12 @@ message Document {
optional string language = 2 [default = "en"];
repeated Field field = 3;
optional int32 order_id = 4;
optional OrderIdSource order_id_source = 6 [default = SUPPLIED];
enum OrderIdSource {
DEFAULTED = 0;
SUPPLIED = 1;
}
enum Storage {
DISK = 0;

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/socket/socket_service.proto
// DO NOT EDIT!
/*
Package socket is a generated protocol buffer package.
@ -55,6 +54,12 @@ 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
type RemoteSocketServiceError_ErrorCode int32
const (
@ -99,6 +104,9 @@ func (x *RemoteSocketServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = RemoteSocketServiceError_ErrorCode(value)
return nil
}
func (RemoteSocketServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type RemoteSocketServiceError_SystemError int32
@ -528,6 +536,9 @@ func (x *RemoteSocketServiceError_SystemError) UnmarshalJSON(data []byte) error
*x = RemoteSocketServiceError_SystemError(value)
return nil
}
func (RemoteSocketServiceError_SystemError) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 1}
}
type CreateSocketRequest_SocketFamily int32
@ -561,6 +572,9 @@ func (x *CreateSocketRequest_SocketFamily) UnmarshalJSON(data []byte) error {
*x = CreateSocketRequest_SocketFamily(value)
return nil
}
func (CreateSocketRequest_SocketFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{2, 0}
}
type CreateSocketRequest_SocketProtocol int32
@ -594,6 +608,9 @@ func (x *CreateSocketRequest_SocketProtocol) UnmarshalJSON(data []byte) error {
*x = CreateSocketRequest_SocketProtocol(value)
return nil
}
func (CreateSocketRequest_SocketProtocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{2, 1}
}
type SocketOption_SocketOptionLevel int32
@ -633,6 +650,9 @@ func (x *SocketOption_SocketOptionLevel) UnmarshalJSON(data []byte) error {
*x = SocketOption_SocketOptionLevel(value)
return nil
}
func (SocketOption_SocketOptionLevel) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{10, 0}
}
type SocketOption_SocketOptionName int32
@ -747,6 +767,9 @@ func (x *SocketOption_SocketOptionName) UnmarshalJSON(data []byte) error {
*x = SocketOption_SocketOptionName(value)
return nil
}
func (SocketOption_SocketOptionName) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{10, 1}
}
type ShutDownRequest_How int32
@ -783,6 +806,7 @@ func (x *ShutDownRequest_How) UnmarshalJSON(data []byte) error {
*x = ShutDownRequest_How(value)
return nil
}
func (ShutDownRequest_How) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{21, 0} }
type ReceiveRequest_Flags int32
@ -816,6 +840,7 @@ func (x *ReceiveRequest_Flags) UnmarshalJSON(data []byte) error {
*x = ReceiveRequest_Flags(value)
return nil
}
func (ReceiveRequest_Flags) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{27, 0} }
type PollEvent_PollEventFlag int32
@ -885,6 +910,7 @@ func (x *PollEvent_PollEventFlag) UnmarshalJSON(data []byte) error {
*x = PollEvent_PollEventFlag(value)
return nil
}
func (PollEvent_PollEventFlag) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{29, 0} }
type ResolveReply_ErrorCode int32
@ -957,16 +983,18 @@ func (x *ResolveReply_ErrorCode) UnmarshalJSON(data []byte) error {
*x = ResolveReply_ErrorCode(value)
return nil
}
func (ResolveReply_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{33, 0} }
type RemoteSocketServiceError struct {
SystemError *int32 `protobuf:"varint,1,opt,name=system_error,def=0" json:"system_error,omitempty"`
ErrorDetail *string `protobuf:"bytes,2,opt,name=error_detail" json:"error_detail,omitempty"`
SystemError *int32 `protobuf:"varint,1,opt,name=system_error,json=systemError,def=0" json:"system_error,omitempty"`
ErrorDetail *string `protobuf:"bytes,2,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *RemoteSocketServiceError) Reset() { *m = RemoteSocketServiceError{} }
func (m *RemoteSocketServiceError) String() string { return proto.CompactTextString(m) }
func (*RemoteSocketServiceError) ProtoMessage() {}
func (m *RemoteSocketServiceError) Reset() { *m = RemoteSocketServiceError{} }
func (m *RemoteSocketServiceError) String() string { return proto.CompactTextString(m) }
func (*RemoteSocketServiceError) ProtoMessage() {}
func (*RemoteSocketServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
const Default_RemoteSocketServiceError_SystemError int32 = 0
@ -986,14 +1014,15 @@ func (m *RemoteSocketServiceError) GetErrorDetail() string {
type AddressPort struct {
Port *int32 `protobuf:"varint,1,req,name=port" json:"port,omitempty"`
PackedAddress []byte `protobuf:"bytes,2,opt,name=packed_address" json:"packed_address,omitempty"`
HostnameHint *string `protobuf:"bytes,3,opt,name=hostname_hint" json:"hostname_hint,omitempty"`
PackedAddress []byte `protobuf:"bytes,2,opt,name=packed_address,json=packedAddress" json:"packed_address,omitempty"`
HostnameHint *string `protobuf:"bytes,3,opt,name=hostname_hint,json=hostnameHint" json:"hostname_hint,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AddressPort) Reset() { *m = AddressPort{} }
func (m *AddressPort) String() string { return proto.CompactTextString(m) }
func (*AddressPort) ProtoMessage() {}
func (m *AddressPort) Reset() { *m = AddressPort{} }
func (m *AddressPort) String() string { return proto.CompactTextString(m) }
func (*AddressPort) ProtoMessage() {}
func (*AddressPort) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *AddressPort) GetPort() int32 {
if m != nil && m.Port != nil {
@ -1019,18 +1048,19 @@ func (m *AddressPort) GetHostnameHint() string {
type CreateSocketRequest struct {
Family *CreateSocketRequest_SocketFamily `protobuf:"varint,1,req,name=family,enum=appengine.CreateSocketRequest_SocketFamily" json:"family,omitempty"`
Protocol *CreateSocketRequest_SocketProtocol `protobuf:"varint,2,req,name=protocol,enum=appengine.CreateSocketRequest_SocketProtocol" json:"protocol,omitempty"`
SocketOptions []*SocketOption `protobuf:"bytes,3,rep,name=socket_options" json:"socket_options,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,4,opt,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
ListenBacklog *int32 `protobuf:"varint,5,opt,name=listen_backlog,def=0" json:"listen_backlog,omitempty"`
RemoteIp *AddressPort `protobuf:"bytes,6,opt,name=remote_ip" json:"remote_ip,omitempty"`
AppId *string `protobuf:"bytes,9,opt,name=app_id" json:"app_id,omitempty"`
ProjectId *int64 `protobuf:"varint,10,opt,name=project_id" json:"project_id,omitempty"`
SocketOptions []*SocketOption `protobuf:"bytes,3,rep,name=socket_options,json=socketOptions" json:"socket_options,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,4,opt,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
ListenBacklog *int32 `protobuf:"varint,5,opt,name=listen_backlog,json=listenBacklog,def=0" json:"listen_backlog,omitempty"`
RemoteIp *AddressPort `protobuf:"bytes,6,opt,name=remote_ip,json=remoteIp" json:"remote_ip,omitempty"`
AppId *string `protobuf:"bytes,9,opt,name=app_id,json=appId" json:"app_id,omitempty"`
ProjectId *int64 `protobuf:"varint,10,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateSocketRequest) Reset() { *m = CreateSocketRequest{} }
func (m *CreateSocketRequest) String() string { return proto.CompactTextString(m) }
func (*CreateSocketRequest) ProtoMessage() {}
func (m *CreateSocketRequest) Reset() { *m = CreateSocketRequest{} }
func (m *CreateSocketRequest) String() string { return proto.CompactTextString(m) }
func (*CreateSocketRequest) ProtoMessage() {}
func (*CreateSocketRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
const Default_CreateSocketRequest_ListenBacklog int32 = 0
@ -1091,16 +1121,17 @@ func (m *CreateSocketRequest) GetProjectId() int64 {
}
type CreateSocketReply struct {
SocketDescriptor *string `protobuf:"bytes,1,opt,name=socket_descriptor" json:"socket_descriptor,omitempty"`
ServerAddress *AddressPort `protobuf:"bytes,3,opt,name=server_address" json:"server_address,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,4,opt,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
XXX_extensions map[int32]proto.Extension `json:"-"`
XXX_unrecognized []byte `json:"-"`
SocketDescriptor *string `protobuf:"bytes,1,opt,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
ServerAddress *AddressPort `protobuf:"bytes,3,opt,name=server_address,json=serverAddress" json:"server_address,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,4,opt,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateSocketReply) Reset() { *m = CreateSocketReply{} }
func (m *CreateSocketReply) String() string { return proto.CompactTextString(m) }
func (*CreateSocketReply) ProtoMessage() {}
func (m *CreateSocketReply) Reset() { *m = CreateSocketReply{} }
func (m *CreateSocketReply) String() string { return proto.CompactTextString(m) }
func (*CreateSocketReply) ProtoMessage() {}
func (*CreateSocketReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
var extRange_CreateSocketReply = []proto.ExtensionRange{
{1000, 536870911},
@ -1109,12 +1140,6 @@ var extRange_CreateSocketReply = []proto.ExtensionRange{
func (*CreateSocketReply) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_CreateSocketReply
}
func (m *CreateSocketReply) ExtensionMap() map[int32]proto.Extension {
if m.XXX_extensions == nil {
m.XXX_extensions = make(map[int32]proto.Extension)
}
return m.XXX_extensions
}
func (m *CreateSocketReply) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1138,14 +1163,15 @@ func (m *CreateSocketReply) GetProxyExternalIp() *AddressPort {
}
type BindRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,2,req,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,2,req,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *BindRequest) Reset() { *m = BindRequest{} }
func (m *BindRequest) String() string { return proto.CompactTextString(m) }
func (*BindRequest) ProtoMessage() {}
func (m *BindRequest) Reset() { *m = BindRequest{} }
func (m *BindRequest) String() string { return proto.CompactTextString(m) }
func (*BindRequest) ProtoMessage() {}
func (*BindRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *BindRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1162,13 +1188,14 @@ func (m *BindRequest) GetProxyExternalIp() *AddressPort {
}
type BindReply struct {
ProxyExternalIp *AddressPort `protobuf:"bytes,1,opt,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,1,opt,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *BindReply) Reset() { *m = BindReply{} }
func (m *BindReply) String() string { return proto.CompactTextString(m) }
func (*BindReply) ProtoMessage() {}
func (m *BindReply) Reset() { *m = BindReply{} }
func (m *BindReply) String() string { return proto.CompactTextString(m) }
func (*BindReply) ProtoMessage() {}
func (*BindReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *BindReply) GetProxyExternalIp() *AddressPort {
if m != nil {
@ -1178,13 +1205,14 @@ func (m *BindReply) GetProxyExternalIp() *AddressPort {
}
type GetSocketNameRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSocketNameRequest) Reset() { *m = GetSocketNameRequest{} }
func (m *GetSocketNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetSocketNameRequest) ProtoMessage() {}
func (m *GetSocketNameRequest) Reset() { *m = GetSocketNameRequest{} }
func (m *GetSocketNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetSocketNameRequest) ProtoMessage() {}
func (*GetSocketNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *GetSocketNameRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1194,13 +1222,14 @@ func (m *GetSocketNameRequest) GetSocketDescriptor() string {
}
type GetSocketNameReply struct {
ProxyExternalIp *AddressPort `protobuf:"bytes,2,opt,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
ProxyExternalIp *AddressPort `protobuf:"bytes,2,opt,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSocketNameReply) Reset() { *m = GetSocketNameReply{} }
func (m *GetSocketNameReply) String() string { return proto.CompactTextString(m) }
func (*GetSocketNameReply) ProtoMessage() {}
func (m *GetSocketNameReply) Reset() { *m = GetSocketNameReply{} }
func (m *GetSocketNameReply) String() string { return proto.CompactTextString(m) }
func (*GetSocketNameReply) ProtoMessage() {}
func (*GetSocketNameReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetSocketNameReply) GetProxyExternalIp() *AddressPort {
if m != nil {
@ -1210,13 +1239,14 @@ func (m *GetSocketNameReply) GetProxyExternalIp() *AddressPort {
}
type GetPeerNameRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetPeerNameRequest) Reset() { *m = GetPeerNameRequest{} }
func (m *GetPeerNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetPeerNameRequest) ProtoMessage() {}
func (m *GetPeerNameRequest) Reset() { *m = GetPeerNameRequest{} }
func (m *GetPeerNameRequest) String() string { return proto.CompactTextString(m) }
func (*GetPeerNameRequest) ProtoMessage() {}
func (*GetPeerNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *GetPeerNameRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1226,13 +1256,14 @@ func (m *GetPeerNameRequest) GetSocketDescriptor() string {
}
type GetPeerNameReply struct {
PeerIp *AddressPort `protobuf:"bytes,2,opt,name=peer_ip" json:"peer_ip,omitempty"`
PeerIp *AddressPort `protobuf:"bytes,2,opt,name=peer_ip,json=peerIp" json:"peer_ip,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetPeerNameReply) Reset() { *m = GetPeerNameReply{} }
func (m *GetPeerNameReply) String() string { return proto.CompactTextString(m) }
func (*GetPeerNameReply) ProtoMessage() {}
func (m *GetPeerNameReply) Reset() { *m = GetPeerNameReply{} }
func (m *GetPeerNameReply) String() string { return proto.CompactTextString(m) }
func (*GetPeerNameReply) ProtoMessage() {}
func (*GetPeerNameReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *GetPeerNameReply) GetPeerIp() *AddressPort {
if m != nil {
@ -1248,9 +1279,10 @@ type SocketOption struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SocketOption) Reset() { *m = SocketOption{} }
func (m *SocketOption) String() string { return proto.CompactTextString(m) }
func (*SocketOption) ProtoMessage() {}
func (m *SocketOption) Reset() { *m = SocketOption{} }
func (m *SocketOption) String() string { return proto.CompactTextString(m) }
func (*SocketOption) ProtoMessage() {}
func (*SocketOption) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *SocketOption) GetLevel() SocketOption_SocketOptionLevel {
if m != nil && m.Level != nil {
@ -1274,14 +1306,15 @@ func (m *SocketOption) GetValue() []byte {
}
type SetSocketOptionsRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
Options []*SocketOption `protobuf:"bytes,2,rep,name=options" json:"options,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SetSocketOptionsRequest) Reset() { *m = SetSocketOptionsRequest{} }
func (m *SetSocketOptionsRequest) String() string { return proto.CompactTextString(m) }
func (*SetSocketOptionsRequest) ProtoMessage() {}
func (m *SetSocketOptionsRequest) Reset() { *m = SetSocketOptionsRequest{} }
func (m *SetSocketOptionsRequest) String() string { return proto.CompactTextString(m) }
func (*SetSocketOptionsRequest) ProtoMessage() {}
func (*SetSocketOptionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *SetSocketOptionsRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1301,19 +1334,21 @@ type SetSocketOptionsReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SetSocketOptionsReply) Reset() { *m = SetSocketOptionsReply{} }
func (m *SetSocketOptionsReply) String() string { return proto.CompactTextString(m) }
func (*SetSocketOptionsReply) ProtoMessage() {}
func (m *SetSocketOptionsReply) Reset() { *m = SetSocketOptionsReply{} }
func (m *SetSocketOptionsReply) String() string { return proto.CompactTextString(m) }
func (*SetSocketOptionsReply) ProtoMessage() {}
func (*SetSocketOptionsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
type GetSocketOptionsRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
Options []*SocketOption `protobuf:"bytes,2,rep,name=options" json:"options,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSocketOptionsRequest) Reset() { *m = GetSocketOptionsRequest{} }
func (m *GetSocketOptionsRequest) String() string { return proto.CompactTextString(m) }
func (*GetSocketOptionsRequest) ProtoMessage() {}
func (m *GetSocketOptionsRequest) Reset() { *m = GetSocketOptionsRequest{} }
func (m *GetSocketOptionsRequest) String() string { return proto.CompactTextString(m) }
func (*GetSocketOptionsRequest) ProtoMessage() {}
func (*GetSocketOptionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *GetSocketOptionsRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1334,9 +1369,10 @@ type GetSocketOptionsReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSocketOptionsReply) Reset() { *m = GetSocketOptionsReply{} }
func (m *GetSocketOptionsReply) String() string { return proto.CompactTextString(m) }
func (*GetSocketOptionsReply) ProtoMessage() {}
func (m *GetSocketOptionsReply) Reset() { *m = GetSocketOptionsReply{} }
func (m *GetSocketOptionsReply) String() string { return proto.CompactTextString(m) }
func (*GetSocketOptionsReply) ProtoMessage() {}
func (*GetSocketOptionsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *GetSocketOptionsReply) GetOptions() []*SocketOption {
if m != nil {
@ -1346,15 +1382,16 @@ func (m *GetSocketOptionsReply) GetOptions() []*SocketOption {
}
type ConnectRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
RemoteIp *AddressPort `protobuf:"bytes,2,req,name=remote_ip" json:"remote_ip,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,3,opt,name=timeout_seconds,def=-1" json:"timeout_seconds,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
RemoteIp *AddressPort `protobuf:"bytes,2,req,name=remote_ip,json=remoteIp" json:"remote_ip,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,3,opt,name=timeout_seconds,json=timeoutSeconds,def=-1" json:"timeout_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ConnectRequest) Reset() { *m = ConnectRequest{} }
func (m *ConnectRequest) String() string { return proto.CompactTextString(m) }
func (*ConnectRequest) ProtoMessage() {}
func (m *ConnectRequest) Reset() { *m = ConnectRequest{} }
func (m *ConnectRequest) String() string { return proto.CompactTextString(m) }
func (*ConnectRequest) ProtoMessage() {}
func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
const Default_ConnectRequest_TimeoutSeconds float64 = -1
@ -1380,14 +1417,15 @@ func (m *ConnectRequest) GetTimeoutSeconds() float64 {
}
type ConnectReply struct {
ProxyExternalIp *AddressPort `protobuf:"bytes,1,opt,name=proxy_external_ip" json:"proxy_external_ip,omitempty"`
XXX_extensions map[int32]proto.Extension `json:"-"`
XXX_unrecognized []byte `json:"-"`
ProxyExternalIp *AddressPort `protobuf:"bytes,1,opt,name=proxy_external_ip,json=proxyExternalIp" json:"proxy_external_ip,omitempty"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ConnectReply) Reset() { *m = ConnectReply{} }
func (m *ConnectReply) String() string { return proto.CompactTextString(m) }
func (*ConnectReply) ProtoMessage() {}
func (m *ConnectReply) Reset() { *m = ConnectReply{} }
func (m *ConnectReply) String() string { return proto.CompactTextString(m) }
func (*ConnectReply) ProtoMessage() {}
func (*ConnectReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
var extRange_ConnectReply = []proto.ExtensionRange{
{1000, 536870911},
@ -1396,12 +1434,6 @@ var extRange_ConnectReply = []proto.ExtensionRange{
func (*ConnectReply) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ConnectReply
}
func (m *ConnectReply) ExtensionMap() map[int32]proto.Extension {
if m.XXX_extensions == nil {
m.XXX_extensions = make(map[int32]proto.Extension)
}
return m.XXX_extensions
}
func (m *ConnectReply) GetProxyExternalIp() *AddressPort {
if m != nil {
@ -1411,14 +1443,15 @@ func (m *ConnectReply) GetProxyExternalIp() *AddressPort {
}
type ListenRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
Backlog *int32 `protobuf:"varint,2,req,name=backlog" json:"backlog,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ListenRequest) Reset() { *m = ListenRequest{} }
func (m *ListenRequest) String() string { return proto.CompactTextString(m) }
func (*ListenRequest) ProtoMessage() {}
func (m *ListenRequest) Reset() { *m = ListenRequest{} }
func (m *ListenRequest) String() string { return proto.CompactTextString(m) }
func (*ListenRequest) ProtoMessage() {}
func (*ListenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
func (m *ListenRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1438,19 +1471,21 @@ type ListenReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ListenReply) Reset() { *m = ListenReply{} }
func (m *ListenReply) String() string { return proto.CompactTextString(m) }
func (*ListenReply) ProtoMessage() {}
func (m *ListenReply) Reset() { *m = ListenReply{} }
func (m *ListenReply) String() string { return proto.CompactTextString(m) }
func (*ListenReply) ProtoMessage() {}
func (*ListenReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
type AcceptRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,2,opt,name=timeout_seconds,def=-1" json:"timeout_seconds,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,2,opt,name=timeout_seconds,json=timeoutSeconds,def=-1" json:"timeout_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AcceptRequest) Reset() { *m = AcceptRequest{} }
func (m *AcceptRequest) String() string { return proto.CompactTextString(m) }
func (*AcceptRequest) ProtoMessage() {}
func (m *AcceptRequest) Reset() { *m = AcceptRequest{} }
func (m *AcceptRequest) String() string { return proto.CompactTextString(m) }
func (*AcceptRequest) ProtoMessage() {}
func (*AcceptRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
const Default_AcceptRequest_TimeoutSeconds float64 = -1
@ -1469,14 +1504,15 @@ func (m *AcceptRequest) GetTimeoutSeconds() float64 {
}
type AcceptReply struct {
NewSocketDescriptor []byte `protobuf:"bytes,2,opt,name=new_socket_descriptor" json:"new_socket_descriptor,omitempty"`
RemoteAddress *AddressPort `protobuf:"bytes,3,opt,name=remote_address" json:"remote_address,omitempty"`
NewSocketDescriptor []byte `protobuf:"bytes,2,opt,name=new_socket_descriptor,json=newSocketDescriptor" json:"new_socket_descriptor,omitempty"`
RemoteAddress *AddressPort `protobuf:"bytes,3,opt,name=remote_address,json=remoteAddress" json:"remote_address,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AcceptReply) Reset() { *m = AcceptReply{} }
func (m *AcceptReply) String() string { return proto.CompactTextString(m) }
func (*AcceptReply) ProtoMessage() {}
func (m *AcceptReply) Reset() { *m = AcceptReply{} }
func (m *AcceptReply) String() string { return proto.CompactTextString(m) }
func (*AcceptReply) ProtoMessage() {}
func (*AcceptReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
func (m *AcceptReply) GetNewSocketDescriptor() []byte {
if m != nil {
@ -1493,15 +1529,16 @@ func (m *AcceptReply) GetRemoteAddress() *AddressPort {
}
type ShutDownRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
How *ShutDownRequest_How `protobuf:"varint,2,req,name=how,enum=appengine.ShutDownRequest_How" json:"how,omitempty"`
SendOffset *int64 `protobuf:"varint,3,req,name=send_offset" json:"send_offset,omitempty"`
SendOffset *int64 `protobuf:"varint,3,req,name=send_offset,json=sendOffset" json:"send_offset,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ShutDownRequest) Reset() { *m = ShutDownRequest{} }
func (m *ShutDownRequest) String() string { return proto.CompactTextString(m) }
func (*ShutDownRequest) ProtoMessage() {}
func (m *ShutDownRequest) Reset() { *m = ShutDownRequest{} }
func (m *ShutDownRequest) String() string { return proto.CompactTextString(m) }
func (*ShutDownRequest) ProtoMessage() {}
func (*ShutDownRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
func (m *ShutDownRequest) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1528,19 +1565,21 @@ type ShutDownReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ShutDownReply) Reset() { *m = ShutDownReply{} }
func (m *ShutDownReply) String() string { return proto.CompactTextString(m) }
func (*ShutDownReply) ProtoMessage() {}
func (m *ShutDownReply) Reset() { *m = ShutDownReply{} }
func (m *ShutDownReply) String() string { return proto.CompactTextString(m) }
func (*ShutDownReply) ProtoMessage() {}
func (*ShutDownReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
type CloseRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SendOffset *int64 `protobuf:"varint,2,opt,name=send_offset,def=-1" json:"send_offset,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
SendOffset *int64 `protobuf:"varint,2,opt,name=send_offset,json=sendOffset,def=-1" json:"send_offset,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CloseRequest) Reset() { *m = CloseRequest{} }
func (m *CloseRequest) String() string { return proto.CompactTextString(m) }
func (*CloseRequest) ProtoMessage() {}
func (m *CloseRequest) Reset() { *m = CloseRequest{} }
func (m *CloseRequest) String() string { return proto.CompactTextString(m) }
func (*CloseRequest) ProtoMessage() {}
func (*CloseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
const Default_CloseRequest_SendOffset int64 = -1
@ -1562,23 +1601,25 @@ type CloseReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CloseReply) Reset() { *m = CloseReply{} }
func (m *CloseReply) String() string { return proto.CompactTextString(m) }
func (*CloseReply) ProtoMessage() {}
func (m *CloseReply) Reset() { *m = CloseReply{} }
func (m *CloseReply) String() string { return proto.CompactTextString(m) }
func (*CloseReply) ProtoMessage() {}
func (*CloseReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
type SendRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
Data []byte `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
StreamOffset *int64 `protobuf:"varint,3,req,name=stream_offset" json:"stream_offset,omitempty"`
StreamOffset *int64 `protobuf:"varint,3,req,name=stream_offset,json=streamOffset" json:"stream_offset,omitempty"`
Flags *int32 `protobuf:"varint,4,opt,name=flags,def=0" json:"flags,omitempty"`
SendTo *AddressPort `protobuf:"bytes,5,opt,name=send_to" json:"send_to,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,6,opt,name=timeout_seconds,def=-1" json:"timeout_seconds,omitempty"`
SendTo *AddressPort `protobuf:"bytes,5,opt,name=send_to,json=sendTo" json:"send_to,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,6,opt,name=timeout_seconds,json=timeoutSeconds,def=-1" json:"timeout_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SendRequest) Reset() { *m = SendRequest{} }
func (m *SendRequest) String() string { return proto.CompactTextString(m) }
func (*SendRequest) ProtoMessage() {}
func (m *SendRequest) Reset() { *m = SendRequest{} }
func (m *SendRequest) String() string { return proto.CompactTextString(m) }
func (*SendRequest) ProtoMessage() {}
func (*SendRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
const Default_SendRequest_Flags int32 = 0
const Default_SendRequest_TimeoutSeconds float64 = -1
@ -1626,13 +1667,14 @@ func (m *SendRequest) GetTimeoutSeconds() float64 {
}
type SendReply struct {
DataSent *int32 `protobuf:"varint,1,opt,name=data_sent" json:"data_sent,omitempty"`
DataSent *int32 `protobuf:"varint,1,opt,name=data_sent,json=dataSent" json:"data_sent,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SendReply) Reset() { *m = SendReply{} }
func (m *SendReply) String() string { return proto.CompactTextString(m) }
func (*SendReply) ProtoMessage() {}
func (m *SendReply) Reset() { *m = SendReply{} }
func (m *SendReply) String() string { return proto.CompactTextString(m) }
func (*SendReply) ProtoMessage() {}
func (*SendReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
func (m *SendReply) GetDataSent() int32 {
if m != nil && m.DataSent != nil {
@ -1642,16 +1684,17 @@ func (m *SendReply) GetDataSent() int32 {
}
type ReceiveRequest struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
DataSize *int32 `protobuf:"varint,2,req,name=data_size" json:"data_size,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
DataSize *int32 `protobuf:"varint,2,req,name=data_size,json=dataSize" json:"data_size,omitempty"`
Flags *int32 `protobuf:"varint,3,opt,name=flags,def=0" json:"flags,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,5,opt,name=timeout_seconds,def=-1" json:"timeout_seconds,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,5,opt,name=timeout_seconds,json=timeoutSeconds,def=-1" json:"timeout_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ReceiveRequest) Reset() { *m = ReceiveRequest{} }
func (m *ReceiveRequest) String() string { return proto.CompactTextString(m) }
func (*ReceiveRequest) ProtoMessage() {}
func (m *ReceiveRequest) Reset() { *m = ReceiveRequest{} }
func (m *ReceiveRequest) String() string { return proto.CompactTextString(m) }
func (*ReceiveRequest) ProtoMessage() {}
func (*ReceiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
const Default_ReceiveRequest_Flags int32 = 0
const Default_ReceiveRequest_TimeoutSeconds float64 = -1
@ -1685,16 +1728,17 @@ func (m *ReceiveRequest) GetTimeoutSeconds() float64 {
}
type ReceiveReply struct {
StreamOffset *int64 `protobuf:"varint,2,opt,name=stream_offset" json:"stream_offset,omitempty"`
StreamOffset *int64 `protobuf:"varint,2,opt,name=stream_offset,json=streamOffset" json:"stream_offset,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
ReceivedFrom *AddressPort `protobuf:"bytes,4,opt,name=received_from" json:"received_from,omitempty"`
BufferSize *int32 `protobuf:"varint,5,opt,name=buffer_size" json:"buffer_size,omitempty"`
ReceivedFrom *AddressPort `protobuf:"bytes,4,opt,name=received_from,json=receivedFrom" json:"received_from,omitempty"`
BufferSize *int32 `protobuf:"varint,5,opt,name=buffer_size,json=bufferSize" json:"buffer_size,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ReceiveReply) Reset() { *m = ReceiveReply{} }
func (m *ReceiveReply) String() string { return proto.CompactTextString(m) }
func (*ReceiveReply) ProtoMessage() {}
func (m *ReceiveReply) Reset() { *m = ReceiveReply{} }
func (m *ReceiveReply) String() string { return proto.CompactTextString(m) }
func (*ReceiveReply) ProtoMessage() {}
func (*ReceiveReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
func (m *ReceiveReply) GetStreamOffset() int64 {
if m != nil && m.StreamOffset != nil {
@ -1725,15 +1769,16 @@ func (m *ReceiveReply) GetBufferSize() int32 {
}
type PollEvent struct {
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor" json:"socket_descriptor,omitempty"`
RequestedEvents *int32 `protobuf:"varint,2,req,name=requested_events" json:"requested_events,omitempty"`
ObservedEvents *int32 `protobuf:"varint,3,req,name=observed_events" json:"observed_events,omitempty"`
SocketDescriptor *string `protobuf:"bytes,1,req,name=socket_descriptor,json=socketDescriptor" json:"socket_descriptor,omitempty"`
RequestedEvents *int32 `protobuf:"varint,2,req,name=requested_events,json=requestedEvents" json:"requested_events,omitempty"`
ObservedEvents *int32 `protobuf:"varint,3,req,name=observed_events,json=observedEvents" json:"observed_events,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PollEvent) Reset() { *m = PollEvent{} }
func (m *PollEvent) String() string { return proto.CompactTextString(m) }
func (*PollEvent) ProtoMessage() {}
func (m *PollEvent) Reset() { *m = PollEvent{} }
func (m *PollEvent) String() string { return proto.CompactTextString(m) }
func (*PollEvent) ProtoMessage() {}
func (*PollEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
func (m *PollEvent) GetSocketDescriptor() string {
if m != nil && m.SocketDescriptor != nil {
@ -1758,13 +1803,14 @@ func (m *PollEvent) GetObservedEvents() int32 {
type PollRequest struct {
Events []*PollEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,2,opt,name=timeout_seconds,def=-1" json:"timeout_seconds,omitempty"`
TimeoutSeconds *float64 `protobuf:"fixed64,2,opt,name=timeout_seconds,json=timeoutSeconds,def=-1" json:"timeout_seconds,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PollRequest) Reset() { *m = PollRequest{} }
func (m *PollRequest) String() string { return proto.CompactTextString(m) }
func (*PollRequest) ProtoMessage() {}
func (m *PollRequest) Reset() { *m = PollRequest{} }
func (m *PollRequest) String() string { return proto.CompactTextString(m) }
func (*PollRequest) ProtoMessage() {}
func (*PollRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
const Default_PollRequest_TimeoutSeconds float64 = -1
@ -1787,9 +1833,10 @@ type PollReply struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *PollReply) Reset() { *m = PollReply{} }
func (m *PollReply) String() string { return proto.CompactTextString(m) }
func (*PollReply) ProtoMessage() {}
func (m *PollReply) Reset() { *m = PollReply{} }
func (m *PollReply) String() string { return proto.CompactTextString(m) }
func (*PollReply) ProtoMessage() {}
func (*PollReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
func (m *PollReply) GetEvents() []*PollEvent {
if m != nil {
@ -1800,13 +1847,14 @@ func (m *PollReply) GetEvents() []*PollEvent {
type ResolveRequest struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
AddressFamilies []CreateSocketRequest_SocketFamily `protobuf:"varint,2,rep,name=address_families,enum=appengine.CreateSocketRequest_SocketFamily" json:"address_families,omitempty"`
AddressFamilies []CreateSocketRequest_SocketFamily `protobuf:"varint,2,rep,name=address_families,json=addressFamilies,enum=appengine.CreateSocketRequest_SocketFamily" json:"address_families,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ResolveRequest) Reset() { *m = ResolveRequest{} }
func (m *ResolveRequest) String() string { return proto.CompactTextString(m) }
func (*ResolveRequest) ProtoMessage() {}
func (m *ResolveRequest) Reset() { *m = ResolveRequest{} }
func (m *ResolveRequest) String() string { return proto.CompactTextString(m) }
func (*ResolveRequest) ProtoMessage() {}
func (*ResolveRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
func (m *ResolveRequest) GetName() string {
if m != nil && m.Name != nil {
@ -1823,15 +1871,16 @@ func (m *ResolveRequest) GetAddressFamilies() []CreateSocketRequest_SocketFamily
}
type ResolveReply struct {
PackedAddress [][]byte `protobuf:"bytes,2,rep,name=packed_address" json:"packed_address,omitempty"`
CanonicalName *string `protobuf:"bytes,3,opt,name=canonical_name" json:"canonical_name,omitempty"`
PackedAddress [][]byte `protobuf:"bytes,2,rep,name=packed_address,json=packedAddress" json:"packed_address,omitempty"`
CanonicalName *string `protobuf:"bytes,3,opt,name=canonical_name,json=canonicalName" json:"canonical_name,omitempty"`
Aliases []string `protobuf:"bytes,4,rep,name=aliases" json:"aliases,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ResolveReply) Reset() { *m = ResolveReply{} }
func (m *ResolveReply) String() string { return proto.CompactTextString(m) }
func (*ResolveReply) ProtoMessage() {}
func (m *ResolveReply) Reset() { *m = ResolveReply{} }
func (m *ResolveReply) String() string { return proto.CompactTextString(m) }
func (*ResolveReply) ProtoMessage() {}
func (*ResolveReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
func (m *ResolveReply) GetPackedAddress() [][]byte {
if m != nil {
@ -1855,4 +1904,239 @@ func (m *ResolveReply) GetAliases() []string {
}
func init() {
proto.RegisterType((*RemoteSocketServiceError)(nil), "appengine.RemoteSocketServiceError")
proto.RegisterType((*AddressPort)(nil), "appengine.AddressPort")
proto.RegisterType((*CreateSocketRequest)(nil), "appengine.CreateSocketRequest")
proto.RegisterType((*CreateSocketReply)(nil), "appengine.CreateSocketReply")
proto.RegisterType((*BindRequest)(nil), "appengine.BindRequest")
proto.RegisterType((*BindReply)(nil), "appengine.BindReply")
proto.RegisterType((*GetSocketNameRequest)(nil), "appengine.GetSocketNameRequest")
proto.RegisterType((*GetSocketNameReply)(nil), "appengine.GetSocketNameReply")
proto.RegisterType((*GetPeerNameRequest)(nil), "appengine.GetPeerNameRequest")
proto.RegisterType((*GetPeerNameReply)(nil), "appengine.GetPeerNameReply")
proto.RegisterType((*SocketOption)(nil), "appengine.SocketOption")
proto.RegisterType((*SetSocketOptionsRequest)(nil), "appengine.SetSocketOptionsRequest")
proto.RegisterType((*SetSocketOptionsReply)(nil), "appengine.SetSocketOptionsReply")
proto.RegisterType((*GetSocketOptionsRequest)(nil), "appengine.GetSocketOptionsRequest")
proto.RegisterType((*GetSocketOptionsReply)(nil), "appengine.GetSocketOptionsReply")
proto.RegisterType((*ConnectRequest)(nil), "appengine.ConnectRequest")
proto.RegisterType((*ConnectReply)(nil), "appengine.ConnectReply")
proto.RegisterType((*ListenRequest)(nil), "appengine.ListenRequest")
proto.RegisterType((*ListenReply)(nil), "appengine.ListenReply")
proto.RegisterType((*AcceptRequest)(nil), "appengine.AcceptRequest")
proto.RegisterType((*AcceptReply)(nil), "appengine.AcceptReply")
proto.RegisterType((*ShutDownRequest)(nil), "appengine.ShutDownRequest")
proto.RegisterType((*ShutDownReply)(nil), "appengine.ShutDownReply")
proto.RegisterType((*CloseRequest)(nil), "appengine.CloseRequest")
proto.RegisterType((*CloseReply)(nil), "appengine.CloseReply")
proto.RegisterType((*SendRequest)(nil), "appengine.SendRequest")
proto.RegisterType((*SendReply)(nil), "appengine.SendReply")
proto.RegisterType((*ReceiveRequest)(nil), "appengine.ReceiveRequest")
proto.RegisterType((*ReceiveReply)(nil), "appengine.ReceiveReply")
proto.RegisterType((*PollEvent)(nil), "appengine.PollEvent")
proto.RegisterType((*PollRequest)(nil), "appengine.PollRequest")
proto.RegisterType((*PollReply)(nil), "appengine.PollReply")
proto.RegisterType((*ResolveRequest)(nil), "appengine.ResolveRequest")
proto.RegisterType((*ResolveReply)(nil), "appengine.ResolveReply")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/socket/socket_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 3088 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5f, 0x77, 0xe3, 0xc6,
0x75, 0x37, 0x48, 0xfd, 0xe3, 0x90, 0x94, 0xee, 0x62, 0xa5, 0x5d, 0x25, 0x6e, 0x12, 0x05, 0x8e,
0x1b, 0x25, 0x8e, 0x77, 0x6d, 0x39, 0x4d, 0x9b, 0xa4, 0x49, 0x16, 0x04, 0x86, 0x24, 0x4c, 0x00,
0x03, 0xcd, 0x0c, 0x25, 0xd1, 0x6d, 0x8a, 0xd0, 0x22, 0xa4, 0x65, 0x4c, 0x11, 0x0c, 0xc9, 0xdd,
0xf5, 0xba, 0x69, 0xaa, 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, 0x2d, 0xed, 0x49, 0x21, 0x60, 0x86, 0xe9, 0x89, 0xe7, 0x2c, 0xbf, 0xe1,
0x24, 0x4e, 0x9c, 0x8e, 0x7c, 0x68, 0xa2, 0x15, 0x3d, 0xd9, 0xef, 0xd8, 0x4b, 0x6f, 0x86, 0x3c,
0xa2, 0xb6, 0x17, 0x72, 0x06, 0xb5, 0x15, 0x86, 0xfc, 0xdd, 0xc1, 0x21, 0x3e, 0xd4, 0x57, 0x18,
0xea, 0x37, 0x9d, 0x6d, 0x6d, 0x0f, 0xcb, 0xb8, 0xec, 0x33, 0xd8, 0x69, 0x6c, 0x7d, 0xb2, 0x91,
0x9d, 0x5a, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x31, 0x03, 0x4e, 0xbd, 0xfd, 0x1f, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/system/system_service.proto
// DO NOT EDIT!
/*
Package system is a generated protocol buffer package.
@ -27,6 +26,12 @@ 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
type SystemServiceError_ErrorCode int32
const (
@ -65,14 +70,18 @@ func (x *SystemServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = SystemServiceError_ErrorCode(value)
return nil
}
func (SystemServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type SystemServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SystemServiceError) Reset() { *m = SystemServiceError{} }
func (m *SystemServiceError) String() string { return proto.CompactTextString(m) }
func (*SystemServiceError) ProtoMessage() {}
func (m *SystemServiceError) Reset() { *m = SystemServiceError{} }
func (m *SystemServiceError) String() string { return proto.CompactTextString(m) }
func (*SystemServiceError) ProtoMessage() {}
func (*SystemServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type SystemStat struct {
// Instaneous value of this stat.
@ -88,9 +97,10 @@ type SystemStat struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *SystemStat) Reset() { *m = SystemStat{} }
func (m *SystemStat) String() string { return proto.CompactTextString(m) }
func (*SystemStat) ProtoMessage() {}
func (m *SystemStat) Reset() { *m = SystemStat{} }
func (m *SystemStat) String() string { return proto.CompactTextString(m) }
func (*SystemStat) ProtoMessage() {}
func (*SystemStat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *SystemStat) GetCurrent() float64 {
if m != nil && m.Current != nil {
@ -138,9 +148,10 @@ type GetSystemStatsRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSystemStatsRequest) Reset() { *m = GetSystemStatsRequest{} }
func (m *GetSystemStatsRequest) String() string { return proto.CompactTextString(m) }
func (*GetSystemStatsRequest) ProtoMessage() {}
func (m *GetSystemStatsRequest) Reset() { *m = GetSystemStatsRequest{} }
func (m *GetSystemStatsRequest) String() string { return proto.CompactTextString(m) }
func (*GetSystemStatsRequest) ProtoMessage() {}
func (*GetSystemStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type GetSystemStatsResponse struct {
// CPU used by this instance, in mcycles.
@ -150,9 +161,10 @@ type GetSystemStatsResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetSystemStatsResponse) Reset() { *m = GetSystemStatsResponse{} }
func (m *GetSystemStatsResponse) String() string { return proto.CompactTextString(m) }
func (*GetSystemStatsResponse) ProtoMessage() {}
func (m *GetSystemStatsResponse) Reset() { *m = GetSystemStatsResponse{} }
func (m *GetSystemStatsResponse) String() string { return proto.CompactTextString(m) }
func (*GetSystemStatsResponse) ProtoMessage() {}
func (*GetSystemStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *GetSystemStatsResponse) GetCpu() *SystemStat {
if m != nil {
@ -172,20 +184,22 @@ type StartBackgroundRequestRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *StartBackgroundRequestRequest) Reset() { *m = StartBackgroundRequestRequest{} }
func (m *StartBackgroundRequestRequest) String() string { return proto.CompactTextString(m) }
func (*StartBackgroundRequestRequest) ProtoMessage() {}
func (m *StartBackgroundRequestRequest) Reset() { *m = StartBackgroundRequestRequest{} }
func (m *StartBackgroundRequestRequest) String() string { return proto.CompactTextString(m) }
func (*StartBackgroundRequestRequest) ProtoMessage() {}
func (*StartBackgroundRequestRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
type StartBackgroundRequestResponse struct {
// Every /_ah/background request will have an X-AppEngine-BackgroundRequest
// header, whose value will be equal to this parameter, the request_id.
RequestId *string `protobuf:"bytes,1,opt,name=request_id" json:"request_id,omitempty"`
RequestId *string `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StartBackgroundRequestResponse) Reset() { *m = StartBackgroundRequestResponse{} }
func (m *StartBackgroundRequestResponse) String() string { return proto.CompactTextString(m) }
func (*StartBackgroundRequestResponse) ProtoMessage() {}
func (m *StartBackgroundRequestResponse) Reset() { *m = StartBackgroundRequestResponse{} }
func (m *StartBackgroundRequestResponse) String() string { return proto.CompactTextString(m) }
func (*StartBackgroundRequestResponse) ProtoMessage() {}
func (*StartBackgroundRequestResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *StartBackgroundRequestResponse) GetRequestId() string {
if m != nil && m.RequestId != nil {
@ -195,4 +209,42 @@ func (m *StartBackgroundRequestResponse) GetRequestId() string {
}
func init() {
proto.RegisterType((*SystemServiceError)(nil), "appengine.SystemServiceError")
proto.RegisterType((*SystemStat)(nil), "appengine.SystemStat")
proto.RegisterType((*GetSystemStatsRequest)(nil), "appengine.GetSystemStatsRequest")
proto.RegisterType((*GetSystemStatsResponse)(nil), "appengine.GetSystemStatsResponse")
proto.RegisterType((*StartBackgroundRequestRequest)(nil), "appengine.StartBackgroundRequestRequest")
proto.RegisterType((*StartBackgroundRequestResponse)(nil), "appengine.StartBackgroundRequestResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/system/system_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 377 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x8f, 0x93, 0x40,
0x18, 0xc6, 0xa5, 0x75, 0x51, 0x5e, 0xa3, 0xc1, 0xc9, 0xee, 0xca, 0xc1, 0x5d, 0x0d, 0x17, 0xbd,
0x48, 0x57, 0xbf, 0x80, 0xf6, 0xcf, 0x44, 0x49, 0x6b, 0xab, 0xd3, 0x7a, 0xf1, 0x42, 0x26, 0xf0,
0x3a, 0x21, 0xc2, 0x0c, 0x0e, 0x43, 0x93, 0x7e, 0x27, 0x3f, 0xa4, 0xe9, 0x30, 0x6d, 0xcd, 0x26,
0x3d, 0x31, 0xcf, 0xf3, 0xfc, 0x02, 0x3f, 0x08, 0xf0, 0x49, 0x28, 0x25, 0x2a, 0x4c, 0x84, 0xaa,
0xb8, 0x14, 0x89, 0xd2, 0x62, 0xc4, 0x9b, 0x06, 0xa5, 0x28, 0x25, 0x8e, 0x4a, 0x69, 0x50, 0x4b,
0x5e, 0x8d, 0xda, 0x5d, 0x6b, 0xb0, 0x76, 0x97, 0xac, 0x45, 0xbd, 0x2d, 0x73, 0x4c, 0x1a, 0xad,
0x8c, 0x22, 0xc1, 0x91, 0x8f, 0x7f, 0x01, 0x59, 0x5b, 0x64, 0xdd, 0x13, 0x54, 0x6b, 0xa5, 0xe3,
0x6f, 0x10, 0xd8, 0xc3, 0x54, 0x15, 0x48, 0x7c, 0x18, 0xac, 0xe6, 0xe1, 0x03, 0x42, 0xe0, 0x59,
0xba, 0xdc, 0x50, 0xb6, 0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, 0x2c, 0x9c, 0xcb,
0x41, 0xe9, 0x23, 0xdc, 0x9e, 0x03, 0x9c, 0xda, 0x0d, 0x80, 0xee, 0xab, 0xac, 0x2c, 0xac, 0x61,
0xc0, 0x02, 0xd7, 0xa4, 0xc5, 0xe4, 0xf1, 0x4f, 0xbf, 0xff, 0x4d, 0xfe, 0x05, 0x00, 0x00, 0xff,
0xff, 0x56, 0x5d, 0x5e, 0xc3, 0x5b, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -54,9 +54,9 @@ type transaction struct {
var ErrConcurrentTransaction = errors.New("internal: concurrent transaction")
func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool) error {
func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) {
if transactionFromContext(c) != nil {
return errors.New("nested transactions are not supported")
return nil, errors.New("nested transactions are not supported")
}
// Begin the transaction.
@ -67,8 +67,16 @@ func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error,
if xg {
req.AllowMultipleEg = proto.Bool(true)
}
if previousTransaction != nil {
req.PreviousTransaction = previousTransaction
}
if readOnly {
req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum()
} else {
req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum()
}
if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil {
return err
return nil, err
}
// Call f, rolling back the transaction if f returns a non-nil error, or panics.
@ -83,7 +91,7 @@ func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error,
Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{})
}()
if err := f(withTransaction(c, t)); err != nil {
return err
return &t.transaction, err
}
t.finished = true
@ -97,11 +105,11 @@ func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error,
// The Python Dev AppServer raises an ApplicationError with error code 2 (which is
// Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.".
if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." {
return ErrConcurrentTransaction
return &t.transaction, ErrConcurrentTransaction
}
if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) {
return ErrConcurrentTransaction
return &t.transaction, ErrConcurrentTransaction
}
}
return err
return &t.transaction, err
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
// DO NOT EDIT!
/*
Package urlfetch is a generated protocol buffer package.
@ -24,6 +23,12 @@ 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
type URLFetchServiceError_ErrorCode int32
const (
@ -89,6 +94,9 @@ func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = URLFetchServiceError_ErrorCode(value)
return nil
}
func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type URLFetchRequest_RequestMethod int32
@ -134,19 +142,23 @@ func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
*x = URLFetchRequest_RequestMethod(value)
return nil
}
func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0}
}
type URLFetchServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} }
func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) }
func (*URLFetchServiceError) ProtoMessage() {}
func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} }
func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) }
func (*URLFetchServiceError) ProtoMessage() {}
func (*URLFetchServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type URLFetchRequest struct {
Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"`
Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"`
Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header" json:"header,omitempty"`
Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"`
FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"`
Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"`
@ -154,9 +166,10 @@ type URLFetchRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} }
func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) }
func (*URLFetchRequest) ProtoMessage() {}
func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} }
func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) }
func (*URLFetchRequest) ProtoMessage() {}
func (*URLFetchRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
const Default_URLFetchRequest_FollowRedirects bool = true
const Default_URLFetchRequest_MustValidateServerCertificate bool = true
@ -216,9 +229,10 @@ type URLFetchRequest_Header struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} }
func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) }
func (*URLFetchRequest_Header) ProtoMessage() {}
func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} }
func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) }
func (*URLFetchRequest_Header) ProtoMessage() {}
func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
func (m *URLFetchRequest_Header) GetKey() string {
if m != nil && m.Key != nil {
@ -237,7 +251,7 @@ func (m *URLFetchRequest_Header) GetValue() string {
type URLFetchResponse struct {
Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"`
StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"`
Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header" json:"header,omitempty"`
Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"`
ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"`
ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"`
ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"`
@ -248,9 +262,10 @@ type URLFetchResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} }
func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) }
func (*URLFetchResponse) ProtoMessage() {}
func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} }
func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) }
func (*URLFetchResponse) ProtoMessage() {}
func (*URLFetchResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
const Default_URLFetchResponse_ContentWasTruncated bool = false
const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0
@ -333,9 +348,10 @@ type URLFetchResponse_Header struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} }
func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) }
func (*URLFetchResponse_Header) ProtoMessage() {}
func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} }
func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) }
func (*URLFetchResponse_Header) ProtoMessage() {}
func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
func (m *URLFetchResponse_Header) GetKey() string {
if m != nil && m.Key != nil {
@ -352,4 +368,66 @@ func (m *URLFetchResponse_Header) GetValue() string {
}
func init() {
proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError")
proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest")
proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header")
proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse")
proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 770 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54,
0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29,
0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e,
0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d,
0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b,
0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27,
0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0x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,
0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b,
0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9,
0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e,
0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97,
0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3,
0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8,
0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05,
0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/user/user_service.proto
// DO NOT EDIT!
/*
Package user is a generated protocol buffer package.
@ -30,6 +29,12 @@ 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
type UserServiceError_ErrorCode int32
const (
@ -74,25 +79,30 @@ func (x *UserServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = UserServiceError_ErrorCode(value)
return nil
}
func (UserServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type UserServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *UserServiceError) Reset() { *m = UserServiceError{} }
func (m *UserServiceError) String() string { return proto.CompactTextString(m) }
func (*UserServiceError) ProtoMessage() {}
func (m *UserServiceError) Reset() { *m = UserServiceError{} }
func (m *UserServiceError) String() string { return proto.CompactTextString(m) }
func (*UserServiceError) ProtoMessage() {}
func (*UserServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type CreateLoginURLRequest struct {
DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url" json:"destination_url,omitempty"`
AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain" json:"auth_domain,omitempty"`
FederatedIdentity *string `protobuf:"bytes,3,opt,name=federated_identity,def=" json:"federated_identity,omitempty"`
DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url,json=destinationUrl" json:"destination_url,omitempty"`
AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
FederatedIdentity *string `protobuf:"bytes,3,opt,name=federated_identity,json=federatedIdentity,def=" json:"federated_identity,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateLoginURLRequest) Reset() { *m = CreateLoginURLRequest{} }
func (m *CreateLoginURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateLoginURLRequest) ProtoMessage() {}
func (m *CreateLoginURLRequest) Reset() { *m = CreateLoginURLRequest{} }
func (m *CreateLoginURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateLoginURLRequest) ProtoMessage() {}
func (*CreateLoginURLRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *CreateLoginURLRequest) GetDestinationUrl() string {
if m != nil && m.DestinationUrl != nil {
@ -116,13 +126,14 @@ func (m *CreateLoginURLRequest) GetFederatedIdentity() string {
}
type CreateLoginURLResponse struct {
LoginUrl *string `protobuf:"bytes,1,req,name=login_url" json:"login_url,omitempty"`
LoginUrl *string `protobuf:"bytes,1,req,name=login_url,json=loginUrl" json:"login_url,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateLoginURLResponse) Reset() { *m = CreateLoginURLResponse{} }
func (m *CreateLoginURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateLoginURLResponse) ProtoMessage() {}
func (m *CreateLoginURLResponse) Reset() { *m = CreateLoginURLResponse{} }
func (m *CreateLoginURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateLoginURLResponse) ProtoMessage() {}
func (*CreateLoginURLResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *CreateLoginURLResponse) GetLoginUrl() string {
if m != nil && m.LoginUrl != nil {
@ -132,14 +143,15 @@ func (m *CreateLoginURLResponse) GetLoginUrl() string {
}
type CreateLogoutURLRequest struct {
DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url" json:"destination_url,omitempty"`
AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain" json:"auth_domain,omitempty"`
DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url,json=destinationUrl" json:"destination_url,omitempty"`
AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateLogoutURLRequest) Reset() { *m = CreateLogoutURLRequest{} }
func (m *CreateLogoutURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateLogoutURLRequest) ProtoMessage() {}
func (m *CreateLogoutURLRequest) Reset() { *m = CreateLogoutURLRequest{} }
func (m *CreateLogoutURLRequest) String() string { return proto.CompactTextString(m) }
func (*CreateLogoutURLRequest) ProtoMessage() {}
func (*CreateLogoutURLRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *CreateLogoutURLRequest) GetDestinationUrl() string {
if m != nil && m.DestinationUrl != nil {
@ -156,13 +168,14 @@ func (m *CreateLogoutURLRequest) GetAuthDomain() string {
}
type CreateLogoutURLResponse struct {
LogoutUrl *string `protobuf:"bytes,1,req,name=logout_url" json:"logout_url,omitempty"`
LogoutUrl *string `protobuf:"bytes,1,req,name=logout_url,json=logoutUrl" json:"logout_url,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateLogoutURLResponse) Reset() { *m = CreateLogoutURLResponse{} }
func (m *CreateLogoutURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateLogoutURLResponse) ProtoMessage() {}
func (m *CreateLogoutURLResponse) Reset() { *m = CreateLogoutURLResponse{} }
func (m *CreateLogoutURLResponse) String() string { return proto.CompactTextString(m) }
func (*CreateLogoutURLResponse) ProtoMessage() {}
func (*CreateLogoutURLResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *CreateLogoutURLResponse) GetLogoutUrl() string {
if m != nil && m.LogoutUrl != nil {
@ -177,9 +190,10 @@ type GetOAuthUserRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *GetOAuthUserRequest) Reset() { *m = GetOAuthUserRequest{} }
func (m *GetOAuthUserRequest) String() string { return proto.CompactTextString(m) }
func (*GetOAuthUserRequest) ProtoMessage() {}
func (m *GetOAuthUserRequest) Reset() { *m = GetOAuthUserRequest{} }
func (m *GetOAuthUserRequest) String() string { return proto.CompactTextString(m) }
func (*GetOAuthUserRequest) ProtoMessage() {}
func (*GetOAuthUserRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *GetOAuthUserRequest) GetScope() string {
if m != nil && m.Scope != nil {
@ -197,18 +211,19 @@ func (m *GetOAuthUserRequest) GetScopes() []string {
type GetOAuthUserResponse struct {
Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"`
UserId *string `protobuf:"bytes,2,req,name=user_id" json:"user_id,omitempty"`
AuthDomain *string `protobuf:"bytes,3,req,name=auth_domain" json:"auth_domain,omitempty"`
UserOrganization *string `protobuf:"bytes,4,opt,name=user_organization,def=" json:"user_organization,omitempty"`
IsAdmin *bool `protobuf:"varint,5,opt,name=is_admin,def=0" json:"is_admin,omitempty"`
ClientId *string `protobuf:"bytes,6,opt,name=client_id,def=" json:"client_id,omitempty"`
UserId *string `protobuf:"bytes,2,req,name=user_id,json=userId" json:"user_id,omitempty"`
AuthDomain *string `protobuf:"bytes,3,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"`
UserOrganization *string `protobuf:"bytes,4,opt,name=user_organization,json=userOrganization,def=" json:"user_organization,omitempty"`
IsAdmin *bool `protobuf:"varint,5,opt,name=is_admin,json=isAdmin,def=0" json:"is_admin,omitempty"`
ClientId *string `protobuf:"bytes,6,opt,name=client_id,json=clientId,def=" json:"client_id,omitempty"`
Scopes []string `protobuf:"bytes,7,rep,name=scopes" json:"scopes,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GetOAuthUserResponse) Reset() { *m = GetOAuthUserResponse{} }
func (m *GetOAuthUserResponse) String() string { return proto.CompactTextString(m) }
func (*GetOAuthUserResponse) ProtoMessage() {}
func (m *GetOAuthUserResponse) Reset() { *m = GetOAuthUserResponse{} }
func (m *GetOAuthUserResponse) String() string { return proto.CompactTextString(m) }
func (*GetOAuthUserResponse) ProtoMessage() {}
func (*GetOAuthUserResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
const Default_GetOAuthUserResponse_IsAdmin bool = false
@ -265,18 +280,20 @@ type CheckOAuthSignatureRequest struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CheckOAuthSignatureRequest) Reset() { *m = CheckOAuthSignatureRequest{} }
func (m *CheckOAuthSignatureRequest) String() string { return proto.CompactTextString(m) }
func (*CheckOAuthSignatureRequest) ProtoMessage() {}
func (m *CheckOAuthSignatureRequest) Reset() { *m = CheckOAuthSignatureRequest{} }
func (m *CheckOAuthSignatureRequest) String() string { return proto.CompactTextString(m) }
func (*CheckOAuthSignatureRequest) ProtoMessage() {}
func (*CheckOAuthSignatureRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
type CheckOAuthSignatureResponse struct {
OauthConsumerKey *string `protobuf:"bytes,1,req,name=oauth_consumer_key" json:"oauth_consumer_key,omitempty"`
OauthConsumerKey *string `protobuf:"bytes,1,req,name=oauth_consumer_key,json=oauthConsumerKey" json:"oauth_consumer_key,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CheckOAuthSignatureResponse) Reset() { *m = CheckOAuthSignatureResponse{} }
func (m *CheckOAuthSignatureResponse) String() string { return proto.CompactTextString(m) }
func (*CheckOAuthSignatureResponse) ProtoMessage() {}
func (m *CheckOAuthSignatureResponse) Reset() { *m = CheckOAuthSignatureResponse{} }
func (m *CheckOAuthSignatureResponse) String() string { return proto.CompactTextString(m) }
func (*CheckOAuthSignatureResponse) ProtoMessage() {}
func (*CheckOAuthSignatureResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *CheckOAuthSignatureResponse) GetOauthConsumerKey() string {
if m != nil && m.OauthConsumerKey != nil {
@ -286,4 +303,57 @@ func (m *CheckOAuthSignatureResponse) GetOauthConsumerKey() string {
}
func init() {
proto.RegisterType((*UserServiceError)(nil), "appengine.UserServiceError")
proto.RegisterType((*CreateLoginURLRequest)(nil), "appengine.CreateLoginURLRequest")
proto.RegisterType((*CreateLoginURLResponse)(nil), "appengine.CreateLoginURLResponse")
proto.RegisterType((*CreateLogoutURLRequest)(nil), "appengine.CreateLogoutURLRequest")
proto.RegisterType((*CreateLogoutURLResponse)(nil), "appengine.CreateLogoutURLResponse")
proto.RegisterType((*GetOAuthUserRequest)(nil), "appengine.GetOAuthUserRequest")
proto.RegisterType((*GetOAuthUserResponse)(nil), "appengine.GetOAuthUserResponse")
proto.RegisterType((*CheckOAuthSignatureRequest)(nil), "appengine.CheckOAuthSignatureRequest")
proto.RegisterType((*CheckOAuthSignatureResponse)(nil), "appengine.CheckOAuthSignatureResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/user/user_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 573 bytes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 0xcc, 0xf0, 0xee, 0x75, 0xf7, 0xc3, 0x76, 0x95, 0xeb, 0x67,
0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x04, 0x53, 0xcc, 0xf8, 0x03, 0x00, 0x00,
}

View file

@ -1,6 +1,5 @@
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google.golang.org/appengine/internal/xmpp/xmpp_service.proto
// DO NOT EDIT!
/*
Package xmpp is a generated protocol buffer package.
@ -32,6 +31,12 @@ 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
type XmppServiceError_ErrorCode int32
const (
@ -85,6 +90,9 @@ func (x *XmppServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
*x = XmppServiceError_ErrorCode(value)
return nil
}
func (XmppServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type PresenceResponse_SHOW int32
@ -127,6 +135,7 @@ func (x *PresenceResponse_SHOW) UnmarshalJSON(data []byte) error {
*x = PresenceResponse_SHOW(value)
return nil
}
func (PresenceResponse_SHOW) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
type XmppMessageResponse_XmppMessageStatus int32
@ -163,24 +172,29 @@ func (x *XmppMessageResponse_XmppMessageStatus) UnmarshalJSON(data []byte) error
*x = XmppMessageResponse_XmppMessageStatus(value)
return nil
}
func (XmppMessageResponse_XmppMessageStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{6, 0}
}
type XmppServiceError struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppServiceError) Reset() { *m = XmppServiceError{} }
func (m *XmppServiceError) String() string { return proto.CompactTextString(m) }
func (*XmppServiceError) ProtoMessage() {}
func (m *XmppServiceError) Reset() { *m = XmppServiceError{} }
func (m *XmppServiceError) String() string { return proto.CompactTextString(m) }
func (*XmppServiceError) ProtoMessage() {}
func (*XmppServiceError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type PresenceRequest struct {
Jid *string `protobuf:"bytes,1,req,name=jid" json:"jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid" json:"from_jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid,json=fromJid" json:"from_jid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PresenceRequest) Reset() { *m = PresenceRequest{} }
func (m *PresenceRequest) String() string { return proto.CompactTextString(m) }
func (*PresenceRequest) ProtoMessage() {}
func (m *PresenceRequest) Reset() { *m = PresenceRequest{} }
func (m *PresenceRequest) String() string { return proto.CompactTextString(m) }
func (*PresenceRequest) ProtoMessage() {}
func (*PresenceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *PresenceRequest) GetJid() string {
if m != nil && m.Jid != nil {
@ -197,15 +211,16 @@ func (m *PresenceRequest) GetFromJid() string {
}
type PresenceResponse struct {
IsAvailable *bool `protobuf:"varint,1,req,name=is_available" json:"is_available,omitempty"`
IsAvailable *bool `protobuf:"varint,1,req,name=is_available,json=isAvailable" json:"is_available,omitempty"`
Presence *PresenceResponse_SHOW `protobuf:"varint,2,opt,name=presence,enum=appengine.PresenceResponse_SHOW" json:"presence,omitempty"`
Valid *bool `protobuf:"varint,3,opt,name=valid" json:"valid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PresenceResponse) Reset() { *m = PresenceResponse{} }
func (m *PresenceResponse) String() string { return proto.CompactTextString(m) }
func (*PresenceResponse) ProtoMessage() {}
func (m *PresenceResponse) Reset() { *m = PresenceResponse{} }
func (m *PresenceResponse) String() string { return proto.CompactTextString(m) }
func (*PresenceResponse) ProtoMessage() {}
func (*PresenceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *PresenceResponse) GetIsAvailable() bool {
if m != nil && m.IsAvailable != nil {
@ -230,13 +245,14 @@ func (m *PresenceResponse) GetValid() bool {
type BulkPresenceRequest struct {
Jid []string `protobuf:"bytes,1,rep,name=jid" json:"jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid" json:"from_jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid,json=fromJid" json:"from_jid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *BulkPresenceRequest) Reset() { *m = BulkPresenceRequest{} }
func (m *BulkPresenceRequest) String() string { return proto.CompactTextString(m) }
func (*BulkPresenceRequest) ProtoMessage() {}
func (m *BulkPresenceRequest) Reset() { *m = BulkPresenceRequest{} }
func (m *BulkPresenceRequest) String() string { return proto.CompactTextString(m) }
func (*BulkPresenceRequest) ProtoMessage() {}
func (*BulkPresenceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *BulkPresenceRequest) GetJid() []string {
if m != nil {
@ -253,13 +269,14 @@ func (m *BulkPresenceRequest) GetFromJid() string {
}
type BulkPresenceResponse struct {
PresenceResponse []*PresenceResponse `protobuf:"bytes,1,rep,name=presence_response" json:"presence_response,omitempty"`
PresenceResponse []*PresenceResponse `protobuf:"bytes,1,rep,name=presence_response,json=presenceResponse" json:"presence_response,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *BulkPresenceResponse) Reset() { *m = BulkPresenceResponse{} }
func (m *BulkPresenceResponse) String() string { return proto.CompactTextString(m) }
func (*BulkPresenceResponse) ProtoMessage() {}
func (m *BulkPresenceResponse) Reset() { *m = BulkPresenceResponse{} }
func (m *BulkPresenceResponse) String() string { return proto.CompactTextString(m) }
func (*BulkPresenceResponse) ProtoMessage() {}
func (*BulkPresenceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *BulkPresenceResponse) GetPresenceResponse() []*PresenceResponse {
if m != nil {
@ -271,15 +288,16 @@ func (m *BulkPresenceResponse) GetPresenceResponse() []*PresenceResponse {
type XmppMessageRequest struct {
Jid []string `protobuf:"bytes,1,rep,name=jid" json:"jid,omitempty"`
Body *string `protobuf:"bytes,2,req,name=body" json:"body,omitempty"`
RawXml *bool `protobuf:"varint,3,opt,name=raw_xml,def=0" json:"raw_xml,omitempty"`
RawXml *bool `protobuf:"varint,3,opt,name=raw_xml,json=rawXml,def=0" json:"raw_xml,omitempty"`
Type *string `protobuf:"bytes,4,opt,name=type,def=chat" json:"type,omitempty"`
FromJid *string `protobuf:"bytes,5,opt,name=from_jid" json:"from_jid,omitempty"`
FromJid *string `protobuf:"bytes,5,opt,name=from_jid,json=fromJid" json:"from_jid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppMessageRequest) Reset() { *m = XmppMessageRequest{} }
func (m *XmppMessageRequest) String() string { return proto.CompactTextString(m) }
func (*XmppMessageRequest) ProtoMessage() {}
func (m *XmppMessageRequest) Reset() { *m = XmppMessageRequest{} }
func (m *XmppMessageRequest) String() string { return proto.CompactTextString(m) }
func (*XmppMessageRequest) ProtoMessage() {}
func (*XmppMessageRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
const Default_XmppMessageRequest_RawXml bool = false
const Default_XmppMessageRequest_Type string = "chat"
@ -324,9 +342,10 @@ type XmppMessageResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppMessageResponse) Reset() { *m = XmppMessageResponse{} }
func (m *XmppMessageResponse) String() string { return proto.CompactTextString(m) }
func (*XmppMessageResponse) ProtoMessage() {}
func (m *XmppMessageResponse) Reset() { *m = XmppMessageResponse{} }
func (m *XmppMessageResponse) String() string { return proto.CompactTextString(m) }
func (*XmppMessageResponse) ProtoMessage() {}
func (*XmppMessageResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *XmppMessageResponse) GetStatus() []XmppMessageResponse_XmppMessageStatus {
if m != nil {
@ -340,13 +359,14 @@ type XmppSendPresenceRequest struct {
Type *string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
Show *string `protobuf:"bytes,3,opt,name=show" json:"show,omitempty"`
Status *string `protobuf:"bytes,4,opt,name=status" json:"status,omitempty"`
FromJid *string `protobuf:"bytes,5,opt,name=from_jid" json:"from_jid,omitempty"`
FromJid *string `protobuf:"bytes,5,opt,name=from_jid,json=fromJid" json:"from_jid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppSendPresenceRequest) Reset() { *m = XmppSendPresenceRequest{} }
func (m *XmppSendPresenceRequest) String() string { return proto.CompactTextString(m) }
func (*XmppSendPresenceRequest) ProtoMessage() {}
func (m *XmppSendPresenceRequest) Reset() { *m = XmppSendPresenceRequest{} }
func (m *XmppSendPresenceRequest) String() string { return proto.CompactTextString(m) }
func (*XmppSendPresenceRequest) ProtoMessage() {}
func (*XmppSendPresenceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *XmppSendPresenceRequest) GetJid() string {
if m != nil && m.Jid != nil {
@ -387,19 +407,21 @@ type XmppSendPresenceResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppSendPresenceResponse) Reset() { *m = XmppSendPresenceResponse{} }
func (m *XmppSendPresenceResponse) String() string { return proto.CompactTextString(m) }
func (*XmppSendPresenceResponse) ProtoMessage() {}
func (m *XmppSendPresenceResponse) Reset() { *m = XmppSendPresenceResponse{} }
func (m *XmppSendPresenceResponse) String() string { return proto.CompactTextString(m) }
func (*XmppSendPresenceResponse) ProtoMessage() {}
func (*XmppSendPresenceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
type XmppInviteRequest struct {
Jid *string `protobuf:"bytes,1,req,name=jid" json:"jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid" json:"from_jid,omitempty"`
FromJid *string `protobuf:"bytes,2,opt,name=from_jid,json=fromJid" json:"from_jid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppInviteRequest) Reset() { *m = XmppInviteRequest{} }
func (m *XmppInviteRequest) String() string { return proto.CompactTextString(m) }
func (*XmppInviteRequest) ProtoMessage() {}
func (m *XmppInviteRequest) Reset() { *m = XmppInviteRequest{} }
func (m *XmppInviteRequest) String() string { return proto.CompactTextString(m) }
func (*XmppInviteRequest) ProtoMessage() {}
func (*XmppInviteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *XmppInviteRequest) GetJid() string {
if m != nil && m.Jid != nil {
@ -419,9 +441,72 @@ type XmppInviteResponse struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *XmppInviteResponse) Reset() { *m = XmppInviteResponse{} }
func (m *XmppInviteResponse) String() string { return proto.CompactTextString(m) }
func (*XmppInviteResponse) ProtoMessage() {}
func (m *XmppInviteResponse) Reset() { *m = XmppInviteResponse{} }
func (m *XmppInviteResponse) String() string { return proto.CompactTextString(m) }
func (*XmppInviteResponse) ProtoMessage() {}
func (*XmppInviteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func init() {
proto.RegisterType((*XmppServiceError)(nil), "appengine.XmppServiceError")
proto.RegisterType((*PresenceRequest)(nil), "appengine.PresenceRequest")
proto.RegisterType((*PresenceResponse)(nil), "appengine.PresenceResponse")
proto.RegisterType((*BulkPresenceRequest)(nil), "appengine.BulkPresenceRequest")
proto.RegisterType((*BulkPresenceResponse)(nil), "appengine.BulkPresenceResponse")
proto.RegisterType((*XmppMessageRequest)(nil), "appengine.XmppMessageRequest")
proto.RegisterType((*XmppMessageResponse)(nil), "appengine.XmppMessageResponse")
proto.RegisterType((*XmppSendPresenceRequest)(nil), "appengine.XmppSendPresenceRequest")
proto.RegisterType((*XmppSendPresenceResponse)(nil), "appengine.XmppSendPresenceResponse")
proto.RegisterType((*XmppInviteRequest)(nil), "appengine.XmppInviteRequest")
proto.RegisterType((*XmppInviteResponse)(nil), "appengine.XmppInviteResponse")
}
func init() {
proto.RegisterFile("google.golang.org/appengine/internal/xmpp/xmpp_service.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 681 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x72, 0xda, 0x48,
0x10, 0xb6, 0x40, 0xfc, 0x35, 0x5e, 0x7b, 0x18, 0xb3, 0xbb, 0xec, 0xa6, 0x2a, 0x45, 0x74, 0xf2,
0x09, 0xa7, 0x7c, 0x74, 0xb9, 0x52, 0x11, 0x68, 0x5c, 0xc8, 0x05, 0x12, 0x19, 0x20, 0xc6, 0xbe,
0x4c, 0x64, 0x33, 0x96, 0x95, 0x08, 0x49, 0x91, 0x64, 0x6c, 0xbf, 0x40, 0xae, 0x79, 0x89, 0xbc,
0x46, 0x5e, 0x22, 0xa7, 0x3c, 0x4e, 0x4a, 0x23, 0x41, 0xc0, 0x4e, 0x9c, 0x54, 0x2e, 0x54, 0xcf,
0x37, 0xdd, 0x1f, 0xfd, 0x7d, 0x3d, 0x2d, 0x38, 0xb4, 0x7d, 0xdf, 0x76, 0x79, 0xcb, 0xf6, 0x5d,
0xcb, 0xb3, 0x5b, 0x7e, 0x68, 0xef, 0x59, 0x41, 0xc0, 0x3d, 0xdb, 0xf1, 0xf8, 0x9e, 0xe3, 0xc5,
0x3c, 0xf4, 0x2c, 0x77, 0xef, 0x76, 0x16, 0x04, 0xe2, 0x87, 0x45, 0x3c, 0x9c, 0x3b, 0x17, 0xbc,
0x15, 0x84, 0x7e, 0xec, 0xe3, 0xca, 0x32, 0x57, 0xf9, 0x22, 0x01, 0x9a, 0xcc, 0x82, 0x60, 0x98,
0x26, 0x90, 0x30, 0xf4, 0x43, 0xe5, 0xb3, 0x04, 0x15, 0x11, 0x75, 0xfc, 0x29, 0xc7, 0x7f, 0x43,
0x6d, 0x6c, 0x0c, 0x07, 0xa4, 0xa3, 0x1f, 0xe9, 0x44, 0x63, 0x84, 0x52, 0x93, 0x22, 0x09, 0x6f,
0x43, 0x55, 0x37, 0x5e, 0xab, 0x3d, 0x5d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0xa3, 0xd8, 0x8a, 0xaf, 0x23, 0xd1,
0xd5, 0xd6, 0xfe, 0xf3, 0x15, 0xa1, 0x3f, 0xc8, 0x5f, 0xc5, 0x86, 0xa2, 0x8e, 0x66, 0xf5, 0x4a,
0x07, 0x6a, 0x0f, 0x2e, 0xf1, 0x26, 0x94, 0x0d, 0x33, 0x5b, 0xb9, 0x8d, 0xfb, 0x2b, 0x27, 0x76,
0xd0, 0x1c, 0x75, 0x09, 0xcd, 0x32, 0x72, 0xca, 0x07, 0x09, 0xfe, 0x4d, 0xd7, 0xd9, 0x9b, 0xfe,
0x7a, 0x05, 0x70, 0xe6, 0x44, 0x3a, 0xdf, 0xd4, 0x03, 0x0c, 0x72, 0x74, 0xe5, 0xdf, 0x08, 0xeb,
0x2a, 0x54, 0xc4, 0xf8, 0x9f, 0xa5, 0x48, 0xe1, 0xd9, 0xa2, 0xe5, 0xc7, 0xfc, 0xfa, 0x1f, 0x1a,
0x0f, 0xfb, 0xc8, 0xa6, 0xfb, 0x32, 0x55, 0xaa, 0x7b, 0x73, 0x27, 0xfe, 0xb3, 0x05, 0xad, 0xa7,
0xcf, 0x63, 0xc1, 0x90, 0xf2, 0xb6, 0x8b, 0x67, 0x72, 0xf2, 0xb1, 0xfb, 0x16, 0x00, 0x00, 0xff,
0xff, 0x4e, 0x58, 0x2e, 0xb1, 0x1d, 0x05, 0x00, 0x00,
}

View file

@ -3,8 +3,8 @@
// license that can be found in the LICENSE file.
/*
Package log provides the means of querying an application's logs from
within an App Engine application.
Package log provides the means of writing and querying an application's logs
from within an App Engine application.
Example:
c := appengine.NewContext(r)

View file

@ -51,7 +51,7 @@ type Message struct {
Attachments []Attachment
// Extra mail headers.
// See https://cloud.google.com/appengine/docs/go/mail/
// See https://cloud.google.com/appengine/docs/standard/go/mail/
// for permissible headers.
Headers mail.Header
}

View file

@ -27,16 +27,24 @@ import (
pb "google.golang.org/appengine/internal/remote_api"
)
// NewRemoteContext returns a context that gives access to the production
// APIs for the application at the given host. All communication will be
// performed over SSL unless the host is localhost.
func NewRemoteContext(host string, client *http.Client) (context.Context, error) {
// Client is a connection to the production APIs for an application.
type Client struct {
hc *http.Client
url string
appID string
}
// NewClient returns a client for the given host. All communication will
// be performed over SSL unless the host is localhost.
func NewClient(host string, client *http.Client) (*Client, error) {
// Add an appcfg header to outgoing requests.
wrapClient := new(http.Client)
*wrapClient = *client
t := client.Transport
if t == nil {
t = http.DefaultTransport
}
client.Transport = &headerAddingRoundTripper{t}
wrapClient.Transport = &headerAddingRoundTripper{t}
url := url.URL{
Scheme: "https",
@ -47,23 +55,35 @@ func NewRemoteContext(host string, client *http.Client) (context.Context, error)
url.Scheme = "http"
}
u := url.String()
appID, err := getAppID(client, u)
appID, err := getAppID(wrapClient, u)
if err != nil {
return nil, fmt.Errorf("unable to contact server: %v", err)
}
rc := &remoteContext{
client: client,
url: u,
}
ctx := internal.WithCallOverride(context.Background(), rc.call)
ctx = internal.WithLogOverride(ctx, rc.logf)
ctx = internal.WithAppIDOverride(ctx, appID)
return ctx, nil
return &Client{
hc: wrapClient,
url: u,
appID: appID,
}, nil
}
type remoteContext struct {
client *http.Client
url string
// NewContext returns a copy of parent that will cause App Engine API
// calls to be sent to the client's remote host.
func (c *Client) NewContext(parent context.Context) context.Context {
ctx := internal.WithCallOverride(parent, c.call)
ctx = internal.WithLogOverride(ctx, c.logf)
ctx = internal.WithAppIDOverride(ctx, c.appID)
return ctx
}
// NewRemoteContext returns a context that gives access to the production
// APIs for the application at the given host. All communication will be
// performed over SSL unless the host is localhost.
func NewRemoteContext(host string, client *http.Client) (context.Context, error) {
c, err := NewClient(host, client)
if err != nil {
return nil, err
}
return c.NewContext(context.Background()), nil
}
var logLevels = map[int64]string{
@ -74,11 +94,11 @@ var logLevels = map[int64]string{
4: "CRITICAL",
}
func (c *remoteContext) logf(level int64, format string, args ...interface{}) {
func (c *Client) logf(level int64, format string, args ...interface{}) {
log.Printf(logLevels[level]+": "+format, args...)
}
func (c *remoteContext) call(ctx context.Context, service, method string, in, out proto.Message) error {
func (c *Client) call(ctx context.Context, service, method string, in, out proto.Message) error {
req, err := proto.Marshal(in)
if err != nil {
return fmt.Errorf("error marshalling request: %v", err)
@ -97,7 +117,7 @@ func (c *remoteContext) call(ctx context.Context, service, method string, in, ou
}
// TODO(djd): Respect ctx.Deadline()?
resp, err := c.client.Post(c.url, "application/octet-stream", bytes.NewReader(req))
resp, err := c.hc.Post(c.url, "application/octet-stream", bytes.NewReader(req))
if err != nil {
return fmt.Errorf("error sending request: %v", err)
}

View file

@ -5,7 +5,12 @@
package remote_api
import (
"log"
"net/http"
"testing"
"golang.org/x/net/context"
"google.golang.org/appengine/datastore"
)
func TestAppIDRE(t *testing.T) {
@ -22,3 +27,17 @@ func TestAppIDRE(t *testing.T) {
}
}
}
func ExampleClient() {
c, err := NewClient("example.appspot.com", http.DefaultClient)
if err != nil {
log.Fatal(err)
}
ctx := context.Background() // or from a request
ctx = c.NewContext(ctx)
_, err = datastore.Put(ctx, datastore.NewIncompleteKey(ctx, "Foo", nil), struct{ Bar int }{42})
if err != nil {
log.Fatal(err)
}
}

View file

@ -39,7 +39,7 @@ func handle(w http.ResponseWriter, req *http.Request) {
)
}
if u == nil || !u.Admin {
if !appengine.IsDevAppServer() && (u == nil || !u.Admin) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.WriteHeader(http.StatusUnauthorized)
io.WriteString(w, "You must be logged in as an administrator to access this.\n")

View file

@ -79,7 +79,7 @@ result. Next will return Done when the iterator is exhausted.
Search takes a string query to determine which documents to return. The query
can be simple, such as a single word to match, or complex. The query
language is described at
https://cloud.google.com/appengine/docs/go/search/query_strings
https://cloud.google.com/appengine/docs/standard/go/search/query_strings
Search also takes an optional SearchOptions struct which gives much more
control over how results are calculated and returned.

View file

@ -29,6 +29,8 @@ import (
pb "google.golang.org/appengine/internal/search"
)
const maxDocumentsPerPutDelete = 200
var (
// ErrInvalidDocumentType is returned when methods like Put, Get or Next
// are passed a dst or src argument of invalid type.
@ -36,6 +38,10 @@ var (
// ErrNoSuchDocument is returned when no document was found for a given ID.
ErrNoSuchDocument = errors.New("search: no such document")
// ErrTooManyDocuments is returned when the user passes too many documents to
// PutMulti or DeleteMulti.
ErrTooManyDocuments = fmt.Errorf("search: too many documents given to put or delete (max is %d)", maxDocumentsPerPutDelete)
)
// Atom is a document field whose contents are indexed as a single indivisible
@ -120,39 +126,78 @@ func Open(name string) (*Index, error) {
// src must be a non-nil struct pointer or implement the FieldLoadSaver
// interface.
func (x *Index) Put(c context.Context, id string, src interface{}) (string, error) {
d, err := saveDoc(src)
ids, err := x.PutMulti(c, []string{id}, []interface{}{src})
if err != nil {
return "", err
}
if id != "" {
if !validIndexNameOrDocID(id) {
return "", fmt.Errorf("search: invalid ID %q", id)
}
d.Id = proto.String(id)
return ids[0], nil
}
// PutMulti is like Put, but is more efficient for adding multiple documents to
// the index at once.
//
// Up to 200 documents can be added at once. ErrTooManyDocuments is returned if
// you try to add more.
//
// ids can either be an empty slice (which means new IDs will be allocated for
// each of the documents added) or a slice the same size as srcs.
//
// The error may be an instance of appengine.MultiError, in which case it will
// be the same size as srcs and the individual errors inside will correspond
// with the items in srcs.
func (x *Index) PutMulti(c context.Context, ids []string, srcs []interface{}) ([]string, error) {
if len(ids) != 0 && len(srcs) != len(ids) {
return nil, fmt.Errorf("search: PutMulti expects ids and srcs slices of the same length")
}
if len(srcs) > maxDocumentsPerPutDelete {
return nil, ErrTooManyDocuments
}
docs := make([]*pb.Document, len(srcs))
for i, s := range srcs {
var err error
docs[i], err = saveDoc(s)
if err != nil {
return nil, err
}
if len(ids) != 0 && ids[i] != "" {
if !validIndexNameOrDocID(ids[i]) {
return nil, fmt.Errorf("search: invalid ID %q", ids[i])
}
docs[i].Id = proto.String(ids[i])
}
}
// spec is modified by Call when applying the current Namespace, so copy it to
// avoid retaining the namespace beyond the scope of the Call.
spec := x.spec
req := &pb.IndexDocumentRequest{
Params: &pb.IndexDocumentParams{
Document: []*pb.Document{d},
Document: docs,
IndexSpec: &spec,
},
}
res := &pb.IndexDocumentResponse{}
if err := internal.Call(c, "search", "IndexDocument", req, res); err != nil {
return "", err
return nil, err
}
if len(res.Status) > 0 {
if s := res.Status[0]; s.GetCode() != pb.SearchServiceError_OK {
return "", fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
multiErr, hasErr := make(appengine.MultiError, len(res.Status)), false
for i, s := range res.Status {
if s.GetCode() != pb.SearchServiceError_OK {
multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
hasErr = true
}
}
if len(res.Status) != 1 || len(res.DocId) != 1 {
return "", fmt.Errorf("search: internal error: wrong number of results (%d Statuses, %d DocIDs)",
len(res.Status), len(res.DocId))
if hasErr {
return res.DocId, multiErr
}
return res.DocId[0], nil
if len(res.Status) != len(docs) || len(res.DocId) != len(docs) {
return nil, fmt.Errorf("search: internal error: wrong number of results (%d Statuses, %d DocIDs, expected %d)",
len(res.Status), len(res.DocId), len(docs))
}
return res.DocId, nil
}
// Get loads the document with the given ID into dst.
@ -194,9 +239,22 @@ func (x *Index) Get(c context.Context, id string, dst interface{}) error {
// Delete deletes a document from the index.
func (x *Index) Delete(c context.Context, id string) error {
return x.DeleteMulti(c, []string{id})
}
// DeleteMulti deletes multiple documents from the index.
//
// The returned error may be an instance of appengine.MultiError, in which case
// it will be the same size as srcs and the individual errors inside will
// correspond with the items in srcs.
func (x *Index) DeleteMulti(c context.Context, ids []string) error {
if len(ids) > maxDocumentsPerPutDelete {
return ErrTooManyDocuments
}
req := &pb.DeleteDocumentRequest{
Params: &pb.DeleteDocumentParams{
DocId: []string{id},
DocId: ids,
IndexSpec: &x.spec,
},
}
@ -204,11 +262,19 @@ func (x *Index) Delete(c context.Context, id string) error {
if err := internal.Call(c, "search", "DeleteDocument", req, res); err != nil {
return err
}
if len(res.Status) != 1 {
return fmt.Errorf("search: internal error: wrong number of results (%d)", len(res.Status))
if len(res.Status) != len(ids) {
return fmt.Errorf("search: internal error: wrong number of results (%d, expected %d)",
len(res.Status), len(ids))
}
if s := res.Status[0]; s.GetCode() != pb.SearchServiceError_OK {
return fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
multiErr, hasErr := make(appengine.MultiError, len(ids)), false
for i, s := range res.Status {
if s.GetCode() != pb.SearchServiceError_OK {
multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
hasErr = true
}
}
if hasErr {
return multiErr
}
return nil
}
@ -438,7 +504,7 @@ type FieldExpression struct {
Name string
// Expr is evaluated to provide a custom content snippet for each document.
// See https://cloud.google.com/appengine/docs/go/search/options for
// See https://cloud.google.com/appengine/docs/standard/go/search/options for
// the supported expression syntax.
Expr string
}
@ -585,7 +651,7 @@ type SortOptions struct {
// SortExpression defines a single dimension for sorting a document.
type SortExpression struct {
// Expr is evaluated to provide a sorting value for each document.
// See https://cloud.google.com/appengine/docs/go/search/options for
// See https://cloud.google.com/appengine/docs/standard/go/search/options for
// the supported expression syntax.
Expr string
@ -863,8 +929,9 @@ func saveDoc(src interface{}) (*pb.Document, error) {
return nil, err
}
d := &pb.Document{
Field: fieldsProto,
OrderId: proto.Int32(int32(time.Since(orderIDEpoch).Seconds())),
Field: fieldsProto,
OrderId: proto.Int32(int32(time.Since(orderIDEpoch).Seconds())),
OrderIdSource: pb.Document_DEFAULTED.Enum(),
}
if meta != nil {
if meta.Rank != 0 {
@ -872,6 +939,7 @@ func saveDoc(src interface{}) (*pb.Document, error) {
return nil, fmt.Errorf("search: invalid rank %d, must be [0, 2^31)", meta.Rank)
}
*d.OrderId = int32(meta.Rank)
d.OrderIdSource = pb.Document_SUPPLIED.Enum()
}
if len(meta.Facets) > 0 {
facets, err := facetsToProto(meta.Facets)

View file

@ -169,6 +169,17 @@ func TestSaveDoc(t *testing.T) {
}
}
func TestSaveDocUsesDefaultedRankIfNotSpecified(t *testing.T) {
got, err := saveDoc(&searchDoc)
if err != nil {
t.Fatalf("saveDoc: %v", err)
}
orderIdSource := got.GetOrderIdSource()
if orderIdSource != pb.Document_DEFAULTED {
t.Errorf("OrderIdSource: got %v, wanted DEFAULTED", orderIdSource)
}
}
func TestLoadFieldList(t *testing.T) {
var got FieldList
want := searchFieldsWithLang
@ -183,7 +194,7 @@ func TestLoadFieldList(t *testing.T) {
func TestLangFields(t *testing.T) {
fl := &FieldList{
{Name: "Foo", Value: "I am English", Language: "en"},
{Name: "Bar", Value: "私は日本人だ", Language: "jp"},
{Name: "Bar", Value: "私は日本人だ", Language: "ja"},
}
var got FieldList
doc, err := saveDoc(fl)
@ -231,8 +242,9 @@ func TestLoadMeta(t *testing.T) {
Fields: searchFieldsWithLang,
}
doc := &pb.Document{
Field: protoFields,
OrderId: proto.Int32(42),
Field: protoFields,
OrderId: proto.Int32(42),
OrderIdSource: pb.Document_SUPPLIED.Enum(),
}
if err := loadDoc(&got, doc, nil); err != nil {
t.Fatalf("loadDoc: %v", err)
@ -251,8 +263,47 @@ func TestSaveMeta(t *testing.T) {
t.Fatalf("saveDoc: %v", err)
}
want := &pb.Document{
Field: protoFields,
OrderId: proto.Int32(42),
Field: protoFields,
OrderId: proto.Int32(42),
OrderIdSource: pb.Document_SUPPLIED.Enum(),
}
if !proto.Equal(got, want) {
t.Errorf("\ngot %v\nwant %v", got, want)
}
}
func TestSaveMetaWithDefaultedRank(t *testing.T) {
metaWithoutRank := &DocumentMetadata{
Rank: 0,
}
got, err := saveDoc(&FieldListWithMeta{
Meta: metaWithoutRank,
Fields: searchFields,
})
if err != nil {
t.Fatalf("saveDoc: %v", err)
}
want := &pb.Document{
Field: protoFields,
OrderId: got.OrderId,
OrderIdSource: pb.Document_DEFAULTED.Enum(),
}
if !proto.Equal(got, want) {
t.Errorf("\ngot %v\nwant %v", got, want)
}
}
func TestSaveWithoutMetaUsesDefaultedRank(t *testing.T) {
got, err := saveDoc(&FieldListWithMeta{
Fields: searchFields,
})
if err != nil {
t.Fatalf("saveDoc: %v", err)
}
want := &pb.Document{
Field: protoFields,
OrderId: got.OrderId,
OrderIdSource: pb.Document_DEFAULTED.Enum(),
}
if !proto.Equal(got, want) {
t.Errorf("\ngot %v\nwant %v", got, want)
@ -291,7 +342,8 @@ func TestLoadSaveWithStruct(t *testing.T) {
if err != nil {
t.Fatalf("saveDoc: %v", err)
}
gotPB.OrderId = nil // Don't test: it's time dependent.
gotPB.OrderId = nil // Don't test: it's time dependent.
gotPB.OrderIdSource = nil // Don't test because it's contingent on OrderId.
if !proto.Equal(gotPB, pb) {
t.Errorf("saving doc\ngot %v\nwant %v", gotPB, pb)
}
@ -486,7 +538,7 @@ func TestPut(t *testing.T) {
expectedIn := &pb.IndexDocumentRequest{
Params: &pb.IndexDocumentParams{
Document: []*pb.Document{
{Field: protoFields, OrderId: proto.Int32(42)},
{Field: protoFields, OrderId: proto.Int32(42), OrderIdSource: pb.Document_SUPPLIED.Enum()},
},
IndexSpec: &pb.IndexSpec{
Name: proto.String("Doc"),
@ -573,6 +625,101 @@ func TestPutBadStatus(t *testing.T) {
}
}
func TestPutMultiNilIDSlice(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error {
if len(in.Params.GetDocument()) < 1 {
return fmt.Errorf("got %v, want at least 1 document", in)
}
got, want := in.Params.Document[0].GetOrderId(), int32(time.Since(orderIDEpoch).Seconds())
if d := got - want; -5 > d || d > 5 {
return fmt.Errorf("got OrderId %d, want near %d", got, want)
}
*out = pb.IndexDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
},
DocId: []string{
"doc_id",
},
}
return nil
})
if _, err := index.PutMulti(c, nil, []interface{}{&searchFields}); err != nil {
t.Fatal(err)
}
}
func TestPutMultiError(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error {
*out = pb.IndexDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
{Code: pb.SearchServiceError_PERMISSION_DENIED.Enum(), ErrorDetail: proto.String("foo")},
},
DocId: []string{
"id1",
"",
},
}
return nil
})
switch _, err := index.PutMulti(c, nil, []interface{}{&searchFields, &searchFields}); {
case err == nil:
t.Fatalf("got nil, want error")
case err.(appengine.MultiError)[0] != nil:
t.Fatalf("got %v, want nil MultiError[0]", err.(appengine.MultiError)[0])
case err.(appengine.MultiError)[1] == nil:
t.Fatalf("got nil, want not-nill MultiError[1]")
}
}
func TestPutMultiWrongNumberOfIDs(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error {
return nil
})
if _, err := index.PutMulti(c, []string{"a"}, []interface{}{&searchFields, &searchFields}); err == nil {
t.Fatal("got success, want error")
}
}
func TestPutMultiTooManyDocs(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error {
return nil
})
srcs := make([]interface{}, 201)
for i, _ := range srcs {
srcs[i] = &searchFields
}
if _, err := index.PutMulti(c, nil, srcs); err != ErrTooManyDocuments {
t.Fatalf("got %v, want ErrTooManyDocuments", err)
}
}
func TestSortOptions(t *testing.T) {
index, err := Open("Doc")
if err != nil {
@ -998,3 +1145,126 @@ func TestNamespaceResetting(t *testing.T) {
t.Errorf(`Put with c2: ns = %q, want nil`, *ns)
}
}
func TestDelete(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error {
expectedIn := &pb.DeleteDocumentRequest{
Params: &pb.DeleteDocumentParams{
DocId: []string{"id"},
IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")},
},
}
if !proto.Equal(in, expectedIn) {
return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn)
}
*out = pb.DeleteDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
},
}
return nil
})
if err := index.Delete(c, "id"); err != nil {
t.Fatal(err)
}
}
func TestDeleteMulti(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error {
expectedIn := &pb.DeleteDocumentRequest{
Params: &pb.DeleteDocumentParams{
DocId: []string{"id1", "id2"},
IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")},
},
}
if !proto.Equal(in, expectedIn) {
return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn)
}
*out = pb.DeleteDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
{Code: pb.SearchServiceError_OK.Enum()},
},
}
return nil
})
if err := index.DeleteMulti(c, []string{"id1", "id2"}); err != nil {
t.Fatal(err)
}
}
func TestDeleteWrongNumberOfResults(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error {
expectedIn := &pb.DeleteDocumentRequest{
Params: &pb.DeleteDocumentParams{
DocId: []string{"id1", "id2"},
IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")},
},
}
if !proto.Equal(in, expectedIn) {
return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn)
}
*out = pb.DeleteDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
},
}
return nil
})
if err := index.DeleteMulti(c, []string{"id1", "id2"}); err == nil {
t.Fatalf("got nil, want error")
}
}
func TestDeleteMultiError(t *testing.T) {
index, err := Open("Doc")
if err != nil {
t.Fatalf("err from Open: %v", err)
}
c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error {
expectedIn := &pb.DeleteDocumentRequest{
Params: &pb.DeleteDocumentParams{
DocId: []string{"id1", "id2"},
IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")},
},
}
if !proto.Equal(in, expectedIn) {
return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn)
}
*out = pb.DeleteDocumentResponse{
Status: []*pb.RequestStatus{
{Code: pb.SearchServiceError_OK.Enum()},
{Code: pb.SearchServiceError_PERMISSION_DENIED.Enum(), ErrorDetail: proto.String("foo")},
},
}
return nil
})
switch err := index.DeleteMulti(c, []string{"id1", "id2"}); {
case err == nil:
t.Fatalf("got nil, want error")
case err.(appengine.MultiError)[0] != nil:
t.Fatalf("got %v, want nil MultiError[0]", err.(appengine.MultiError)[0])
case err.(appengine.MultiError)[1] == nil:
t.Fatalf("got nil, want not-nill MultiError[1]")
}
}

View file

@ -21,6 +21,7 @@ import (
"fmt"
"net/http"
"net/url"
"strconv"
"time"
"github.com/golang/protobuf/proto"
@ -147,6 +148,48 @@ func NewPOSTTask(path string, params url.Values) *Task {
}
}
// RequestHeaders are the special HTTP request headers available to push task
// HTTP request handlers. These headers are set internally by App Engine.
// See https://cloud.google.com/appengine/docs/standard/go/taskqueue/push/creating-handlers#reading_request_headers
// for a description of the fields.
type RequestHeaders struct {
QueueName string
TaskName string
TaskRetryCount int64
TaskExecutionCount int64
TaskETA time.Time
TaskPreviousResponse int
TaskRetryReason string
FailFast bool
}
// ParseRequestHeaders parses the special HTTP request headers available to push
// task request handlers. This function silently ignores values of the wrong
// format.
func ParseRequestHeaders(h http.Header) *RequestHeaders {
ret := &RequestHeaders{
QueueName: h.Get("X-AppEngine-QueueName"),
TaskName: h.Get("X-AppEngine-TaskName"),
}
ret.TaskRetryCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskRetryCount"), 10, 64)
ret.TaskExecutionCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskExecutionCount"), 10, 64)
etaSecs, _ := strconv.ParseInt(h.Get("X-AppEngine-TaskETA"), 10, 64)
if etaSecs != 0 {
ret.TaskETA = time.Unix(etaSecs, 0)
}
ret.TaskPreviousResponse, _ = strconv.Atoi(h.Get("X-AppEngine-TaskPreviousResponse"))
ret.TaskRetryReason = h.Get("X-AppEngine-TaskRetryReason")
if h.Get("X-AppEngine-FailFast") != "" {
ret.FailFast = true
}
return ret
}
var (
currentNamespace = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace")
defaultNamespace = http.CanonicalHeaderKey("X-AppEngine-Default-Namespace")
@ -321,6 +364,8 @@ func Delete(c context.Context, task *Task, queueName string) error {
// DeleteMulti deletes multiple tasks from a named queue.
// If a given task could not be deleted, an appengine.MultiError is returned.
// Each task is deleted independently; one may fail to delete while the others
// are sucessfully deleted.
func DeleteMulti(c context.Context, tasks []*Task, queueName string) error {
taskNames := make([][]byte, len(tasks))
for i, t := range tasks {

View file

@ -7,8 +7,10 @@ package taskqueue
import (
"errors"
"fmt"
"net/http"
"reflect"
"testing"
"time"
"google.golang.org/appengine"
"google.golang.org/appengine/internal"
@ -114,3 +116,58 @@ func TestAddWithEmptyPath(t *testing.T) {
t.Fatalf("Add: %v", err)
}
}
func TestParseRequestHeaders(t *testing.T) {
tests := []struct {
Header http.Header
Want RequestHeaders
}{
{
Header: map[string][]string{
"X-Appengine-Queuename": []string{"foo"},
"X-Appengine-Taskname": []string{"bar"},
"X-Appengine-Taskretrycount": []string{"4294967297"}, // 2^32 + 1
"X-Appengine-Taskexecutioncount": []string{"4294967298"}, // 2^32 + 2
"X-Appengine-Tasketa": []string{"1500000000"},
"X-Appengine-Taskpreviousresponse": []string{"404"},
"X-Appengine-Taskretryreason": []string{"baz"},
"X-Appengine-Failfast": []string{"yes"},
},
Want: RequestHeaders{
QueueName: "foo",
TaskName: "bar",
TaskRetryCount: 4294967297,
TaskExecutionCount: 4294967298,
TaskETA: time.Date(2017, time.July, 14, 2, 40, 0, 0, time.UTC),
TaskPreviousResponse: 404,
TaskRetryReason: "baz",
FailFast: true,
},
},
{
Header: map[string][]string{},
Want: RequestHeaders{
QueueName: "",
TaskName: "",
TaskRetryCount: 0,
TaskExecutionCount: 0,
TaskETA: time.Time{},
TaskPreviousResponse: 0,
TaskRetryReason: "",
FailFast: false,
},
},
}
for idx, test := range tests {
got := *ParseRequestHeaders(test.Header)
if got.TaskETA.UnixNano() != test.Want.TaskETA.UnixNano() {
t.Errorf("%d. ParseRequestHeaders got TaskETA %v, wanted %v", idx, got.TaskETA, test.Want.TaskETA)
}
got.TaskETA = time.Time{}
test.Want.TaskETA = time.Time{}
if !reflect.DeepEqual(got, test.Want) {
t.Errorf("%d. ParseRequestHeaders got %v, wanted %v", idx, got, test.Want)
}
}
}

View file

@ -15,7 +15,11 @@ import (
)
func Current(ctx context.Context) *User {
u := user.Current(internal.ClassicContextFromContext(ctx))
c, err := internal.ClassicContextFromContext(ctx)
if err != nil {
panic(err)
}
u := user.Current(c)
if u == nil {
return nil
}
@ -31,5 +35,10 @@ func Current(ctx context.Context) *User {
}
func IsAdmin(ctx context.Context) bool {
return user.IsAdmin(internal.ClassicContextFromContext(ctx))
c, err := internal.ClassicContextFromContext(ctx)
if err != nil {
panic(err)
}
return user.IsAdmin(c)
}