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 ¶
- type DataObject
- type DataObjectReference
- type DataSourceDetails
- func (d *DataSourceDetails) AddAvailablePermission(permission string)
- func (d *DataSourceDetails) SetAvailablePermissions(permissions []string)
- func (d *DataSourceDetails) SetDescription(desc string)
- func (d *DataSourceDetails) SetFullname(name string)
- func (d *DataSourceDetails) SetName(name string)
- type DataSourceFileCreator
Constants ¶
This section is empty.
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"` AvailablePermissions []string `json:"availablePermissions"` }
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
DataObjectReference represents the reference to a DataObject suitable for e.g. defining the What in Access Provider import
type DataSourceDetails ¶ added in v0.12.0
type DataSourceDetails struct {
// contains filtered or unexported fields
}
To handle availablePermissions on Data Source level correctly, we need to import a DataObject of type datasource. 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) AddAvailablePermission ¶ added in v0.12.0
func (d *DataSourceDetails) AddAvailablePermission(permission string)
func (*DataSourceDetails) SetAvailablePermissions ¶ added in v0.12.0
func (d *DataSourceDetails) SetAvailablePermissions(permissions []string)
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 *data_source.DataSourceSyncConfig) (DataSourceFileCreator, error)
NewDataSourceFileCreator creates a new DataSourceFileCreator based on the configuration coming from the Raito CLI.