persist

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2018 License: BSD-3-Clause Imports: 4 Imported by: 14

Documentation

Overview

Package persist is a generated protocol buffer package.

It is generated from these files:

persist/options.proto

It has these top-level messages:

QLImpl
TypeMapping

Index

Constants

This section is empty.

Variables

View Source
var E_Mapping = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.ServiceOptions)(nil),
	ExtensionType: (*TypeMapping)(nil),
	Field:         560001,
	Name:          "persist.mapping",
	Tag:           "bytes,560001,opt,name=mapping",
	Filename:      "persist/options.proto",
}
View Source
var E_Package = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.FileOptions)(nil),
	ExtensionType: (*string)(nil),
	Field:         560003,
	Name:          "persist.package",
	Tag:           "bytes,560003,opt,name=package",
	Filename:      "persist/options.proto",
}
View Source
var E_Ql = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*QLImpl)(nil),
	Field:         560000,
	Name:          "persist.ql",
	Tag:           "bytes,560000,opt,name=ql",
	Filename:      "persist/options.proto",
}
View Source
var E_ServiceType = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.ServiceOptions)(nil),
	ExtensionType: (*PersistenceOptions)(nil),
	Field:         560002,
	Name:          "persist.service_type",
	Tag:           "varint,560002,opt,name=service_type,json=serviceType,enum=persist.PersistenceOptions",
	Filename:      "persist/options.proto",
}
View Source
var PersistenceOptions_name = map[int32]string{
	0: "SQL",
	1: "SPANNER",
}
View Source
var PersistenceOptions_value = map[string]int32{
	"SQL":     0,
	"SPANNER": 1,
}

Functions

This section is empty.

Types

type PersistenceOptions

type PersistenceOptions int32
const (
	// SQL Query
	PersistenceOptions_SQL     PersistenceOptions = 0
	PersistenceOptions_SPANNER PersistenceOptions = 1
)

func (PersistenceOptions) Enum

func (PersistenceOptions) EnumDescriptor

func (PersistenceOptions) EnumDescriptor() ([]byte, []int)

func (PersistenceOptions) String

func (x PersistenceOptions) String() string

func (*PersistenceOptions) UnmarshalJSON

func (x *PersistenceOptions) UnmarshalJSON(data []byte) error

type QLImpl

type QLImpl struct {
	// the query string with numeric placeholders for parameters
	// its an array to allow the query to span across multiple lines but it
	// will be joined and used as a single sql query string at generation time
	Query []string `protobuf:"bytes,1,rep,name=query" json:"query,omitempty"`
	// in order list of argument names that will be used as parameters for the query
	// the list of arguments represents the field names of the input type message
	Arguments []string `protobuf:"bytes,2,rep,name=arguments" json:"arguments,omitempty"`
	// method level type mapping, if this does not exist it will be
	// used the type mapping at the service level, if that one will not exist
	// it will be used the default one, the code can be found
	// generator/service.go function GetSafeType()
	Mapping *TypeMapping `protobuf:"bytes,4,opt,name=mapping" json:"mapping,omitempty"`
	// the before function will be called before running any sql code for
	// every input data element and if the return will be not empty/nil and
	// the error will be nil the data returned by this function will be
	// returned by the function skipping the code execution
	Before *QLImpl_CallbackFunction `protobuf:"bytes,10,opt,name=before" json:"before,omitempty"`
	// the after function will be called after running any sql code for
	// every output data element, the return data of this function will be ignored
	After            *QLImpl_CallbackFunction `protobuf:"bytes,11,opt,name=after" json:"after,omitempty"`
	XXX_unrecognized []byte                   `json:"-"`
}

func (*QLImpl) Descriptor

func (*QLImpl) Descriptor() ([]byte, []int)

func (*QLImpl) GetAfter

func (m *QLImpl) GetAfter() *QLImpl_CallbackFunction

func (*QLImpl) GetArguments

func (m *QLImpl) GetArguments() []string

func (*QLImpl) GetBefore

func (m *QLImpl) GetBefore() *QLImpl_CallbackFunction

func (*QLImpl) GetMapping

func (m *QLImpl) GetMapping() *TypeMapping

func (*QLImpl) GetQuery

