data_source

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package data_source contains the API for the data source syncer.

Index

Constants

View Source
const (
	/*
		Data Source features
	*/
	ColumnMasking   = "columnMasking"
	RowFiltering    = "rowFiltering"
	ColumnFiltering = "columnFiltering"

	/*
		The list of standard Data Object Types
	*/
	Datasource = "datasource"
	Database   = "database"
	Schema     = "schema"
	Table      = "table"
	View       = "view"
	Column     = "column"
	Dataset    = "dataset"

	/*
		The list of global permissions
	*/
	Write = "write"
	Read  = "read"
)
View Source
const DataSourceSyncerName = "dataSourceSyncer"

DataSourceSyncerName constant should not be used directly when implementing plugins. It's the registration name for the data source syncer plugin, used by the CLI and the cli-plugin-base library (RegisterPlugins function) to register the plugins.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataObjectType added in v0.10.0

type DataObjectType struct {
	Name        string                     `json:"name"`
	Type        string                     `json:"type"`
	Label       string                     `json:"label"`
	Icon        string                     `json:"icon"`
	Permissions []DataObjectTypePermission `json:"permissions"`
	Children    []string                   `json:"children"`
}

type DataObjectTypePermission added in v0.10.0

type DataObjectTypePermission struct {
	Permission        string   `json:"permission"`
	GlobalPermissions []string `json:"globalPermissions,omitempty"`
	Description       string   `json:"description"`
}

type DataSourceSyncConfig

type DataSourceSyncConfig struct {
	config.ConfigMap
	TargetFile   string
	DataSourceId string
}

DataSourceSyncConfig represents the configuration that is passed from the CLI to the DataAccessSyncer plugin interface. It contains all the necessary configuration parameters for the plugin to function.

type DataSourceSyncResult

type DataSourceSyncResult struct {
	Error *api.ErrorResult
}

DataSourceSyncResult represents the result from the data source sync process. A potential error is also modeled in here so specific errors remain intact when passed over RPC.

type DataSourceSyncer

type DataSourceSyncer interface {
	SyncDataSource(config *DataSourceSyncConfig) DataSourceSyncResult
	GetMetaData() MetaData
}

DataSourceSyncer interface needs to be implemented by any plugin that wants to import data objects into a Raito data source.

type DataSourceSyncerPlugin

type DataSourceSyncerPlugin struct {
	Impl DataSourceSyncer
}

DataSourceSyncerPlugin is used on the server (CLI) and client (plugin) side to integrate with the plugin system. A plugin should not be using this directly, but instead depend on the cli-plugin-base library to register the plugins.

func (DataSourceSyncerPlugin) Client

func (DataSourceSyncerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*DataSourceSyncerPlugin) Server

func (p *DataSourceSyncerPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type MetaData added in v0.10.0

type MetaData struct {
	DataObjectTypes   []DataObjectType `json:"dataObjectTypes"`
	SupportedFeatures []string         `json:"supportedFeatures"`
	Type              string           `json:"type"`
	Icon              string           `json:"icon"`
}

Jump to

Keyboard shortcuts

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