fortify

package
v1.146.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 31 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

type System interface {
	GetProjectByName(name string, autoCreate bool, projectVersion string) (*models.Project, error)
	GetProjectVersionDetailsByProjectIDAndVersionName(id int64, name string, autoCreate bool, projectName string) (*models.ProjectVersion, error)
	GetProjectVersionAttributesByProjectVersionID(id int64) ([]*models.Attribute, error)
	SetProjectVersionAttributesByProjectVersionID(id int64, attributes []*models.Attribute) ([]*models.Attribute, error)
	CreateProjectVersionIfNotExist(projectName, projectVersionName, description string) (*models.ProjectVersion, error)
	LookupOrCreateProjectVersionDetailsForPullRequest(projectID int64, masterProjectVersion *models.ProjectVersion, pullRequestName string) (*models.ProjectVersion, error)
	CreateProjectVersion(version *models.ProjectVersion) (*models.ProjectVersion, error)
	ProjectVersionCopyFromPartial(sourceID, targetID int64) error
	ProjectVersionCopyCurrentState(sourceID, targetID int64) error
	ProjectVersionCopyPermissions(sourceID, targetID int64) error
	CommitProjectVersion(id int64) (*models.ProjectVersion, error)
	MergeProjectVersionStateOfPRIntoMaster(downloadEndpoint, uploadEndpoint string, masterProjectID, masterProjectVersionID int64, pullRequestName string) error
	GetArtifactsOfProjectVersion(id int64) ([]*models.Artifact, error)
	GetFilterSetOfProjectVersionByTitle(id int64, title string) (*models.FilterSet, error)
	GetIssueFilterSelectorOfProjectVersionByName(id int64, names []string, options []string) (*models.IssueFilterSelectorSet, error)
	GetFilterSetByDisplayName(issueFilterSelectorSet *models.IssueFilterSelectorSet, name string) *models.IssueFilterSelector
	GetProjectIssuesByIDAndFilterSetGroupedBySelector(id int64, filter, filterSetGUID string, issueFilterSelectorSet *models.IssueFilterSelectorSet) ([]*models.ProjectVersionIssueGroup, error)
	ReduceIssueFilterSelectorSet(issueFilterSelectorSet *models.IssueFilterSelectorSet, names []string, options []string) *models.IssueFilterSelectorSet
	GetIssueStatisticsOfProjectVersion(id int64) ([]*models.IssueStatistics, error)
	GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, projectName, projectVersionName, reportFormat string) (*models.SavedReport, error)
	GetReportDetails(id int64) (*models.SavedReport, error)
	UploadResultFile(endpoint, file string, projectVersionID int64) error
	DownloadReportFile(endpoint string, reportID int64) ([]byte, error)
	DownloadResultFile(endpoint string, projectVersionID int64) ([]byte, error)
}

System is the interface abstraction of a specific SystemInstance

type SystemInstance

type SystemInstance struct {
	// contains filtered or unexported fields
}

SystemInstance is the specific instance

func NewSystemInstance

func NewSystemInstance(serverURL, apiEndpoint, authToken string, timeout time.Duration) *SystemInstance

NewSystemInstance - creates an returns a new SystemInstance

func NewSystemInstanceForClient

func NewSystemInstanceForClient(clientInstance *ff.Fortify, httpClientInstance *piperHttp.Client, serverURL, authToken string, requestTimeout time.Duration) *SystemInstance

NewSystemInstanceForClient - creates a new SystemInstance

func (*SystemInstance) AuthenticateRequest

func (sys *SystemInstance) AuthenticateRequest(req runtime.ClientRequest, formats strfmt.Registry) error

AuthenticateRequest authenticates the request

func (*SystemInstance) CommitProjectVersion

func (sys *SystemInstance) CommitProjectVersion(id int64) (*models.ProjectVersion, error)

CommitProjectVersion commits the project version with the provided id

func (*SystemInstance) CreateProjectVersion

func (sys *SystemInstance) CreateProjectVersion(version *models.ProjectVersion) (*models.ProjectVersion, error)

CreateProjectVersion creates the project version with the provided details

func (*SystemInstance) CreateProjectVersionIfNotExist

func (sys *SystemInstance) CreateProjectVersionIfNotExist(projectName, projectVersionName, description string) (*models.ProjectVersion, error)

CreateProjectVersionIfNotExist creates a new ProjectVersion if it does not already exist. If the projectName also does not exist, it will create that as well.

func (*SystemInstance) DownloadReportFile

func (sys *SystemInstance) DownloadReportFile(endpoint string, reportID int64) ([]byte, error)

DownloadReportFile downloads a report file from Fortify backend

func (*SystemInstance) DownloadResultFile

func (sys *SystemInstance) DownloadResultFile(endpoint string, projectVersionID int64) ([]byte, error)

DownloadResultFile downloads a result file from Fortify backend

func (*SystemInstance) GenerateQGateReport

func (sys *SystemInstance) GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, projectName, projectVersionName, reportFormat string) (*models.SavedReport, error)

GenerateQGateReport returns the issue statistics related to the project version addressed with id

func (*SystemInstance) GetArtifactsOfProjectVersion

func (sys *SystemInstance) GetArtifactsOfProjectVersion(id int64) ([]*models.Artifact, error)

GetArtifactsOfProjectVersion returns the list of artifacts related to the project version addressed with id

func (*SystemInstance) GetFilterSetByDisplayName