func (m *QLImpl) GetQuery() []string

func (*QLImpl) ProtoMessage

func (*QLImpl) ProtoMessage()

func (*QLImpl) Reset

func (m *QLImpl) Reset()

func (*QLImpl) String

func (m *QLImpl) String() string

type QLImpl_CallbackFunction

type QLImpl_CallbackFunction struct {
	// function name
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// function go package name in the following formats
	// github.com/repo;package
	// github.com/package
	// dir/package
	// package
	Package          *string `protobuf:"bytes,2,req,name=package" json:"package,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

Callback definition function define the name and the package of a function with the signature func CallbackFunction(message pb.Message) (pb.Message, error)

func (*QLImpl_CallbackFunction) Descriptor

func (*QLImpl_CallbackFunction) Descriptor() ([]byte, []int)

func (*QLImpl_CallbackFunction) GetName

func (m *QLImpl_CallbackFunction) GetName() string

func (*QLImpl_CallbackFunction) GetPackage

func (m *QLImpl_CallbackFunction) GetPackage() string

func (*QLImpl_CallbackFunction) ProtoMessage

func (*QLImpl_CallbackFunction) ProtoMessage()

func (*QLImpl_CallbackFunction) Reset

func (m *QLImpl_CallbackFunction) Reset()

func (*QLImpl_CallbackFunction) String

func (m *QLImpl_CallbackFunction) String() string

type TypeMapping

type TypeMapping struct {
	Types            []*TypeMapping_TypeDescriptor `protobuf:"bytes,1,rep,name=types" json:"types,omitempty"`
	XXX_unrecognized []byte                        `json:"-"`
}

func (*TypeMapping) Descriptor

func (*TypeMapping) Descriptor() ([]byte, []int)

func (*TypeMapping) GetTypes

func (m *TypeMapping) GetTypes() []*TypeMapping_TypeDescriptor

func (*TypeMapping) ProtoMessage

func (*TypeMapping) ProtoMessage()

func (*TypeMapping) Reset

func (m *TypeMapping) Reset()

func (*TypeMapping) String

func (m *TypeMapping) String() string

type TypeMapping_TypeDescriptor

type TypeMapping_TypeDescriptor struct {
	// if this is not setup the proto_type must be one of the built-in types
	ProtoTypeName *string `protobuf:"bytes,1,opt,name=proto_type_name,json=protoTypeName" json:"proto_type_name,omitempty"`
	// If proto_type_name is set, this need not be set.  If both this and proto_type_name
	// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE
	// TYPE_GROUP is not supported
	ProtoType *google_protobuf.FieldDescriptorProto_Type `` /* 129-byte string literal not displayed */
	// if proto_label is not setup we consider any option except LABAEL_REPEATED
	ProtoLabel *google_protobuf.FieldDescriptorProto_Label `` /* 133-byte string literal not displayed */
	// go type name that will be used in the method implementation
	GoType *string `protobuf:"bytes,4,req,name=go_type,json=goType" json:"go_type,omitempty"`
	// go package path
	GoPackage        *string `protobuf:"bytes,5,req,name=go_package,json=goPackage" json:"go_package,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*TypeMapping_TypeDescriptor) Descriptor

func (*TypeMapping_TypeDescriptor) Descriptor() ([]byte, []int)

func (*TypeMapping_TypeDescriptor) GetGoPackage

func (m *TypeMapping_TypeDescriptor) GetGoPackage() string

func (*TypeMapping_TypeDescriptor) GetGoType

func (m *TypeMapping_TypeDescriptor) GetGoType() string

func (*TypeMapping_TypeDescriptor) GetProtoLabel

func (*TypeMapping_TypeDescriptor) GetProtoType

func (*TypeMapping_TypeDescriptor) GetProtoTypeName

func (m *TypeMapping_TypeDescriptor) GetProtoTypeName() string

func (*TypeMapping_TypeDescriptor) ProtoMessage

func (*TypeMapping_TypeDescriptor) ProtoMessage()

func (*TypeMapping_TypeDescriptor) Reset

func (m *TypeMapping_TypeDescriptor) Reset()

func (*TypeMapping_TypeDescriptor) String

func (m *TypeMapping_TypeDescriptor) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL