Documentation
¶
Index ¶
- func TestSourcePluginSync(t *testing.T, plugin *SourcePlugin, spec specs.Source)
- type DestinationClient
- type DestinationExampleConfigOptions
- type DestinationNewExecutionClientFunc
- type DestinationOption
- type DestinationPlugin
- func (p *DestinationPlugin) ExampleConfig(opts DestinationExampleConfigOptions) (string, error)
- func (p *DestinationPlugin) Initialize(ctx context.Context, spec specs.Destination) error
- func (p *DestinationPlugin) Migrate(ctx context.Context, tables schema.Tables) error
- func (p *DestinationPlugin) Name() string
- func (p *DestinationPlugin) SetLogger(logger zerolog.Logger)
- func (p *DestinationPlugin) Version() string
- func (p *DestinationPlugin) Write(ctx context.Context, table string, data map[string]interface{}) error
- type ResourceTestCase
- type SourceExampleConfigOptions
- type SourceNewExecutionClientFunc
- type SourceOption
- type SourcePlugin
- func (p *SourcePlugin) ExampleConfig(opts SourceExampleConfigOptions) (string, error)
- func (p *SourcePlugin) Name() string
- func (p *SourcePlugin) SetLogger(log zerolog.Logger)
- func (p *SourcePlugin) Sync(ctx context.Context, spec specs.Source, res chan<- *schema.Resource) error
- func (p *SourcePlugin) Tables() schema.Tables
- func (p *SourcePlugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestSourcePluginSync ¶ added in v0.0.4
func TestSourcePluginSync(t *testing.T, plugin *SourcePlugin, spec specs.Source)
Types ¶
type DestinationClient ¶ added in v0.2.3
type DestinationExampleConfigOptions ¶ added in v0.2.3
DestinationExampleConfigOptions can be used to override default example values.
type DestinationNewExecutionClientFunc ¶ added in v0.2.3
type DestinationNewExecutionClientFunc func(context.Context, zerolog.Logger, specs.Destination) (DestinationClient, error)
type DestinationOption ¶ added in v0.2.3
type DestinationOption func(*DestinationPlugin)
func WithDestinationExampleConfig ¶ added in v0.2.3
func WithDestinationExampleConfig(exampleConfig string) DestinationOption
WithDestinationExampleConfig sets an example config to user. It should only contain the inner "spec" part of a destination config. In other words, only the part specific to each destination plugin. The standard destination plugin config should not be included.
func WithDestinationLogger ¶ added in v0.2.3
func WithDestinationLogger(logger zerolog.Logger) DestinationOption
type DestinationPlugin ¶
type DestinationPlugin struct {
// contains filtered or unexported fields
}
DestinationPlugin is the base structure required by calls to serve.Serve.
func NewDestinationPlugin ¶ added in v0.2.3
func NewDestinationPlugin(name string, version string, newExecutionClient DestinationNewExecutionClientFunc, opts ...DestinationOption) *DestinationPlugin
func (*DestinationPlugin) ExampleConfig ¶ added in v0.0.4
func (p *DestinationPlugin) ExampleConfig(opts DestinationExampleConfigOptions) (string, error)
ExampleConfig returns a full example yaml config for the plugin.
func (*DestinationPlugin) Initialize ¶ added in v0.0.4
func (p *DestinationPlugin) Initialize(ctx context.Context, spec specs.Destination) error
func (*DestinationPlugin) Name ¶ added in v0.0.4
func (p *DestinationPlugin) Name() string
func (*DestinationPlugin) SetLogger ¶ added in v0.0.4
func (p *DestinationPlugin) SetLogger(logger zerolog.Logger)
func (*DestinationPlugin) Version ¶ added in v0.0.4
func (p *DestinationPlugin) Version() string
type ResourceTestCase ¶
type ResourceTestCase struct { Plugin *SourcePlugin Spec specs.Source // ParallelFetchingLimit limits parallel resources fetch at a time ParallelFetchingLimit uint64 // SkipIgnoreInTest flag which detects if schema.Table or schema.Column should be ignored SkipIgnoreInTest bool }
type SourceExampleConfigOptions ¶ added in v0.2.3
SourceExampleConfigOptions can be used to override default example values.
type SourceNewExecutionClientFunc ¶ added in v0.0.4
type SourceOption ¶ added in v0.0.4
type SourceOption func(*SourcePlugin)
func WithSourceExampleConfig ¶ added in v0.0.4
func WithSourceExampleConfig(exampleConfig string) SourceOption
func WithSourceLogger ¶ added in v0.0.4
func WithSourceLogger(logger zerolog.Logger) SourceOption
type SourcePlugin ¶
type SourcePlugin struct {
// contains filtered or unexported fields
}
SourcePlugin is the base structure required by calls to serve.Serve. We take a declarative approach to API here, similar to Cobra.
func NewSourcePlugin ¶ added in v0.0.4
func NewSourcePlugin(name string, version string, tables []*schema.Table, newExecutionClient SourceNewExecutionClientFunc, opts ...SourceOption) *SourcePlugin
func (*SourcePlugin) ExampleConfig ¶
func (p *SourcePlugin) ExampleConfig(opts SourceExampleConfigOptions) (string, error)
func (*SourcePlugin) Name ¶
func (p *SourcePlugin) Name() string
func (*SourcePlugin) SetLogger ¶ added in v0.0.4
func (p *SourcePlugin) SetLogger(log zerolog.Logger)
func (*SourcePlugin) Sync ¶ added in v0.0.4
func (p *SourcePlugin) Sync(ctx context.Context, spec specs.Source, res chan<- *schema.Resource) error
Sync data from source to the given channel
func (*SourcePlugin) Tables ¶
func (p *SourcePlugin) Tables() schema.Tables
func (*SourcePlugin) Version ¶
func (p *SourcePlugin) Version() string