generator

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCode

func FormatCode(filename string, buffer []byte) []byte

func FromScanableFuncName added in v1.0.0

func FromScanableFuncName(m *Method) string

func GetGoPackage

func GetGoPackage(url string) string

GetGoPackage get a go import url under the following formats github.com/path/project/dir;package github.com/path/project/dir project/dir;package project/dir and will return the package name from url package dir package dir

func GetGoPath

func GetGoPath(url string) string

GetGoPath get a go import url under the following formats github.com/path/project/dir;package github.com/path/project/dir project/dir;package project/dir and will return the path portion from url: github.com/path/project/dir project/dir

func GetSpannerPersistLibTypeName added in v1.0.0

func GetSpannerPersistLibTypeName(t TypeDesc) string

func GetSqlPersistLibTypeName added in v1.0.0

func GetSqlPersistLibTypeName(t TypeDesc) string

func IterPersistName added in v1.0.0

func IterPersistName(m *Method) string

func IterProtoName added in v1.0.0

func IterProtoName(m *Method) string

func IteratorHelper added in v1.0.0

func IteratorHelper(m *Method) string

func P

func P(args ...interface{}) string

func PersistLibTypeString added in v1.0.0

func PersistLibTypeString(m *Method, typ string) string

func SpannerType added in v1.0.0

func SpannerType(t TypeDesc) string

func SpannerTypeFieldName added in v1.0.0

func SpannerTypeFieldName(t TypeDesc) string

func ToParamsFuncName added in v1.0.0

func ToParamsFuncName(m *Method) string

func WriteBuilderHookInterfaceAndFunc

func WriteBuilderHookInterfaceAndFunc(p *Printer, s *Service)

func WriteBuilderHooksAcceptingFunc

func WriteBuilderHooksAcceptingFunc(p *Printer, serv *Service)

Types

type BackendStringer added in v1.0.0

type BackendStringer interface {
	MapRequestToParams() string
	RowType() string
	TranslateRowToResult() string
}

type BidiStreamStringer added in v1.0.0

type BidiStreamStringer struct {
	// contains filtered or unexported fields
}

func NewBidiStreamStringer added in v1.0.0

func NewBidiStreamStringer(method *Method, b BackendStringer) *BidiStreamStringer

func (*BidiStreamStringer) AfterHook added in v1.0.0

func (s *BidiStreamStringer) AfterHook()

func (*BidiStreamStringer) BeforeHook added in v1.0.0

func (s *BidiStreamStringer) BeforeHook()

func (*BidiStreamStringer) HandleRow added in v1.0.0

func (s *BidiStreamStringer) HandleRow()

func (*BidiStreamStringer) Params added in v1.0.0

func (s *BidiStreamStringer) Params()

func (*BidiStreamStringer) PersistCall added in v1.0.0

func (s *BidiStreamStringer) PersistCall()

func (*BidiStreamStringer) String added in v1.0.0

func (s *BidiStreamStringer) String() string

func (*BidiStreamStringer) Unimplemented added in v1.0.0

func (s *BidiStreamStringer) Unimplemented() string

type ClientStreamStringer added in v1.0.0

type ClientStreamStringer struct {
	// contains filtered or unexported fields
}

func NewClientStreamStringer added in v1.0.0

func NewClientStreamStringer(method *Method, b BackendStringer) *ClientStreamStringer

func (*ClientStreamStringer) AfterHook added in v1.0.0

func (s *ClientStreamStringer) AfterHook()

func (*ClientStreamStringer) BeforeHook added in v1.0.0

func (s *ClientStreamStringer) BeforeHook()

func (*ClientStreamStringer) HandleRow added in v1.0.0

func (s *ClientStreamStringer) HandleRow()

func (*ClientStreamStringer) Params added in v1.0.0

func (s *ClientStreamStringer) Params()

func (*ClientStreamStringer) PersistCall added in v1.0.0

func (s *ClientStreamStringer) PersistCall()

func (*ClientStreamStringer) String added in v1.0.0

func (s *ClientStreamStringer) String() string

func (*ClientStreamStringer) Unimplemented added in v1.0.0

func (s *ClientStreamStringer) Unimplemented() string

type FileList

type FileList []*FileStruct

func NewFileList

func NewFileList() *FileList

func (*FileList) Append

func (fl *FileList) Append(file *FileStruct)

func (*FileList) FindFile

func (fl *FileList) FindFile(desc *descriptor.FileDescriptorProto) *FileStruct

func (*FileList) GetOrCreateFile

