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

connector

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// DATABASE the database connector (mysql, pgsql, oracle, sqlite ... )
	DATABASE = iota + 1

	// REDIS the redis connector
	REDIS

	// MONGO the mongodb connector
	MONGO

	// ELASTICSEARCH the elasticsearch connector
	ELASTICSEARCH

	// KAFKA the kafka connector
	KAFKA

	// SCRIPT ? the script connector ( difference with widget ?)
	SCRIPT
)

Variables

View Source
var Connectors = map[string]Connector{}

Connectors the loaded connectors

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Register(id string, dsl []byte) error
	ID() string
	Is(int) bool
}

Connector the connector interface

func Load

func Load(source string, id string) (Connector, error)

Load a connector from source

func Select

func Select(id string) (Connector, error)

Select a connector

type DSL

type DSL struct {
	ID      string                 `json:"-"`
	Type    string                 `json:"type"`
	Name    string                 `json:"name,omitempty"`
	Label   string                 `json:"label,omitempty"`
	Version string                 `json:"version,omitempty"`
	Options map[string]interface{} `json:"options,omitempty"`
}

DSL the connector DSL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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