Documentation ¶
Overview ¶
Package backend defines a Backend that is responsible for communicating with SQL databases and other external systems
Index ¶
- Variables
- type Backend
- func (b *Backend) CommitTransaction(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) CommitTx(txUUID string) (err error)
- func (b *Backend) CreateSingle(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) CreateTransaction(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) CreateTx(timeout time.Duration) (txUUID uuid.UUID, err error)
- func (b *Backend) DeleteSingle(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) ExecContext(ctx context.Context, query string, args ...interface{}) (result sql.Result, err error)
- func (b *Backend) GetCoerceArgFuncs() ...
- func (b *Backend) GetCollection(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetCollectionAsOptions(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetCollectionAsOptionsFilterable(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetCollectionAsOptionsWithParams(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetCollectionFilterable(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetDescriptorFile(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetFilterPredicateMapping(predicate filter.Predicate) string
- func (b *Backend) GetHandler() http.Handler
- func (b *Backend) GetQueryFormatFuncs() map[string]func() string
- func (b *Backend) GetQueryTemplate(name string) string
- func (b *Backend) GetSchemaMapping(typeDescriptor string) *descriptor.SchemaMapping
- func (b *Backend) GetSingle(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) GetSingleAsOption(rw http.ResponseWriter, req *http.Request)
- func (b *Backend) Open(args ...interface{}) error
- func (b *Backend) QueryContext(ctx context.Context, query string, args ...interface{}) (results []interface{}, err error)
- func (b *Backend) UpdateSingle(rw http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { GetSchemaMappingFunc func(string) *descriptor.SchemaMapping GetFilterPredicateMappingFunc func(filter.Predicate) string GetQueryTemplateFunc func(string) string CoerceArgFuncs map[string]func(map[string]interface{}, *descriptor.Field) (interface{}, bool, error) QueryFormatFuncs map[string]func() string BackendFormattingFuncs map[string]func(string) (string, error) CastBackendTypeToGolangType func(string) interface{} QueryContextFunc func(context.Context, string, ...interface{}) ([]interface{}, error) ExecContextFunc func(context.Context, string, ...interface{}) (sql.Result, error) OpenFunc func(...interface{}) error CreateTxFunc func(time.Duration) (uuid.UUID, error) CommitTxFunc func(string) error }
func (*Backend) CommitTransaction ¶
func (b *Backend) CommitTransaction(rw http.ResponseWriter, req *http.Request)
func (*Backend) CreateSingle ¶
func (b *Backend) CreateSingle(rw http.ResponseWriter, req *http.Request)
func (*Backend) CreateTransaction ¶
func (b *Backend) CreateTransaction(rw http.ResponseWriter, req *http.Request)
func (*Backend) DeleteSingle ¶
func (b *Backend) DeleteSingle(rw http.ResponseWriter, req *http.Request)
func (*Backend) ExecContext ¶
func (*Backend) GetCoerceArgFuncs ¶
func (*Backend) GetCollection ¶
func (b *Backend) GetCollection(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetCollectionAsOptions ¶
func (b *Backend) GetCollectionAsOptions(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetCollectionAsOptionsFilterable ¶
func (b *Backend) GetCollectionAsOptionsFilterable(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetCollectionAsOptionsWithParams ¶
func (b *Backend) GetCollectionAsOptionsWithParams(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetCollectionFilterable ¶
func (b *Backend) GetCollectionFilterable(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetDescriptorFile ¶
func (b *Backend) GetDescriptorFile(rw http.ResponseWriter, req *http.Request)
func (*Backend) GetFilterPredicateMapping ¶
func (*Backend) GetHandler ¶
func (*Backend) GetQueryFormatFuncs ¶
func (*Backend) GetQueryTemplate ¶
func (*Backend) GetSchemaMapping ¶
func (b *Backend) GetSchemaMapping(typeDescriptor string) *descriptor.SchemaMapping
func (*Backend) GetSingleAsOption ¶
func (b *Backend) GetSingleAsOption(rw http.ResponseWriter, req *http.Request)
func (*Backend) QueryContext ¶
func (*Backend) UpdateSingle ¶
func (b *Backend) UpdateSingle(rw http.ResponseWriter, req *http.Request)
Source Files ¶
- backend.go
- commitDBTransaction.go
- createDBTransaction.go
- createSingle.go
- deleteSingle.go
- getCollection.go
- getCollectionAsOptions.go
- getCollectionAsOptionsFilterable.go
- getCollectionAsOptionsWithParams.go
- getCollectionFilterable.go
- getDescriptorFile.go
- getSingle.go
- getSingleAsOption.go
- updateSingle.go
Click to show internal directories.
Click to hide internal directories.