Documentation
¶
Index ¶
- func DefaultBidirectionalHandler(accessor SqlClientGetter) ...
- func DefaultBidirectionalWithHooksHandler(accessor SqlClientGetter) ...
- func DefaultClientStreamHandler(accessor SqlClientGetter) ...
- func DefaultClientStreamWithHookHandler(accessor SqlClientGetter) ...
- func DefaultServerStreamHandler(accessor SqlClientGetter) func(context.Context, *Test_NameForAmazing, func(Scanable)) error
- func DefaultServerStreamWithHooksHandler(accessor SqlClientGetter) func(context.Context, *Test_NameForAmazing, func(Scanable)) error
- func DefaultUniarySelectHandler(accessor SqlClientGetter) func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
- func DefaultUniarySelectWithHooksHandler(accessor SqlClientGetter) func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
- type AmazingBidirectionalQueryParams
- type AmazingBidirectionalWithHooksQueryParams
- type AmazingClientStreamQueryParams
- type AmazingClientStreamWithHookQueryParams
- type AmazingMethodReceiver
- func (p *AmazingMethodReceiver) Bidirectional(ctx context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
- func (p *AmazingMethodReceiver) BidirectionalWithHooks(ctx context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
- func (p *AmazingMethodReceiver) ClientStream(ctx context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
- func (p *AmazingMethodReceiver) ClientStreamWithHook(ctx context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
- func (p *AmazingMethodReceiver) ServerStream(ctx context.Context, params *Test_NameForAmazing, next func(Scanable)) error
- func (p *AmazingMethodReceiver) ServerStreamWithHooks(ctx context.Context, params *Test_NameForAmazing, next func(Scanable)) error
- func (p *AmazingMethodReceiver) UniarySelect(ctx context.Context, params *Test_PartialTableForAmazing, next func(Scanable)) error
- func (p *AmazingMethodReceiver) UniarySelectWithHooks(ctx context.Context, params *Test_PartialTableForAmazing, next func(Scanable)) error
- type AmazingQueryHandlers
- type AmazingServerStreamQueryParams
- type AmazingServerStreamWithHooksQueryParams
- type AmazingUniarySelectQueryParams
- type AmazingUniarySelectWithHooksQueryParams
- type Result
- func AmazingBidirectionalQuery(tx Runable, req AmazingBidirectionalQueryParams) *Result
- func AmazingBidirectionalWithHooksQuery(tx Runable, req AmazingBidirectionalWithHooksQueryParams) *Result
- func AmazingClientStreamQuery(tx Runable, req AmazingClientStreamQueryParams) *Result
- func AmazingClientStreamWithHookQuery(tx Runable, req AmazingClientStreamWithHookQueryParams) *Result
- func AmazingServerStreamQuery(tx Runable, req AmazingServerStreamQueryParams) *Result
- func AmazingServerStreamWithHooksQuery(tx Runable, req AmazingServerStreamWithHooksQueryParams) *Result
- func AmazingUniarySelectQuery(tx Runable, req AmazingUniarySelectQueryParams) *Result
- func AmazingUniarySelectWithHooksQuery(tx Runable, req AmazingUniarySelectWithHooksQueryParams) *Result
- type Runable
- type Scanable
- type SqlClientGetter
- type Test_ExampleTableForAmazing
- func (p *Test_ExampleTableForAmazing) GetId() int64
- func (p *Test_ExampleTableForAmazing) GetName() string
- func (p *Test_ExampleTableForAmazing) GetStartTime() interface{}
- func (p *Test_ExampleTableForAmazing) SetId(param int64)
- func (p *Test_ExampleTableForAmazing) SetName(param string)
- func (p *Test_ExampleTableForAmazing) SetStartTime(param interface{})
- type Test_NameForAmazing
- type Test_PartialTableForAmazing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBidirectionalHandler ¶
func DefaultBidirectionalHandler(accessor SqlClientGetter) func(context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
func DefaultBidirectionalWithHooksHandler ¶
func DefaultBidirectionalWithHooksHandler(accessor SqlClientGetter) func(context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
func DefaultClientStreamHandler ¶
func DefaultClientStreamHandler(accessor SqlClientGetter) func(context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
func DefaultClientStreamWithHookHandler ¶
func DefaultClientStreamWithHookHandler(accessor SqlClientGetter) func(context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
func DefaultServerStreamHandler ¶
func DefaultServerStreamHandler(accessor SqlClientGetter) func(context.Context, *Test_NameForAmazing, func(Scanable)) error
func DefaultServerStreamWithHooksHandler ¶
func DefaultServerStreamWithHooksHandler(accessor SqlClientGetter) func(context.Context, *Test_NameForAmazing, func(Scanable)) error
func DefaultUniarySelectHandler ¶
func DefaultUniarySelectHandler(accessor SqlClientGetter) func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
func DefaultUniarySelectWithHooksHandler ¶
func DefaultUniarySelectWithHooksHandler(accessor SqlClientGetter) func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
Types ¶
type AmazingMethodReceiver ¶
type AmazingMethodReceiver struct {
Handlers AmazingQueryHandlers
}
func (*AmazingMethodReceiver) Bidirectional ¶
func (p *AmazingMethodReceiver) Bidirectional(ctx context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
returns two functions (feed, stop) feed needs to be called for every row received. It will run the query and return the result + error// stop needs to be called to signal the transaction has finished
func (*AmazingMethodReceiver) BidirectionalWithHooks ¶
func (p *AmazingMethodReceiver) BidirectionalWithHooks(ctx context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
returns two functions (feed, stop) feed needs to be called for every row received. It will run the query and return the result + error// stop needs to be called to signal the transaction has finished
func (*AmazingMethodReceiver) ClientStream ¶
func (p *AmazingMethodReceiver) ClientStream(ctx context.Context) (func(*Test_ExampleTableForAmazing) 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 (*AmazingMethodReceiver) ClientStreamWithHook ¶
func (p *AmazingMethodReceiver) ClientStreamWithHook(ctx context.Context) (func(*Test_ExampleTableForAmazing) 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 (*AmazingMethodReceiver) ServerStream ¶
func (p *AmazingMethodReceiver) ServerStream(ctx context.Context, params *Test_NameForAmazing, next func(Scanable)) error
next must be called on each result row
func (*AmazingMethodReceiver) ServerStreamWithHooks ¶
func (p *AmazingMethodReceiver) ServerStreamWithHooks(ctx context.Context, params *Test_NameForAmazing, next func(Scanable)) error
next must be called on each result row
func (*AmazingMethodReceiver) UniarySelect ¶
func (p *AmazingMethodReceiver) UniarySelect(ctx context.Context, params *Test_PartialTableForAmazing, next func(Scanable)) error
next must be called on each result row
func (*AmazingMethodReceiver) UniarySelectWithHooks ¶
func (p *AmazingMethodReceiver) UniarySelectWithHooks(ctx context.Context, params *Test_PartialTableForAmazing, next func(Scanable)) error
next must be called on each result row
type AmazingQueryHandlers ¶
type AmazingQueryHandlers struct {
UniarySelectHandler func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
UniarySelectWithHooksHandler func(context.Context, *Test_PartialTableForAmazing, func(Scanable)) error
ServerStreamHandler func(context.Context, *Test_NameForAmazing, func(Scanable)) error
ServerStreamWithHooksHandler func(context.Context, *Test_NameForAmazing, func(Scanable)) error
BidirectionalHandler func(context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
BidirectionalWithHooksHandler func(context.Context) (func(*Test_ExampleTableForAmazing) (Scanable, error), func() error)
ClientStreamHandler func(context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
ClientStreamWithHookHandler func(context.Context) (func(*Test_ExampleTableForAmazing) error, func() (Scanable, error), error)
}
type AmazingServerStreamQueryParams ¶
type AmazingServerStreamQueryParams interface {
GetName() string
}
type AmazingServerStreamWithHooksQueryParams ¶
type AmazingServerStreamWithHooksQueryParams interface {
GetName() string
}
type AmazingUniarySelectQueryParams ¶
type AmazingUniarySelectQueryParams interface {
GetId() int64
GetStartTime() interface{}
}
type AmazingUniarySelectWithHooksQueryParams ¶
type AmazingUniarySelectWithHooksQueryParams interface {
GetStartTime() interface{}
GetId() int64
}
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func AmazingBidirectionalQuery ¶
func AmazingBidirectionalQuery(tx Runable, req AmazingBidirectionalQueryParams) *Result
func AmazingBidirectionalWithHooksQuery ¶
func AmazingBidirectionalWithHooksQuery(tx Runable, req AmazingBidirectionalWithHooksQueryParams) *Result
func AmazingClientStreamQuery ¶
func AmazingClientStreamQuery(tx Runable, req AmazingClientStreamQueryParams) *Result
func AmazingClientStreamWithHookQuery ¶
func AmazingClientStreamWithHookQuery(tx Runable, req AmazingClientStreamWithHookQueryParams) *Result
func AmazingServerStreamQuery ¶
func AmazingServerStreamQuery(tx Runable, req AmazingServerStreamQueryParams) *Result
func AmazingServerStreamWithHooksQuery ¶
func AmazingServerStreamWithHooksQuery(tx Runable, req AmazingServerStreamWithHooksQueryParams) *Result
func AmazingUniarySelectQuery ¶
func AmazingUniarySelectQuery(tx Runable, req AmazingUniarySelectQueryParams) *Result
func AmazingUniarySelectWithHooksQuery ¶
func AmazingUniarySelectWithHooksQuery(tx Runable, req AmazingUniarySelectWithHooksQueryParams) *Result
type SqlClientGetter ¶
func NewSqlClientGetter ¶
func NewSqlClientGetter(cli **sql.DB) SqlClientGetter
type Test_ExampleTableForAmazing ¶
func (*Test_ExampleTableForAmazing) GetId ¶
func (p *Test_ExampleTableForAmazing) GetId() int64
this could be used in a query, so generate the getters/setters
func (*Test_ExampleTableForAmazing) GetName ¶
func (p *Test_ExampleTableForAmazing) GetName() string
func (*Test_ExampleTableForAmazing) GetStartTime ¶
func (p *Test_ExampleTableForAmazing) GetStartTime() interface{}
func (*Test_ExampleTableForAmazing) SetId ¶
func (p *Test_ExampleTableForAmazing) SetId(param int64)
func (*Test_ExampleTableForAmazing) SetName ¶
func (p *Test_ExampleTableForAmazing) SetName(param string)
func (*Test_ExampleTableForAmazing) SetStartTime ¶
func (p *Test_ExampleTableForAmazing) SetStartTime(param interface{})
type Test_NameForAmazing ¶
type Test_NameForAmazing struct {
Name string
}
func (*Test_NameForAmazing) GetName ¶
func (p *Test_NameForAmazing) GetName() string
this could be used in a query, so generate the getters/setters
func (*Test_NameForAmazing) SetName ¶
func (p *Test_NameForAmazing) SetName(param string)
type Test_PartialTableForAmazing ¶
type Test_PartialTableForAmazing struct {
Id int64
StartTime interface{}
}
func (*Test_PartialTableForAmazing) GetId ¶
func (p *Test_PartialTableForAmazing) GetId() int64
this could be used in a query, so generate the getters/setters
func (*Test_PartialTableForAmazing) GetStartTime ¶
func (p *Test_PartialTableForAmazing) GetStartTime() interface{}
func (*Test_PartialTableForAmazing) SetId ¶
func (p *Test_PartialTableForAmazing) SetId(param int64)
func (*Test_PartialTableForAmazing) SetStartTime ¶
func (p *Test_PartialTableForAmazing) SetStartTime(param interface{})