func (fl *FileList) GetOrCreateFile(desc *descriptor.FileDescriptorProto, allStructs *StructList, dependency bool, params PersistOpts) *FileStruct

func (*FileList) Process

func (fl *FileList) Process() error

type FileStruct

type FileStruct struct {
	Desc            *descriptor.FileDescriptorProto
	ImportList      *Imports
	Dependency      bool        // if is dependency
	Structures      *StructList // all structures in the file
	AllStructures   *StructList // all structures in all the files
	ServiceList     *Services
	PersistStringer *PersistStringer // print our persist file
	Opts            PersistOpts      // options passed in via parameter
}

func NewFileStruct

func NewFileStruct(
	desc *descriptor.FileDescriptorProto, allStructs *StructList,
	dependency bool, opts PersistOpts) *FileStruct

func (*FileStruct) DifferentImpl added in v1.0.0

func (f *FileStruct) DifferentImpl() bool

func (*FileStruct) Generate

func (f *FileStruct) Generate() ([]byte, error)

func (*FileStruct) GetFileName

func (f *FileStruct) GetFileName() string

func (*FileStruct) GetFullGoPackage added in v1.0.0

func (f *FileStruct) GetFullGoPackage() string

func (*FileStruct) GetGoPackage

func (f *FileStruct) GetGoPackage() string

func (*FileStruct) GetGoPath

func (f *FileStruct) GetGoPath() string

func (*FileStruct) GetImplDir added in v1.0.0

func (f *FileStruct) GetImplDir() string

func (*FileStruct) GetImplFileName added in v1.0.0

func (f *FileStruct) GetImplFileName() string

func (*FileStruct) GetImplPackage added in v1.0.0

func (f *FileStruct) GetImplPackage() string

func (*FileStruct) GetOrigName

func (f *FileStruct) GetOrigName() string

func (*FileStruct) GetPackageName

func (f *FileStruct) GetPackageName() string

func (*FileStruct) GetPersistFile added in v1.0.0

func (f *FileStruct) GetPersistFile() string

return the computed persist file taking in consideration the persist.package option and original file name

func (*FileStruct) GetPersistLibFullFilepath added in v1.0.0

func (f *FileStruct) GetPersistLibFullFilepath() persistFile

func (*FileStruct) GetPersistPackageOption added in v1.0.0

func (f *FileStruct) GetPersistPackageOption() string

extract the persist.package file option or return "" as default

func (*FileStruct) GetServices

func (f *FileStruct) GetServices() *Services

func (*FileStruct) IsSameAsMyPackage added in v1.0.0

func (f *FileStruct) IsSameAsMyPackage(pkg string) bool

func (*FileStruct) NeedImport added in v1.0.0

func (f *FileStruct) NeedImport(pkg string) bool

func (*FileStruct) NeedsPersistLibDir added in v1.0.0

func (f *FileStruct) NeedsPersistLibDir() bool

the generator may need to make an extra package in the directory beneath ours this library will not be imported by our persist code, so it is safe to use anywhere the client wants

func (*FileStruct) NotSameAsMyPackage added in v1.0.0

func (f *FileStruct) NotSameAsMyPackage(pkg string) bool

func (*FileStruct) Process

func (f *FileStruct) Process() error

func (*FileStruct) ProcessImports

func (f *FileStruct) ProcessImports()

func (*FileStruct) ProcessImportsForType

func (f *FileStruct) ProcessImportsForType(name string)

func (*FileStruct) SanatizeImports added in v1.0.0

func (f *FileStruct) SanatizeImports()

type Generator

type Generator struct {
	OriginalRequest *plugin_go.CodeGeneratorRequest
	AllStructures   *StructList // all structures present in the files
	Files           *FileList
	Response        *plugin_go.CodeGeneratorResponse
}

func NewGenerator

func NewGenerator(request *plugin_go.CodeGeneratorRequest) *Generator

func (*Generator) GetResponse

func (g *Generator) GetResponse() (*plugin_go.CodeGeneratorResponse, error)

func (*Generator) Process

func (g *Generator) Process() error

type GeneratorStruct

type GeneratorStruct interface {
	Generate() string
}

type GenericDescriptor

type GenericDescriptor interface {
	GetName() string
}

type Import

type Import struct {
	GoPackageName string
	GoImportPath  string
}

func GetHookAndImports added in v1.0.0

func GetHookAndImports() (string, []*Import)

func GetTypeMappingsAndImports added in v1.0.0

func GetTypeMappingsAndImports(*persist.TypeMapping) (string, []*Import)

type Imports

type Imports []*Import

func EmptyImportList

func EmptyImportList() *Imports

func (*Imports) Exist

func (il *Imports) Exist(pkg string) bool

func (*Imports) GetGoNameByStruct

func (il *Imports) GetGoNameByStruct(str *Struct) *Import

func (*Imports) GetImportPkgForPath

func (il *Imports) GetImportPkgForPath(path string) string

func (*Imports) GetOrAddImport

func (il *Imports) GetOrAddImport(goPkg, goPath string) string

func (Imports) String added in v1.0.0

func (il Imports) String() string

type Method

type Method struct {
	Desc    *descriptor.MethodDescriptorProto
	Service *Service
	Query   parser.Query
	// contains filtered or unexported fields
}

func NewMethod

func NewMethod(desc *descriptor.MethodDescriptorProto, srv *Service) (*Method, error)

func (*Method) DefaultMapping

func (m *Method) DefaultMapping(typ *descriptor.FieldDescriptorProto) string

func (*Method) GetAfterHookName

func (m *Method) GetAfterHookName() string

func (*Method) GetBeforeHookName

func (m *Method) GetBeforeHookName() string

HOOKCHANGE

func (*Method) GetFilePackage added in v1.0.0

func (m *Method) GetFilePackage() string

helper method for getting a files package for stream calls if the service.pb.go and the persist.go are in different packages it will return the import prefix+. of the package, otherwise it returns the empty string

func (*Method) GetGoTypeName

func (m *Method) GetGoTypeName(typ string) string

func (*Method) GetGoTypeNameByFieldDesc added in v1.0.0

func (m *Method) GetGoTypeNameByFieldDesc(ty *descriptor.FieldDescriptorProto) string

func (*Method) GetInputType

func (m *Method) GetInputType() string

func (*Method) GetInputTypeMinusPackage added in v1.0.0

func (m *Method) GetInputTypeMinusPackage() string

returns the last element of the type. So instead of test.ExampleTable, it returns ExampleTable

func (*Method) GetInputTypeStruct

func (m *Method) GetInputTypeStruct() *Struct

func (*Method) GetMappedType

func (m *Method) GetMappedType(typ *descriptor.FieldDescriptorProto) string

GetMappedType return mapped type's package + type for a mapped proto, otherwise it returns the default type data

func (*Method) GetMethodOption

func (m *Method) GetMethodOption() *persist.QLImpl

func (*Method) GetName

func (m *Method) GetName() string

func (*Method) GetOutputType

func (m *Method) GetOutputType() string

func (*Method) GetOutputTypeMinusPackage added in v1.0.0

func (m *Method) GetOutputTypeMinusPackage() string

returns the last element of the type. So instead of test.ExampleTable, it returns ExampleTable

func (*Method) GetOutputTypeStruct

func (m *Method) GetOutputTypeStruct() *Struct

func (*Method) GetQuery

func (m *Method) GetQuery() string

func (*Method) GetTypeDescArrayForStruct

func (m *Method) GetTypeDescArrayForStruct(str *Struct) []TypeDesc

func (*Method) GetTypeDescForFieldsInStruct

func (m *Method) GetTypeDescForFieldsInStruct(str *Struct) map[string]TypeDesc

func (*Method) GetTypeDescForFieldsInStructSnakeCase

func (m *Method) GetTypeDescForFieldsInStructSnakeCase(str *Struct) map[string]TypeDesc

func (*Method) GetTypeDescForQueryFields added in v1.0.0

func (m *Method) GetTypeDescForQueryFields() map[string]TypeDesc

func (*Method) GetTypeMappingOpts added in v1.0.0

func (m *Method) GetTypeMappingOpts() *persist.TypeMapping

returns the type mapping option on either the method, or the service.

func (*Method) GetTypeStructByProtoName

func (m *Method) GetTypeStructByProtoName(proto string) *Struct

func (*Method) IsBidiStreaming

func (m *Method) IsBidiStreaming() bool

func (*Method) IsClientStreaming

func (m *Method) IsClientStreaming() bool

func (*Method) IsSQL

func (m *Method) IsSQL() bool

func (*Method) IsSelect added in v1.0.0

func (m *Method) IsSelect() bool

func (*Method) IsServerStreaming

func (m *Method) IsServerStreaming() bool

func (*Method) IsSpanner

func (m *Method) IsSpanner() bool

func (*Method) IsUnary

func (m *Method) IsUnary() bool

func (*Method) Process

