persist_lib

package
v2.0.0+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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClientStreamingExampleHandler

func DefaultClientStreamingExampleHandler(accessor SqlClientGetter) func(context.Context) (func(*ExampleTable1ForTestservice1) error, func() (Scanable, error), error)

func DefaultServerStreamSelectHandler

func DefaultServerStreamSelectHandler(accessor SqlClientGetter) func(context.Context, *ExampleTable1ForTestservice1, func(Scanable)) error

func DefaultUnaryExample1Handler

func DefaultUnaryExample1Handler(accessor SqlClientGetter) func(context.Context, *ExampleTable1ForTestservice1, func(Scanable)) error

func DefaultUnaryExample2Handler

func DefaultUnaryExample2Handler(accessor SqlClientGetter) func(context.Context, *Test_TestForTestservice1, func(Scanable)) error

Types

type ExampleTable1ForTestservice1

type ExampleTable1ForTestservice1 struct {
	TableId      int32
	Key          string
	Value        string
	InnerMessage []byte
	InnerEnum    int32
	StringArray  []string
	BytesField   []byte
	StartTime    interface{}
	TestField    []byte
	Myyenum      int32
	Testsenum    int32
	Mappedenum   interface{}
}

func (*ExampleTable1ForTestservice1) GetBytesField

func (p *ExampleTable1ForTestservice1) GetBytesField() []byte

func (*ExampleTable1ForTestservice1) GetInnerEnum

func (p *ExampleTable1ForTestservice1) GetInnerEnum() int32

func (*ExampleTable1ForTestservice1) GetInnerMessage

func (p *ExampleTable1ForTestservice1) GetInnerMessage() []byte

func (*ExampleTable1ForTestservice1) GetKey

func (*ExampleTable1ForTestservice1) GetMappedenum

func (p *ExampleTable1ForTestservice1) GetMappedenum() interface{}

func (*ExampleTable1ForTestservice1) GetMyyenum

func (p *ExampleTable1ForTestservice1) GetMyyenum() int32

func (*ExampleTable1ForTestservice1) GetStartTime

func (p *ExampleTable1ForTestservice1) GetStartTime() interface{}

func (*ExampleTable1ForTestservice1) GetStringArray

func (p *ExampleTable1ForTestservice1) GetStringArray() []string

func (*ExampleTable1ForTestservice1) GetTableId

func (p *ExampleTable1ForTestservice1) GetTableId() int32

this could be used in a query, so generate the getters/setters

func (*ExampleTable1ForTestservice1) GetTestField

func (p *ExampleTable1ForTestservice1) GetTestField() []byte

func (*ExampleTable1ForTestservice1) GetTestsenum

func (p *ExampleTable1ForTestservice1) GetTestsenum() int32

func (*ExampleTable1ForTestservice1) GetValue

func (p *ExampleTable1ForTestservice1) GetValue() string

func (*ExampleTable1ForTestservice1) SetBytesField

func (p *ExampleTable1ForTestservice1) SetBytesField(param []byte)

func (*ExampleTable1ForTestservice1) SetInnerEnum

func (p *ExampleTable1ForTestservice1) SetInnerEnum(param int32)

func (*ExampleTable1ForTestservice1) SetInnerMessage

func (p *ExampleTable1ForTestservice1) SetInnerMessage(param []byte)

func (*ExampleTable1ForTestservice1) SetKey

func (p *ExampleTable1ForTestservice1) SetKey(param string)

func (*ExampleTable1ForTestservice1) SetMappedenum

func (p *ExampleTable1ForTestservice1) SetMappedenum(param interface{})

func (*ExampleTable1ForTestservice1) SetMyyenum

func (p *ExampleTable1ForTestservice1) SetMyyenum(param int32)

func (*ExampleTable1ForTestservice1) SetStartTime

func (p *ExampleTable1ForTestservice1) SetStartTime(param interface{})

func (*ExampleTable1ForTestservice1) SetStringArray

func (p *ExampleTable1ForTestservice1) SetStringArray(param []string)

func (*ExampleTable1ForTestservice1) SetTableId

func (p *ExampleTable1ForTestservice1) SetTableId(param int32)

func (*ExampleTable1ForTestservice1) SetTestField

func (p *ExampleTable1ForTestservice1) SetTestField(param []byte)

func (*ExampleTable1ForTestservice1) SetTestsenum

func (p *ExampleTable1ForTestservice1) SetTestsenum(param int32)

func (*ExampleTable1ForTestservice1) SetValue

func (p *ExampleTable1ForTestservice1) SetValue(param string)

type NotEnabledServiceMethodReceiver

type NotEnabledServiceMethodReceiver struct {
	Handlers NotEnabledServiceQueryHandlers
}

type NotEnabledServiceQueryHandlers

type NotEnabledServiceQueryHandlers struct {
}

type Result

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

func Testservice1ClientStreamingExampleQuery

func Testservice1ClientStreamingExampleQuery(tx Runable, req Testservice1ClientStreamingExampleQueryParams) *Result

func Testservice1ServerStreamSelectQuery

func Testservice1ServerStreamSelectQuery(tx Runable, req Testservice1ServerStreamSelectQueryParams) *Result

func Testservice1UnaryExample1Query

func Testservice1UnaryExample1Query(tx Runable, req Testservice1UnaryExample1QueryParams) *Result

func Testservice1UnaryExample2Query

func Testservice1UnaryExample2Query(tx Runable, req Testservice1UnaryExample2QueryParams) *Result

func (*Result) Do

func (r *Result) Do(fun func(Scanable) error) error

func (*Result) Err

func (r *Result) Err() error

func (*Result) Scan

func (r *Result) Scan(dest ...interface{}) error

returns sql.ErrNoRows if it did not scan into dest

type Runable

type Runable interface {
	Query(string, ...interface{}) (*sql.Rows, error)
	QueryRow(string, ...interface{}) *sql.Row
	Exec(string, ...interface{}) (sql.Result, error)
}

type Scanable

type Scanable interface {
	Scan(dest ...interface{}) error
}

type SqlClientGetter

type SqlClientGetter func() (*sql.DB, error)

func NewSqlClientGetter

func NewSqlClientGetter(cli **sql.DB) SqlClientGetter

type Test_TestForTestservice1

type Test_TestForTestservice1 struct {
	Id   int32
	Name string
}

func (*Test_TestForTestservice1) GetId

func (p *Test_TestForTestservice1) GetId() int32

this could be used in a query, so generate the getters/setters

func (*Test_TestForTestservice1) GetName

func (p *Test_TestForTestservice1) GetName() string

func (*Test_TestForTestservice1) SetId

func (p *Test_TestForTestservice1) SetId(param int32)

func (*Test_TestForTestservice1) SetName

func (p *Test_TestForTestservice1) SetName(param string)

type Testservice1ClientStreamingExampleQueryParams

type Testservice1ClientStreamingExampleQueryParams interface {
	GetTableId() int32
}

type Testservice1MethodReceiver

type Testservice1MethodReceiver struct {
	Handlers Testservice1QueryHandlers
}

func (*Testservice1MethodReceiver) ClientStreamingExample

func (p *Testservice1MethodReceiver) ClientStreamingExample(ctx context.Context) (func(*ExampleTable1ForTestservice1) error, func() (Scanable, error), error)

given a context, returns two functions. (feed, stop) feed will be called once for every row recieved by the handler stop will be called when the client is done streaming. it expects a row to be returned, or nil.

func (*Testservice1MethodReceiver) ServerStreamSelect

func (p *Testservice1MethodReceiver) ServerStreamSelect(ctx context.Context, params *ExampleTable1ForTestservice1, next func(Scanable)) error

next must be called on each result row

func (*Testservice1MethodReceiver) UnaryExample1

func (p *Testservice1MethodReceiver) UnaryExample1(ctx context.Context, params *ExampleTable1ForTestservice1, next func(Scanable)) error

next must be called on each result row

func (*Testservice1MethodReceiver) UnaryExample2

func (p *Testservice1MethodReceiver) UnaryExample2(ctx context.Context, params *Test_TestForTestservice1, next func(Scanable)) error

next must be called on each result row

type Testservice1QueryHandlers

type Testservice1QueryHandlers struct {
	UnaryExample1Handler          func(context.Context, *ExampleTable1ForTestservice1, func(Scanable)) error
	UnaryExample2Handler          func(context.Context, *Test_TestForTestservice1, func(Scanable)) error
	ServerStreamSelectHandler     func(context.Context, *ExampleTable1ForTestservice1, func(Scanable)) error
	ClientStreamingExampleHandler func(context.Context) (func(*ExampleTable1ForTestservice1) error, func() (Scanable, error), error)
}

type Testservice1ServerStreamSelectQueryParams

type Testservice1ServerStreamSelectQueryParams interface {
	GetTableId() int32
}

type Testservice1UnaryExample1QueryParams

type Testservice1UnaryExample1QueryParams interface {
	GetTableId() int32
	GetStartTime() interface{}
}

type Testservice1UnaryExample2QueryParams

type Testservice1UnaryExample2QueryParams interface {
	GetId() int32
}

Jump to

Keyboard shortcuts

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