services

package
v1.46.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	AnalyticsMetricsMinXscVersion = "1.7.1"
)
View Source
const (
	ConfigProfileMinXscVersion = "1.11.0"
)
View Source
const (
	LogErrorMinXscVersion = AnalyticsMetricsMinXscVersion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticsEventService

type AnalyticsEventService struct {
	XscDetails auth.ServiceDetails
	// contains filtered or unexported fields
}

func (*AnalyticsEventService) AddGeneralEvent

func (vs *AnalyticsEventService) AddGeneralEvent(event XscAnalyticsGeneralEvent) (string, error)

AddGeneralEvent add general event in Xsc and returns msi generated by Xsc.

func (*AnalyticsEventService) GetGeneralEvent

func (vs *AnalyticsEventService) GetGeneralEvent(msi string) (*XscAnalyticsGeneralEvent, error)

GetGeneralEvent returns event's data matching the provided multi scan id.

func (*AnalyticsEventService) GetXscDetails

func (vs *AnalyticsEventService) GetXscDetails() auth.ServiceDetails

GetXscDetails returns the Xsc details

func (*AnalyticsEventService) UpdateGeneralEvent

func (vs *AnalyticsEventService) UpdateGeneralEvent(event XscAnalyticsGeneralEventFinalize) error

UpdateGeneralEvent update finalized analytics metrics info of an existing event.

type ApplicationsScannerConfig added in v1.45.0

type ApplicationsScannerConfig struct {
	EnableApplicationsScan bool     `json:"enable_applications_scan,omitempty"`
	ExcludePatterns        []string `json:"exclude_patterns,omitempty"`
}

type ConfigProfile added in v1.45.0

type ConfigProfile struct {
	ProfileName   string        `json:"profile_name"`
	FrogbotConfig FrogbotConfig `json:"frogbot_config,omitempty"`
	Modules       []Module      `json:"modules"`
	IsDefault     bool          `json:"is_default,omitempty"`
}

type ConfigurationProfileService added in v1.45.0

type ConfigurationProfileService struct {
	XscDetails auth.ServiceDetails
	// contains filtered or unexported fields
}

func NewConfigurationProfileService added in v1.45.0

func NewConfigurationProfileService(client *jfroghttpclient.JfrogHttpClient) *ConfigurationProfileService

func (*ConfigurationProfileService) GetConfigurationProfile added in v1.45.0

func (cp *ConfigurationProfileService) GetConfigurationProfile(profileName string) (*ConfigProfile, error)

type EventStatus

type EventStatus string
const (
	Started   EventStatus = "started"
	Completed EventStatus = "completed"
	Cancelled EventStatus = "cancelled"
	Failed    EventStatus = "failed"
)

type EventType

type EventType int
const (
	CliEventType EventType = 1
	FrogbotType  EventType = 8
)

type ExternalErrorLog

type ExternalErrorLog struct {
	Log_level string `json:"log_level"`
	Source    string `json:"source"`
	Message   string `json:"message"`
}

type FrogbotConfig added in v1.45.0

type FrogbotConfig struct {
	EmailAuthor                     string `json:"email_author,omitempty"`
	AggregateFixes                  bool   `json:"aggregate_fixes,omitempty"`
	AvoidPreviousPrCommentsDeletion bool   `json:"avoid_previous_pr_comments_deletion,omitempty"`
	BranchNameTemplate              string `json:"branch_name_template,omitempty"`
	PrTitleTemplate                 string `json:"pr_title_template,omitempty"`
	PrCommentTitle                  string `json:"pr_comment_title,omitempty"`
	CommitMessageTemplate           string `json:"commit_message_template,omitempty"`
	ShowSecretsAsPrComment          bool   `json:"show_secrets_as_pr_comment,omitempty"`
}

type IacScannerConfig added in v1.45.0

type IacScannerConfig struct {
	EnableIacScan   bool     `json:"enable_iac_scan,omitempty"`
	ExcludePatterns []string `json:"exclude_patterns,omitempty"`
}

type LogErrorEventService

type LogErrorEventService struct {
	XscDetails auth.ServiceDetails
	// contains filtered or unexported fields
}

func NewLogErrorEventService

func NewLogErrorEventService(client *jfroghttpclient.JfrogHttpClient) *LogErrorEventService

func (*LogErrorEventService) SendLogErrorEvent

func (les *LogErrorEventService) SendLogErrorEvent(errorLog *ExternalErrorLog) error

type Module added in v1.45.0

type Module struct {
	ModuleId                 int32      `json:"module_id,omitempty"`
	ModuleName               string     `json:"module_name"`
	PathFromRoot             string     `json:"path_from_root"`
	ReleasesRepo             string     `json:"releases_repo,omitempty"`
	AnalyzerManagerVersion   string     `json:"analyzer_manager_version,omitempty"`
	AdditionalPathsForModule []string   `json:"additional_paths_for_module,omitempty"`
	ExcludePaths             []string   `json:"exclude_paths,omitempty"`
	ScanConfig               ScanConfig `json:"scan_config"`
	ProtectedBranches        []string   `json:"protected_branches,omitempty"`
	IncludeExcludeMode       int32      `json:"include_exclude_mode,omitempty"`
	IncludeExcludePattern    string     `json:"include_exclude_pattern,omitempty"`
	ReportAnalytics          bool       `json:"report_analytics,omitempty"`
}

type ProductName

type ProductName string
const (
	CliProduct     ProductName = "cli"
	FrogbotProduct ProductName = "frogbot"
)

type SastScannerConfig added in v1.45.0

type SastScannerConfig struct {
	EnableSastScan  bool     `json:"enable_sast_scan,omitempty"`
	Language        string   `json:"language,omitempty"`
	ExcludePatterns []string `json:"exclude_patterns,omitempty"`
	ExcludeRules    []string `json:"exclude_rules,omitempty"`
}

type ScanConfig added in v1.45.0

type ScanConfig struct {
	ScanTimeout                  int32                     `json:"scan_timeout,omitempty"`
	ExcludePattern               string                    `json:"exclude_pattern,omitempty"`
	EnableScaScan                bool                      `json:"enable_sca_scan,omitempty"`
	EnableContextualAnalysisScan bool                      `json:"enable_contextual_analysis_scan,omitempty"`
	SastScannerConfig            SastScannerConfig         `json:"sast_scanner_config,omitempty"`
	SecretsScannerConfig         SecretsScannerConfig      `json:"secrets_scanner_config,omitempty"`
	IacScannerConfig             IacScannerConfig          `json:"iac_scanner_config,omitempty"`
	ApplicationsScannerConfig    ApplicationsScannerConfig `json:"applications_scanner_config,omitempty"`
	ServicesScannerConfig        ServicesScannerConfig     `json:"services_scanner_config,omitempty"`
}

type SecretsScannerConfig added in v1.45.0

type SecretsScannerConfig struct {
	EnableSecretsScan bool     `json:"enable_secrets_scan,omitempty"`
	ExcludePatterns   []string `json:"exclude_patterns,omitempty"`
}

type ServicesScannerConfig added in v1.45.0

type ServicesScannerConfig struct {
	EnableServicesScan bool     `json:"enable_services_scan,omitempty"`
	ExcludePatterns    []string `json:"exclude_patterns,omitempty"`
}

type VersionService

type VersionService struct {
	XscDetails auth.ServiceDetails
	// contains filtered or unexported fields
}

VersionService returns the https client and Xsc details

func NewVersionService

func NewVersionService(client *jfroghttpclient.JfrogHttpClient) *VersionService

NewVersionService creates a new service to retrieve the version of Xsc

func (*VersionService) GetVersion

func (vs *VersionService) GetVersion() (string, error)

GetVersion returns the version of Xsc

func (*VersionService) GetXscDetails

func (vs *VersionService) GetXscDetails() auth.ServiceDetails

GetXscDetails returns the Xsc details

type XscAnalyticsBasicGeneralEvent

type XscAnalyticsBasicGeneralEvent struct {
	EventType              EventType   `json:"event_type,omitempty"`
	EventStatus            EventStatus `json:"event_status,omitempty"`
	Product                ProductName `json:"product,omitempty"`
	ProductVersion         string      `json:"product_version,omitempty"`
	TotalFindings          int         `json:"total_findings,omitempty"`
	TotalIgnoredFindings   int         `json:"total_ignored_findings,omitempty"`
	IsDefaultConfig        bool        `json:"is_default_config,omitempty"`
	JfrogUser              string      `json:"jfrog_user,omitempty"`
	OsPlatform             string      `json:"os_platform,omitempty"`
	OsArchitecture         string      `json:"os_architecture,omitempty"`
	MachineId              string      `json:"machine_id,omitempty"`
	AnalyzerManagerVersion string      `json:"analyzer_manager_version,omitempty"`
	JpdVersion             string      `json:"jpd_version,omitempty"`
	TotalScanDuration      string      `json:"total_scan_duration,omitempty"`
	FrogbotScanType        string      `json:"frogbot_scan_type,omitempty"`
	FrogbotCiProvider      string      `json:"frogbot_ci_provider,omitempty"`
}

type XscAnalyticsGeneralEvent

type XscAnalyticsGeneralEvent struct {
	XscAnalyticsBasicGeneralEvent
	GitInfo       *services.XscGitInfoContext `json:"gitinfo,omitempty"`
	IsGitInfoFlow bool                        `json:"is_gitinfo_flow,omitempty"`
}

XscAnalyticsGeneralEvent extend the basic struct with Frogbot related info.

type XscAnalyticsGeneralEventFinalize

type XscAnalyticsGeneralEventFinalize struct {
	XscAnalyticsBasicGeneralEvent
	MultiScanId string `json:"multi_scan_id,omitempty"`
}

type XscAnalyticsGeneralEventResponse

type XscAnalyticsGeneralEventResponse struct {
	MultiScanId string `json:"multi_scan_id,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL