conduit

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaPlugin     = "kafka"
	GeneratorPlugin = "generator"
	S3Plugin        = "s3"
	PostgresPlugin  = "postgres"
	LogPlugin       = "log"
)

Variables

View Source
var HTTPClient httpClient = http.DefaultClient

Functions

func GetHTTPResps

func GetHTTPResps(t *testing.T) map[string]func(*http.Request) (*http.Response, error)

func SetupHTTPMockClient

func SetupHTTPMockClient(t *testing.T) *mock.MockhttpClient

func ValidatePlugin

func ValidatePlugin(name string) error

ValidatePlugin returns an error when the plugin name is not one of allowed Conduit built-in plugins or in one of the allowed GitHub organizations.

func ValidatePluginType

func ValidatePluginType(t string) error

func WithConnectorsPath

func WithConnectorsPath(path string) func(*Args)

func WithDBPath

func WithDBPath(path string) func(*Args)

func WithLogFormat

func WithLogFormat(format string) func(*Args)

func WithPipelineFile

func WithPipelineFile(file string) func(*Args)

func WithProcessorsPath

func WithProcessorsPath(path string) func(*Args)

Types

type Args

type Args struct {
	PipelineFile   string
	ConnectorsPath string
	DBPath         string
	ProcessorsPath string
	LogFormat      string
}

type ConnectorInfo

type ConnectorInfo struct {
	Name     string     `json:"name_with_owner"`
	URL      string     `json:"url"`
	Releases []Releases `json:"releases"`
}

type Flags

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

func NewFlags

func NewFlags(fns ...func(*Args)) *Flags

func (*Flags) ForVersion

func (f *Flags) ForVersion(ver string) ([]string, error)

type PluginInfo

type PluginInfo struct {
	Name    string
	Org     string
	URL     string
	Version string
}

type PluginRegistry added in v0.0.13

type PluginRegistry interface {
	Register(ctx context.Context, path string) (plugin.FullName, error)
}

type Releases

type Releases struct {
	Name   string `json:"name"`
	Latest bool   `json:"is_latest"`
}

type Validator

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

func NewValidator

func NewValidator(ctx context.Context, cl client.Client, log logr.Logger) *Validator

func (*Validator) ValidateConnector

func (v *Validator) ValidateConnector(ctx context.Context, c *v1alpha.ConduitConnector, fp *field.Path) *field.Error

func (*Validator) ValidateProcessor added in v0.0.13

func (v *Validator) ValidateProcessor(ctx context.Context, p *v1alpha.ConduitProcessor, reg PluginRegistry, fp *field.Path) *field.Error

type ValidatorService

type ValidatorService interface {
	ValidateConnector(ctx context.Context, c *v1alpha.ConduitConnector, fp *field.Path) *field.Error
	ValidateProcessor(ctx context.Context, p *v1alpha.ConduitProcessor, r PluginRegistry, fp *field.Path) *field.Error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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