Documentation ¶
Overview ¶
Package specs specs for source and destination plugins including parsers and readers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpecUnmarshalYamlStrict ¶ added in v0.0.4
func UnmarshalJSONStrict ¶ added in v0.5.0
func ValidateSpec ¶
func ValidateSpec(schema string, spec interface{}) (*gojsonschema.Result, error)
Types ¶
type Destination ¶ added in v0.0.4
type Destination struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Path string `json:"path,omitempty"` Registry Registry `json:"registry,omitempty"` WriteMode WriteMode `json:"write_mode,omitempty"` Spec interface{} `json:"spec,omitempty"` }
func (*Destination) SetDefaults ¶ added in v0.0.4
func (d *Destination) SetDefaults()
func (*Destination) UnmarshalSpec ¶ added in v0.0.4
func (d *Destination) UnmarshalSpec(out interface{}) error
func (*Destination) Validate ¶ added in v0.9.2
func (d *Destination) Validate() error
type Kind ¶ added in v0.0.4
type Kind int
func KindFromString ¶ added in v0.0.4
func (Kind) MarshalJSON ¶ added in v0.0.4
func (*Kind) UnmarshalJSON ¶ added in v0.0.4
type Registry ¶ added in v0.0.4
type Registry int
func RegistryFromString ¶ added in v0.0.4
func (Registry) MarshalJSON ¶ added in v0.0.4
func (*Registry) UnmarshalJSON ¶ added in v0.0.4
type Source ¶ added in v0.0.4
type Source struct { // Name of the source plugin to use Name string `json:"name,omitempty"` // Version of the source plugin to use Version string `json:"version,omitempty"` // Path is the canonical path to the source plugin in a given registry // For example: // in github the path will be: org/repo // For the local registry the path will be the path to the binary: ./path/to/binary // For the gRPC registry the path will be the address of the gRPC server: host:port Path string `json:"path,omitempty"` // Registry can be github,local,grpc. Registry Registry `json:"registry,omitempty"` TableConcurrency uint64 `json:"table_concurrency,omitempty"` ResourceConcurrency uint64 `json:"resource_concurrency,omitempty"` // Tables to sync from the source plugin Tables []string `json:"tables,omitempty"` // SkipTables defines tables to skip when syncing data. Useful if a glob pattern is used in Tables SkipTables []string `json:"skip_tables,omitempty"` // Destinations are the names of destination plugins to send sync data to Destinations []string `json:"destinations,omitempty"` // Spec defines plugin specific configuration // This is different in every source plugin. Spec interface{} `json:"spec,omitempty"` }
Source is the spec for a source plugin
func (*Source) SetDefaults ¶ added in v0.0.4
func (s *Source) SetDefaults()
func (*Source) UnmarshalSpec ¶ added in v0.0.4
UnmarshalSpec unmarshals the internal spec into the given interface
type Spec ¶
type Spec struct { Kind Kind `json:"kind"` Spec interface{} `json:"spec"` }
func (*Spec) UnmarshalJSON ¶ added in v0.0.4
type SpecReader ¶
type SpecReader struct { Sources map[string]*Source Destinations map[string]*Destination }
func NewSpecReader ¶
func NewSpecReader(paths []string) (*SpecReader, error)
type WriteMode ¶ added in v0.0.4
type WriteMode int
func WriteModeFromString ¶ added in v0.0.4
func (WriteMode) MarshalJSON ¶ added in v0.0.4
func (*WriteMode) UnmarshalJSON ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.