Moved to google.golang.org/genproto/googleapis/api/annotations
Fixes #52
This commit is contained in:
921
vendor/google.golang.org/genproto/googleapis/spanner/admin/database/v1/spanner_database_admin.pb.go
generated
vendored
Normal file
921
vendor/google.golang.org/genproto/googleapis/spanner/admin/database/v1/spanner_database_admin.pb.go
generated
vendored
Normal file
@@ -0,0 +1,921 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/admin/database/v1/spanner_database_admin.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package database is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
google/spanner/admin/database/v1/spanner_database_admin.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Database
|
||||
ListDatabasesRequest
|
||||
ListDatabasesResponse
|
||||
CreateDatabaseRequest
|
||||
CreateDatabaseMetadata
|
||||
GetDatabaseRequest
|
||||
UpdateDatabaseDdlRequest
|
||||
UpdateDatabaseDdlMetadata
|
||||
DropDatabaseRequest
|
||||
GetDatabaseDdlRequest
|
||||
GetDatabaseDdlResponse
|
||||
*/
|
||||
package database
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import _ "google.golang.org/genproto/googleapis/api/serviceconfig"
|
||||
import google_iam_v11 "google.golang.org/genproto/googleapis/iam/v1"
|
||||
import google_iam_v1 "google.golang.org/genproto/googleapis/iam/v1"
|
||||
import google_longrunning "google.golang.org/genproto/googleapis/longrunning"
|
||||
import google_protobuf2 "github.com/golang/protobuf/ptypes/empty"
|
||||
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// Indicates the current state of the database.
|
||||
type Database_State int32
|
||||
|
||||
const (
|
||||
// Not specified.
|
||||
Database_STATE_UNSPECIFIED Database_State = 0
|
||||
// The database is still being created. Operations on the database may fail
|
||||
// with `FAILED_PRECONDITION` in this state.
|
||||
Database_CREATING Database_State = 1
|
||||
// The database is fully created and ready for use.
|
||||
Database_READY Database_State = 2
|
||||
)
|
||||
|
||||
var Database_State_name = map[int32]string{
|
||||
0: "STATE_UNSPECIFIED",
|
||||
1: "CREATING",
|
||||
2: "READY",
|
||||
}
|
||||
var Database_State_value = map[string]int32{
|
||||
"STATE_UNSPECIFIED": 0,
|
||||
"CREATING": 1,
|
||||
"READY": 2,
|
||||
}
|
||||
|
||||
func (x Database_State) String() string {
|
||||
return proto.EnumName(Database_State_name, int32(x))
|
||||
}
|
||||
func (Database_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
|
||||
|
||||
// A Cloud Spanner database.
|
||||
type Database struct {
|
||||
// Required. The name of the database. Values are of the form
|
||||
// `projects/<project>/instances/<instance>/databases/<database>`,
|
||||
// where `<database>` is as specified in the `CREATE DATABASE`
|
||||
// statement. This name can be passed to other API methods to
|
||||
// identify the database.
|
||||
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
// Output only. The current database state.
|
||||
State Database_State `protobuf:"varint,2,opt,name=state,enum=google.spanner.admin.database.v1.Database_State" json:"state,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Database) Reset() { *m = Database{} }
|
||||
func (m *Database) String() string { return proto.CompactTextString(m) }
|
||||
func (*Database) ProtoMessage() {}
|
||||
func (*Database) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
|
||||
func (m *Database) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Database) GetState() Database_State {
|
||||
if m != nil {
|
||||
return m.State
|
||||
}
|
||||
return Database_STATE_UNSPECIFIED
|
||||
}
|
||||
|
||||
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
|
||||
type ListDatabasesRequest struct {
|
||||
// Required. The instance whose databases should be listed.
|
||||
// Values are of the form `projects/<project>/instances/<instance>`.
|
||||
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
|
||||
// Number of databases to be returned in the response. If 0 or less,
|
||||
// defaults to the server's maximum allowed page size.
|
||||
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
|
||||
// If non-empty, `page_token` should contain a
|
||||
// [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
|
||||
// previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
|
||||
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListDatabasesRequest) Reset() { *m = ListDatabasesRequest{} }
|
||||
func (m *ListDatabasesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListDatabasesRequest) ProtoMessage() {}
|
||||
func (*ListDatabasesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||||
|
||||
func (m *ListDatabasesRequest) GetParent() string {
|
||||
if m != nil {
|
||||
return m.Parent
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ListDatabasesRequest) GetPageSize() int32 {
|
||||
if m != nil {
|
||||
return m.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ListDatabasesRequest) GetPageToken() string {
|
||||
if m != nil {
|
||||
return m.PageToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
|
||||
type ListDatabasesResponse struct {
|
||||
// Databases that matched the request.
|
||||
Databases []*Database `protobuf:"bytes,1,rep,name=databases" json:"databases,omitempty"`
|
||||
// `next_page_token` can be sent in a subsequent
|
||||
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
|
||||
// of the matching databases.
|
||||
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListDatabasesResponse) Reset() { *m = ListDatabasesResponse{} }
|
||||
func (m *ListDatabasesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListDatabasesResponse) ProtoMessage() {}
|
||||
func (*ListDatabasesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
||||
|
||||
func (m *ListDatabasesResponse) GetDatabases() []*Database {
|
||||
if m != nil {
|
||||
return m.Databases
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ListDatabasesResponse) GetNextPageToken() string {
|
||||
if m != nil {
|
||||
return m.NextPageToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
|
||||
type CreateDatabaseRequest struct {
|
||||
// Required. The name of the instance that will serve the new database.
|
||||
// Values are of the form `projects/<project>/instances/<instance>`.
|
||||
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
|
||||
// Required. A `CREATE DATABASE` statement, which specifies the ID of the
|
||||
// new database. The database ID must conform to the regular expression
|
||||
// `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
|
||||
CreateStatement string `protobuf:"bytes,2,opt,name=create_statement,json=createStatement" json:"create_statement,omitempty"`
|
||||
// An optional list of DDL statements to run inside the newly created
|
||||
// database. Statements can create tables, indexes, etc. These
|
||||
// statements execute atomically with the creation of the database:
|
||||
// if there is an error in any statement, the database is not created.
|
||||
ExtraStatements []string `protobuf:"bytes,3,rep,name=extra_statements,json=extraStatements" json:"extra_statements,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateDatabaseRequest) Reset() { *m = CreateDatabaseRequest{} }
|
||||
func (m *CreateDatabaseRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateDatabaseRequest) ProtoMessage() {}
|
||||
func (*CreateDatabaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||
|
||||
func (m *CreateDatabaseRequest) GetParent() string {
|
||||
if m != nil {
|
||||
return m.Parent
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateDatabaseRequest) GetCreateStatement() string {
|
||||
if m != nil {
|
||||
return m.CreateStatement
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateDatabaseRequest) GetExtraStatements() []string {
|
||||
if m != nil {
|
||||
return m.ExtraStatements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Metadata type for the operation returned by
|
||||
// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
|
||||
type CreateDatabaseMetadata struct {
|
||||
// The database being created.
|
||||
Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateDatabaseMetadata) Reset() { *m = CreateDatabaseMetadata{} }
|
||||
func (m *CreateDatabaseMetadata) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateDatabaseMetadata) ProtoMessage() {}
|
||||
func (*CreateDatabaseMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
||||
|
||||
func (m *CreateDatabaseMetadata) GetDatabase() string {
|
||||
if m != nil {
|
||||
return m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
|
||||
type GetDatabaseRequest struct {
|
||||
// Required. The name of the requested database. Values are of the form
|
||||
// `projects/<project>/instances/<instance>/databases/<database>`.
|
||||
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetDatabaseRequest) Reset() { *m = GetDatabaseRequest{} }
|
||||
func (m *GetDatabaseRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetDatabaseRequest) ProtoMessage() {}
|
||||
func (*GetDatabaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
|
||||
func (m *GetDatabaseRequest) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Enqueues the given DDL statements to be applied, in order but not
|
||||
// necessarily all at once, to the database schema at some point (or
|
||||
// points) in the future. The server checks that the statements
|
||||
// are executable (syntactically valid, name tables that exist, etc.)
|
||||
// before enqueueing them, but they may still fail upon
|
||||
// later execution (e.g., if a statement from another batch of
|
||||
// statements is applied first and it conflicts in some way, or if
|
||||
// there is some data-related problem like a `NULL` value in a column to
|
||||
// which `NOT NULL` would be added). If a statement fails, all
|
||||
// subsequent statements in the batch are automatically cancelled.
|
||||
//
|
||||
// Each batch of statements is assigned a name which can be used with
|
||||
// the [Operations][google.longrunning.Operations] API to monitor
|
||||
// progress. See the
|
||||
// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
|
||||
// details.
|
||||
type UpdateDatabaseDdlRequest struct {
|
||||
// Required. The database to update.
|
||||
Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
|
||||
// DDL statements to be applied to the database.
|
||||
Statements []string `protobuf:"bytes,2,rep,name=statements" json:"statements,omitempty"`
|
||||
// If empty, the new update request is assigned an
|
||||
// automatically-generated operation ID. Otherwise, `operation_id`
|
||||
// is used to construct the name of the resulting
|
||||
// [Operation][google.longrunning.Operation].
|
||||
//
|
||||
// Specifying an explicit operation ID simplifies determining
|
||||
// whether the statements were executed in the event that the
|
||||
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
|
||||
// or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
|
||||
// `operation_id` fields can be combined to form the
|
||||
// [name][google.longrunning.Operation.name] of the resulting
|
||||
// [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
|
||||
//
|
||||
// `operation_id` should be unique within the database, and must be
|
||||
// a valid identifier: `[a-z][a-z0-9_]*`. Note that
|
||||
// automatically-generated operation IDs always begin with an
|
||||
// underscore. If the named operation already exists,
|
||||
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
|
||||
// `ALREADY_EXISTS`.
|
||||
OperationId string `protobuf:"bytes,3,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlRequest) Reset() { *m = UpdateDatabaseDdlRequest{} }
|
||||
func (m *UpdateDatabaseDdlRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*UpdateDatabaseDdlRequest) ProtoMessage() {}
|
||||
func (*UpdateDatabaseDdlRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
|
||||
func (m *UpdateDatabaseDdlRequest) GetDatabase() string {
|
||||
if m != nil {
|
||||
return m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlRequest) GetStatements() []string {
|
||||
if m != nil {
|
||||
return m.Statements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlRequest) GetOperationId() string {
|
||||
if m != nil {
|
||||
return m.OperationId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Metadata type for the operation returned by
|
||||
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
|
||||
type UpdateDatabaseDdlMetadata struct {
|
||||
// The database being modified.
|
||||
Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
|
||||
// For an update this list contains all the statements. For an
|
||||
// individual statement, this list contains only that statement.
|
||||
Statements []string `protobuf:"bytes,2,rep,name=statements" json:"statements,omitempty"`
|
||||
// Reports the commit timestamps of all statements that have
|
||||
// succeeded so far, where `commit_timestamps[i]` is the commit
|
||||
// timestamp for the statement `statements[i]`.
|
||||
CommitTimestamps []*google_protobuf3.Timestamp `protobuf:"bytes,3,rep,name=commit_timestamps,json=commitTimestamps" json:"commit_timestamps,omitempty"`
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlMetadata) Reset() { *m = UpdateDatabaseDdlMetadata{} }
|
||||
func (m *UpdateDatabaseDdlMetadata) String() string { return proto.CompactTextString(m) }
|
||||
func (*UpdateDatabaseDdlMetadata) ProtoMessage() {}
|
||||
func (*UpdateDatabaseDdlMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
|
||||
func (m *UpdateDatabaseDdlMetadata) GetDatabase() string {
|
||||
if m != nil {
|
||||
return m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlMetadata) GetStatements() []string {
|
||||
if m != nil {
|
||||
return m.Statements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UpdateDatabaseDdlMetadata) GetCommitTimestamps() []*google_protobuf3.Timestamp {
|
||||
if m != nil {
|
||||
return m.CommitTimestamps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
|
||||
type DropDatabaseRequest struct {
|
||||
// Required. The database to be dropped.
|
||||
Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DropDatabaseRequest) Reset() { *m = DropDatabaseRequest{} }
|
||||
func (m *DropDatabaseRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DropDatabaseRequest) ProtoMessage() {}
|
||||
func (*DropDatabaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
|
||||
func (m *DropDatabaseRequest) GetDatabase() string {
|
||||
if m != nil {
|
||||
return m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
|
||||
type GetDatabaseDdlRequest struct {
|
||||
// Required. The database whose schema we wish to get.
|
||||
Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetDatabaseDdlRequest) Reset() { *m = GetDatabaseDdlRequest{} }
|
||||
func (m *GetDatabaseDdlRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetDatabaseDdlRequest) ProtoMessage() {}
|
||||
func (*GetDatabaseDdlRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
|
||||
func (m *GetDatabaseDdlRequest) GetDatabase() string {
|
||||
if m != nil {
|
||||
return m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
|
||||
type GetDatabaseDdlResponse struct {
|
||||
// A list of formatted DDL statements defining the schema of the database
|
||||
// specified in the request.
|
||||
Statements []string `protobuf:"bytes,1,rep,name=statements" json:"statements,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetDatabaseDdlResponse) Reset() { *m = GetDatabaseDdlResponse{} }
|
||||
func (m *GetDatabaseDdlResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetDatabaseDdlResponse) ProtoMessage() {}
|
||||
func (*GetDatabaseDdlResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
|
||||
func (m *GetDatabaseDdlResponse) GetStatements() []string {
|
||||
if m != nil {
|
||||
return m.Statements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Database)(nil), "google.spanner.admin.database.v1.Database")
|
||||
proto.RegisterType((*ListDatabasesRequest)(nil), "google.spanner.admin.database.v1.ListDatabasesRequest")
|
||||
proto.RegisterType((*ListDatabasesResponse)(nil), "google.spanner.admin.database.v1.ListDatabasesResponse")
|
||||
proto.RegisterType((*CreateDatabaseRequest)(nil), "google.spanner.admin.database.v1.CreateDatabaseRequest")
|
||||
proto.RegisterType((*CreateDatabaseMetadata)(nil), "google.spanner.admin.database.v1.CreateDatabaseMetadata")
|
||||
proto.RegisterType((*GetDatabaseRequest)(nil), "google.spanner.admin.database.v1.GetDatabaseRequest")
|
||||
proto.RegisterType((*UpdateDatabaseDdlRequest)(nil), "google.spanner.admin.database.v1.UpdateDatabaseDdlRequest")
|
||||
proto.RegisterType((*UpdateDatabaseDdlMetadata)(nil), "google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata")
|
||||
proto.RegisterType((*DropDatabaseRequest)(nil), "google.spanner.admin.database.v1.DropDatabaseRequest")
|
||||
proto.RegisterType((*GetDatabaseDdlRequest)(nil), "google.spanner.admin.database.v1.GetDatabaseDdlRequest")
|
||||
proto.RegisterType((*GetDatabaseDdlResponse)(nil), "google.spanner.admin.database.v1.GetDatabaseDdlResponse")
|
||||
proto.RegisterEnum("google.spanner.admin.database.v1.Database_State", Database_State_name, Database_State_value)
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for DatabaseAdmin service
|
||||
|
||||
type DatabaseAdminClient interface {
|
||||
// Lists Cloud Spanner databases.
|
||||
ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error)
|
||||
// Creates a new Cloud Spanner database and starts to prepare it for serving.
|
||||
// The returned [long-running operation][google.longrunning.Operation] will
|
||||
// have a name of the format `<database_name>/operations/<operation_id>` and
|
||||
// can be used to track preparation of the database. The
|
||||
// [metadata][google.longrunning.Operation.metadata] field type is
|
||||
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
|
||||
// [response][google.longrunning.Operation.response] field type is
|
||||
// [Database][google.spanner.admin.database.v1.Database], if successful.
|
||||
CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
|
||||
// Gets the state of a Cloud Spanner database.
|
||||
GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error)
|
||||
// Updates the schema of a Cloud Spanner database by
|
||||
// creating/altering/dropping tables, columns, indexes, etc. The returned
|
||||
// [long-running operation][google.longrunning.Operation] will have a name of
|
||||
// the format `<database_name>/operations/<operation_id>` and can be used to
|
||||
// track execution of the schema change(s). The
|
||||
// [metadata][google.longrunning.Operation.metadata] field type is
|
||||
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
|
||||
UpdateDatabaseDdl(ctx context.Context, in *UpdateDatabaseDdlRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
|
||||
// Drops (aka deletes) a Cloud Spanner database.
|
||||
DropDatabase(ctx context.Context, in *DropDatabaseRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
|
||||
// Returns the schema of a Cloud Spanner database as a list of formatted
|
||||
// DDL statements. This method does not show pending schema updates, those may
|
||||
// be queried using the [Operations][google.longrunning.Operations] API.
|
||||
GetDatabaseDdl(ctx context.Context, in *GetDatabaseDdlRequest, opts ...grpc.CallOption) (*GetDatabaseDdlResponse, error)
|
||||
// Sets the access control policy on a database resource. Replaces any
|
||||
// existing policy.
|
||||
//
|
||||
// Authorization requires `spanner.databases.setIamPolicy` permission on
|
||||
// [resource][google.iam.v1.SetIamPolicyRequest.resource].
|
||||
SetIamPolicy(ctx context.Context, in *google_iam_v11.SetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
|
||||
// Gets the access control policy for a database resource. Returns an empty
|
||||
// policy if a database exists but does not have a policy set.
|
||||
//
|
||||
// Authorization requires `spanner.databases.getIamPolicy` permission on
|
||||
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
|
||||
GetIamPolicy(ctx context.Context, in *google_iam_v11.GetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
|
||||
// Returns permissions that the caller has on the specified database resource.
|
||||
//
|
||||
// Attempting this RPC on a non-existent Cloud Spanner database will result in
|
||||
// a NOT_FOUND error if the user has `spanner.databases.list` permission on
|
||||
// the containing Cloud Spanner instance. Otherwise returns an empty set of
|
||||
// permissions.
|
||||
TestIamPermissions(ctx context.Context, in *google_iam_v11.TestIamPermissionsRequest, opts ...grpc.CallOption) (*google_iam_v11.TestIamPermissionsResponse, error)
|
||||
}
|
||||
|
||||
type databaseAdminClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewDatabaseAdminClient(cc *grpc.ClientConn) DatabaseAdminClient {
|
||||
return &databaseAdminClient{cc}
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) {
|
||||
out := new(ListDatabasesResponse)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/ListDatabases", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error) {
|
||||
out := new(google_longrunning.Operation)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/CreateDatabase", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error) {
|
||||
out := new(Database)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabase", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) UpdateDatabaseDdl(ctx context.Context, in *UpdateDatabaseDdlRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error) {
|
||||
out := new(google_longrunning.Operation)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/UpdateDatabaseDdl", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) DropDatabase(ctx context.Context, in *DropDatabaseRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
|
||||
out := new(google_protobuf2.Empty)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/DropDatabase", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) GetDatabaseDdl(ctx context.Context, in *GetDatabaseDdlRequest, opts ...grpc.CallOption) (*GetDatabaseDdlResponse, error) {
|
||||
out := new(GetDatabaseDdlResponse)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabaseDdl", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) SetIamPolicy(ctx context.Context, in *google_iam_v11.SetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error) {
|
||||
out := new(google_iam_v1.Policy)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/SetIamPolicy", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) GetIamPolicy(ctx context.Context, in *google_iam_v11.GetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error) {
|
||||
out := new(google_iam_v1.Policy)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/GetIamPolicy", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *databaseAdminClient) TestIamPermissions(ctx context.Context, in *google_iam_v11.TestIamPermissionsRequest, opts ...grpc.CallOption) (*google_iam_v11.TestIamPermissionsResponse, error) {
|
||||
out := new(google_iam_v11.TestIamPermissionsResponse)
|
||||
err := grpc.Invoke(ctx, "/google.spanner.admin.database.v1.DatabaseAdmin/TestIamPermissions", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for DatabaseAdmin service
|
||||
|
||||
type DatabaseAdminServer interface {
|
||||
// Lists Cloud Spanner databases.
|
||||
ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error)
|
||||
// Creates a new Cloud Spanner database and starts to prepare it for serving.
|
||||
// The returned [long-running operation][google.longrunning.Operation] will
|
||||
// have a name of the format `<database_name>/operations/<operation_id>` and
|
||||
// can be used to track preparation of the database. The
|
||||
// [metadata][google.longrunning.Operation.metadata] field type is
|
||||
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
|
||||
// [response][google.longrunning.Operation.response] field type is
|
||||
// [Database][google.spanner.admin.database.v1.Database], if successful.
|
||||
CreateDatabase(context.Context, *CreateDatabaseRequest) (*google_longrunning.Operation, error)
|
||||
// Gets the state of a Cloud Spanner database.
|
||||
GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error)
|
||||
// Updates the schema of a Cloud Spanner database by
|
||||
// creating/altering/dropping tables, columns, indexes, etc. The returned
|
||||
// [long-running operation][google.longrunning.Operation] will have a name of
|
||||
// the format `<database_name>/operations/<operation_id>` and can be used to
|
||||
// track execution of the schema change(s). The
|
||||
// [metadata][google.longrunning.Operation.metadata] field type is
|
||||
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
|
||||
UpdateDatabaseDdl(context.Context, *UpdateDatabaseDdlRequest) (*google_longrunning.Operation, error)
|
||||
// Drops (aka deletes) a Cloud Spanner database.
|
||||
DropDatabase(context.Context, *DropDatabaseRequest) (*google_protobuf2.Empty, error)
|
||||
// Returns the schema of a Cloud Spanner database as a list of formatted
|
||||
// DDL statements. This method does not show pending schema updates, those may
|
||||
// be queried using the [Operations][google.longrunning.Operations] API.
|
||||
GetDatabaseDdl(context.Context, *GetDatabaseDdlRequest) (*GetDatabaseDdlResponse, error)
|
||||
// Sets the access control policy on a database resource. Replaces any
|
||||
// existing policy.
|
||||
//
|
||||
// Authorization requires `spanner.databases.setIamPolicy` permission on
|
||||
// [resource][google.iam.v1.SetIamPolicyRequest.resource].
|
||||
SetIamPolicy(context.Context, *google_iam_v11.SetIamPolicyRequest) (*google_iam_v1.Policy, error)
|
||||
// Gets the access control policy for a database resource. Returns an empty
|
||||
// policy if a database exists but does not have a policy set.
|
||||
//
|
||||
// Authorization requires `spanner.databases.getIamPolicy` permission on
|
||||
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
|
||||
GetIamPolicy(context.Context, *google_iam_v11.GetIamPolicyRequest) (*google_iam_v1.Policy, error)
|
||||
// Returns permissions that the caller has on the specified database resource.
|
||||
//
|
||||
// Attempting this RPC on a non-existent Cloud Spanner database will result in
|
||||
// a NOT_FOUND error if the user has `spanner.databases.list` permission on
|
||||
// the containing Cloud Spanner instance. Otherwise returns an empty set of
|
||||
// permissions.
|
||||
TestIamPermissions(context.Context, *google_iam_v11.TestIamPermissionsRequest) (*google_iam_v11.TestIamPermissionsResponse, error)
|
||||
}
|
||||
|
||||
func RegisterDatabaseAdminServer(s *grpc.Server, srv DatabaseAdminServer) {
|
||||
s.RegisterService(&_DatabaseAdmin_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_ListDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListDatabasesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).ListDatabases(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/ListDatabases",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).ListDatabases(ctx, req.(*ListDatabasesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_CreateDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDatabaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).CreateDatabase(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/CreateDatabase",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).CreateDatabase(ctx, req.(*CreateDatabaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_GetDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDatabaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).GetDatabase(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabase",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).GetDatabase(ctx, req.(*GetDatabaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_UpdateDatabaseDdl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateDatabaseDdlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).UpdateDatabaseDdl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/UpdateDatabaseDdl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).UpdateDatabaseDdl(ctx, req.(*UpdateDatabaseDdlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_DropDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DropDatabaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).DropDatabase(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/DropDatabase",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).DropDatabase(ctx, req.(*DropDatabaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_GetDatabaseDdl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDatabaseDdlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).GetDatabaseDdl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabaseDdl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).GetDatabaseDdl(ctx, req.(*GetDatabaseDdlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(google_iam_v11.SetIamPolicyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).SetIamPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/SetIamPolicy",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).SetIamPolicy(ctx, req.(*google_iam_v11.SetIamPolicyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(google_iam_v11.GetIamPolicyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).GetIamPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/GetIamPolicy",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).GetIamPolicy(ctx, req.(*google_iam_v11.GetIamPolicyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DatabaseAdmin_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(google_iam_v11.TestIamPermissionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DatabaseAdminServer).TestIamPermissions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/google.spanner.admin.database.v1.DatabaseAdmin/TestIamPermissions",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DatabaseAdminServer).TestIamPermissions(ctx, req.(*google_iam_v11.TestIamPermissionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _DatabaseAdmin_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "google.spanner.admin.database.v1.DatabaseAdmin",
|
||||
HandlerType: (*DatabaseAdminServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListDatabases",
|
||||
Handler: _DatabaseAdmin_ListDatabases_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDatabase",
|
||||
Handler: _DatabaseAdmin_CreateDatabase_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDatabase",
|
||||
Handler: _DatabaseAdmin_GetDatabase_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateDatabaseDdl",
|
||||
Handler: _DatabaseAdmin_UpdateDatabaseDdl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DropDatabase",
|
||||
Handler: _DatabaseAdmin_DropDatabase_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDatabaseDdl",
|
||||
Handler: _DatabaseAdmin_GetDatabaseDdl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetIamPolicy",
|
||||
Handler: _DatabaseAdmin_SetIamPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetIamPolicy",
|
||||
Handler: _DatabaseAdmin_GetIamPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TestIamPermissions",
|
||||
Handler: _DatabaseAdmin_TestIamPermissions_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "google/spanner/admin/database/v1/spanner_database_admin.proto",
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("google/spanner/admin/database/v1/spanner_database_admin.proto", fileDescriptor0)
|
||||
}
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 1020 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x6f, 0x1b, 0x45,
|
||||
0x18, 0xc7, 0x19, 0xa7, 0xa9, 0x92, 0x27,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fe, 0x42, 0x80, 0xbb,
|
||||
0x94, 0x2b, 0x23, 0x0d, 0x3d, 0x97, 0x73, 0xf9, 0xdd, 0x87, 0x0b, 0xa9, 0xc6, 0xb3, 0x21, 0x1a,
|
||||
0xf1, 0xd6, 0x02, 0x91, 0xf1, 0x8b, 0x7d, 0xa0, 0xb0, 0x9b, 0x66, 0x6d, 0x79, 0x6c, 0x31, 0x53,
|
||||
0xb5, 0x82, 0x8a, 0x77, 0xfe, 0x40, 0xf0, 0x66, 0x9f, 0x79, 0x73, 0x4f, 0xda, 0x9d, 0xab, 0x9d,
|
||||
0xc8, 0x35, 0xf5, 0x27, 0xd2, 0x92, 0xba, 0x69, 0xa1, 0x4f, 0xef, 0xc5, 0xe9, 0x0e, 0x1b, 0x12,
|
||||
0xdf, 0xb1, 0x58, 0xe8, 0xd8, 0x0e, 0xf5, 0x95, 0xaa, 0xec, 0xc8, 0x45, 0x02, 0x97, 0x9f, 0xff,
|
||||
0xcd, 0xff, 0x9e, 0xfe, 0xfd, 0x5b, 0xe6, 0x66, 0x23, 0x2a, 0x55, 0x1d, 0xb2, 0xd1, 0xc0, 0x8a,
|
||||
0x9b, 0x5a, 0xaa, 0xdb, 0xe4, 0x9b, 0xf5, 0xe3, 0xd2, 0xe9, 0x65, 0x55, 0x7d, 0xff, 0xbf, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0xdc, 0xc4, 0xc8, 0x83, 0x50, 0x0c, 0x00, 0x00,
|
||||
}
|
1282
vendor/google.golang.org/genproto/googleapis/spanner/admin/instance/v1/spanner_instance_admin.pb.go
generated
vendored
Normal file
1282
vendor/google.golang.org/genproto/googleapis/spanner/admin/instance/v1/spanner_instance_admin.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
439
vendor/google.golang.org/genproto/googleapis/spanner/v1/keys.pb.go
generated
vendored
Normal file
439
vendor/google.golang.org/genproto/googleapis/spanner/v1/keys.pb.go
generated
vendored
Normal file
@@ -0,0 +1,439 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/keys.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package spanner is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
google/spanner/v1/keys.proto
|
||||
google/spanner/v1/mutation.proto
|
||||
google/spanner/v1/query_plan.proto
|
||||
google/spanner/v1/result_set.proto
|
||||
google/spanner/v1/spanner.proto
|
||||
google/spanner/v1/transaction.proto
|
||||
google/spanner/v1/type.proto
|
||||
|
||||
It has these top-level messages:
|
||||
KeyRange
|
||||
KeySet
|
||||
Mutation
|
||||
PlanNode
|
||||
QueryPlan
|
||||
ResultSet
|
||||
PartialResultSet
|
||||
ResultSetMetadata
|
||||
ResultSetStats
|
||||
CreateSessionRequest
|
||||
Session
|
||||
GetSessionRequest
|
||||
DeleteSessionRequest
|
||||
ExecuteSqlRequest
|
||||
ReadRequest
|
||||
BeginTransactionRequest
|
||||
CommitRequest
|
||||
CommitResponse
|
||||
RollbackRequest
|
||||
TransactionOptions
|
||||
Transaction
|
||||
TransactionSelector
|
||||
Type
|
||||
StructType
|
||||
*/
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// KeyRange represents a range of rows in a table or index.
|
||||
//
|
||||
// A range has a start key and an end key. These keys can be open or
|
||||
// closed, indicating if the range includes rows with that key.
|
||||
//
|
||||
// Keys are represented by lists, where the ith value in the list
|
||||
// corresponds to the ith component of the table or index primary key.
|
||||
// Individual values are encoded as described [here][google.spanner.v1.TypeCode].
|
||||
//
|
||||
// For example, consider the following table definition:
|
||||
//
|
||||
// CREATE TABLE UserEvents (
|
||||
// UserName STRING(MAX),
|
||||
// EventDate STRING(10)
|
||||
// ) PRIMARY KEY(UserName, EventDate);
|
||||
//
|
||||
// The following keys name rows in this table:
|
||||
//
|
||||
// ["Bob", "2014-09-23"]
|
||||
// ["Alfred", "2015-06-12"]
|
||||
//
|
||||
// Since the `UserEvents` table's `PRIMARY KEY` clause names two
|
||||
// columns, each `UserEvents` key has two elements; the first is the
|
||||
// `UserName`, and the second is the `EventDate`.
|
||||
//
|
||||
// Key ranges with multiple components are interpreted
|
||||
// lexicographically by component using the table or index key's declared
|
||||
// sort order. For example, the following range returns all events for
|
||||
// user `"Bob"` that occurred in the year 2015:
|
||||
//
|
||||
// "start_closed": ["Bob", "2015-01-01"]
|
||||
// "end_closed": ["Bob", "2015-12-31"]
|
||||
//
|
||||
// Start and end keys can omit trailing key components. This affects the
|
||||
// inclusion and exclusion of rows that exactly match the provided key
|
||||
// components: if the key is closed, then rows that exactly match the
|
||||
// provided components are included; if the key is open, then rows
|
||||
// that exactly match are not included.
|
||||
//
|
||||
// For example, the following range includes all events for `"Bob"` that
|
||||
// occurred during and after the year 2000:
|
||||
//
|
||||
// "start_closed": ["Bob", "2000-01-01"]
|
||||
// "end_closed": ["Bob"]
|
||||
//
|
||||
// The next example retrieves all events for `"Bob"`:
|
||||
//
|
||||
// "start_closed": ["Bob"]
|
||||
// "end_closed": ["Bob"]
|
||||
//
|
||||
// To retrieve events before the year 2000:
|
||||
//
|
||||
// "start_closed": ["Bob"]
|
||||
// "end_open": ["Bob", "2000-01-01"]
|
||||
//
|
||||
// The following range includes all rows in the table:
|
||||
//
|
||||
// "start_closed": []
|
||||
// "end_closed": []
|
||||
//
|
||||
// This range returns all users whose `UserName` begins with any
|
||||
// character from A to C:
|
||||
//
|
||||
// "start_closed": ["A"]
|
||||
// "end_open": ["D"]
|
||||
//
|
||||
// This range returns all users whose `UserName` begins with B:
|
||||
//
|
||||
// "start_closed": ["B"]
|
||||
// "end_open": ["C"]
|
||||
//
|
||||
// Key ranges honor column sort order. For example, suppose a table is
|
||||
// defined as follows:
|
||||
//
|
||||
// CREATE TABLE DescendingSortedTable {
|
||||
// Key INT64,
|
||||
// ...
|
||||
// ) PRIMARY KEY(Key DESC);
|
||||
//
|
||||
// The following range retrieves all rows with key values between 1
|
||||
// and 100 inclusive:
|
||||
//
|
||||
// "start_closed": ["100"]
|
||||
// "end_closed": ["1"]
|
||||
//
|
||||
// Note that 100 is passed as the start, and 1 is passed as the end,
|
||||
// because `Key` is a descending column in the schema.
|
||||
type KeyRange struct {
|
||||
// The start key must be provided. It can be either closed or open.
|
||||
//
|
||||
// Types that are valid to be assigned to StartKeyType:
|
||||
// *KeyRange_StartClosed
|
||||
// *KeyRange_StartOpen
|
||||
StartKeyType isKeyRange_StartKeyType `protobuf_oneof:"start_key_type"`
|
||||
// The end key must be provided. It can be either closed or open.
|
||||
//
|
||||
// Types that are valid to be assigned to EndKeyType:
|
||||
// *KeyRange_EndClosed
|
||||
// *KeyRange_EndOpen
|
||||
EndKeyType isKeyRange_EndKeyType `protobuf_oneof:"end_key_type"`
|
||||
}
|
||||
|
||||
func (m *KeyRange) Reset() { *m = KeyRange{} }
|
||||
func (m *KeyRange) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyRange) ProtoMessage() {}
|
||||
func (*KeyRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
|
||||
type isKeyRange_StartKeyType interface {
|
||||
isKeyRange_StartKeyType()
|
||||
}
|
||||
type isKeyRange_EndKeyType interface {
|
||||
isKeyRange_EndKeyType()
|
||||
}
|
||||
|
||||
type KeyRange_StartClosed struct {
|
||||
StartClosed *google_protobuf1.ListValue `protobuf:"bytes,1,opt,name=start_closed,json=startClosed,oneof"`
|
||||
}
|
||||
type KeyRange_StartOpen struct {
|
||||
StartOpen *google_protobuf1.ListValue `protobuf:"bytes,2,opt,name=start_open,json=startOpen,oneof"`
|
||||
}
|
||||
type KeyRange_EndClosed struct {
|
||||
EndClosed *google_protobuf1.ListValue `protobuf:"bytes,3,opt,name=end_closed,json=endClosed,oneof"`
|
||||
}
|
||||
type KeyRange_EndOpen struct {
|
||||
EndOpen *google_protobuf1.ListValue `protobuf:"bytes,4,opt,name=end_open,json=endOpen,oneof"`
|
||||
}
|
||||
|
||||
func (*KeyRange_StartClosed) isKeyRange_StartKeyType() {}
|
||||
func (*KeyRange_StartOpen) isKeyRange_StartKeyType() {}
|
||||
func (*KeyRange_EndClosed) isKeyRange_EndKeyType() {}
|
||||
func (*KeyRange_EndOpen) isKeyRange_EndKeyType() {}
|
||||
|
||||
func (m *KeyRange) GetStartKeyType() isKeyRange_StartKeyType {
|
||||
if m != nil {
|
||||
return m.StartKeyType
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *KeyRange) GetEndKeyType() isKeyRange_EndKeyType {
|
||||
if m != nil {
|
||||
return m.EndKeyType
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyRange) GetStartClosed() *google_protobuf1.ListValue {
|
||||
if x, ok := m.GetStartKeyType().(*KeyRange_StartClosed); ok {
|
||||
return x.StartClosed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyRange) GetStartOpen() *google_protobuf1.ListValue {
|
||||
if x, ok := m.GetStartKeyType().(*KeyRange_StartOpen); ok {
|
||||
return x.StartOpen
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyRange) GetEndClosed() *google_protobuf1.ListValue {
|
||||
if x, ok := m.GetEndKeyType().(*KeyRange_EndClosed); ok {
|
||||
return x.EndClosed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyRange) GetEndOpen() *google_protobuf1.ListValue {
|
||||
if x, ok := m.GetEndKeyType().(*KeyRange_EndOpen); ok {
|
||||
return x.EndOpen
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||
func (*KeyRange) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||
return _KeyRange_OneofMarshaler, _KeyRange_OneofUnmarshaler, _KeyRange_OneofSizer, []interface{}{
|
||||
(*KeyRange_StartClosed)(nil),
|
||||
(*KeyRange_StartOpen)(nil),
|
||||
(*KeyRange_EndClosed)(nil),
|
||||
(*KeyRange_EndOpen)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func _KeyRange_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||
m := msg.(*KeyRange)
|
||||
// start_key_type
|
||||
switch x := m.StartKeyType.(type) {
|
||||
case *KeyRange_StartClosed:
|
||||
b.EncodeVarint(1<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.StartClosed); err != nil {
|
||||
return err
|
||||
}
|
||||
case *KeyRange_StartOpen:
|
||||
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.StartOpen); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("KeyRange.StartKeyType has unexpected type %T", x)
|
||||
}
|
||||
// end_key_type
|
||||
switch x := m.EndKeyType.(type) {
|
||||
case *KeyRange_EndClosed:
|
||||
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.EndClosed); err != nil {
|
||||
return err
|
||||
}
|
||||
case *KeyRange_EndOpen:
|
||||
b.EncodeVarint(4<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.EndOpen); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("KeyRange.EndKeyType has unexpected type %T", x)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _KeyRange_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||
m := msg.(*KeyRange)
|
||||
switch tag {
|
||||
case 1: // start_key_type.start_closed
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf1.ListValue)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.StartKeyType = &KeyRange_StartClosed{msg}
|
||||
return true, err
|
||||
case 2: // start_key_type.start_open
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf1.ListValue)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.StartKeyType = &KeyRange_StartOpen{msg}
|
||||
return true, err
|
||||
case 3: // end_key_type.end_closed
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf1.ListValue)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.EndKeyType = &KeyRange_EndClosed{msg}
|
||||
return true, err
|
||||
case 4: // end_key_type.end_open
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf1.ListValue)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.EndKeyType = &KeyRange_EndOpen{msg}
|
||||
return true, err
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
func _KeyRange_OneofSizer(msg proto.Message) (n int) {
|
||||
m := msg.(*KeyRange)
|
||||
// start_key_type
|
||||
switch x := m.StartKeyType.(type) {
|
||||
case *KeyRange_StartClosed:
|
||||
s := proto.Size(x.StartClosed)
|
||||
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *KeyRange_StartOpen:
|
||||
s := proto.Size(x.StartOpen)
|
||||
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
// end_key_type
|
||||
switch x := m.EndKeyType.(type) {
|
||||
case *KeyRange_EndClosed:
|
||||
s := proto.Size(x.EndClosed)
|
||||
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *KeyRange_EndOpen:
|
||||
s := proto.Size(x.EndOpen)
|
||||
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
|
||||
// the keys are expected to be in the same table or index. The keys need
|
||||
// not be sorted in any particular way.
|
||||
//
|
||||
// If the same key is specified multiple times in the set (for example
|
||||
// if two ranges, two keys, or a key and a range overlap), Cloud Spanner
|
||||
// behaves as if the key were only specified once.
|
||||
type KeySet struct {
|
||||
// A list of specific keys. Entries in `keys` should have exactly as
|
||||
// many elements as there are columns in the primary or index key
|
||||
// with which this `KeySet` is used. Individual key values are
|
||||
// encoded as described [here][google.spanner.v1.TypeCode].
|
||||
Keys []*google_protobuf1.ListValue `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
|
||||
// A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
|
||||
// key range specifications.
|
||||
Ranges []*KeyRange `protobuf:"bytes,2,rep,name=ranges" json:"ranges,omitempty"`
|
||||
// For convenience `all` can be set to `true` to indicate that this
|
||||
// `KeySet` matches all keys in the table or index. Note that any keys
|
||||
// specified in `keys` or `ranges` are only yielded once.
|
||||
All bool `protobuf:"varint,3,opt,name=all" json:"all,omitempty"`
|
||||
}
|
||||
|
||||
func (m *KeySet) Reset() { *m = KeySet{} }
|
||||
func (m *KeySet) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeySet) ProtoMessage() {}
|
||||
func (*KeySet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||||
|
||||
func (m *KeySet) GetKeys() []*google_protobuf1.ListValue {
|
||||
if m != nil {
|
||||
return m.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeySet) GetRanges() []*KeyRange {
|
||||
if m != nil {
|
||||
return m.Ranges
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeySet) GetAll() bool {
|
||||
if m != nil {
|
||||
return m.All
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*KeyRange)(nil), "google.spanner.v1.KeyRange")
|
||||
proto.RegisterType((*KeySet)(nil), "google.spanner.v1.KeySet")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/keys.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 356 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6b, 0xf2, 0x30,
|
||||
0x18, 0xc7, 0xdf, 0x56, 0xf1, 0xd5, 0x28, 0xe2, 0x5b, 0x78, 0x59, 0x71, 0x3b, 0x88, 0xa7, 0x9d,
|
||||
0x52, 0x9c, 0x87, 0x0d, 0x3c, 0x0c, 0xea, 0x61, 0x03, 0x07, 0x93, 0x0a, 0x1e, 0x76, 0x91, 0x68,
|
||||
0x9f, 0x85, 0x62, 0x96, 0x84, 0x26, 0x95, 0xf5, 0xb4, 0xaf, 0xb2, 0xf3, 0x3e, 0xe5, 0x48, 0x9a,
|
||||
0x8e, 0x81, 0xb0, 0x79, 0x4b, 0xf8, 0x3f, 0xbf, 0xe7, 0x97, 0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0xd4, 0xf8, 0x59, 0x90, 0xd8, 0xba, 0x60,
|
||||
0x8a, 0x5a, 0xb9, 0x19, 0xac, 0x0a, 0x7d, 0x4b, 0x9c, 0xe3, 0xa3, 0xe5, 0xe1, 0x7a, 0xf8, 0x89,
|
||||
0x2b, 0x0d, 0x06, 0xa8, 0x41, 0x18, 0xb3, 0xdf, 0xdf, 0x4e, 0xcc, 0x31, 0x7e, 0x45, 0xff, 0x77,
|
||||
0xe2, 0xe5, 0x98, 0x8d, 0x3b, 0x0b, 0x28, 0xd5, 0xd2, 0xd8, 0x97, 0xde, 0xd3, 0x8d, 0xcb, 0xa9,
|
||||
0x60, 0x84, 0x53, 0x2c, 0x72, 0x1a, 0x51, 0xe0, 0xf6, 0x6d, 0x51, 0x15, 0x11, 0x99, 0xa9, 0x6f,
|
||||
0x7f, 0xd5, 0xcc, 0x1d, 0x3f, 0xfc, 0xb3, 0xbb, 0x0a, 0x9d, 0x33, 0x51, 0xa4, 0x78, 0xe5, 0x04,
|
||||
0xeb, 0xc9, 0xb6, 0x65, 0xf1, 0xe9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x78, 0x80, 0x47,
|
||||
0x93, 0x02, 0x00, 0x00,
|
||||
}
|
348
vendor/google.golang.org/genproto/googleapis/spanner/v1/mutation.pb.go
generated
vendored
Normal file
348
vendor/google.golang.org/genproto/googleapis/spanner/v1/mutation.pb.go
generated
vendored
Normal file
@@ -0,0 +1,348 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/mutation.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// A modification to one or more Cloud Spanner rows. Mutations can be
|
||||
// applied to a Cloud Spanner database by sending them in a
|
||||
// [Commit][google.spanner.v1.Spanner.Commit] call.
|
||||
type Mutation struct {
|
||||
// Required. The operation to perform.
|
||||
//
|
||||
// Types that are valid to be assigned to Operation:
|
||||
// *Mutation_Insert
|
||||
// *Mutation_Update
|
||||
// *Mutation_InsertOrUpdate
|
||||
// *Mutation_Replace
|
||||
// *Mutation_Delete_
|
||||
Operation isMutation_Operation `protobuf_oneof:"operation"`
|
||||
}
|
||||
|
||||
func (m *Mutation) Reset() { *m = Mutation{} }
|
||||
func (m *Mutation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Mutation) ProtoMessage() {}
|
||||
func (*Mutation) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
|
||||
|
||||
type isMutation_Operation interface {
|
||||
isMutation_Operation()
|
||||
}
|
||||
|
||||
type Mutation_Insert struct {
|
||||
Insert *Mutation_Write `protobuf:"bytes,1,opt,name=insert,oneof"`
|
||||
}
|
||||
type Mutation_Update struct {
|
||||
Update *Mutation_Write `protobuf:"bytes,2,opt,name=update,oneof"`
|
||||
}
|
||||
type Mutation_InsertOrUpdate struct {
|
||||
InsertOrUpdate *Mutation_Write `protobuf:"bytes,3,opt,name=insert_or_update,json=insertOrUpdate,oneof"`
|
||||
}
|
||||
type Mutation_Replace struct {
|
||||
Replace *Mutation_Write `protobuf:"bytes,4,opt,name=replace,oneof"`
|
||||
}
|
||||
type Mutation_Delete_ struct {
|
||||
Delete *Mutation_Delete `protobuf:"bytes,5,opt,name=delete,oneof"`
|
||||
}
|
||||
|
||||
func (*Mutation_Insert) isMutation_Operation() {}
|
||||
func (*Mutation_Update) isMutation_Operation() {}
|
||||
func (*Mutation_InsertOrUpdate) isMutation_Operation() {}
|
||||
func (*Mutation_Replace) isMutation_Operation() {}
|
||||
func (*Mutation_Delete_) isMutation_Operation() {}
|
||||
|
||||
func (m *Mutation) GetOperation() isMutation_Operation {
|
||||
if m != nil {
|
||||
return m.Operation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation) GetInsert() *Mutation_Write {
|
||||
if x, ok := m.GetOperation().(*Mutation_Insert); ok {
|
||||
return x.Insert
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation) GetUpdate() *Mutation_Write {
|
||||
if x, ok := m.GetOperation().(*Mutation_Update); ok {
|
||||
return x.Update
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation) GetInsertOrUpdate() *Mutation_Write {
|
||||
if x, ok := m.GetOperation().(*Mutation_InsertOrUpdate); ok {
|
||||
return x.InsertOrUpdate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation) GetReplace() *Mutation_Write {
|
||||
if x, ok := m.GetOperation().(*Mutation_Replace); ok {
|
||||
return x.Replace
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation) GetDelete() *Mutation_Delete {
|
||||
if x, ok := m.GetOperation().(*Mutation_Delete_); ok {
|
||||
return x.Delete
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||
func (*Mutation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||
return _Mutation_OneofMarshaler, _Mutation_OneofUnmarshaler, _Mutation_OneofSizer, []interface{}{
|
||||
(*Mutation_Insert)(nil),
|
||||
(*Mutation_Update)(nil),
|
||||
(*Mutation_InsertOrUpdate)(nil),
|
||||
(*Mutation_Replace)(nil),
|
||||
(*Mutation_Delete_)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func _Mutation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||
m := msg.(*Mutation)
|
||||
// operation
|
||||
switch x := m.Operation.(type) {
|
||||
case *Mutation_Insert:
|
||||
b.EncodeVarint(1<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.Insert); err != nil {
|
||||
return err
|
||||
}
|
||||
case *Mutation_Update:
|
||||
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.Update); err != nil {
|
||||
return err
|
||||
}
|
||||
case *Mutation_InsertOrUpdate:
|
||||
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.InsertOrUpdate); err != nil {
|
||||
return err
|
||||
}
|
||||
case *Mutation_Replace:
|
||||
b.EncodeVarint(4<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.Replace); err != nil {
|
||||
return err
|
||||
}
|
||||
case *Mutation_Delete_:
|
||||
b.EncodeVarint(5<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.Delete); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("Mutation.Operation has unexpected type %T", x)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _Mutation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||
m := msg.(*Mutation)
|
||||
switch tag {
|
||||
case 1: // operation.insert
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(Mutation_Write)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Operation = &Mutation_Insert{msg}
|
||||
return true, err
|
||||
case 2: // operation.update
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(Mutation_Write)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Operation = &Mutation_Update{msg}
|
||||
return true, err
|
||||
case 3: // operation.insert_or_update
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(Mutation_Write)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Operation = &Mutation_InsertOrUpdate{msg}
|
||||
return true, err
|
||||
case 4: // operation.replace
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(Mutation_Write)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Operation = &Mutation_Replace{msg}
|
||||
return true, err
|
||||
case 5: // operation.delete
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(Mutation_Delete)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Operation = &Mutation_Delete_{msg}
|
||||
return true, err
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
func _Mutation_OneofSizer(msg proto.Message) (n int) {
|
||||
m := msg.(*Mutation)
|
||||
// operation
|
||||
switch x := m.Operation.(type) {
|
||||
case *Mutation_Insert:
|
||||
s := proto.Size(x.Insert)
|
||||
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *Mutation_Update:
|
||||
s := proto.Size(x.Update)
|
||||
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *Mutation_InsertOrUpdate:
|
||||
s := proto.Size(x.InsertOrUpdate)
|
||||
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *Mutation_Replace:
|
||||
s := proto.Size(x.Replace)
|
||||
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *Mutation_Delete_:
|
||||
s := proto.Size(x.Delete)
|
||||
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
|
||||
// [replace][google.spanner.v1.Mutation.replace] operations.
|
||||
type Mutation_Write struct {
|
||||
// Required. The table whose rows will be written.
|
||||
Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
|
||||
// The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written.
|
||||
//
|
||||
// The list of columns must contain enough columns to allow
|
||||
// Cloud Spanner to derive values for all primary key columns in the
|
||||
// row(s) to be modified.
|
||||
Columns []string `protobuf:"bytes,2,rep,name=columns" json:"columns,omitempty"`
|
||||
// The values to be written. `values` can contain more than one
|
||||
// list of values. If it does, then multiple rows are written, one
|
||||
// for each entry in `values`. Each list in `values` must have
|
||||
// exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns]
|
||||
// above. Sending multiple lists is equivalent to sending multiple
|
||||
// `Mutation`s, each containing one `values` entry and repeating
|
||||
// [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are
|
||||
// encoded as described [here][google.spanner.v1.TypeCode].
|
||||
Values []*google_protobuf1.ListValue `protobuf:"bytes,3,rep,name=values" json:"values,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Mutation_Write) Reset() { *m = Mutation_Write{} }
|
||||
func (m *Mutation_Write) String() string { return proto.CompactTextString(m) }
|
||||
func (*Mutation_Write) ProtoMessage() {}
|
||||
func (*Mutation_Write) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
|
||||
|
||||
func (m *Mutation_Write) GetTable() string {
|
||||
if m != nil {
|
||||
return m.Table
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Mutation_Write) GetColumns() []string {
|
||||
if m != nil {
|
||||
return m.Columns
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Mutation_Write) GetValues() []*google_protobuf1.ListValue {
|
||||
if m != nil {
|
||||
return m.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
|
||||
type Mutation_Delete struct {
|
||||
// Required. The table whose rows will be deleted.
|
||||
Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
|
||||
// Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete.
|
||||
KeySet *KeySet `protobuf:"bytes,2,opt,name=key_set,json=keySet" json:"key_set,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Mutation_Delete) Reset() { *m = Mutation_Delete{} }
|
||||
func (m *Mutation_Delete) String() string { return proto.CompactTextString(m) }
|
||||
func (*Mutation_Delete) ProtoMessage() {}
|
||||
func (*Mutation_Delete) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 1} }
|
||||
|
||||
func (m *Mutation_Delete) GetTable() string {
|
||||
if m != nil {
|
||||
return m.Table
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Mutation_Delete) GetKeySet() *KeySet {
|
||||
if m != nil {
|
||||
return m.KeySet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Mutation)(nil), "google.spanner.v1.Mutation")
|
||||
proto.RegisterType((*Mutation_Write)(nil), "google.spanner.v1.Mutation.Write")
|
||||
proto.RegisterType((*Mutation_Delete)(nil), "google.spanner.v1.Mutation.Delete")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/mutation.proto", fileDescriptor1) }
|
||||
|
||||
var fileDescriptor1 = []byte{
|
||||
// 402 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x6b, 0xdb, 0x30,
|
||||
0x14, 0xc7, 0x97, 0x38, 0x71, 0x16, 0x85, 0x8d, 0xcd, 0x6c, 0xcc, 0x33, 0x3b, 0x78, 0x39, 0xe5,
|
||||
0x24, 0x13, 0xef, 0x32, 0xc8, 0x76, 0xc9, 0x06, 0x1b, 0x6c, 0xa1, 0xc1, 0xa1, 0x29, 0xf4, 0x12,
|
||||
0x14, 0xe7, 0xd5, 0x18, 0x2b, 0x92, 0x91, 0xe4, 0x40, 0xa0, 0x9f, 0xa5, 0x1f, 0xa0, 0x9f, 0xb2,
|
||||
0x58, 0x92, 0x4b, 0x68, 0xda, 0x92, 0x9e, 0xec, 0xc7, 0xfb, 0xff, 0xfe, 0xff, 0xf7, 0x24, 0xa1,
|
||||
0x30, 0xe3, 0x3c, 0xa3, 0x10, 0xc9, 0x92, 0x30, 0x06, 0x22, 0xda, 0x8d, 0xa3, 0x6d, 0xa5, 0x88,
|
||||
0xca, 0x39, 0xc3, 0xa5, 0xe0, 0x8a, 0x7b, 0xef, 0x8d, 0x02, 0x5b, 0x05, 0xde, 0x8d, 0x83, 0x2f,
|
||||
0x16, 0x22, 0x65, 0x1e, 0x11, 0xc6, 0xb8, 0xd1, 0x4b, 0x03, 0xdc, 0x77, 0x75, 0xb5, 0xae, 0xae,
|
||||
0x22, 0xa9, 0x44, 0x95, 0xaa, 0x07, 0xdd, 0x83, 0xc0, 0x02, 0xf6, 0x96, 0x1d, 0xde, 0x74, 0xd0,
|
||||
0xeb, 0x99, 0xcd, 0xf7, 0x26, 0xc8, 0xcd, 0x99, 0x04, 0xa1, 0xfc, 0x56, 0xd8, 0x1a, 0x0d, 0xe2,
|
||||
0xaf, 0xf8, 0x68, 0x14, 0xdc, 0x88, 0xf1, 0x85, 0xc8, 0x15, 0xfc, 0x7d, 0x95, 0x58, 0xa4, 0x86,
|
||||
0xab, 0x72, 0x43, 0x14, 0xf8, 0xed, 0x17, 0xc0, 0x06, 0xf1, 0x66, 0xe8, 0x9d, 0xb1, 0x59, 0x71,
|
||||
0xb1, 0xb2, 0x36, 0xce, 0xe9, 0x36, 0x6f, 0x0d, 0x7c, 0x26, 0xce, 0x8d, 0xdd, 0x4f, 0xd4, 0x13,
|
||||
0x50, 0x52, 0x92, 0x82, 0xdf, 0x39, 0xdd, 0xa5, 0x61, 0xbc, 0x1f, 0xc8, 0xdd, 0x00, 0x05, 0x05,
|
||||
0x7e, 0x57, 0xd3, 0xc3, 0xe7, 0xe8, 0xdf, 0x5a, 0x59, 0xef, 0x62, 0x98, 0xa0, 0x40, 0x5d, 0xed,
|
||||
0xe8, 0x7d, 0x40, 0x5d, 0x45, 0xd6, 0x14, 0xf4, 0x69, 0xf6, 0x13, 0x53, 0x78, 0x3e, 0xea, 0xa5,
|
||||
0x9c, 0x56, 0x5b, 0x26, 0xfd, 0x76, 0xe8, 0x8c, 0xfa, 0x49, 0x53, 0x7a, 0x31, 0x72, 0x77, 0x84,
|
||||
0x56, 0x20, 0x7d, 0x27, 0x74, 0x46, 0x83, 0x38, 0x68, 0x62, 0x9b, 0x8b, 0xc5, 0xff, 0x73, 0xa9,
|
||||
0x96, 0xb5, 0x24, 0xb1, 0xca, 0x20, 0x41, 0xae, 0x19, 0xe0, 0x89, 0xb4, 0x18, 0xf5, 0x0a, 0xd8,
|
||||
0xaf, 0x24, 0x28, 0x7b, 0x2d, 0x9f, 0x1f, 0xd9, 0xe5, 0x1f, 0xec, 0x17, 0xa0, 0x12, 0xb7, 0xd0,
|
||||
0xdf, 0xe9, 0x00, 0xf5, 0x79, 0x09, 0x42, 0xaf, 0x37, 0xbd, 0x46, 0x1f, 0x53, 0xbe, 0x3d, 0x86,
|
||||
0xa6, 0x6f, 0x9a, 0x13, 0x98, 0xd7, 0xd3, 0xcd, 0x5b, 0x97, 0xdf, 0xad, 0x26, 0xe3, 0x94, 0xb0,
|
||||
0x0c, 0x73, 0x91, 0x45, 0x19, 0x30, 0x3d, 0x7b, 0x64, 0x5a, 0xa4, 0xcc, 0xe5, 0xc1, 0x3b, 0x9c,
|
||||
0xd8, 0xdf, 0xdb, 0xf6, 0xa7, 0x3f, 0x06, 0xfd, 0x45, 0x79, 0xb5, 0xc1, 0x0b, 0x1b, 0xb2, 0x1c,
|
||||
0xaf, 0x5d, 0x8d, 0x7f, 0xbb, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x94, 0x52, 0x99, 0xf3, 0x36, 0x03,
|
||||
0x00, 0x00,
|
||||
}
|
286
vendor/google.golang.org/genproto/googleapis/spanner/v1/query_plan.pb.go
generated
vendored
Normal file
286
vendor/google.golang.org/genproto/googleapis/spanner/v1/query_plan.pb.go
generated
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/query_plan.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between the two different kinds of
|
||||
// nodes that can appear in a query plan.
|
||||
type PlanNode_Kind int32
|
||||
|
||||
const (
|
||||
// Not specified.
|
||||
PlanNode_KIND_UNSPECIFIED PlanNode_Kind = 0
|
||||
// Denotes a Relational operator node in the expression tree. Relational
|
||||
// operators represent iterative processing of rows during query execution.
|
||||
// For example, a `TableScan` operation that reads rows from a table.
|
||||
PlanNode_RELATIONAL PlanNode_Kind = 1
|
||||
// Denotes a Scalar node in the expression tree. Scalar nodes represent
|
||||
// non-iterable entities in the query plan. For example, constants or
|
||||
// arithmetic operators appearing inside predicate expressions or references
|
||||
// to column names.
|
||||
PlanNode_SCALAR PlanNode_Kind = 2
|
||||
)
|
||||
|
||||
var PlanNode_Kind_name = map[int32]string{
|
||||
0: "KIND_UNSPECIFIED",
|
||||
1: "RELATIONAL",
|
||||
2: "SCALAR",
|
||||
}
|
||||
var PlanNode_Kind_value = map[string]int32{
|
||||
"KIND_UNSPECIFIED": 0,
|
||||
"RELATIONAL": 1,
|
||||
"SCALAR": 2,
|
||||
}
|
||||
|
||||
func (x PlanNode_Kind) String() string {
|
||||
return proto.EnumName(PlanNode_Kind_name, int32(x))
|
||||
}
|
||||
func (PlanNode_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
|
||||
|
||||
// Node information for nodes appearing in a [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes].
|
||||
type PlanNode struct {
|
||||
// The `PlanNode`'s index in [node list][google.spanner.v1.QueryPlan.plan_nodes].
|
||||
Index int32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
|
||||
// Used to determine the type of node. May be needed for visualizing
|
||||
// different kinds of nodes differently. For example, If the node is a
|
||||
// [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a condensed representation
|
||||
// which can be used to directly embed a description of the node in its
|
||||
// parent.
|
||||
Kind PlanNode_Kind `protobuf:"varint,2,opt,name=kind,enum=google.spanner.v1.PlanNode_Kind" json:"kind,omitempty"`
|
||||
// The display name for the node.
|
||||
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
|
||||
// List of child node `index`es and their relationship to this parent.
|
||||
ChildLinks []*PlanNode_ChildLink `protobuf:"bytes,4,rep,name=child_links,json=childLinks" json:"child_links,omitempty"`
|
||||
// Condensed representation for [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes.
|
||||
ShortRepresentation *PlanNode_ShortRepresentation `protobuf:"bytes,5,opt,name=short_representation,json=shortRepresentation" json:"short_representation,omitempty"`
|
||||
// Attributes relevant to the node contained in a group of key-value pairs.
|
||||
// For example, a Parameter Reference node could have the following
|
||||
// information in its metadata:
|
||||
//
|
||||
// {
|
||||
// "parameter_reference": "param1",
|
||||
// "parameter_type": "array"
|
||||
// }
|
||||
Metadata *google_protobuf1.Struct `protobuf:"bytes,6,opt,name=metadata" json:"metadata,omitempty"`
|
||||
// The execution statistics associated with the node, contained in a group of
|
||||
// key-value pairs. Only present if the plan was returned as a result of a
|
||||
// profile query. For example, number of executions, number of rows/time per
|
||||
// execution etc.
|
||||
ExecutionStats *google_protobuf1.Struct `protobuf:"bytes,7,opt,name=execution_stats,json=executionStats" json:"execution_stats,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PlanNode) Reset() { *m = PlanNode{} }
|
||||
func (m *PlanNode) String() string { return proto.CompactTextString(m) }
|
||||
func (*PlanNode) ProtoMessage() {}
|
||||
func (*PlanNode) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
||||
|
||||
func (m *PlanNode) GetIndex() int32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetKind() PlanNode_Kind {
|
||||
if m != nil {
|
||||
return m.Kind
|
||||
}
|
||||
return PlanNode_KIND_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetDisplayName() string {
|
||||
if m != nil {
|
||||
return m.DisplayName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetChildLinks() []*PlanNode_ChildLink {
|
||||
if m != nil {
|
||||
return m.ChildLinks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetShortRepresentation() *PlanNode_ShortRepresentation {
|
||||
if m != nil {
|
||||
return m.ShortRepresentation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetMetadata() *google_protobuf1.Struct {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PlanNode) GetExecutionStats() *google_protobuf1.Struct {
|
||||
if m != nil {
|
||||
return m.ExecutionStats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Metadata associated with a parent-child relationship appearing in a
|
||||
// [PlanNode][google.spanner.v1.PlanNode].
|
||||
type PlanNode_ChildLink struct {
|
||||
// The node to which the link points.
|
||||
ChildIndex int32 `protobuf:"varint,1,opt,name=child_index,json=childIndex" json:"child_index,omitempty"`
|
||||
// The type of the link. For example, in Hash Joins this could be used to
|
||||
// distinguish between the build child and the probe child, or in the case
|
||||
// of the child being an output variable, to represent the tag associated
|
||||
// with the output variable.
|
||||
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
|
||||
// Only present if the child node is [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds
|
||||
// to an output variable of the parent node. The field carries the name of
|
||||
// the output variable.
|
||||
// For example, a `TableScan` operator that reads rows from a table will
|
||||
// have child links to the `SCALAR` nodes representing the output variables
|
||||
// created for each column that is read by the operator. The corresponding
|
||||
// `variable` fields will be set to the variable names assigned to the
|
||||
// columns.
|
||||
Variable string `protobuf:"bytes,3,opt,name=variable" json:"variable,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PlanNode_ChildLink) Reset() { *m = PlanNode_ChildLink{} }
|
||||
func (m *PlanNode_ChildLink) String() string { return proto.CompactTextString(m) }
|
||||
func (*PlanNode_ChildLink) ProtoMessage() {}
|
||||
func (*PlanNode_ChildLink) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
|
||||
|
||||
func (m *PlanNode_ChildLink) GetChildIndex() int32 {
|
||||
if m != nil {
|
||||
return m.ChildIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PlanNode_ChildLink) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PlanNode_ChildLink) GetVariable() string {
|
||||
if m != nil {
|
||||
return m.Variable
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Condensed representation of a node and its subtree. Only present for
|
||||
// `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode].
|
||||
type PlanNode_ShortRepresentation struct {
|
||||
// A string representation of the expression subtree rooted at this node.
|
||||
Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
|
||||
// A mapping of (subquery variable name) -> (subquery node id) for cases
|
||||
// where the `description` string of this node references a `SCALAR`
|
||||
// subquery contained in the expression subtree rooted at this node. The
|
||||
// referenced `SCALAR` subquery may not necessarily be a direct child of
|
||||
// this node.
|
||||
Subqueries map[string]int32 `protobuf:"bytes,2,rep,name=subqueries" json:"subqueries,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
}
|
||||
|
||||
func (m *PlanNode_ShortRepresentation) Reset() { *m = PlanNode_ShortRepresentation{} }
|
||||
func (m *PlanNode_ShortRepresentation) String() string { return proto.CompactTextString(m) }
|
||||
func (*PlanNode_ShortRepresentation) ProtoMessage() {}
|
||||
func (*PlanNode_ShortRepresentation) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} }
|
||||
|
||||
func (m *PlanNode_ShortRepresentation) GetDescription() string {
|
||||
if m != nil {
|
||||
return m.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PlanNode_ShortRepresentation) GetSubqueries() map[string]int32 {
|
||||
if m != nil {
|
||||
return m.Subqueries
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Contains an ordered list of nodes appearing in the query plan.
|
||||
type QueryPlan struct {
|
||||
// The nodes in the query plan. Plan nodes are returned in pre-order starting
|
||||
// with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` corresponds to its index in
|
||||
// `plan_nodes`.
|
||||
PlanNodes []*PlanNode `protobuf:"bytes,1,rep,name=plan_nodes,json=planNodes" json:"plan_nodes,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryPlan) Reset() { *m = QueryPlan{} }
|
||||
func (m *QueryPlan) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryPlan) ProtoMessage() {}
|
||||
func (*QueryPlan) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
||||
|
||||
func (m *QueryPlan) GetPlanNodes() []*PlanNode {
|
||||
if m != nil {
|
||||
return m.PlanNodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PlanNode)(nil), "google.spanner.v1.PlanNode")
|
||||
proto.RegisterType((*PlanNode_ChildLink)(nil), "google.spanner.v1.PlanNode.ChildLink")
|
||||
proto.RegisterType((*PlanNode_ShortRepresentation)(nil), "google.spanner.v1.PlanNode.ShortRepresentation")
|
||||
proto.RegisterType((*QueryPlan)(nil), "google.spanner.v1.QueryPlan")
|
||||
proto.RegisterEnum("google.spanner.v1.PlanNode_Kind", PlanNode_Kind_name, PlanNode_Kind_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/query_plan.proto", fileDescriptor2) }
|
||||
|
||||
var fileDescriptor2 = []byte{
|
||||
// 588 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xd1, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0x25, 0x5d, 0x5b, 0xd6, 0x5b, 0xd4, 0x15, 0x6f, 0x68, 0x51, 0x41, 0x22, 0x54, 0x42, 0xea,
|
||||
0x53, 0xa2, 0x6d, 0x3c, 0x4c, 0x43, 0x08, 0xba, 0xae, 0x9b, 0xaa, 0x55, 0xa5, 0x38, 0xc0, 0x03,
|
||||
0x42, 0x8a, 0xdc, 0xc6, 0x74, 0x56, 0x53, 0x3b, 0xc4, 0x4e, 0xb5, 0x3e, 0xf0, 0x0b, 0x7c, 0x08,
|
||||
0x3f, 0xc4, 0xef, 0x20, 0x3b, 0x69, 0x18, 0x14, 0x55, 0xe2, 0xed, 0x5e, 0xdf, 0x73, 0x4f, 0x7c,
|
||||
0xcf, 0xb9, 0x0e, 0xb4, 0x67, 0x42, 0xcc, 0x22, 0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0x58, 0x9d, 0xfa, 0xb1, 0xb7, 0x8d, 0xd0, 0xd7, 0x7d,
|
||||
0xf8, 0x8f, 0x36, 0xbc, 0x2f, 0x37, 0x0f, 0xd1, 0x09, 0xec, 0x2e, 0xa8, 0x22, 0x21, 0x51, 0xc4,
|
||||
0xae, 0x1a, 0xde, 0xc3, 0x35, 0xef, 0x5a, 0x58, 0xd7, 0x37, 0xc2, 0xe2, 0x02, 0x88, 0xde, 0xc0,
|
||||
0x1e, 0xbd, 0xa5, 0xd3, 0x54, 0x33, 0x04, 0x52, 0x11, 0x25, 0xed, 0xfb, 0xdb, 0x7b, 0x1b, 0x05,
|
||||
0xde, 0xd7, 0xf0, 0xd6, 0x67, 0xa8, 0x15, 0x33, 0xa3, 0xa7, 0x6b, 0xbd, 0xee, 0x9a, 0x94, 0x09,
|
||||
0x31, 0x30, 0x4e, 0x21, 0x28, 0xab, 0x55, 0x4c, 0x8d, 0x53, 0x35, 0x6c, 0x62, 0xd4, 0x82, 0xdd,
|
||||
0x25, 0x49, 0x18, 0x99, 0x44, 0x6b, 0x0f, 0x8a, 0xbc, 0xf5, 0xd3, 0x82, 0xfd, 0x7f, 0x28, 0x80,
|
||||
0x1c, 0xa8, 0x87, 0x54, 0x4e, 0x13, 0x16, 0x1b, 0x1d, 0xad, 0xdc, 0xba, 0xdf, 0x47, 0x28, 0x00,
|
||||
0x90, 0xe9, 0x44, 0x2f, 0x27, 0xa3, 0xd2, 0x2e, 0x19, 0xe7, 0x5e, 0xff, 0xa7, 0xd0, 0xae, 0x5f,
|
||||
0x30, 0xf4, 0xb9, 0x4a, 0x56, 0xf8, 0x0e, 0x65, 0xeb, 0x15, 0xec, 0xfd, 0x55, 0x46, 0x4d, 0xd8,
|
||||
0x99, 0xd3, 0x55, 0x7e, 0x1b, 0x1d, 0xea, 0x7d, 0x5d, 0x92, 0x28, 0xcd, 0x06, 0xae, 0xe0, 0x2c,
|
||||
0x39, 0x2b, 0x9d, 0x5a, 0xed, 0x53, 0x28, 0xeb, 0x5d, 0x44, 0x07, 0xd0, 0xbc, 0x1e, 0x8c, 0x2e,
|
||||
0x82, 0x0f, 0x23, 0x7f, 0xdc, 0xef, 0x0d, 0x2e, 0x07, 0xfd, 0x8b, 0xe6, 0x3d, 0xd4, 0x00, 0xc0,
|
||||
0xfd, 0x61, 0xf7, 0xfd, 0xe0, 0xed, 0xa8, 0x3b, 0x6c, 0x5a, 0x08, 0xa0, 0xea, 0xf7, 0xba, 0xc3,
|
||||
0x2e, 0x6e, 0x96, 0xda, 0x57, 0x50, 0x7b, 0xa7, 0xdf, 0x9c, 0xbe, 0x39, 0x3a, 0x03, 0xd0, 0x4f,
|
||||
0x2f, 0xe0, 0x22, 0xa4, 0xd2, 0xb6, 0xcc, 0x98, 0x8f, 0xb7, 0x8c, 0x89, 0x6b, 0x71, 0x1e, 0xc9,
|
||||
0xf3, 0x6f, 0xf0, 0x68, 0x2a, 0x16, 0x9b, 0xe0, 0xf3, 0x46, 0xc1, 0x3f, 0xd6, 0xee, 0x8f, 0xad,
|
||||
0x4f, 0xa7, 0x39, 0x68, 0x26, 0x22, 0xc2, 0x67, 0xae, 0x48, 0x66, 0xde, 0x8c, 0x72, 0xb3, 0x1b,
|
||||
0x5e, 0x56, 0x22, 0x31, 0x93, 0x77, 0x7e, 0x0b, 0x2f, 0xf3, 0xf0, 0x47, 0xe9, 0xf0, 0x2a, 0x6b,
|
||||
0xed, 0x45, 0x22, 0x0d, 0x5d, 0x3f, 0xff, 0xca, 0xc7, 0xa3, 0x49, 0xd5, 0xb4, 0x9f, 0xfc, 0x0a,
|
||||
0x00, 0x00, 0xff, 0xff, 0xcc, 0x06, 0x5f, 0x9c, 0x54, 0x04, 0x00, 0x00,
|
||||
}
|
312
vendor/google.golang.org/genproto/googleapis/spanner/v1/result_set.pb.go
generated
vendored
Normal file
312
vendor/google.golang.org/genproto/googleapis/spanner/v1/result_set.pb.go
generated
vendored
Normal file
@@ -0,0 +1,312 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/result_set.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// Results from [Read][google.spanner.v1.Spanner.Read] or
|
||||
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
|
||||
type ResultSet struct {
|
||||
// Metadata about the result set, such as row type information.
|
||||
Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
|
||||
// Each element in `rows` is a row whose format is defined by
|
||||
// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
|
||||
// in each row matches the ith field in
|
||||
// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
|
||||
// encoded based on type as described
|
||||
// [here][google.spanner.v1.TypeCode].
|
||||
Rows []*google_protobuf1.ListValue `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
|
||||
// Query plan and execution statistics for the query that produced this
|
||||
// result set. These can be requested by setting
|
||||
// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
|
||||
Stats *ResultSetStats `protobuf:"bytes,3,opt,name=stats" json:"stats,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ResultSet) Reset() { *m = ResultSet{} }
|
||||
func (m *ResultSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResultSet) ProtoMessage() {}
|
||||
func (*ResultSet) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
|
||||
|
||||
func (m *ResultSet) GetMetadata() *ResultSetMetadata {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResultSet) GetRows() []*google_protobuf1.ListValue {
|
||||
if m != nil {
|
||||
return m.Rows
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResultSet) GetStats() *ResultSetStats {
|
||||
if m != nil {
|
||||
return m.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Partial results from a streaming read or SQL query. Streaming reads and
|
||||
// SQL queries better tolerate large result sets, large rows, and large
|
||||
// values, but are a little trickier to consume.
|
||||
type PartialResultSet struct {
|
||||
// Metadata about the result set, such as row type information.
|
||||
// Only present in the first response.
|
||||
Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
|
||||
// A streamed result set consists of a stream of values, which might
|
||||
// be split into many `PartialResultSet` messages to accommodate
|
||||
// large rows and/or large values. Every N complete values defines a
|
||||
// row, where N is equal to the number of entries in
|
||||
// [metadata.row_type.fields][google.spanner.v1.StructType.fields].
|
||||
//
|
||||
// Most values are encoded based on type as described
|
||||
// [here][google.spanner.v1.TypeCode].
|
||||
//
|
||||
// It is possible that the last value in values is "chunked",
|
||||
// meaning that the rest of the value is sent in subsequent
|
||||
// `PartialResultSet`(s). This is denoted by the [chunked_value][google.spanner.v1.PartialResultSet.chunked_value]
|
||||
// field. Two or more chunked values can be merged to form a
|
||||
// complete value as follows:
|
||||
//
|
||||
// * `bool/number/null`: cannot be chunked
|
||||
// * `string`: concatenate the strings
|
||||
// * `list`: concatenate the lists. If the last element in a list is a
|
||||
// `string`, `list`, or `object`, merge it with the first element in
|
||||
// the next list by applying these rules recursively.
|
||||
// * `object`: concatenate the (field name, field value) pairs. If a
|
||||
// field name is duplicated, then apply these rules recursively
|
||||
// to merge the field values.
|
||||
//
|
||||
// Some examples of merging:
|
||||
//
|
||||
// # Strings are concatenated.
|
||||
// "foo", "bar" => "foobar"
|
||||
//
|
||||
// # Lists of non-strings are concatenated.
|
||||
// [2, 3], [4] => [2, 3, 4]
|
||||
//
|
||||
// # Lists are concatenated, but the last and first elements are merged
|
||||
// # because they are strings.
|
||||
// ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
|
||||
//
|
||||
// # Lists are concatenated, but the last and first elements are merged
|
||||
// # because they are lists. Recursively, the last and first elements
|
||||
// # of the inner lists are merged because they are strings.
|
||||
// ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"]
|
||||
//
|
||||
// # Non-overlapping object fields are combined.
|
||||
// {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"}
|
||||
//
|
||||
// # Overlapping object fields are merged.
|
||||
// {"a": "1"}, {"a": "2"} => {"a": "12"}
|
||||
//
|
||||
// # Examples of merging objects containing lists of strings.
|
||||
// {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]}
|
||||
//
|
||||
// For a more complete example, suppose a streaming SQL query is
|
||||
// yielding a result set whose rows contain a single string
|
||||
// field. The following `PartialResultSet`s might be yielded:
|
||||
//
|
||||
// {
|
||||
// "metadata": { ... }
|
||||
// "values": ["Hello", "W"]
|
||||
// "chunked_value": true
|
||||
// "resume_token": "Af65..."
|
||||
// }
|
||||
// {
|
||||
// "values": ["orl"]
|
||||
// "chunked_value": true
|
||||
// "resume_token": "Bqp2..."
|
||||
// }
|
||||
// {
|
||||
// "values": ["d"]
|
||||
// "resume_token": "Zx1B..."
|
||||
// }
|
||||
//
|
||||
// This sequence of `PartialResultSet`s encodes two rows, one
|
||||
// containing the field value `"Hello"`, and a second containing the
|
||||
// field value `"World" = "W" + "orl" + "d"`.
|
||||
Values []*google_protobuf1.Value `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"`
|
||||
// If true, then the final value in [values][google.spanner.v1.PartialResultSet.values] is chunked, and must
|
||||
// be combined with more values from subsequent `PartialResultSet`s
|
||||
// to obtain a complete field value.
|
||||
ChunkedValue bool `protobuf:"varint,3,opt,name=chunked_value,json=chunkedValue" json:"chunked_value,omitempty"`
|
||||
// Streaming calls might be interrupted for a variety of reasons, such
|
||||
// as TCP connection loss. If this occurs, the stream of results can
|
||||
// be resumed by re-sending the original request and including
|
||||
// `resume_token`. Note that executing any other transaction in the
|
||||
// same session invalidates the token.
|
||||
ResumeToken []byte `protobuf:"bytes,4,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
|
||||
// Query plan and execution statistics for the query that produced this
|
||||
// streaming result set. These can be requested by setting
|
||||
// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] and are sent
|
||||
// only once with the last response in the stream.
|
||||
Stats *ResultSetStats `protobuf:"bytes,5,opt,name=stats" json:"stats,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PartialResultSet) Reset() { *m = PartialResultSet{} }
|
||||
func (m *PartialResultSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*PartialResultSet) ProtoMessage() {}
|
||||
func (*PartialResultSet) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
|
||||
|
||||
func (m *PartialResultSet) GetMetadata() *ResultSetMetadata {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PartialResultSet) GetValues() []*google_protobuf1.Value {
|
||||
if m != nil {
|
||||
return m.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PartialResultSet) GetChunkedValue() bool {
|
||||
if m != nil {
|
||||
return m.ChunkedValue
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *PartialResultSet) GetResumeToken() []byte {
|
||||
if m != nil {
|
||||
return m.ResumeToken
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PartialResultSet) GetStats() *ResultSetStats {
|
||||
if m != nil {
|
||||
return m.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].
|
||||
type ResultSetMetadata struct {
|
||||
// Indicates the field names and types for the rows in the result
|
||||
// set. For example, a SQL query like `"SELECT UserId, UserName FROM
|
||||
// Users"` could return a `row_type` value like:
|
||||
//
|
||||
// "fields": [
|
||||
// { "name": "UserId", "type": { "code": "INT64" } },
|
||||
// { "name": "UserName", "type": { "code": "STRING" } },
|
||||
// ]
|
||||
RowType *StructType `protobuf:"bytes,1,opt,name=row_type,json=rowType" json:"row_type,omitempty"`
|
||||
// If the read or SQL query began a transaction as a side-effect, the
|
||||
// information about the new transaction is yielded here.
|
||||
Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ResultSetMetadata) Reset() { *m = ResultSetMetadata{} }
|
||||
func (m *ResultSetMetadata) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResultSetMetadata) ProtoMessage() {}
|
||||
func (*ResultSetMetadata) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
|
||||
|
||||
func (m *ResultSetMetadata) GetRowType() *StructType {
|
||||
if m != nil {
|
||||
return m.RowType
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResultSetMetadata) GetTransaction() *Transaction {
|
||||
if m != nil {
|
||||
return m.Transaction
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].
|
||||
type ResultSetStats struct {
|
||||
// [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this result.
|
||||
QueryPlan *QueryPlan `protobuf:"bytes,1,opt,name=query_plan,json=queryPlan" json:"query_plan,omitempty"`
|
||||
// Aggregated statistics from the execution of the query. Only present when
|
||||
// the query is profiled. For example, a query could return the statistics as
|
||||
// follows:
|
||||
//
|
||||
// {
|
||||
// "rows_returned": "3",
|
||||
// "elapsed_time": "1.22 secs",
|
||||
// "cpu_time": "1.19 secs"
|
||||
// }
|
||||
QueryStats *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=query_stats,json=queryStats" json:"query_stats,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ResultSetStats) Reset() { *m = ResultSetStats{} }
|
||||
func (m *ResultSetStats) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResultSetStats) ProtoMessage() {}
|
||||
func (*ResultSetStats) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
|
||||
|
||||
func (m *ResultSetStats) GetQueryPlan() *QueryPlan {
|
||||
if m != nil {
|
||||
return m.QueryPlan
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResultSetStats) GetQueryStats() *google_protobuf1.Struct {
|
||||
if m != nil {
|
||||
return m.QueryStats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ResultSet)(nil), "google.spanner.v1.ResultSet")
|
||||
proto.RegisterType((*PartialResultSet)(nil), "google.spanner.v1.PartialResultSet")
|
||||
proto.RegisterType((*ResultSetMetadata)(nil), "google.spanner.v1.ResultSetMetadata")
|
||||
proto.RegisterType((*ResultSetStats)(nil), "google.spanner.v1.ResultSetStats")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/result_set.proto", fileDescriptor3) }
|
||||
|
||||
var fileDescriptor3 = []byte{
|
||||
// 482 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcb, 0x6e, 0x13, 0x31,
|
||||
0x14, 0x86, 0x35, 0xe9, 0x85, 0xd4, 0x13, 0x10, 0xb5, 0x04, 0x1d, 0x45, 0x05, 0xa5, 0x29, 0x8b,
|
||||
0xac, 0x3c, 0x4a, 0x59, 0x10, 0xa9, 0x9b, 0xaa, 0x2c, 0xd8, 0x80, 0x14, 0x9c, 0xa8, 0x0b, 0x36,
|
||||
0xa3, 0xd3, 0xc4, 0x0c, 0xa3, 0x3a, 0xf6, 0xd4, 0xf6, 0x24, 0xca, 0x82, 0x25, 0x62, 0xc9, 0x7b,
|
||||
0xf0, 0x00, 0x3c, 0x1f, 0xf2, 0x25, 0x17, 0x98, 0x08, 0x09, 0xa9, 0x3b, 0xc7, 0xfe, 0xfe, 0xf3,
|
||||
0x9f, 0xff, 0xcc, 0x09, 0xea, 0xe6, 0x52, 0xe6, 0x9c, 0xa5, 0xba, 0x04, 0x21, 0x98, 0x4a, 0xe7,
|
||||
0xfd, 0x54, 0x31, 0x5d, 0x71, 0x93, 0x69, 0x66, 0x48, 0xa9, 0xa4, 0x91, 0xf8, 0xd8, 0x33, 0x24,
|
||||
0x30, 0x64, 0xde, 0x6f, 0x9f, 0x06, 0x19, 0x94, 0x45, 0x0a, 0x42, 0x48, 0x03, 0xa6, 0x90, 0x42,
|
||||
0x7b, 0xc1, 0xfa, 0xd5, 0xfd, 0xba, 0xad, 0x3e, 0xa7, 0xda, 0xa8, 0x6a, 0x12, 0xca, 0xb5, 0x77,
|
||||
0x58, 0xde, 0x57, 0x4c, 0x2d, 0xb3, 0x92, 0x83, 0x08, 0xcc, 0x79, 0x9d, 0x31, 0x0a, 0x84, 0x86,
|
||||
0x89, 0xf5, 0xf9, 0xcb, 0x66, 0x1b, 0x5a, 0x96, 0xcc, 0xbf, 0x76, 0x7f, 0x45, 0xe8, 0x88, 0xba,
|
||||
0x28, 0x23, 0x66, 0xf0, 0x15, 0x6a, 0xce, 0x98, 0x81, 0x29, 0x18, 0x48, 0xa2, 0x4e, 0xd4, 0x8b,
|
||||
0x2f, 0x5e, 0x91, 0x5a, 0x2c, 0xb2, 0xe6, 0x3f, 0x04, 0x96, 0xae, 0x55, 0x98, 0xa0, 0x7d, 0x25,
|
||||
0x17, 0x3a, 0x69, 0x74, 0xf6, 0x7a, 0xf1, 0x45, 0x7b, 0xa5, 0x5e, 0x65, 0x24, 0xef, 0x0b, 0x6d,
|
||||
0x6e, 0x80, 0x57, 0x8c, 0x3a, 0x0e, 0xbf, 0x41, 0x07, 0xda, 0x80, 0xd1, 0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0xb6, 0xd7, 0x5f, 0xd1, 0xb3, 0x89, 0x9c, 0xd5,
|
||||
0x7d, 0xae, 0x37, 0xfd, 0x0d, 0xad, 0x7c, 0x18, 0x7d, 0x1a, 0x04, 0x28, 0x97, 0x1c, 0x44, 0x4e,
|
||||
0xa4, 0xca, 0xd3, 0x9c, 0x09, 0x57, 0x3c, 0xf5, 0x4f, 0x50, 0x16, 0x7a, 0xeb, 0x4f, 0x74, 0x19,
|
||||
0x8e, 0x3f, 0x1b, 0x27, 0xef, 0xbc, 0xf4, 0x2d, 0x97, 0xd5, 0x94, 0x8c, 0x82, 0xcb, 0x4d, 0xff,
|
||||
0xf6, 0xd0, 0xc9, 0x5f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x15, 0x1f, 0xa6, 0x3e, 0x04,
|
||||
0x00, 0x00,
|
||||
}
|
1216
vendor/google.golang.org/genproto/googleapis/spanner/v1/spanner.pb.go
generated
vendored
Normal file
1216
vendor/google.golang.org/genproto/googleapis/spanner/v1/spanner.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
831
vendor/google.golang.org/genproto/googleapis/spanner/v1/transaction.pb.go
generated
vendored
Normal file
831
vendor/google.golang.org/genproto/googleapis/spanner/v1/transaction.pb.go
generated
vendored
Normal file
@@ -0,0 +1,831 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/transaction.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import google_protobuf2 "github.com/golang/protobuf/ptypes/duration"
|
||||
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// # Transactions
|
||||
//
|
||||
//
|
||||
// Each session can have at most one active transaction at a time. After the
|
||||
// active transaction is completed, the session can immediately be
|
||||
// re-used for the next transaction. It is not necessary to create a
|
||||
// new session for each transaction.
|
||||
//
|
||||
// # Transaction Modes
|
||||
//
|
||||
// Cloud Spanner supports two transaction modes:
|
||||
//
|
||||
// 1. Locking read-write. This type of transaction is the only way
|
||||
// to write data into Cloud Spanner. These transactions rely on
|
||||
// pessimistic locking and, if necessary, two-phase commit.
|
||||
// Locking read-write transactions may abort, requiring the
|
||||
// application to retry.
|
||||
//
|
||||
// 2. Snapshot read-only. This transaction type provides guaranteed
|
||||
// consistency across several reads, but does not allow
|
||||
// writes. Snapshot read-only transactions can be configured to
|
||||
// read at timestamps in the past. Snapshot read-only
|
||||
// transactions do not need to be committed.
|
||||
//
|
||||
// For transactions that only read, snapshot read-only transactions
|
||||
// provide simpler semantics and are almost always faster. In
|
||||
// particular, read-only transactions do not take locks, so they do
|
||||
// not conflict with read-write transactions. As a consequence of not
|
||||
// taking locks, they also do not abort, so retry loops are not needed.
|
||||
//
|
||||
// Transactions may only read/write data in a single database. They
|
||||
// may, however, read/write data in different tables within that
|
||||
// database.
|
||||
//
|
||||
// ## Locking Read-Write Transactions
|
||||
//
|
||||
// Locking transactions may be used to atomically read-modify-write
|
||||
// data anywhere in a database. This type of transaction is externally
|
||||
// consistent.
|
||||
//
|
||||
// Clients should attempt to minimize the amount of time a transaction
|
||||
// is active. Faster transactions commit with higher probability
|
||||
// and cause less contention. Cloud Spanner attempts to keep read locks
|
||||
// active as long as the transaction continues to do reads, and the
|
||||
// transaction has not been terminated by
|
||||
// [Commit][google.spanner.v1.Spanner.Commit] or
|
||||
// [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of
|
||||
// inactivity at the client may cause Cloud Spanner to release a
|
||||
// transaction's locks and abort it.
|
||||
//
|
||||
// Reads performed within a transaction acquire locks on the data
|
||||
// being read. Writes can only be done at commit time, after all reads
|
||||
// have been completed.
|
||||
// Conceptually, a read-write transaction consists of zero or more
|
||||
// reads or SQL queries followed by
|
||||
// [Commit][google.spanner.v1.Spanner.Commit]. At any time before
|
||||
// [Commit][google.spanner.v1.Spanner.Commit], the client can send a
|
||||
// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
|
||||
// transaction.
|
||||
//
|
||||
// ### Semantics
|
||||
//
|
||||
// Cloud Spanner can commit the transaction if all read locks it acquired
|
||||
// are still valid at commit time, and it is able to acquire write
|
||||
// locks for all writes. Cloud Spanner can abort the transaction for any
|
||||
// reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
|
||||
// that the transaction has not modified any user data in Cloud Spanner.
|
||||
//
|
||||
// Unless the transaction commits, Cloud Spanner makes no guarantees about
|
||||
// how long the transaction's locks were held for. It is an error to
|
||||
// use Cloud Spanner locks for any sort of mutual exclusion other than
|
||||
// between Cloud Spanner transactions themselves.
|
||||
//
|
||||
// ### Retrying Aborted Transactions
|
||||
//
|
||||
// When a transaction aborts, the application can choose to retry the
|
||||
// whole transaction again. To maximize the chances of successfully
|
||||
// committing the retry, the client should execute the retry in the
|
||||
// same session as the original attempt. The original session's lock
|
||||
// priority increases with each consecutive abort, meaning that each
|
||||
// attempt has a slightly better chance of success than the previous.
|
||||
//
|
||||
// Under some circumstances (e.g., many transactions attempting to
|
||||
// modify the same row(s)), a transaction can abort many times in a
|
||||
// short period before successfully committing. Thus, it is not a good
|
||||
// idea to cap the number of retries a transaction can attempt;
|
||||
// instead, it is better to limit the total amount of wall time spent
|
||||
// retrying.
|
||||
//
|
||||
// ### Idle Transactions
|
||||
//
|
||||
// A transaction is considered idle if it has no outstanding reads or
|
||||
// SQL queries and has not started a read or SQL query within the last 10
|
||||
// seconds. Idle transactions can be aborted by Cloud Spanner so that they
|
||||
// don't hold on to locks indefinitely. In that case, the commit will
|
||||
// fail with error `ABORTED`.
|
||||
//
|
||||
// If this behavior is undesirable, periodically executing a simple
|
||||
// SQL query in the transaction (e.g., `SELECT 1`) prevents the
|
||||
// transaction from becoming idle.
|
||||
//
|
||||
// ## Snapshot Read-Only Transactions
|
||||
//
|
||||
// Snapshot read-only transactions provides a simpler method than
|
||||
// locking read-write transactions for doing several consistent
|
||||
// reads. However, this type of transaction does not support writes.
|
||||
//
|
||||
// Snapshot transactions do not take locks. Instead, they work by
|
||||
// choosing a Cloud Spanner timestamp, then executing all reads at that
|
||||
// timestamp. Since they do not acquire locks, they do not block
|
||||
// concurrent read-write transactions.
|
||||
//
|
||||
// Unlike locking read-write transactions, snapshot read-only
|
||||
// transactions never abort. They can fail if the chosen read
|
||||
// timestamp is garbage collected; however, the default garbage
|
||||
// collection policy is generous enough that most applications do not
|
||||
// need to worry about this in practice.
|
||||
//
|
||||
// Snapshot read-only transactions do not need to call
|
||||
// [Commit][google.spanner.v1.Spanner.Commit] or
|
||||
// [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
|
||||
// permitted to do so).
|
||||
//
|
||||
// To execute a snapshot transaction, the client specifies a timestamp
|
||||
// bound, which tells Cloud Spanner how to choose a read timestamp.
|
||||
//
|
||||
// The types of timestamp bound are:
|
||||
//
|
||||
// - Strong (the default).
|
||||
// - Bounded staleness.
|
||||
// - Exact staleness.
|
||||
//
|
||||
// If the Cloud Spanner database to be read is geographically distributed,
|
||||
// stale read-only transactions can execute more quickly than strong
|
||||
// or read-write transaction, because they are able to execute far
|
||||
// from the leader replica.
|
||||
//
|
||||
// Each type of timestamp bound is discussed in detail below.
|
||||
//
|
||||
// ### Strong
|
||||
//
|
||||
// Strong reads are guaranteed to see the effects of all transactions
|
||||
// that have committed before the start of the read. Furthermore, all
|
||||
// rows yielded by a single read are consistent with each other -- if
|
||||
// any part of the read observes a transaction, all parts of the read
|
||||
// see the transaction.
|
||||
//
|
||||
// Strong reads are not repeatable: two consecutive strong read-only
|
||||
// transactions might return inconsistent results if there are
|
||||
// concurrent writes. If consistency across reads is required, the
|
||||
// reads should be executed within a transaction or at an exact read
|
||||
// timestamp.
|
||||
//
|
||||
// See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
|
||||
//
|
||||
// ### Exact Staleness
|
||||
//
|
||||
// These timestamp bounds execute reads at a user-specified
|
||||
// timestamp. Reads at a timestamp are guaranteed to see a consistent
|
||||
// prefix of the global transaction history: they observe
|
||||
// modifications done by all transactions with a commit timestamp <=
|
||||
// the read timestamp, and observe none of the modifications done by
|
||||
// transactions with a larger commit timestamp. They will block until
|
||||
// all conflicting transactions that may be assigned commit timestamps
|
||||
// <= the read timestamp have finished.
|
||||
//
|
||||
// The timestamp can either be expressed as an absolute Cloud Spanner commit
|
||||
// timestamp or a staleness relative to the current time.
|
||||
//
|
||||
// These modes do not require a "negotiation phase" to pick a
|
||||
// timestamp. As a result, they execute slightly faster than the
|
||||
// equivalent boundedly stale concurrency modes. On the other hand,
|
||||
// boundedly stale reads usually return fresher results.
|
||||
//
|
||||
// See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
|
||||
// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
|
||||
//
|
||||
// ### Bounded Staleness
|
||||
//
|
||||
// Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
|
||||
// subject to a user-provided staleness bound. Cloud Spanner chooses the
|
||||
// newest timestamp within the staleness bound that allows execution
|
||||
// of the reads at the closest available replica without blocking.
|
||||
//
|
||||
// All rows yielded are consistent with each other -- if any part of
|
||||
// the read observes a transaction, all parts of the read see the
|
||||
// transaction. Boundedly stale reads are not repeatable: two stale
|
||||
// reads, even if they use the same staleness bound, can execute at
|
||||
// different timestamps and thus return inconsistent results.
|
||||
//
|
||||
// Boundedly stale reads execute in two phases: the first phase
|
||||
// negotiates a timestamp among all replicas needed to serve the
|
||||
// read. In the second phase, reads are executed at the negotiated
|
||||
// timestamp.
|
||||
//
|
||||
// As a result of the two phase execution, bounded staleness reads are
|
||||
// usually a little slower than comparable exact staleness
|
||||
// reads. However, they are typically able to return fresher
|
||||
// results, and are more likely to execute at the closest replica.
|
||||
//
|
||||
// Because the timestamp negotiation requires up-front knowledge of
|
||||
// which rows will be read, it can only be used with single-use
|
||||
// read-only transactions.
|
||||
//
|
||||
// See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
|
||||
// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
|
||||
//
|
||||
// ### Old Read Timestamps and Garbage Collection
|
||||
//
|
||||
// Cloud Spanner continuously garbage collects deleted and overwritten data
|
||||
// in the background to reclaim storage space. This process is known
|
||||
// as "version GC". By default, version GC reclaims versions after they
|
||||
// are one hour old. Because of this, Cloud Spanner cannot perform reads
|
||||
// at read timestamps more than one hour in the past. This
|
||||
// restriction also applies to in-progress reads and/or SQL queries whose
|
||||
// timestamp become too old while executing. Reads and SQL queries with
|
||||
// too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
||||
type TransactionOptions struct {
|
||||
// Required. The type of transaction.
|
||||
//
|
||||
// Types that are valid to be assigned to Mode:
|
||||
// *TransactionOptions_ReadWrite_
|
||||
// *TransactionOptions_ReadOnly_
|
||||
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
|
||||
}
|
||||
|
||||
func (m *TransactionOptions) Reset() { *m = TransactionOptions{} }
|
||||
func (m *TransactionOptions) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransactionOptions) ProtoMessage() {}
|
||||
func (*TransactionOptions) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
|
||||
|
||||
type isTransactionOptions_Mode interface {
|
||||
isTransactionOptions_Mode()
|
||||
}
|
||||
|
||||
type TransactionOptions_ReadWrite_ struct {
|
||||
ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,1,opt,name=read_write,json=readWrite,oneof"`
|
||||
}
|
||||
type TransactionOptions_ReadOnly_ struct {
|
||||
ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,oneof"`
|
||||
}
|
||||
|
||||
func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {}
|
||||
func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
|
||||
|
||||
func (m *TransactionOptions) GetMode() isTransactionOptions_Mode {
|
||||
if m != nil {
|
||||
return m.Mode
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWrite {
|
||||
if x, ok := m.GetMode().(*TransactionOptions_ReadWrite_); ok {
|
||||
return x.ReadWrite
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnly {
|
||||
if x, ok := m.GetMode().(*TransactionOptions_ReadOnly_); ok {
|
||||
return x.ReadOnly
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||
func (*TransactionOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||
return _TransactionOptions_OneofMarshaler, _TransactionOptions_OneofUnmarshaler, _TransactionOptions_OneofSizer, []interface{}{
|
||||
(*TransactionOptions_ReadWrite_)(nil),
|
||||
(*TransactionOptions_ReadOnly_)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||
m := msg.(*TransactionOptions)
|
||||
// mode
|
||||
switch x := m.Mode.(type) {
|
||||
case *TransactionOptions_ReadWrite_:
|
||||
b.EncodeVarint(1<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.ReadWrite); err != nil {
|
||||
return err
|
||||
}
|
||||
case *TransactionOptions_ReadOnly_:
|
||||
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.ReadOnly); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("TransactionOptions.Mode has unexpected type %T", x)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _TransactionOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||
m := msg.(*TransactionOptions)
|
||||
switch tag {
|
||||
case 1: // mode.read_write
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(TransactionOptions_ReadWrite)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Mode = &TransactionOptions_ReadWrite_{msg}
|
||||
return true, err
|
||||
case 2: // mode.read_only
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(TransactionOptions_ReadOnly)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Mode = &TransactionOptions_ReadOnly_{msg}
|
||||
return true, err
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
|
||||
m := msg.(*TransactionOptions)
|
||||
// mode
|
||||
switch x := m.Mode.(type) {
|
||||
case *TransactionOptions_ReadWrite_:
|
||||
s := proto.Size(x.ReadWrite)
|
||||
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *TransactionOptions_ReadOnly_:
|
||||
s := proto.Size(x.ReadOnly)
|
||||
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// Options for read-write transactions.
|
||||
type TransactionOptions_ReadWrite struct {
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadWrite) Reset() { *m = TransactionOptions_ReadWrite{} }
|
||||
func (m *TransactionOptions_ReadWrite) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransactionOptions_ReadWrite) ProtoMessage() {}
|
||||
func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0, 0} }
|
||||
|
||||
// Options for read-only transactions.
|
||||
type TransactionOptions_ReadOnly struct {
|
||||
// How to choose the timestamp for the read-only transaction.
|
||||
//
|
||||
// Types that are valid to be assigned to TimestampBound:
|
||||
// *TransactionOptions_ReadOnly_Strong
|
||||
// *TransactionOptions_ReadOnly_MinReadTimestamp
|
||||
// *TransactionOptions_ReadOnly_MaxStaleness
|
||||
// *TransactionOptions_ReadOnly_ReadTimestamp
|
||||
// *TransactionOptions_ReadOnly_ExactStaleness
|
||||
TimestampBound isTransactionOptions_ReadOnly_TimestampBound `protobuf_oneof:"timestamp_bound"`
|
||||
// If true, the Cloud Spanner-selected read timestamp is included in
|
||||
// the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
|
||||
ReturnReadTimestamp bool `protobuf:"varint,6,opt,name=return_read_timestamp,json=returnReadTimestamp" json:"return_read_timestamp,omitempty"`
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) Reset() { *m = TransactionOptions_ReadOnly{} }
|
||||
func (m *TransactionOptions_ReadOnly) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransactionOptions_ReadOnly) ProtoMessage() {}
|
||||
func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0, 1} }
|
||||
|
||||
type isTransactionOptions_ReadOnly_TimestampBound interface {
|
||||
isTransactionOptions_ReadOnly_TimestampBound()
|
||||
}
|
||||
|
||||
type TransactionOptions_ReadOnly_Strong struct {
|
||||
Strong bool `protobuf:"varint,1,opt,name=strong,oneof"`
|
||||
}
|
||||
type TransactionOptions_ReadOnly_MinReadTimestamp struct {
|
||||
MinReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=min_read_timestamp,json=minReadTimestamp,oneof"`
|
||||
}
|
||||
type TransactionOptions_ReadOnly_MaxStaleness struct {
|
||||
MaxStaleness *google_protobuf2.Duration `protobuf:"bytes,3,opt,name=max_staleness,json=maxStaleness,oneof"`
|
||||
}
|
||||
type TransactionOptions_ReadOnly_ReadTimestamp struct {
|
||||
ReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,4,opt,name=read_timestamp,json=readTimestamp,oneof"`
|
||||
}
|
||||
type TransactionOptions_ReadOnly_ExactStaleness struct {
|
||||
ExactStaleness *google_protobuf2.Duration `protobuf:"bytes,5,opt,name=exact_staleness,json=exactStaleness,oneof"`
|
||||
}
|
||||
|
||||
func (*TransactionOptions_ReadOnly_Strong) isTransactionOptions_ReadOnly_TimestampBound() {}
|
||||
func (*TransactionOptions_ReadOnly_MinReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {}
|
||||
func (*TransactionOptions_ReadOnly_MaxStaleness) isTransactionOptions_ReadOnly_TimestampBound() {}
|
||||
func (*TransactionOptions_ReadOnly_ReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {}
|
||||
func (*TransactionOptions_ReadOnly_ExactStaleness) isTransactionOptions_ReadOnly_TimestampBound() {}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetTimestampBound() isTransactionOptions_ReadOnly_TimestampBound {
|
||||
if m != nil {
|
||||
return m.TimestampBound
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetStrong() bool {
|
||||
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_Strong); ok {
|
||||
return x.Strong
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetMinReadTimestamp() *google_protobuf3.Timestamp {
|
||||
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_MinReadTimestamp); ok {
|
||||
return x.MinReadTimestamp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetMaxStaleness() *google_protobuf2.Duration {
|
||||
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_MaxStaleness); ok {
|
||||
return x.MaxStaleness
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetReadTimestamp() *google_protobuf3.Timestamp {
|
||||
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_ReadTimestamp); ok {
|
||||
return x.ReadTimestamp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetExactStaleness() *google_protobuf2.Duration {
|
||||
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_ExactStaleness); ok {
|
||||
return x.ExactStaleness
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionOptions_ReadOnly) GetReturnReadTimestamp() bool {
|
||||
if m != nil {
|
||||
return m.ReturnReadTimestamp
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||
func (*TransactionOptions_ReadOnly) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||
return _TransactionOptions_ReadOnly_OneofMarshaler, _TransactionOptions_ReadOnly_OneofUnmarshaler, _TransactionOptions_ReadOnly_OneofSizer, []interface{}{
|
||||
(*TransactionOptions_ReadOnly_Strong)(nil),
|
||||
(*TransactionOptions_ReadOnly_MinReadTimestamp)(nil),
|
||||
(*TransactionOptions_ReadOnly_MaxStaleness)(nil),
|
||||
(*TransactionOptions_ReadOnly_ReadTimestamp)(nil),
|
||||
(*TransactionOptions_ReadOnly_ExactStaleness)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionOptions_ReadOnly_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||
m := msg.(*TransactionOptions_ReadOnly)
|
||||
// timestamp_bound
|
||||
switch x := m.TimestampBound.(type) {
|
||||
case *TransactionOptions_ReadOnly_Strong:
|
||||
t := uint64(0)
|
||||
if x.Strong {
|
||||
t = 1
|
||||
}
|
||||
b.EncodeVarint(1<<3 | proto.WireVarint)
|
||||
b.EncodeVarint(t)
|
||||
case *TransactionOptions_ReadOnly_MinReadTimestamp:
|
||||
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.MinReadTimestamp); err != nil {
|
||||
return err
|
||||
}
|
||||
case *TransactionOptions_ReadOnly_MaxStaleness:
|
||||
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.MaxStaleness); err != nil {
|
||||
return err
|
||||
}
|
||||
case *TransactionOptions_ReadOnly_ReadTimestamp:
|
||||
b.EncodeVarint(4<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.ReadTimestamp); err != nil {
|
||||
return err
|
||||
}
|
||||
case *TransactionOptions_ReadOnly_ExactStaleness:
|
||||
b.EncodeVarint(5<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.ExactStaleness); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("TransactionOptions_ReadOnly.TimestampBound has unexpected type %T", x)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _TransactionOptions_ReadOnly_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||
m := msg.(*TransactionOptions_ReadOnly)
|
||||
switch tag {
|
||||
case 1: // timestamp_bound.strong
|
||||
if wire != proto.WireVarint {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
x, err := b.DecodeVarint()
|
||||
m.TimestampBound = &TransactionOptions_ReadOnly_Strong{x != 0}
|
||||
return true, err
|
||||
case 2: // timestamp_bound.min_read_timestamp
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf3.Timestamp)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.TimestampBound = &TransactionOptions_ReadOnly_MinReadTimestamp{msg}
|
||||
return true, err
|
||||
case 3: // timestamp_bound.max_staleness
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf2.Duration)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.TimestampBound = &TransactionOptions_ReadOnly_MaxStaleness{msg}
|
||||
return true, err
|
||||
case 4: // timestamp_bound.read_timestamp
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf3.Timestamp)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.TimestampBound = &TransactionOptions_ReadOnly_ReadTimestamp{msg}
|
||||
return true, err
|
||||
case 5: // timestamp_bound.exact_staleness
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(google_protobuf2.Duration)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.TimestampBound = &TransactionOptions_ReadOnly_ExactStaleness{msg}
|
||||
return true, err
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionOptions_ReadOnly_OneofSizer(msg proto.Message) (n int) {
|
||||
m := msg.(*TransactionOptions_ReadOnly)
|
||||
// timestamp_bound
|
||||
switch x := m.TimestampBound.(type) {
|
||||
case *TransactionOptions_ReadOnly_Strong:
|
||||
n += proto.SizeVarint(1<<3 | proto.WireVarint)
|
||||
n += 1
|
||||
case *TransactionOptions_ReadOnly_MinReadTimestamp:
|
||||
s := proto.Size(x.MinReadTimestamp)
|
||||
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *TransactionOptions_ReadOnly_MaxStaleness:
|
||||
s := proto.Size(x.MaxStaleness)
|
||||
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *TransactionOptions_ReadOnly_ReadTimestamp:
|
||||
s := proto.Size(x.ReadTimestamp)
|
||||
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *TransactionOptions_ReadOnly_ExactStaleness:
|
||||
s := proto.Size(x.ExactStaleness)
|
||||
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// A transaction.
|
||||
type Transaction struct {
|
||||
// `id` may be used to identify the transaction in subsequent
|
||||
// [Read][google.spanner.v1.Spanner.Read],
|
||||
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
|
||||
// [Commit][google.spanner.v1.Spanner.Commit], or
|
||||
// [Rollback][google.spanner.v1.Spanner.Rollback] calls.
|
||||
//
|
||||
// Single-use read-only transactions do not have IDs, because
|
||||
// single-use transactions do not support multiple requests.
|
||||
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// For snapshot read-only transactions, the read timestamp chosen
|
||||
// for the transaction. Not returned by default: see
|
||||
// [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
|
||||
ReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=read_timestamp,json=readTimestamp" json:"read_timestamp,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Transaction) Reset() { *m = Transaction{} }
|
||||
func (m *Transaction) String() string { return proto.CompactTextString(m) }
|
||||
func (*Transaction) ProtoMessage() {}
|
||||
func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} }
|
||||
|
||||
func (m *Transaction) GetId() []byte {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Transaction) GetReadTimestamp() *google_protobuf3.Timestamp {
|
||||
if m != nil {
|
||||
return m.ReadTimestamp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// This message is used to select the transaction in which a
|
||||
// [Read][google.spanner.v1.Spanner.Read] or
|
||||
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.
|
||||
//
|
||||
// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions.
|
||||
type TransactionSelector struct {
|
||||
// If no fields are set, the default is a single use transaction
|
||||
// with strong concurrency.
|
||||
//
|
||||
// Types that are valid to be assigned to Selector:
|
||||
// *TransactionSelector_SingleUse
|
||||
// *TransactionSelector_Id
|
||||
// *TransactionSelector_Begin
|
||||
Selector isTransactionSelector_Selector `protobuf_oneof:"selector"`
|
||||
}
|
||||
|
||||
func (m *TransactionSelector) Reset() { *m = TransactionSelector{} }
|
||||
func (m *TransactionSelector) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransactionSelector) ProtoMessage() {}
|
||||
func (*TransactionSelector) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} }
|
||||
|
||||
type isTransactionSelector_Selector interface {
|
||||
isTransactionSelector_Selector()
|
||||
}
|
||||
|
||||
type TransactionSelector_SingleUse struct {
|
||||
SingleUse *TransactionOptions `protobuf:"bytes,1,opt,name=single_use,json=singleUse,oneof"`
|
||||
}
|
||||
type TransactionSelector_Id struct {
|
||||
Id []byte `protobuf:"bytes,2,opt,name=id,proto3,oneof"`
|
||||
}
|
||||
type TransactionSelector_Begin struct {
|
||||
Begin *TransactionOptions `protobuf:"bytes,3,opt,name=begin,oneof"`
|
||||
}
|
||||
|
||||
func (*TransactionSelector_SingleUse) isTransactionSelector_Selector() {}
|
||||
func (*TransactionSelector_Id) isTransactionSelector_Selector() {}
|
||||
func (*TransactionSelector_Begin) isTransactionSelector_Selector() {}
|
||||
|
||||
func (m *TransactionSelector) GetSelector() isTransactionSelector_Selector {
|
||||
if m != nil {
|
||||
return m.Selector
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionSelector) GetSingleUse() *TransactionOptions {
|
||||
if x, ok := m.GetSelector().(*TransactionSelector_SingleUse); ok {
|
||||
return x.SingleUse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionSelector) GetId() []byte {
|
||||
if x, ok := m.GetSelector().(*TransactionSelector_Id); ok {
|
||||
return x.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TransactionSelector) GetBegin() *TransactionOptions {
|
||||
if x, ok := m.GetSelector().(*TransactionSelector_Begin); ok {
|
||||
return x.Begin
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||
func (*TransactionSelector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||
return _TransactionSelector_OneofMarshaler, _TransactionSelector_OneofUnmarshaler, _TransactionSelector_OneofSizer, []interface{}{
|
||||
(*TransactionSelector_SingleUse)(nil),
|
||||
(*TransactionSelector_Id)(nil),
|
||||
(*TransactionSelector_Begin)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionSelector_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||||
m := msg.(*TransactionSelector)
|
||||
// selector
|
||||
switch x := m.Selector.(type) {
|
||||
case *TransactionSelector_SingleUse:
|
||||
b.EncodeVarint(1<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.SingleUse); err != nil {
|
||||
return err
|
||||
}
|
||||
case *TransactionSelector_Id:
|
||||
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||||
b.EncodeRawBytes(x.Id)
|
||||
case *TransactionSelector_Begin:
|
||||
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||||
if err := b.EncodeMessage(x.Begin); err != nil {
|
||||
return err
|
||||
}
|
||||
case nil:
|
||||
default:
|
||||
return fmt.Errorf("TransactionSelector.Selector has unexpected type %T", x)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _TransactionSelector_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||||
m := msg.(*TransactionSelector)
|
||||
switch tag {
|
||||
case 1: // selector.single_use
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(TransactionOptions)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Selector = &TransactionSelector_SingleUse{msg}
|
||||
return true, err
|
||||
case 2: // selector.id
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
x, err := b.DecodeRawBytes(true)
|
||||
m.Selector = &TransactionSelector_Id{x}
|
||||
return true, err
|
||||
case 3: // selector.begin
|
||||
if wire != proto.WireBytes {
|
||||
return true, proto.ErrInternalBadWireType
|
||||
}
|
||||
msg := new(TransactionOptions)
|
||||
err := b.DecodeMessage(msg)
|
||||
m.Selector = &TransactionSelector_Begin{msg}
|
||||
return true, err
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
func _TransactionSelector_OneofSizer(msg proto.Message) (n int) {
|
||||
m := msg.(*TransactionSelector)
|
||||
// selector
|
||||
switch x := m.Selector.(type) {
|
||||
case *TransactionSelector_SingleUse:
|
||||
s := proto.Size(x.SingleUse)
|
||||
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case *TransactionSelector_Id:
|
||||
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(len(x.Id)))
|
||||
n += len(x.Id)
|
||||
case *TransactionSelector_Begin:
|
||||
s := proto.Size(x.Begin)
|
||||
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
||||
n += proto.SizeVarint(uint64(s))
|
||||
n += s
|
||||
case nil:
|
||||
default:
|
||||
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*TransactionOptions)(nil), "google.spanner.v1.TransactionOptions")
|
||||
proto.RegisterType((*TransactionOptions_ReadWrite)(nil), "google.spanner.v1.TransactionOptions.ReadWrite")
|
||||
proto.RegisterType((*TransactionOptions_ReadOnly)(nil), "google.spanner.v1.TransactionOptions.ReadOnly")
|
||||
proto.RegisterType((*Transaction)(nil), "google.spanner.v1.Transaction")
|
||||
proto.RegisterType((*TransactionSelector)(nil), "google.spanner.v1.TransactionSelector")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/transaction.proto", fileDescriptor5) }
|
||||
|
||||
var fileDescriptor5 = []byte{
|
||||
// 522 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xd1, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0x86, 0xd3, 0x6e, 0xab, 0xba, 0xd3, 0xae, 0xeb, 0x3c, 0x4d, 0x94, 0x08, 0x01, 0x2a, 0x42,
|
||||
0xe2, 0xca, 0x51, 0xc7, 0x0d, 0x12, 0x42, 0x82, 0x6e, 0x82, 0x08, 0x09, 0xad, 0x4a, 0x07, 0x48,
|
||||
0xdc, 0x04, 0xb7, 0x31, 0x91, 0xa5, 0xc4, 0x8e, 0x6c, 0x67, 0x74, 0x57, 0xdc, 0xf0, 0x34, 0x3c,
|
||||
0x02, 0x6f, 0xc1, 0x1b, 0xa1, 0x38, 0x4e, 0x9b, 0x35, 0x17, 0xeb, 0x5d, 0xdc, 0xf3, 0xff, 0xff,
|
||||
0xf9, 0x7c, 0x8e, 0x55, 0x78, 0x16, 0x0b, 0x11, 0x27, 0xd4, 0x53, 0x19, 0xe1, 0x9c, 0x4a, 0xef,
|
||||
0x66, 0xe2, 0x69, 0x49, 0xb8, 0x22, 0x4b, 0xcd, 0x04, 0xc7, 0x99, 0x14, 0x5a, 0xa0, 0x93, 0x52,
|
||||
0x84, 0xad, 0x08, 0xdf, 0x4c, 0xdc, 0x47, 0xd6, 0x47, 0x32, 0xe6, 0x11, 0xce, 0x85, 0x26, 0x85,
|
||||
0x5e, 0x95, 0x06, 0xf7, 0xb1, 0xad, 0x9a, 0xd3, 0x22, 0xff, 0xe1, 0x45, 0xb9, 0x24, 0x9b, 0x40,
|
||||
0xf7, 0xc9, 0x76, 0x5d, 0xb3, 0x94, 0x2a, 0x4d, 0xd2, 0xac, 0x14, 0x8c, 0xff, 0xed, 0x03, 0xba,
|
||||
0xde, 0x70, 0x5c, 0x65, 0x26, 0x1d, 0xcd, 0x00, 0x24, 0x25, 0x51, 0xf8, 0x53, 0x32, 0x4d, 0x47,
|
||||
0xad, 0xa7, 0xad, 0x17, 0xbd, 0x73, 0x0f, 0x37, 0xe8, 0x70, 0xd3, 0x8a, 0x03, 0x4a, 0xa2, 0xaf,
|
||||
0x85, 0xcd, 0x77, 0x82, 0x43, 0x59, 0x1d, 0xd0, 0x27, 0x30, 0x87, 0x50, 0xf0, 0xe4, 0x76, 0xd4,
|
||||
0x36, 0x81, 0x78, 0xf7, 0xc0, 0x2b, 0x9e, 0xdc, 0xfa, 0x4e, 0xd0, 0x95, 0xf6, 0xdb, 0xed, 0xc1,
|
||||
0xe1, 0xba, 0x91, 0xfb, 0x7b, 0x0f, 0xba, 0x95, 0x0a, 0x8d, 0xa0, 0xa3, 0xb4, 0x14, 0x3c, 0x36,
|
||||
0xd8, 0x5d, 0xdf, 0x09, 0xec, 0x19, 0x7d, 0x04, 0x94, 0x32, 0x1e, 0x1a, 0x8c, 0xf5, 0x1c, 0x2c,
|
||||
0x8b, 0x5b, 0xb1, 0x54, 0x93, 0xc2, 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 0xb7, 0x7b, 0xde, 0x39, 0xb4, 0x74, 0x4d, 0x01, 0xba, 0xca, 0x42, 0x4e,
|
||||
0x7f, 0xc1, 0xd9, 0x52, 0xa4, 0xcd, 0x80, 0xe9, 0xb0, 0x96, 0x30, 0x2b, 0x66, 0x30, 0x6b, 0x7d,
|
||||
0x7b, 0x65, 0x65, 0xb1, 0x48, 0x08, 0x8f, 0xb1, 0x90, 0xb1, 0x17, 0x53, 0x6e, 0x26, 0xe4, 0x95,
|
||||
0x25, 0x92, 0x31, 0x55, 0xfb, 0x57, 0x79, 0x6d, 0x3f, 0xff, 0xb4, 0x1f, 0x7c, 0x28, 0xad, 0x17,
|
||||
0x89, 0xc8, 0x23, 0x3c, 0xb7, 0x7d, 0xbe, 0x4c, 0x16, 0x1d, 0x63, 0x7f, 0xf9, 0x3f, 0x00, 0x00,
|
||||
0xff, 0xff, 0xeb, 0x34, 0x76, 0xbe, 0x93, 0x04, 0x00, 0x00,
|
||||
}
|
217
vendor/google.golang.org/genproto/googleapis/spanner/v1/type.pb.go
generated
vendored
Normal file
217
vendor/google.golang.org/genproto/googleapis/spanner/v1/type.pb.go
generated
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
// Code generated by protoc-gen-go.
|
||||
// source: google/spanner/v1/type.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spanner
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// `TypeCode` is used as part of [Type][google.spanner.v1.Type] to
|
||||
// indicate the type of a Cloud Spanner value.
|
||||
//
|
||||
// Each legal value of a type can be encoded to or decoded from a JSON
|
||||
// value, using the encodings described below. All Cloud Spanner values can
|
||||
// be `null`, regardless of type; `null`s are always encoded as a JSON
|
||||
// `null`.
|
||||
type TypeCode int32
|
||||
|
||||
const (
|
||||
// Not specified.
|
||||
TypeCode_TYPE_CODE_UNSPECIFIED TypeCode = 0
|
||||
// Encoded as JSON `true` or `false`.
|
||||
TypeCode_BOOL TypeCode = 1
|
||||
// Encoded as `string`, in decimal format.
|
||||
TypeCode_INT64 TypeCode = 2
|
||||
// Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
|
||||
// `"-Infinity"`.
|
||||
TypeCode_FLOAT64 TypeCode = 3
|
||||
// Encoded as `string` in RFC 3339 timestamp format. The time zone
|
||||
// must be present, and must be `"Z"`.
|
||||
TypeCode_TIMESTAMP TypeCode = 4
|
||||
// Encoded as `string` in RFC 3339 date format.
|
||||
TypeCode_DATE TypeCode = 5
|
||||
// Encoded as `string`.
|
||||
TypeCode_STRING TypeCode = 6
|
||||
// Encoded as a base64-encoded `string`, as described in RFC 4648,
|
||||
// section 4.
|
||||
TypeCode_BYTES TypeCode = 7
|
||||
// Encoded as `list`, where the list elements are represented
|
||||
// according to [array_element_type][google.spanner.v1.Type.array_element_type].
|
||||
TypeCode_ARRAY TypeCode = 8
|
||||
// Encoded as `list`, where list element `i` is represented according
|
||||
// to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
|
||||
TypeCode_STRUCT TypeCode = 9
|
||||
)
|
||||
|
||||
var TypeCode_name = map[int32]string{
|
||||
0: "TYPE_CODE_UNSPECIFIED",
|
||||
1: "BOOL",
|
||||
2: "INT64",
|
||||
3: "FLOAT64",
|
||||
4: "TIMESTAMP",
|
||||
5: "DATE",
|
||||
6: "STRING",
|
||||
7: "BYTES",
|
||||
8: "ARRAY",
|
||||
9: "STRUCT",
|
||||
}
|
||||
var TypeCode_value = map[string]int32{
|
||||
"TYPE_CODE_UNSPECIFIED": 0,
|
||||
"BOOL": 1,
|
||||
"INT64": 2,
|
||||
"FLOAT64": 3,
|
||||
"TIMESTAMP": 4,
|
||||
"DATE": 5,
|
||||
"STRING": 6,
|
||||
"BYTES": 7,
|
||||
"ARRAY": 8,
|
||||
"STRUCT": 9,
|
||||
}
|
||||
|
||||
func (x TypeCode) String() string {
|
||||
return proto.EnumName(TypeCode_name, int32(x))
|
||||
}
|
||||
func (TypeCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
|
||||
|
||||
// `Type` indicates the type of a Cloud Spanner value, as might be stored in a
|
||||
// table cell or returned from an SQL query.
|
||||
type Type struct {
|
||||
// Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
|
||||
Code TypeCode `protobuf:"varint,1,opt,name=code,enum=google.spanner.v1.TypeCode" json:"code,omitempty"`
|
||||
// If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type`
|
||||
// is the type of the array elements.
|
||||
ArrayElementType *Type `protobuf:"bytes,2,opt,name=array_element_type,json=arrayElementType" json:"array_element_type,omitempty"`
|
||||
// If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type`
|
||||
// provides type information for the struct's fields.
|
||||
StructType *StructType `protobuf:"bytes,3,opt,name=struct_type,json=structType" json:"struct_type,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Type) Reset() { *m = Type{} }
|
||||
func (m *Type) String() string { return proto.CompactTextString(m) }
|
||||
func (*Type) ProtoMessage() {}
|
||||
func (*Type) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
|
||||
|
||||
func (m *Type) GetCode() TypeCode {
|
||||
if m != nil {
|
||||
return m.Code
|
||||
}
|
||||
return TypeCode_TYPE_CODE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (m *Type) GetArrayElementType() *Type {
|
||||
if m != nil {
|
||||
return m.ArrayElementType
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Type) GetStructType() *StructType {
|
||||
if m != nil {
|
||||
return m.StructType
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
|
||||
type StructType struct {
|
||||
// The list of fields that make up this struct. Order is
|
||||
// significant, because values of this struct type are represented as
|
||||
// lists, where the order of field values matches the order of
|
||||
// fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields
|
||||
// matches the order of columns in a read request, or the order of
|
||||
// fields in the `SELECT` clause of a query.
|
||||
Fields []*StructType_Field `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StructType) Reset() { *m = StructType{} }
|
||||
func (m *StructType) String() string { return proto.CompactTextString(m) }
|
||||
func (*StructType) ProtoMessage() {}
|
||||
func (*StructType) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} }
|
||||
|
||||
func (m *StructType) GetFields() []*StructType_Field {
|
||||
if m != nil {
|
||||
return m.Fields
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Message representing a single field of a struct.
|
||||
type StructType_Field struct {
|
||||
// The name of the field. For reads, this is the column name. For
|
||||
// SQL queries, it is the column alias (e.g., `"Word"` in the
|
||||
// query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
|
||||
// `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
|
||||
// columns might have an empty name (e.g., !"SELECT
|
||||
// UPPER(ColName)"`). Note that a query result can contain
|
||||
// multiple fields with the same name.
|
||||
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
// The type of the field.
|
||||
Type *Type `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StructType_Field) Reset() { *m = StructType_Field{} }
|
||||
func (m *StructType_Field) String() string { return proto.CompactTextString(m) }
|
||||
func (*StructType_Field) ProtoMessage() {}
|
||||
func (*StructType_Field) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1, 0} }
|
||||
|
||||
func (m *StructType_Field) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StructType_Field) GetType() *Type {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Type)(nil), "google.spanner.v1.Type")
|
||||
proto.RegisterType((*StructType)(nil), "google.spanner.v1.StructType")
|
||||
proto.RegisterType((*StructType_Field)(nil), "google.spanner.v1.StructType.Field")
|
||||
proto.RegisterEnum("google.spanner.v1.TypeCode", TypeCode_name, TypeCode_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/spanner/v1/type.proto", fileDescriptor6) }
|
||||
|
||||
var fileDescriptor6 = []byte{
|
||||
// 430 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xd1, 0x8a, 0xd3, 0x40,
|
||||
0x14, 0x86, 0x9d, 0x36, 0xed, 0x36, 0xa7, 0x28, 0xe3, 0xc0, 0xb2, 0x75, 0x55, 0x28, 0xeb, 0x4d,
|
||||
0x51, 0x48, 0x68, 0x15, 0x11, 0x16, 0x84, 0x34, 0x9d, 0xae, 0x81, 0xdd, 0x36, 0x24, 0xb3, 0x42,
|
||||
0xbd, 0x29, 0x63, 0x3b, 0x86, 0x40, 0x3a, 0x13, 0x92, 0xec, 0x62, 0x5f, 0xc2, 0x1b, 0xdf, 0xc2,
|
||||
0x87, 0xf0, 0xd9, 0x64, 0x26, 0x59, 0x15, 0xaa, 0xe2, 0xdd, 0x9f, 0xfc, 0xff, 0x77, 0xce, 0x99,
|
||||
0xc3, 0x81, 0x27, 0x89, 0x52, 0x49, 0x26, 0xdc, 0x32, 0xe7, 0x52, 0x8a, 0xc2, 0xbd, 0x1d, 0xbb,
|
||||
0xd5, 0x3e, 0x17, 0x4e, 0x5e, 0xa8, 0x4a, 0x91, 0x87, 0xb5, 0xeb, 0x34, 0xae, 0x73, 0x3b, 0x3e,
|
||||
0xbd, 0x03, 0x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x5c, 0x5e, 0x62, 0x44, 0x6c, 0xe8, 0x04, 0x0b, 0xf6, 0xfa, 0x15, 0x6e, 0x91, 0x3e, 0x1c,
|
||||
0xcd, 0x2f, 0x97, 0x9e, 0xfe, 0x68, 0x93, 0xfb, 0x60, 0xb3, 0xe0, 0x8a, 0xc6, 0xcc, 0xbb, 0x0a,
|
||||
0xb1, 0xa5, 0x81, 0x99, 0xc7, 0x28, 0xee, 0x10, 0x80, 0x6e, 0xcc, 0xa2, 0x60, 0x71, 0x81, 0xbb,
|
||||
0x1a, 0x9e, 0xae, 0x18, 0x8d, 0xf1, 0x91, 0x96, 0x5e, 0x14, 0x79, 0x2b, 0xdc, 0x6b, 0x12, 0xd7,
|
||||
0x3e, 0xc3, 0xf6, 0xf4, 0x33, 0x1c, 0x6f, 0xd4, 0xee, 0x70, 0xe8, 0xa9, 0xad, 0xc7, 0x0c, 0xf5,
|
||||
0x2d, 0x84, 0xe8, 0xc3, 0x9b, 0xc6, 0x4f, 0x54, 0xc6, 0x65, 0xe2, 0xa8, 0x22, 0x71, 0x13, 0x21,
|
||||
0xcd, 0xa5, 0xb8, 0xb5, 0xc5, 0xf3, 0xb4, 0xfc, 0xed, 0xf6, 0xce, 0x1b, 0xf9, 0xad, 0x75, 0x72,
|
||||
0x51, 0xa3, 0x7e, 0xa6, 0x6e, 0xb6, 0x4e, 0xdc, 0x34, 0x78, 0x3f, 0xfe, 0xd8, 0x35, 0xf8, 0xcb,
|
||||
0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xaa, 0xcb, 0xef, 0xb9, 0x02, 0x00, 0x00,
|
||||
}
|
Reference in New Issue
Block a user