Help us shape the future of Go! Take the 2026 Go Developer Survey

specs

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: MPL-2.0 Imports: 7 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSourceSpecDefault added in v0.0.3

func SetSourceSpecDefault(s *SourceSpec)

func ValidateSpec

func ValidateSpec(schema string, spec interface{}) (*gojsonschema.Result, error)

Types

type ConnectionSpec

type ConnectionSpec struct {
	Source      string `yaml:"source"`
	Destination string `yaml:"destination"`
}

type DestinationSpec

type DestinationSpec struct {
	Name     string    `yaml:"name"`
	Version  string    `yaml:"version"`
	Path     string    `yaml:"path"`
	Registry string    `yaml:"registry"`
	Spec     yaml.Node `yaml:"spec"`
}

type SourceSpec

type SourceSpec struct {
	Name    string `json:"name" yaml:"name"`
	Version string `json:"version" yaml:"version"`
	// Path is the path in the registry
	Path string `json:"path" yaml:"path"`
	// Registry can be github,local,grpc. Might support things like https in the future.
	Registry      string   `json:"registry" yaml:"registry"`
	MaxGoRoutines uint64   `json:"max_goroutines" yaml:"max_goroutines"`
	Tables        []string `json:"tables" yaml:"tables"`
	SkipTables    []string `json:"skip_tables" yaml:"skip_tables"`
}

SourceSpec is the shared configuration for all source plugins

func (*SourceSpec) UnmarshalYAML

func (s *SourceSpec) UnmarshalYAML(n *yaml.Node) error

type Spec

type Spec struct {
	Kind string      `yaml:"kind"`
	Spec interface{} `yaml:"-"`
}

func (*Spec) UnmarshalYAML

func (s *Spec) UnmarshalYAML(n *yaml.Node) error

type SpecReader

type SpecReader struct {
	// contains filtered or unexported fields
}

func NewSpecReader

func NewSpecReader(directory string) (*SpecReader, error)

func (*SpecReader) Connections

func (s *SpecReader) Connections() []ConnectionSpec

func (*SpecReader) GetConnectionByName

func (s *SpecReader) GetConnectionByName(name string) ConnectionSpec

func (*SpecReader) GetDestinatinoByName

func (s *SpecReader) GetDestinatinoByName(name string) DestinationSpec

func (*SpecReader) GetSourceByName

func (s *SpecReader) GetSourceByName(name string) SourceSpec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL