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
- type DataObject
- type DataObjectReference
- type DataObjectType
- type DataObjectTypePermission
- type DataSourceDetails
- type DataSourceFileCreator
- type DataSourceSyncConfig
- type DataSourceSyncResult
- type DataSourceSyncer
- type DataSourceSyncerPlugin
- type GlobalPermission
- type GlobalPermissionSet
- func CreateGlobalPermissionSet(permissions ...GlobalPermission) GlobalPermissionSet
- func DeleteGlobalPermission() GlobalPermissionSet
- func InsertGlobalPermission() GlobalPermissionSet
- func JoinGlobalPermissionsSets(sets ...GlobalPermissionSet) GlobalPermissionSet
- func ReadGlobalPermission() GlobalPermissionSet
- func UpdateGlobalPermission() GlobalPermissionSet
- func WriteGlobalPermission() GlobalPermissionSet
- type MetaData
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" Bucket = "bucket" Object = "object" Folder = "folder" File = "file" )
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 DataObjectTypePermission struct { Permission string `json:"permission"` GlobalPermissions GlobalPermissionSet `json:"globalPermissions,omitempty"` Description string `json:"description"` Action []string `json:"action,omitempty"` }
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 SetDataSourceName(name string) SetDataSourceFullname(name string) SetDataSourceDescription(desc string) 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 GetDataSourceMetaData() 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)
type GlobalPermission ¶ added in v0.31.0
type GlobalPermission string
type GlobalPermissionSet ¶ added in v0.31.0
type GlobalPermissionSet map[GlobalPermission]struct{}
func CreateGlobalPermissionSet ¶ added in v0.31.0
func CreateGlobalPermissionSet(permissions ...GlobalPermission) GlobalPermissionSet
func DeleteGlobalPermission ¶ added in v0.31.0
func DeleteGlobalPermission() GlobalPermissionSet
DeleteGlobalPermission Get all rights to delete data and the table
func InsertGlobalPermission ¶ added in v0.31.0
func InsertGlobalPermission() GlobalPermissionSet
InsertGlobalPermission Get rights to add data
func JoinGlobalPermissionsSets ¶ added in v0.31.0
func JoinGlobalPermissionsSets(sets ...GlobalPermissionSet) GlobalPermissionSet
func ReadGlobalPermission ¶ added in v0.31.0
func ReadGlobalPermission() GlobalPermissionSet
ReadGlobalPermission Get access to read the data
func UpdateGlobalPermission ¶ added in v0.31.0
func UpdateGlobalPermission() GlobalPermissionSet
UpdateGlobalPermission Get rights to modify data, not to delete a row
func WriteGlobalPermission ¶ added in v0.31.0
func WriteGlobalPermission() GlobalPermissionSet
WriteGlobalPermission Get all rights to (over)write data
func (GlobalPermissionSet) Append ¶ added in v0.31.0
func (s GlobalPermissionSet) Append(permission ...GlobalPermission)
func (GlobalPermissionSet) MarshalJSON ¶ added in v0.31.0
func (s GlobalPermissionSet) MarshalJSON() ([]byte, error)
func (*GlobalPermissionSet) UnmarshalJSON ¶ added in v0.31.0
func (s *GlobalPermissionSet) UnmarshalJSON(data []byte) error
func (GlobalPermissionSet) Values ¶ added in v0.31.0
func (s GlobalPermissionSet) Values() []GlobalPermission