func (m *Method) Process() error

func (*Method) String

func (m *Method) String() string

type Methods

type Methods []*Method

func (*Methods) AddMethod

func (m *Methods) AddMethod(desc *descriptor.MethodDescriptorProto, service *Service) error

func (*Methods) PreGenerate

func (m *Methods) PreGenerate() error

type PLInputName added in v1.0.0

type PLInputName struct {
	// contains filtered or unexported fields
}

func NewPLInputName added in v1.0.0

func NewPLInputName(m *Method) PLInputName

name of the structs that are inputs to a method these need to be specific to the package and service. Each service can have their own type mapping of the same message. if the mappings of a message don't match then they will override eachother unless they are specific to the service.

func (PLInputName) String added in v1.0.0

func (p PLInputName) String() string

type PLOutputName added in v1.0.0

type PLOutputName struct {
	// contains filtered or unexported fields
}

func NewPLOutputName added in v1.0.0

func NewPLOutputName(m *Method) PLOutputName

func (PLOutputName) String added in v1.0.0

func (p PLOutputName) String() string

type PLQueryMethodName added in v1.0.0

type PLQueryMethodName struct {
	// contains filtered or unexported fields
}

the method name that returns our stringed query

func NewPLQueryMethodName added in v1.0.0

func NewPLQueryMethodName(m *Method) PLQueryMethodName

func (PLQueryMethodName) String added in v1.0.0

func (pl PLQueryMethodName) String() string

type PackagePath added in v1.0.0

type PackagePath string

just a string, but represents the path that these persist files will live in

type PersistContent added in v1.0.0

type PersistContent struct {
	Content string // the contents that belong in the code generator response
	Name    string // the filename for the response
}

func GenerateFilePersistHandlerContent added in v1.0.0

func GenerateFilePersistHandlerContent(pkg PackagePath, file *FileStruct) PersistContent

func GenerateFileQueryContent added in v1.0.0

func GenerateFileQueryContent(pkg PackagePath, file *FileStruct) PersistContent

func GeneratePkgLevelContent added in v1.0.0

func GeneratePkgLevelContent(pkg PackagePath, files []*FileStruct) PersistContent

type PersistHandlerName added in v1.0.0

type PersistHandlerName struct {
	// contains filtered or unexported fields
}

name of the handler on the persist helper struct

func NewPersistHandlerName added in v1.0.0

func NewPersistHandlerName(m *Method) PersistHandlerName

func (PersistHandlerName) String added in v1.0.0

func (p PersistHandlerName) String() string

type PersistHelperName added in v1.0.0

type PersistHelperName struct {
	// contains filtered or unexported fields
}

name of the method reciever struct in the persist lib implements all persist methods on a service

func NewPersistHelperName added in v1.0.0

func NewPersistHelperName(s *Service) PersistHelperName

func (PersistHelperName) String added in v1.0.0

func (p PersistHelperName) String() string

type PersistOpts added in v1.0.0

type PersistOpts struct {
	Raw            map[string]string
	PersistLibRoot string
}

func ParseCommandLine added in v1.0.0

func ParseCommandLine(str string) PersistOpts

type PersistPackage added in v1.0.0

type PersistPackage struct {
	// contains filtered or unexported fields
}

func NewPersistPackage added in v1.0.0

func NewPersistPackage(fileList *FileList) *PersistPackage

func (*PersistPackage) Generate added in v1.0.0

func (p *PersistPackage) Generate() []PersistContent

type PersistStringer added in v1.0.0

type PersistStringer struct{}

func (*PersistStringer) DeclareSpannerGetter added in v1.0.0

func (per *PersistStringer) DeclareSpannerGetter() string

func (*PersistStringer) DeclareSqlPackageDefs added in v1.0.0

func (per *PersistStringer) DeclareSqlPackageDefs() string

package level definitions for sql implemented libraries SqlClientGetter Scanable interface Runable interface Result struct

func (*PersistStringer) DefaultFunctionsImpl added in v1.0.0

func (per *PersistStringer) DefaultFunctionsImpl(service *Service) string

func (*PersistStringer) DefaultSpannerFunctionsImpl added in v1.0.0

func (per *PersistStringer) DefaultSpannerFunctionsImpl(method *Method) string

func (*PersistStringer) DefaultSqlFunctionsImpl added in v1.0.0

func (per *PersistStringer) DefaultSqlFunctionsImpl(method *Method) string

func (*PersistStringer) HandlersStructDeclaration added in v1.0.0

