Documentation
¶
Index ¶
- func GetAllDefaultClassAndTags() ([]*Tag, []*Class, error)
- type CScan
- type Class
- type DpDataSource
- type DpDbColumn
- type DpDbDatabase
- type DpDbTable
- type DpSensitiveDataElementTag
- type InternalStorage
- func (insto InternalStorage) AddClass(description string, rule string, class string) error
- func (into InternalStorage) AddDataSource(dpDataSource DpDataSource) (int64, error)
- func (insto InternalStorage) AddTag(name string, description string, rules []string) error
- func (into InternalStorage) ApplyPolicy(dsname string, ids []int64) error
- func (into InternalStorage) DeleteClasses(ids []int64) (bool, error)
- func (into InternalStorage) DeleteDataSources(ids []int64) (bool, error)
- func (into InternalStorage) DeleteTags(ids []int64) (bool, error)
- func (insto InternalStorage) GetAssociatedClasses(rule string) ([]Class, error)
- func (insto InternalStorage) GetAssociatedTags(class string) ([]Tag, error)
- func (insto InternalStorage) GetClasses() ([]Class, error)
- func (into InternalStorage) GetDataSource(dsname string) (DpDataSource, error)
- func (into InternalStorage) GetDataSources() ([]DpDataSource, error)
- func (into InternalStorage) GetRecommendedPolicy(dsname string) ([]RecommendedPolicy, error)
- func (insto InternalStorage) GetScanLog(ds string, db string, table string, columns []string) ([]CScan, error)
- func (into InternalStorage) GetStatus(dsname string) (string, error)
- func (insto InternalStorage) GetTags() ([]Tag, error)
- func (into InternalStorage) InsertDefaultData(tags []*Tag, classes []*Class) error
- func (into InternalStorage) Scan(dsname string) error
- func (into InternalStorage) SetSchemaData(dpDbDatabase DpDbDatabase) error
- func (insto InternalStorage) UpdateDSStatus(dsid int64, statusid int64) error
- type RecommendedPolicy
- type ScanDto
- type SensitiveDataElement
- type SensitiveElementTag
- type SensitiveElementTags
- type Storage
- type StorageConfig
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DpDataSource ¶
type DpDataSource struct {
ID int `json:"id"`
Datadomain string `json:"Datadomain"`
Dsname string `json:"Dsname"`
Dsdecription string `json:"Dsdecription"`
Dstype string `json:"Dstype"`
DsKey string `json:"DsKey"`
Dsversion string `json:"Dsversion"`
Host string `json:"Host"`
Port string `json:"Port"`
User string `json:"User"`
Password string `json:"Password"`
CreatedAt string `json:"CreatedAt"`
}
type DpDbColumn ¶
type DpDbDatabase ¶
type DpDbTable ¶
type DpDbTable struct {
Name string `json:"Name"`
Tags string `json:"Tags"`
DpDbColumns []DpDbColumn `json:"DpDbColumns"`
}
type InternalStorage ¶
func NewInternalStorage ¶
func NewInternalStorage(dsn string) (InternalStorage, error)
func (InternalStorage) AddClass ¶
func (insto InternalStorage) AddClass(description string, rule string, class string) error
func (InternalStorage) AddDataSource ¶
func (into InternalStorage) AddDataSource(dpDataSource DpDataSource) (int64, error)
func (InternalStorage) AddTag ¶
func (insto InternalStorage) AddTag(name string, description string, rules []string) error
func (InternalStorage) ApplyPolicy ¶
func (into InternalStorage) ApplyPolicy(dsname string, ids []int64) error
func (InternalStorage) DeleteClasses ¶
func (into InternalStorage) DeleteClasses(ids []int64) (bool, error)
func (InternalStorage) DeleteDataSources ¶
func (into InternalStorage) DeleteDataSources(ids []int64) (bool, error)
func (InternalStorage) DeleteTags ¶
func (into InternalStorage) DeleteTags(ids []int64) (bool, error)
func (InternalStorage) GetAssociatedClasses ¶
func (insto InternalStorage) GetAssociatedClasses(rule string) ([]Class, error)
func (InternalStorage) GetAssociatedTags ¶
func (insto InternalStorage) GetAssociatedTags(class string) ([]Tag, error)
func (InternalStorage) GetClasses ¶
func (insto InternalStorage) GetClasses() ([]Class, error)
func (InternalStorage) GetDataSource ¶
func (into InternalStorage) GetDataSource(dsname string) (DpDataSource, error)
func (InternalStorage) GetDataSources ¶
func (into InternalStorage) GetDataSources() ([]DpDataSource, error)
func (InternalStorage) GetRecommendedPolicy ¶
func (into InternalStorage) GetRecommendedPolicy(dsname string) ([]RecommendedPolicy, error)
func (InternalStorage) GetScanLog ¶
func (InternalStorage) GetStatus ¶
func (into InternalStorage) GetStatus(dsname string) (string, error)
func (InternalStorage) GetTags ¶
func (insto InternalStorage) GetTags() ([]Tag, error)
func (InternalStorage) InsertDefaultData ¶
func (into InternalStorage) InsertDefaultData(tags []*Tag, classes []*Class) error
func (InternalStorage) Scan ¶
func (into InternalStorage) Scan(dsname string) error
func (InternalStorage) SetSchemaData ¶
func (into InternalStorage) SetSchemaData(dpDbDatabase DpDbDatabase) error
func (InternalStorage) UpdateDSStatus ¶
func (insto InternalStorage) UpdateDSStatus(dsid int64, statusid int64) error
type RecommendedPolicy ¶
type SensitiveDataElement ¶
type SensitiveDataElement struct {
ID int `json:"id" gorm:"primary_key"`
WorkspaceID int `json:"workspace_id"`
DpDbColumn string `json:"dp_db_column"`
ElementID int `json:"element_id"`
DeletedAt time.Time `json:"deleted_at"`
SensitivityClass string `json:"sensitivity_class"`
SensitiveDataElementTag []DpSensitiveDataElementTag `gorm:"foreignKey:SensitiveDataElementID;references:ID" json:"sensitive_data_element_tag"`
}
type SensitiveElementTag ¶
type SensitiveElementTag struct {
SensitiveElementTags []SensitiveElementTags `json:"sensitive_data_element"`
}
type SensitiveElementTags ¶
type Storage ¶
type Storage interface {
GetClasses() ([]Class, error)
AddClass(string, string, string) error
DeleteClasses(ids []int64) (bool, error)
GetTags() ([]Tag, error)
AddTag(string, string, []string) error
DeleteTags(ids []int64) (bool, error)
GetAssociatedTags(string) ([]Tag, error)
GetAssociatedClasses(string) ([]Class, error)
SetSchemaData(DpDbDatabase) error
AddDataSource(DpDataSource) (int64, error)
GetDataSources() ([]DpDataSource, error)
DeleteDataSources(ids []int64) (bool, error)
Scan(dsname string) error
GetStatus(dsname string) (string, error)
GetRecommendedPolicy(dsname string) ([]RecommendedPolicy, error)
ApplyPolicy(dsname string, ids []int64) error
GetDataSource(dsname string) (DpDataSource, error)
GetScanLog(ds string, db string, table string, columns []string) ([]CScan, error)
UpdateDSStatus(dsid int64, statusid int64) error
}
func GetStorageInstance ¶
func New ¶
func New(config StorageConfig) (Storage, error)
type StorageConfig ¶
Click to show internal directories.
Click to hide internal directories.