func (sys *SystemInstance) GetFilterSetByDisplayName(issueFilterSelectorSet *models.IssueFilterSelectorSet, name string) *models.IssueFilterSelector

GetFilterSetByDisplayName returns the set identified by the provided name or nil

func (*SystemInstance) GetFilterSetOfProjectVersionByTitle

func (sys *SystemInstance) GetFilterSetOfProjectVersionByTitle(id int64, title string) (*models.FilterSet, error)

GetFilterSetOfProjectVersionByTitle returns the filter set with the given title related to the project version addressed with id, if no title is provided the default filter set will be returned

func (*SystemInstance) GetIssueFilterSelectorOfProjectVersionByName

func (sys *SystemInstance) GetIssueFilterSelectorOfProjectVersionByName(id int64, names []string, options []string) (*models.IssueFilterSelectorSet, error)

GetIssueFilterSelectorOfProjectVersionByName returns the groupings with the given names related to the project version addressed with id

func (*SystemInstance) GetIssueStatisticsOfProjectVersion

func (sys *SystemInstance) GetIssueStatisticsOfProjectVersion(id int64) ([]*models.IssueStatistics, error)

GetIssueStatisticsOfProjectVersion returns the issue statistics related to the project version addressed with id

func (*SystemInstance) GetProjectByName

func (sys *SystemInstance) GetProjectByName(projectName string, autoCreate bool, projectVersionName string) (*models.Project, error)

GetProjectByName returns the project identified by the name provided autoCreate and projectVersion parameters only used if autoCreate=true

func (*SystemInstance) GetProjectIssuesByIDAndFilterSetGroupedBySelector

func (sys *SystemInstance) GetProjectIssuesByIDAndFilterSetGroupedBySelector(id int64, filter, filterSetGUID string, issueFilterSelectorSet *models.IssueFilterSelectorSet) ([]*models.ProjectVersionIssueGroup, error)

GetProjectIssuesByIDAndFilterSetGroupedBySelector returns issues of the project version addressed with id filtered with the respective set and grouped by the issue filter selector grouping

func (*SystemInstance) GetProjectVersionAttributesByProjectVersionID

func (sys *SystemInstance) GetProjectVersionAttributesByProjectVersionID(id int64) ([]*models.Attribute, error)

GetProjectVersionAttributesByProjectVersionID returns the project version attributes of the project version identified by the id

func (*SystemInstance) GetProjectVersionDetailsByProjectIDAndVersionName

func (sys *SystemInstance) GetProjectVersionDetailsByProjectIDAndVersionName(id int64, versionName string, autoCreate bool, projectName string) (*models.ProjectVersion, error)

GetProjectVersionDetailsByProjectIDAndVersionName returns the project version details of the project version identified by the id and project versionname projectName parameter is only used if autoCreate=true

func (*SystemInstance) GetReportDetails

func (sys *SystemInstance) GetReportDetails(id int64) (*models.SavedReport, error)

GetReportDetails returns the details of the report addressed with id

func (*SystemInstance) LookupOrCreateProjectVersionDetailsForPullRequest

func (sys *SystemInstance) LookupOrCreateProjectVersionDetailsForPullRequest(projectID int64, masterProjectVersion *models.ProjectVersion, pullRequestName string) (*models.ProjectVersion, error)

LookupOrCreateProjectVersionDetailsForPullRequest looks up a project version for pull requests or creates it from scratch

func (*SystemInstance) MergeProjectVersionStateOfPRIntoMaster

func (sys *SystemInstance) MergeProjectVersionStateOfPRIntoMaster(downloadEndpoint, uploadEndpoint string, masterProjectID, masterProjectVersionID int64, pullRequestName string) error

MergeProjectVersionStateOfPRIntoMaster merges the PR project version's fpr result file into the master project version

func (*SystemInstance) ProjectVersionCopyCurrentState

func (sys *SystemInstance) ProjectVersionCopyCurrentState(sourceID, targetID int64) error

ProjectVersionCopyCurrentState copies the project version state of sourceID into the new project version addressed by targetID

func (*SystemInstance) ProjectVersionCopyFromPartial

func (sys *SystemInstance) ProjectVersionCopyFromPartial(sourceID, targetID int64) error

ProjectVersionCopyFromPartial copies parts of the source project version to the target project version identified by their ids

func (*SystemInstance) ProjectVersionCopyPermissions

func (sys *SystemInstance) ProjectVersionCopyPermissions(sourceID, targetID int64) error

ProjectVersionCopyPermissions copies the authentication entity of the project version addressed by sourceID to the one of targetID

func (*SystemInstance) ReduceIssueFilterSelectorSet

func (sys *SystemInstance) ReduceIssueFilterSelectorSet(issueFilterSelectorSet *models.IssueFilterSelectorSet, names []string, options []string) *models.IssueFilterSelectorSet

ReduceIssueFilterSelectorSet filters the set to the relevant filter display names

func (*SystemInstance) SetProjectVersionAttributesByProjectVersionID

func (sys *SystemInstance) SetProjectVersionAttributesByProjectVersionID(id int64, attributes []*models.Attribute) ([]*models.Attribute, error)

SetProjectVersionAttributesByProjectVersionID sets the project version attributes of the project version identified by the id

func (*SystemInstance) UploadResultFile

func (sys *SystemInstance) UploadResultFile(endpoint, file string, projectVersionID int64) error

UploadResultFile uploads a fpr file to the fortify backend

Jump to

Keyboard shortcuts

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