Documentation
¶
Overview ¶
Package data_source provides the tooling to build the Raito data source import file. Simply use the NewDataSourceFileCreator function by passing in the config coming from the CLI to create the necessary file(s). The returned DataSourceFileCreator can then be used (using the AddDataObjects function) to write DataObjects to the file. Make sure to call the Close function on the creator at the end (tip: use defer).
Index ¶
Constants ¶
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" )
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 DataObject ¶
type DataObject struct { ExternalId string `json:"externalId"` Name string `json:"name"` FullName string `json:"fullName"` Type string `json:"type"` Description string `json:"description"` ParentExternalId string `json:"parentExternalId"` Tags map[string]interface{} `json:"tags"` }
DataObject represents a data object in the format that is suitable to be imported into a Raito data source.
type DataObjectReference ¶ added in v0.6.0
type DataObjectReference struct { FullName string `json:"fullName" yaml:"fullName"` Type string `json:"type" yaml:"type"` }
DataObjectReference represents the reference to a DataObject suitable for e.g. defining the What in Access Provider import
type DataObjectType ¶ added in v0.15.0
type DataObjectTypePermission ¶ added in v0.15.0
type DataSourceDetails ¶ added in v0.12.0
type DataSourceDetails struct {
// contains filtered or unexported fields
}
DataSourceDetails is a helper to abstract this from the plugin and just expose some setters. The import file creator then automatically prepends the import file with this DataObject
func (*DataSourceDetails) SetDescription ¶ added in v0.12.0
func (d *DataSourceDetails) SetDescription(desc string)
func (*DataSourceDetails) SetFullname ¶ added in v0.12.0
func (d *DataSourceDetails) SetFullname(name string)
func (*DataSourceDetails) SetName ¶ added in v0.12.0
func (d *DataSourceDetails) SetName(name string)
type DataSourceFileCreator ¶
type DataSourceFileCreator interface { AddDataObjects(dataObjects []DataObject) error Close() GetDataObjectCount() int GetDataSourceDetails() *DataSourceDetails }
DataSourceFileCreator describes the interface for easily creating the data object import files to be imported by the Raito CLI. Use GetDataSourceDetails() to access DataSourceDetails setters like SetAvailablePermission()
func NewDataSourceFileCreator ¶
func NewDataSourceFileCreator(config *DataSourceSyncConfig) (DataSourceFileCreator, error)
NewDataSourceFileCreator creates a new DataSourceFileCreator based on the configuration coming from the Raito CLI.
type DataSourceSyncConfig ¶ added in v0.15.0
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 ¶ added in v0.15.0
type DataSourceSyncResult struct {
Error *error2.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 ¶ added in v0.15.0
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 ¶ added in v0.15.0
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 ¶ added in v0.15.0
func (DataSourceSyncerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*DataSourceSyncerPlugin) Server ¶ added in v0.15.0
func (p *DataSourceSyncerPlugin) Server(*plugin.MuxBroker) (interface{}, error)