connection_config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginPath

func GetPluginPath(remoteSchema string) (string, error)

func PluginFQNToSchemaName

func PluginFQNToSchemaName(pluginFQN string) string

schemas in postgres are limited to 63 chars - the FQN may be longer than this, in which case trim the length and add a hash to the end to make unique

func SaveConnectionState

func SaveConnectionState(state ConnectionMap) error

Types

type Connection

type Connection struct {
	Name   string
	Plugin string
	Config map[string]string
}

func NewConnection

func NewConnection() *Connection

type ConnectionConfig

type ConnectionConfig struct {
	Connections map[string]*Connection
}

func Load

func Load() (*ConnectionConfig, error)

type ConnectionMap

type ConnectionMap map[string]*installedPlugin

func GetConnectionState

func GetConnectionState(schemas []string) (ConnectionMap, error)

GetConnectionState :: load connection state file, and remove any connections which do not exist in the db

type ConnectionPlugin

type ConnectionPlugin struct {
	ConnectionName string
	PluginName     string
	Plugin         *grpc.PluginClient
	Schema         *proto.Schema
}

func CreateConnectionPlugin

func CreateConnectionPlugin(options *ConnectionPluginOptions) (*ConnectionPlugin, error)

type ConnectionPluginOptions

type ConnectionPluginOptions struct {
	PluginFQN      string
	ConnectionName string
	DisableLogger  bool
}

type ConnectionUpdates

type ConnectionUpdates struct {
	Update         ConnectionMap
	Delete         ConnectionMap
	MissingPlugins []string
	// the connections which will exist after the update
	RequiredConnections ConnectionMap
}

func GetConnectionsToUpdate

func GetConnectionsToUpdate(schemas []string) (*ConnectionUpdates, error)

GetConnectionsToUpdate :: returns updates to be made to the database to sync with connection config

Jump to

Keyboard shortcuts

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