Documentation ¶
Index ¶
- Constants
- func ContainsEngine(needle string, data []*common.InstallationMapping) bool
- func CreateExportFileName(prefix, suffix, extension string, now time.Time) string
- func GetOptions() []string
- func NewJSONDataSource(obj interface{}) func() ([]byte, error)
- func TransformEngineServers(servers []*rest.EngineServer) []*common.InstallationMapping
- func TransformSamlTeamMappings(samlTeamMappings []*rest.SamlTeamMapping, options TransformOptions) []*rest.SamlTeamMapping
- func TransformScanReport(xml []byte, options TransformOptions) ([]byte, error)
- func TransformTeams(teams []*rest.Team, options TransformOptions) []*rest.Team
- func TransformUsers(users []*rest.User, teams []*rest.Team, options TransformOptions) []*rest.User
- func TransformXMLInstallationMappings(installationMappings *soap.GetInstallationSettingsResponse) []*common.InstallationMapping
- type Export
- func (e *Export) AddFile(fileName string, data []byte) error
- func (e *Export) AddFileWithDataSource(fileName string, dataSource func() ([]byte, error)) error
- func (e *Export) Clean() error
- func (e *Export) CreateDir(dirName string) error
- func (e *Export) CreateExportPackage(prefix, outputPath string) (string, string, error)
- func (e *Export) GetTmpDir() string
- type Exporter
- type TransformOptions
Constants ¶
const ( // UsersFileName name of the file with user info UsersFileName = "users.json" // RolesFileName name of the file with roles info RolesFileName = "roles.json" // LdapServersFileName name of the file with ldap servers LdapServersFileName = "ldap_servers.json" // LdapRoleMappingsFileName name of the file with ldap role mapping LdapRoleMappingsFileName = "ldap_role_mappings.json" // LdapTeamMappingsFileName name of the file with ldap team mappingj LdapTeamMappingsFileName = "ldap_team_mappings.json" // SamlIdpFileName name of the file about saml idp SamlIdpFileName = "saml_identity_providers.json" // SamlRoleMappingsFileName saml roles mapping file SamlRoleMappingsFileName = "saml_role_mappings.json" // SamlTeamMappingsFileName salm teams mapping file SamlTeamMappingsFileName = "saml_team_mappings.json" // TeamsFileName teams file TeamsFileName = "teams.json" // ProjectsFileName projects file ProjectsFileName = "projects.json" // QueriesFileName queries file QueriesFileName = "queries.xml" // PresetsDirName presets directory name PresetsDirName = "presets" // PresetsFileName presets file PresetsFileName = "presets.json" // InstallationFileName file InstallationFileName = "installation.json" // ResultsMappingFileName file ResultsMappingFileName = "results_mapping.csv" // DateTimeFormat the formal to use for DT DateTimeFormat = "2006-01-02-15-04-05" )
const ( // UsersOption represent users UsersOption = "users" // TeamsOption represent teams (groups) TeamsOption = "teams" // ResultsOption represent results (projects & data) ResultsOption = "triage" // ProjectsOption represent projects ProjectsOption = "projects" // QueriesOption represent custom queries QueriesOption = "queries" // PresetsOption represent presets PresetsOption = "presets" )
const (
InstallationEngineServiceName = "Checkmarx Engine Service"
)
Variables ¶
This section is empty.
Functions ¶
func ContainsEngine ¶ added in v1.2.0
func ContainsEngine(needle string, data []*common.InstallationMapping) bool
ContainsEngine returns true if already exists object filtered by name.
func CreateExportFileName ¶
CreateExportFileName creates a file name with the format: {prefix}-yyyy-mm-dd-HH-MM-SS.{extension}
func GetOptions ¶
func GetOptions() []string
func NewJSONDataSource ¶ added in v1.0.3
func TransformEngineServers ¶ added in v1.2.0
func TransformEngineServers(servers []*rest.EngineServer) []*common.InstallationMapping
TransformEngineServers just for SAST distributed architecture just for 9.4 or higher.
func TransformSamlTeamMappings ¶ added in v1.0.3
func TransformSamlTeamMappings(samlTeamMappings []*rest.SamlTeamMapping, options TransformOptions) []*rest.SamlTeamMapping
TransformSamlTeamMappings updates team mapping in the context of flatten teams.
func TransformScanReport ¶ added in v1.0.3
func TransformScanReport(xml []byte, options TransformOptions) ([]byte, error)
TransformScanReport updates scan report in context of flatten teams.
func TransformTeams ¶ added in v1.0.3
func TransformTeams(teams []*rest.Team, options TransformOptions) []*rest.Team
TransformTeams flattens teams.
func TransformUsers ¶ added in v1.0.3
TransformUsers reassigns users in the context of flatten teams. Note "teams" list passed must be the original, non-flattened, list
func TransformXMLInstallationMappings ¶ added in v1.2.0
func TransformXMLInstallationMappings(installationMappings *soap.GetInstallationSettingsResponse) []*common.InstallationMapping
TransformXMLInstallationMappings updates installation mapping.
Types ¶
type Export ¶
type Export struct {
// contains filtered or unexported fields
}
func CreateExport ¶
CreateExport creates ExportProducer structure and temporary directory The caller is responsible for calling the Export.Clear function when it's done with the ExportProducer
func (*Export) AddFile ¶
AddFile creates a file with the specified name and content in ExportProducer's temporary directory.
func (*Export) AddFileWithDataSource ¶
AddFileWithDataSource creates the specified file with content provided by dataSource
func (*Export) CreateExportPackage ¶
CreateExportPackage compresses and encrypts all files added so far
type TransformOptions ¶ added in v1.2.0
type TransformOptions struct {
NestedTeams bool
}