func (per *PersistStringer) HandlersStructDeclaration(service *Service) string

func (*PersistStringer) HelperFunctionImpl added in v1.0.0

func (per *PersistStringer) HelperFunctionImpl(service *Service) string

func (*PersistStringer) MessageInputDeclaration added in v1.0.0

func (per *PersistStringer) MessageInputDeclaration(method *Method) string

func (*PersistStringer) PersistImplBuilder added in v1.0.0

func (per *PersistStringer) PersistImplBuilder(service *Service) string

HOOKCHANGE merges custom defined handlers with our own

func (*PersistStringer) QueryInterfaceDefinition added in v1.0.0

func (per *PersistStringer) QueryInterfaceDefinition(method *Method) string

func (*PersistStringer) SpannerQueryFunction added in v1.0.0

func (per *PersistStringer) SpannerQueryFunction(method *Method) string

func (*PersistStringer) SqlQueryFunction added in v1.0.0

func (per *PersistStringer) SqlQueryFunction(method *Method) string

type Printer added in v1.0.0

type Printer struct {
	// contains filtered or unexported fields
}

func (*Printer) P added in v1.0.0

func (p *Printer) P(formatString string, args ...interface{})

func (*Printer) PA added in v1.0.0

func (p *Printer) PA(formatStrings []string, args ...interface{})

func (*Printer) PTemplate added in v1.0.0

func (p *Printer) PTemplate(t string, dot interface{})

func (*Printer) Q

func (p *Printer) Q(args ...interface{})

func (*Printer) String added in v1.0.0

func (p *Printer) String() string

type ServerStreamStringer added in v1.0.0

type ServerStreamStringer struct {
	// contains filtered or unexported fields
}

func NewServerStreamStringer added in v1.0.0

func NewServerStreamStringer(method *Method, b BackendStringer) *ServerStreamStringer

func (*ServerStreamStringer) AfterHook added in v1.0.0

func (s *ServerStreamStringer) AfterHook()

func (*ServerStreamStringer) BeforeHook added in v1.0.0

func (s *ServerStreamStringer) BeforeHook()

func (*ServerStreamStringer) HandleRow added in v1.0.0

func (s *ServerStreamStringer) HandleRow()

func (*ServerStreamStringer) Params added in v1.0.0

func (s *ServerStreamStringer) Params()

func (*ServerStreamStringer) PersistCall added in v1.0.0

func (s *ServerStreamStringer) PersistCall()

func (*ServerStreamStringer) ResultFromRow added in v1.0.0

func (s *ServerStreamStringer) ResultFromRow()

func (*ServerStreamStringer) String added in v1.0.0

func (s *ServerStreamStringer) String() string

func (*ServerStreamStringer) Unimplemented added in v1.0.0

func (s *ServerStreamStringer) Unimplemented() string

type Service

type Service struct {
	Desc       *descriptor.ServiceDescriptorProto
	Methods    *Methods
	Package    string // protobuf package
	File       *FileStruct
	AllStructs *StructList
}

func (*Service) GetName

func (s *Service) GetName() string

func (*Service) GetServiceOption

func (s *Service) GetServiceOption() *persist.TypeMapping

func (*Service) GetServiceType

func (s *Service) GetServiceType() *persist.PersistenceOptions

func (*Service) IsSQL

func (s *Service) IsSQL() bool

func (*Service) IsSpanner

func (s *Service) IsSpanner() bool

func (*Service) PrintBuilder added in v1.0.0

func (s *Service) PrintBuilder() string

func (*Service) Process

func (s *Service) Process() error

func (*Service) ProcessMethods

func (s *Service) ProcessMethods() error

type Services

type Services []*Service

func (*Services) AddService

func (s *Services) AddService(pkg string, desc *descriptor.ServiceDescriptorProto, allStructs *StructList, file *FileStruct) *Service

func (Services) HasPersistService added in v1.0.0

func (s Services) HasPersistService() bool

we are a persist service if we have persist options. meaning we are either spanner or sql

func (*Services) PreGenerate

func (s *Services) PreGenerate() error

func (*Services) Process

func (s *Services) Process() error

type SpannerStringer added in v1.0.0

type SpannerStringer struct {
	// contains filtered or unexported fields
}

func (*SpannerStringer) MapRequestToParams added in v1.0.0

func (s *SpannerStringer) MapRequestToParams() string

func (*SpannerStringer) RowType added in v1.0.0

func (s *SpannerStringer) RowType() string

func (*SpannerStringer) TranslateRowToResult added in v1.0.0

