Documentation
¶
Index ¶
- func DefaultRetryer() requests.Doer
- func EmitBatch(ctx context.Context, emitter ValueEmitter, req *requests.Request, ...) error
- func Handler(loaders Loaders, protos Protos) http.HandlerFunc
- func Keys(schema *jsonschema.Document) []string
- func NewSource(config interface{}) *sourceDef
- type BaseProtocol
- type Command
- type ConnectorSpecification
- type DbContext
- type DbRunner
- type FieldDef
- type FsContext
- type FsRunner
- type GeneralContext
- type GeneralRunner
- type HttpContext
- type HttpRunner
- type HttpRunnerFunc
- type Loader
- type Loaders
- type ManualContext
- type ManualRunner
- type ManualRunnerFunc
- type ManualStreamContext
- type MaskedString
- type MsgType
- type Proto
- type ProtoFn
- type Protocol
- type Protos
- type Schema
- type SchemaBuilder
- func (s SchemaBuilder) CustomIterateBy() SchemaBuilder
- func (s SchemaBuilder) CustomOrderBy() SchemaBuilder
- func (s SchemaBuilder) CustomPrimary() SchemaBuilder
- func (s SchemaBuilder) IterateBy(keys ...FieldDef) SchemaBuilder
- func (s SchemaBuilder) Namespace(namespace string) SchemaBuilder
- func (s SchemaBuilder) OrderBy(keys ...FieldDef) SchemaBuilder
- func (s SchemaBuilder) Primary(keys ...FieldDef) SchemaBuilder
- type Settings
- type StreamProto
- type Streams
- type ValueEmitter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRetryer ¶
func DefaultRetryer() requests.Doer
Types ¶
type BaseProtocol ¶
type BaseProtocol struct {
// contains filtered or unexported fields
}
func (*BaseProtocol) Flush ¶
func (m *BaseProtocol) Flush() error
type ConnectorSpecification ¶
type DbContext ¶
type DbContext interface { GeneralContext }
type FsContext ¶
type FsContext interface { GeneralContext }
type GeneralContext ¶
type GeneralRunner ¶
type GeneralRunner interface {
Run(ctx GeneralContext) error
}
type HttpContext ¶
type HttpContext interface { GeneralContext // EmitBatch executes the provided request, locate the data array and emit the records // (likely) called multiple times in the same run // resp: (pre-allocated and reusable) // path: (path to the data array) EmitBatch(req *requests.Request, resp *requests.JSONResponse, keys ...string) error }
type HttpRunner ¶
type HttpRunner interface { // Run runs the sync job. Run(ctx HttpContext) error }
type HttpRunnerFunc ¶
type HttpRunnerFunc func(ctx HttpContext) error
func (HttpRunnerFunc) Run ¶
func (r HttpRunnerFunc) Run(ctx HttpContext) error
type ManualContext ¶
type ManualContext interface {
Stream(schema Schema) (ManualStreamContext, error)
}
type ManualRunner ¶
type ManualRunner interface {
Run(ctx ManualContext) error
}
type ManualRunnerFunc ¶
type ManualRunnerFunc func(ctx ManualContext) error
func (ManualRunnerFunc) Run ¶
func (r ManualRunnerFunc) Run(ctx ManualContext) error
type ManualStreamContext ¶
type MaskedString ¶
type MaskedString string
func (MaskedString) MarshalJSON ¶
func (s MaskedString) MarshalJSON() ([]byte, error)
func (MaskedString) Masked ¶
func (s MaskedString) Masked() string
func (MaskedString) String ¶
func (s MaskedString) String() string
type Proto ¶
type Proto interface { // Open a new stream loader. Should emit or record the schema information // Proto can return nil in case this stream should not be emitted Open(typ Schema) (StreamProto, error) // Close closes the current session. Flushes pending data Close() error // EmitSpec defines the available streams EmitSpec(ConnectorSpecification) error EmitStatus(v error) error // can we move this to Proto }
type Schema ¶
type SchemaBuilder ¶
type SchemaBuilder struct {
Schema
}
func Incremental ¶
func Incremental(name string, typ interface{}) SchemaBuilder
func NonIncremental ¶
func NonIncremental(name string, typ interface{}) SchemaBuilder
func (SchemaBuilder) CustomIterateBy ¶
func (s SchemaBuilder) CustomIterateBy() SchemaBuilder
func (SchemaBuilder) CustomOrderBy ¶
func (s SchemaBuilder) CustomOrderBy() SchemaBuilder
func (SchemaBuilder) CustomPrimary ¶
func (s SchemaBuilder) CustomPrimary() SchemaBuilder
func (SchemaBuilder) IterateBy ¶
func (s SchemaBuilder) IterateBy(keys ...FieldDef) SchemaBuilder
func (SchemaBuilder) Namespace ¶
func (s SchemaBuilder) Namespace(namespace string) SchemaBuilder
func (SchemaBuilder) OrderBy ¶
func (s SchemaBuilder) OrderBy(keys ...FieldDef) SchemaBuilder
func (SchemaBuilder) Primary ¶
func (s SchemaBuilder) Primary(keys ...FieldDef) SchemaBuilder
type StreamProto ¶
type ValueEmitter ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.