func (s *SpannerStringer) TranslateRowToResult() string

type SqlStringer added in v1.0.0

type SqlStringer struct {
	// contains filtered or unexported fields
}

func (*SqlStringer) MapRequestToParams added in v1.0.0

func (s *SqlStringer) MapRequestToParams() string

func (*SqlStringer) RowType added in v1.0.0

func (s *SqlStringer) RowType() string

func (*SqlStringer) TranslateRowToResult added in v1.0.0

func (s *SqlStringer) TranslateRowToResult() string

type StreamType added in v1.0.0

type StreamType struct {
	// contains filtered or unexported fields
}

the stream struct name used by streaming grpc methods

func NewStreamType added in v1.0.0

func NewStreamType(m *Method) StreamType

func (StreamType) String added in v1.0.0

func (s StreamType) String() string

type Struct

type Struct struct {
	Descriptor       GenericDescriptor
	Package          string
	ParentDescriptor *Struct
	IsMessage        bool
	IsInnerType      bool
	File             *FileStruct // for determine go import path and go package
	EnumDesc         *desc.EnumDescriptorProto
	MsgDesc          *desc.DescriptorProto
}

func (*Struct) GetFieldType

func (s *Struct) GetFieldType(field string) *desc.FieldDescriptorProto

func (*Struct) GetGoName

func (s *Struct) GetGoName() string

func (*Struct) GetGoPath

func (s *Struct) GetGoPath() string

func (*Struct) GetImportedFiles

func (s *Struct) GetImportedFiles() *FileList

func (*Struct) GetProtoName

func (s *Struct) GetProtoName() string

type StructList

type StructList []*Struct

func NewStructList

func NewStructList() *StructList

func (*StructList) AddEnum

func (s *StructList) AddEnum(enum *desc.EnumDescriptorProto, parent *Struct, pkg string, file *FileStruct) *Struct

func (*StructList) AddMessage

func (s *StructList) AddMessage(message *desc.DescriptorProto, parent *Struct, pkg string, file *FileStruct) *Struct

func (*StructList) Append

func (s *StructList) Append(struc *Struct)

func (*StructList) GetStructByFieldDesc

func (s *StructList) GetStructByFieldDesc(fld *desc.FieldDescriptorProto) *Struct

func (*StructList) GetStructByProtoName

func (s *StructList) GetStructByProtoName(name string) *Struct

type TypeDesc

type TypeDesc struct {
	Name      string // ex. StartTime
	ProtoName string // start_time
	// mytime.MyTime (if it is mapped) otherwise is defaultMapping  ex: string, []float64
	// if is a message type, then *pb.TestMessage  []*TestMessage
	GoName          string
	GoTypeName      string
	OrigGoName      string // Timestamp
	Struct          *Struct
	Mapping         *persist.TypeMapping_TypeDescriptor
	IsMapped        bool
	IsRepeated      bool
	IsEnum          bool
	IsMessage       bool
	ResultHook      bool
	FieldDescriptor *descriptor.FieldDescriptorProto
	// spanner.GenericColumnValue, spanner.NullString, spanner.NullInt64
	// or if just the GoName
	SpannerType string
	// name used as field in the spanner.Null* types. ex: StringVal, NullInt64
	SpannerTypeFieldName string
	// if our spannerType != GoName, we need to convert our message
	NeedsSpannerConversion bool
}

type UnaryStringer added in v1.0.0

type UnaryStringer struct {
	// contains filtered or unexported fields
}

func NewUnaryStringer added in v1.0.0

func NewUnaryStringer(method *Method, b BackendStringer) *UnaryStringer

func (*UnaryStringer) AfterHook added in v1.0.0

func (s *UnaryStringer) AfterHook()

func (*UnaryStringer) BeforeHook added in v1.0.0

func (s *UnaryStringer) BeforeHook()

HOOKCHANGE

func (*UnaryStringer) HandleRow added in v1.0.0

func (s *UnaryStringer) HandleRow()

func (*UnaryStringer) Params added in v1.0.0

func (s *UnaryStringer) Params()

func (*UnaryStringer) PersistCall added in v1.0.0

func (s *UnaryStringer) PersistCall()

func (*UnaryStringer) ResultFromRow added in v1.0.0

func (s *UnaryStringer) ResultFromRow()

func (*UnaryStringer) String added in v1.0.0

func (s *UnaryStringer) String() string

func (*UnaryStringer) Unimplemented added in v1.0.0

func (s *UnaryStringer) Unimplemented() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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