Documentation ¶
Overview ¶
Get information on Compute Engine tasks.
Get information about a component (file, directory, project, ...) and its ancestors or descendants. Update a project or module key.
Get duplication information for a project.
Manage user favorites ¶
Read and update issues.
Get the list of programming languages supported in this instance.
Get components or children with specified measures.
Get information on automatic metrics, and manage custom metrics. See also api/custom_measures.
Manage notifications of the authenticated user ¶
Manage permission templates, and the granting and revoking of permissions at the global and project levels.
Manage the plugins on the server, including installing, uninstalling, and upgrading.
Manage project analyses.
Generate badges based on quality gates or measures ¶
Manage branch (only available when the Branch plugin is installed)
Manage projects links.
Manage pull request (only available when the Branch plugin is installed)
Manage project tags ¶
Manage project existence.
Manage quality gates, including conditions and project association.
Manage quality profiles.
Get and update some details of automatic rules, and manage custom rules.
Manage settings.
Get details on source files. See also api/tests.
Get system details, and perform some management actions, such as restarting, and initiating a database migration (as part of a system upgrade).
Manage user groups.
List, create, and delete a user's access tokens.
Manage users.
Webhooks allow to notify external services when a project analysis is done
Index ¶
- Constants
- func CheckResponse(r *http.Response) error
- func Do(c *http.Client, req *http.Request, v interface{}) (*http.Response, error)
- func NewRequest(method, path string, baseURL *url.URL, username, password string, ...) (*http.Request, error)
- func SetBaseURLUtil(urlStr string) (*url.URL, error)
- type Actions
- type Actives
- type Analysis
- type Block
- type Branch
- type Cause
- type CeActivityObject
- type CeActivityOption
- type CeComponentObject
- type CeComponentOption
- type CeService
- func (s *CeService) Activity(opt *CeActivityOption) (v *CeActivityObject, resp *http.Response, err error)
- func (s *CeService) Component(opt *CeComponentOption) (v *CeComponentObject, resp *http.Response, err error)
- func (s *CeService) Task(opt *CeTaskOption) (v *CeTaskObject, resp *http.Response, err error)
- func (s *CeService) ValidateActivityOpt(opt *CeActivityOption) error
- func (s *CeService) ValidateComponentOpt(opt *CeComponentOption) error
- func (s *CeService) ValidateTaskOpt(opt *CeTaskOption) error
- type CeTaskObject
- type CeTaskOption
- type Changelog
- type Client
- type Comment
- type Component
- type ComponentsSearchObject
- type ComponentsSearchOption
- type ComponentsService
- func (s *ComponentsService) Search(opt *ComponentsSearchOption) (v *ComponentsSearchObject, resp *http.Response, err error)
- func (s *ComponentsService) Show(opt *ComponentsShowOption) (v *ComponentsShowObject, resp *http.Response, err error)
- func (s *ComponentsService) Tree(opt *ComponentsTreeOption) (v *ComponentsTreeObject, resp *http.Response, err error)
- func (s *ComponentsService) ValidateSearchOpt(opt *ComponentsSearchOption) error
- func (s *ComponentsService) ValidateShowOpt(opt *ComponentsShowOption) error
- func (s *ComponentsService) ValidateTreeOpt(opt *ComponentsTreeOption) error
- type ComponentsShowObject
- type ComponentsShowOption
- type ComponentsTreeObject
- type ComponentsTreeOption
- type Condition
- type DefaultTemplate
- type Definition
- type Delivery
- type Diff
- type Duplication
- type DuplicationsService
- type DuplicationsShowObject
- type DuplicationsShowOption
- type ErrorResponse
- type Event
- type EventCatagory
- type ExportImporter
- type Facet
- type FacetValue
- type Favorite
- type FavoritesAddOption
- type FavoritesRemoveOption
- type FavoritesSearchObject
- type FavoritesSearchOption
- type FavoritesService
- func (s *FavoritesService) Add(opt *FavoritesAddOption) (resp *http.Response, err error)
- func (s *FavoritesService) Remove(opt *FavoritesRemoveOption) (resp *http.Response, err error)
- func (s *FavoritesService) Search(opt *FavoritesSearchOption) (v *FavoritesSearchObject, resp *http.Response, err error)
- func (s *FavoritesService) ValidateAddOpt(opt *FavoritesAddOption) error
- func (s *FavoritesService) ValidateRemoveOpt(opt *FavoritesRemoveOption) error
- func (s *FavoritesService) ValidateSearchOpt(opt *FavoritesSearchOption) error
- type Field
- type FieldValue
- type File
- type Files
- type Group
- type History
- type Incompatible
- type Issue
- type IssuesAddCommentObject
- type IssuesAddCommentOption
- type IssuesAssignOption
- type IssuesAuthorsObject
- type IssuesAuthorsOption
- type IssuesBulkChangeObject
- type IssuesBulkChangeOption
- type IssuesChangelogObject
- type IssuesChangelogOption
- type IssuesDeleteCommentOption
- type IssuesDoTransitionOption
- type IssuesEditCommentOption
- type IssuesSearchObject
- type IssuesSearchOption
- type IssuesService
- func (s *IssuesService) AddComment(opt *IssuesAddCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) Assign(opt *IssuesAssignOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) Authors(opt *IssuesAuthorsOption) (v *IssuesAuthorsObject, resp *http.Response, err error)
- func (s *IssuesService) BulkChange(opt *IssuesBulkChangeOption) (v *IssuesBulkChangeObject, resp *http.Response, err error)
- func (s *IssuesService) Changelog(opt *IssuesChangelogOption) (v *IssuesChangelogObject, resp *http.Response, err error)
- func (s *IssuesService) DeleteComment(opt *IssuesDeleteCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) DoTransition(opt *IssuesDoTransitionOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) EditComment(opt *IssuesEditCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) Search(opt *IssuesSearchOption) (v *IssuesSearchObject, resp *http.Response, err error)
- func (s *IssuesService) SetSeverity(opt *IssuesSetSeverityOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) SetTags(opt *IssuesSetTagsOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) SetType(opt *IssuesSetTypeOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
- func (s *IssuesService) Tags(opt *IssuesTagsOption) (v *IssuesTagsObject, resp *http.Response, err error)
- func (s *IssuesService) ValidateAddCommentOpt(opt *IssuesAddCommentOption) error
- func (s *IssuesService) ValidateAssignOpt(opt *IssuesAssignOption) error
- func (s *IssuesService) ValidateAuthorsOpt(opt *IssuesAuthorsOption) error
- func (s *IssuesService) ValidateBulkChangeOpt(opt *IssuesBulkChangeOption) error
- func (s *IssuesService) ValidateChangelogOpt(opt *IssuesChangelogOption) error
- func (s *IssuesService) ValidateDeleteCommentOpt(opt *IssuesDeleteCommentOption) error
- func (s *IssuesService) ValidateDoTransitionOpt(opt *IssuesDoTransitionOption) error
- func (s *IssuesService) ValidateEditCommentOpt(opt *IssuesEditCommentOption) error
- func (s *IssuesService) ValidateSearchOpt(opt *IssuesSearchOption) error
- func (s *IssuesService) ValidateSetSeverityOpt(opt *IssuesSetSeverityOption) error
- func (s *IssuesService) ValidateSetTagsOpt(opt *IssuesSetTagsOption) error
- func (s *IssuesService) ValidateSetTypeOpt(opt *IssuesSetTypeOption) error
- func (s *IssuesService) ValidateTagsOpt(opt *IssuesTagsOption) error
- type IssuesSetSeverityOption
- type IssuesSetTagsOption
- type IssuesSetTypeOption
- type IssuesTagsObject
- type IssuesTagsOption
- type Key
- type Language
- type LanguagesListObject
- type LanguagesListOption
- type LanguagesService
- type Link
- type LogLevel
- type MeasuresComponentObject
- type MeasuresComponentOption
- type MeasuresComponentTreeObject
- type MeasuresComponentTreeOption
- type MeasuresSearchHistoryObject
- type MeasuresSearchHistoryOption
- type MeasuresService
- func (s *MeasuresService) Component(opt *MeasuresComponentOption) (v *MeasuresComponentObject, resp *http.Response, err error)
- func (s *MeasuresService) ComponentTree(opt *MeasuresComponentTreeOption) (v *MeasuresComponentTreeObject, resp *http.Response, err error)
- func (s *MeasuresService) SearchHistory(opt *MeasuresSearchHistoryOption) (v *MeasuresSearchHistoryObject, resp *http.Response, err error)
- func (s *MeasuresService) ValidateComponentOpt(opt *MeasuresComponentOption) error
- func (s *MeasuresService) ValidateComponentTreeOpt(opt *MeasuresComponentTreeOption) error
- func (s *MeasuresService) ValidateSearchHistoryOpt(opt *MeasuresSearchHistoryOption) error
- type Metric
- type MetricsCreateOption
- type MetricsDeleteOption
- type MetricsDomainsObject
- type MetricsSearchObject
- type MetricsSearchOption
- type MetricsService
- func (s *MetricsService) Create(opt *MetricsCreateOption) (v *Metric, resp *http.Response, err error)
- func (s *MetricsService) Delete(opt *MetricsDeleteOption) (resp *http.Response, err error)
- func (s *MetricsService) Domains() (v *MetricsDomainsObject, resp *http.Response, err error)
- func (s *MetricsService) GetDefaultMetrics() []Metric
- func (s *MetricsService) Search(opt *MetricsSearchOption) (v *MetricsSearchObject, resp *http.Response, err error)
- func (s *MetricsService) Types() (v *MetricsTypesObject, resp *http.Response, err error)
- func (s *MetricsService) Update(opt *MetricsUpdateOption) (v *Metric, resp *http.Response, err error)
- func (s *MetricsService) ValidateCreateOpt(opt *MetricsCreateOption) error
- func (s *MetricsService) ValidateDeleteOpt(opt *MetricsDeleteOption) error
- func (s *MetricsService) ValidateSearchOpt(opt *MetricsSearchOption) error
- func (s *MetricsService) ValidateUpdateOpt(opt *MetricsUpdateOption) error
- type MetricsTypesObject
- type MetricsUpdateOption
- type Node
- type Notification
- type NotificationsAddOption
- type NotificationsListObject
- type NotificationsListOption
- type NotificationsRemoveOption
- type NotificationsService
- func (s *NotificationsService) Add(opt *NotificationsAddOption) (resp *http.Response, err error)
- func (s *NotificationsService) List(opt *NotificationsListOption) (v *NotificationsListObject, resp *http.Response, err error)
- func (s *NotificationsService) Remove(opt *NotificationsRemoveOption) (resp *http.Response, err error)
- func (s *NotificationsService) ValidateAddOpt(opt *NotificationsAddOption) error
- func (s *NotificationsService) ValidateListOpt(opt *NotificationsListOption) error
- func (s *NotificationsService) ValidateRemoveOpt(opt *NotificationsRemoveOption) error
- type Paging
- type Period
- type Permission
- type PermissionTemplate
- type PermissionsAddGroupOption
- type PermissionsAddGroupToTemplateOption
- type PermissionsAddProjectCreatorToTemplateOption
- type PermissionsAddUserOption
- type PermissionsAddUserToTemplateOption
- type PermissionsApplyTemplateOption
- type PermissionsBulkApplyTemplateOption
- type PermissionsCreateTemplateObject
- type PermissionsCreateTemplateOption
- type PermissionsDeleteTemplateOption
- type PermissionsRemoveGroupFromTemplateOption
- type PermissionsRemoveGroupOption
- type PermissionsRemoveProjectCreatorFromTemplateOption
- type PermissionsRemoveUserFromTemplateOption
- type PermissionsRemoveUserOption
- type PermissionsSearchTemplatesObject
- type PermissionsSearchTemplatesOption
- type PermissionsService
- func (s *PermissionsService) AddGroup(opt *PermissionsAddGroupOption) (resp *http.Response, err error)
- func (s *PermissionsService) AddGroupToTemplate(opt *PermissionsAddGroupToTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) AddProjectCreatorToTemplate(opt *PermissionsAddProjectCreatorToTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) AddUser(opt *PermissionsAddUserOption) (resp *http.Response, err error)
- func (s *PermissionsService) AddUserToTemplate(opt *PermissionsAddUserToTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) ApplyTemplate(opt *PermissionsApplyTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) BulkApplyTemplate(opt *PermissionsBulkApplyTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) CreateTemplate(opt *PermissionsCreateTemplateOption) (v *PermissionsCreateTemplateObject, resp *http.Response, err error)
- func (s *PermissionsService) DeleteTemplate(opt *PermissionsDeleteTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) RemoveGroup(opt *PermissionsRemoveGroupOption) (resp *http.Response, err error)
- func (s *PermissionsService) RemoveGroupFromTemplate(opt *PermissionsRemoveGroupFromTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) RemoveProjectCreatorFromTemplate(opt *PermissionsRemoveProjectCreatorFromTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) RemoveUser(opt *PermissionsRemoveUserOption) (resp *http.Response, err error)
- func (s *PermissionsService) RemoveUserFromTemplate(opt *PermissionsRemoveUserFromTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) SearchTemplates(opt *PermissionsSearchTemplatesOption) (v *PermissionsSearchTemplatesObject, resp *http.Response, err error)
- func (s *PermissionsService) SetDefaultTemplate(opt *PermissionsSetDefaultTemplateOption) (resp *http.Response, err error)
- func (s *PermissionsService) UpdateTemplate(opt *PermissionsUpdateTemplateOption) (v *PermissionsCreateTemplateObject, resp *http.Response, err error)
- func (s *PermissionsService) ValidateAddGroupOpt(opt *PermissionsAddGroupOption) error
- func (s *PermissionsService) ValidateAddGroupToTemplateOpt(opt *PermissionsAddGroupToTemplateOption) error
- func (s *PermissionsService) ValidateAddProjectCreatorToTemplateOpt(opt *PermissionsAddProjectCreatorToTemplateOption) error
- func (s *PermissionsService) ValidateAddUserOpt(opt *PermissionsAddUserOption) error
- func (s *PermissionsService) ValidateAddUserToTemplateOpt(opt *PermissionsAddUserToTemplateOption) error
- func (s *PermissionsService) ValidateApplyTemplateOpt(opt *PermissionsApplyTemplateOption) error
- func (s *PermissionsService) ValidateBulkApplyTemplateOpt(opt *PermissionsBulkApplyTemplateOption) error
- func (s *PermissionsService) ValidateCreateTemplateOpt(opt *PermissionsCreateTemplateOption) error
- func (s *PermissionsService) ValidateDeleteTemplateOpt(opt *PermissionsDeleteTemplateOption) error
- func (s *PermissionsService) ValidateRemoveGroupFromTemplateOpt(opt *PermissionsRemoveGroupFromTemplateOption) error
- func (s *PermissionsService) ValidateRemoveGroupOpt(opt *PermissionsRemoveGroupOption) error
- func (s *PermissionsService) ValidateRemoveProjectCreatorFromTemplateOpt(opt *PermissionsRemoveProjectCreatorFromTemplateOption) error
- func (s *PermissionsService) ValidateRemoveUserFromTemplateOpt(opt *PermissionsRemoveUserFromTemplateOption) error
- func (s *PermissionsService) ValidateRemoveUserOpt(opt *PermissionsRemoveUserOption) error
- func (s *PermissionsService) ValidateSearchTemplatesOpt(opt *PermissionsSearchTemplatesOption) error
- func (s *PermissionsService) ValidateSetDefaultTemplateOpt(opt *PermissionsSetDefaultTemplateOption) error
- func (s *PermissionsService) ValidateUpdateTemplateOpt(opt *PermissionsUpdateTemplateOption) error
- type PermissionsSetDefaultTemplateOption
- type PermissionsUpdateTemplateOption
- type Plugin
- type PluginsAvailableObject
- type PluginsInstallOption
- type PluginsInstalledObject
- type PluginsInstalledOption
- type PluginsPendingObject
- type PluginsService
- func (s *PluginsService) Available() (v *PluginsAvailableObject, resp *http.Response, err error)
- func (s *PluginsService) CancelAll() (resp *http.Response, err error)
- func (s *PluginsService) Install(opt *PluginsInstallOption) (resp *http.Response, err error)
- func (s *PluginsService) Installed(opt *PluginsInstalledOption) (v *PluginsInstalledObject, resp *http.Response, err error)
- func (s *PluginsService) Pending() (v *PluginsPendingObject, resp *http.Response, err error)
- func (s *PluginsService) Uninstall(opt *PluginsUninstallOption) (resp *http.Response, err error)
- func (s *PluginsService) Update(opt *PluginsUpdateOption) (resp *http.Response, err error)
- func (s *PluginsService) Updates() (v *PluginsUpdatesObject, resp *http.Response, err error)
- func (s *PluginsService) ValidateInstallOpt(opt *PluginsInstallOption) error
- func (s *PluginsService) ValidateInstalledOpt(opt *PluginsInstalledOption) error
- func (s *PluginsService) ValidateUninstallOpt(opt *PluginsUninstallOption) error
- func (s *PluginsService) ValidateUpdateOpt(opt *PluginsUpdateOption) error
- type PluginsUninstallOption
- type PluginsUpdateOption
- type PluginsUpdatesObject
- type Project
- type ProjectAnalysesCreateEventOption
- type ProjectAnalysesDeleteEventOption
- type ProjectAnalysesDeleteOption
- type ProjectAnalysesEventObject
- type ProjectAnalysesSearchObject
- type ProjectAnalysesSearchOption
- type ProjectAnalysesService
- func (s *ProjectAnalysesService) CreateEvent(opt *ProjectAnalysesCreateEventOption) (v *ProjectAnalysesEventObject, resp *http.Response, err error)
- func (s *ProjectAnalysesService) Delete(opt *ProjectAnalysesDeleteOption) (resp *http.Response, err error)
- func (s *ProjectAnalysesService) DeleteEvent(opt *ProjectAnalysesDeleteEventOption) (resp *http.Response, err error)
- func (s *ProjectAnalysesService) Search(opt *ProjectAnalysesSearchOption) (v *ProjectAnalysesSearchObject, resp *http.Response, err error)
- func (s *ProjectAnalysesService) UpdateEvent(opt *ProjectAnalysesUpdateEventOption) (v *ProjectAnalysesEventObject, resp *http.Response, err error)
- func (s *ProjectAnalysesService) ValidateCreateEventOpt(opt *ProjectAnalysesCreateEventOption) error
- func (s *ProjectAnalysesService) ValidateDeleteEventOpt(opt *ProjectAnalysesDeleteEventOption) error
- func (s *ProjectAnalysesService) ValidateDeleteOpt(opt *ProjectAnalysesDeleteOption) error
- func (s *ProjectAnalysesService) ValidateSearchOpt(opt *ProjectAnalysesSearchOption) error
- func (s *ProjectAnalysesService) ValidateUpdateEventOpt(opt *ProjectAnalysesUpdateEventOption) error
- type ProjectAnalysesUpdateEventOption
- type ProjectBadgesMeasureOption
- type ProjectBadgesQualityGateOption
- type ProjectBadgesService
- func (s *ProjectBadgesService) Measure(opt *ProjectBadgesMeasureOption) (v *string, resp *http.Response, err error)
- func (s *ProjectBadgesService) QualityGate(opt *ProjectBadgesQualityGateOption) (v *string, resp *http.Response, err error)
- func (s *ProjectBadgesService) ValidateMeasureOpt(opt *ProjectBadgesMeasureOption) error
- func (s *ProjectBadgesService) ValidateQualityGateOpt(opt *ProjectBadgesQualityGateOption) error
- type ProjectBranchesDeleteOption
- type ProjectBranchesListObject
- type ProjectBranchesListOption
- type ProjectBranchesRenameOption
- type ProjectBranchesService
- func (s *ProjectBranchesService) Delete(opt *ProjectBranchesDeleteOption) (resp *http.Response, err error)
- func (s *ProjectBranchesService) List(opt *ProjectBranchesListOption) (v *ProjectBranchesListObject, resp *http.Response, err error)
- func (s *ProjectBranchesService) Rename(opt *ProjectBranchesRenameOption) (resp *http.Response, err error)
- func (s *ProjectBranchesService) ValidateDeleteOpt(opt *ProjectBranchesDeleteOption) error
- func (s *ProjectBranchesService) ValidateListOpt(opt *ProjectBranchesListOption) error
- func (s *ProjectBranchesService) ValidateRenameOpt(opt *ProjectBranchesRenameOption) error
- type ProjectLinksCreateObject
- type ProjectLinksCreateOption
- type ProjectLinksDeleteOption
- type ProjectLinksSearchObject
- type ProjectLinksSearchOption
- type ProjectLinksService
- func (s *ProjectLinksService) Create(opt *ProjectLinksCreateOption) (v *ProjectLinksCreateObject, resp *http.Response, err error)
- func (s *ProjectLinksService) Delete(opt *ProjectLinksDeleteOption) (resp *http.Response, err error)
- func (s *ProjectLinksService) Search(opt *ProjectLinksSearchOption) (v *ProjectLinksSearchObject, resp *http.Response, err error)
- func (s *ProjectLinksService) ValidateCreateOpt(opt *ProjectLinksCreateOption) error
- func (s *ProjectLinksService) ValidateDeleteOpt(opt *ProjectLinksDeleteOption) error
- func (s *ProjectLinksService) ValidateSearchOpt(opt *ProjectLinksSearchOption) error
- type ProjectPullRequestsDeleteOption
- type ProjectPullRequestsListObject
- type ProjectPullRequestsListOption
- type ProjectPullRequestsService
- func (s *ProjectPullRequestsService) Delete(opt *ProjectPullRequestsDeleteOption) (resp *http.Response, err error)
- func (s *ProjectPullRequestsService) List(opt *ProjectPullRequestsListOption) (v *ProjectPullRequestsListObject, resp *http.Response, err error)
- func (s *ProjectPullRequestsService) ValidateDeleteOpt(opt *ProjectPullRequestsDeleteOption) error
- func (s *ProjectPullRequestsService) ValidateListOpt(opt *ProjectPullRequestsListOption) error
- type ProjectSearchObject
- type ProjectStatus
- type ProjectTagsSearchOption
- type ProjectTagsService
- func (s *ProjectTagsService) Search(opt *ProjectTagsSearchOption) (v *IssuesTagsObject, resp *http.Response, err error)
- func (s *ProjectTagsService) Set(opt *ProjectTagsSetOption) (resp *http.Response, err error)
- func (s *ProjectTagsService) ValidateSearchOpt(opt *ProjectTagsSearchOption) error
- func (s *ProjectTagsService) ValidateSetOpt(opt *ProjectTagsSetOption) error
- type ProjectTagsSetOption
- type ProjectsBulkDeleteOption
- type ProjectsBulkUpdateKeyObject
- type ProjectsBulkUpdateKeyOption
- type ProjectsCreateObject
- type ProjectsCreateOption
- type ProjectsDeleteOption
- type ProjectsSearchOption
- type ProjectsService
- func (s *ProjectsService) BulkDelete(opt *ProjectsBulkDeleteOption) (resp *http.Response, err error)
- func (s *ProjectsService) BulkUpdateKey(opt *ProjectsBulkUpdateKeyOption) (v *ProjectsBulkUpdateKeyObject, resp *http.Response, err error)
- func (s *ProjectsService) Create(opt *ProjectsCreateOption) (v *ProjectsCreateObject, resp *http.Response, err error)
- func (s *ProjectsService) Delete(opt *ProjectsDeleteOption) (resp *http.Response, err error)
- func (s *ProjectsService) Search(opt *ProjectsSearchOption) (v *ProjectSearchObject, resp *http.Response, err error)
- func (s *ProjectsService) UpdateKey(opt *ProjectsUpdateKeyOption) (resp *http.Response, err error)
- func (s *ProjectsService) UpdateVisibility(opt *ProjectsUpdateVisibilityOption) (resp *http.Response, err error)
- func (s *ProjectsService) ValidateBulkDeleteOpt(opt *ProjectsBulkDeleteOption) error
- func (s *ProjectsService) ValidateBulkUpdateKeyOpt(opt *ProjectsBulkUpdateKeyOption) error
- func (s *ProjectsService) ValidateCreateOpt(opt *ProjectsCreateOption) error
- func (s *ProjectsService) ValidateDeleteOpt(opt *ProjectsDeleteOption) error
- func (s *ProjectsService) ValidateSearchOpt(opt *ProjectsSearchOption) error
- func (s *ProjectsService) ValidateUpdateKeyOpt(opt *ProjectsUpdateKeyOption) error
- func (s *ProjectsService) ValidateUpdateVisibilityOpt(opt *ProjectsUpdateVisibilityOption) error
- type ProjectsUpdateKeyOption
- type ProjectsUpdateVisibilityOption
- type PullRequest
- type QualityGate
- type QualityGateV2
- type QualityGatesCondition
- type QualityProfile
- type QualityProfilesActivateRuleOption
- type QualityProfilesActivateRulesOption
- type QualityProfilesActiveRulesObject
- type QualityProfilesAddProjectOption
- type QualityProfilesBackupOption
- type QualityProfilesChangeParentOption
- type QualityProfilesChangelogObject
- type QualityProfilesChangelogOption
- type QualityProfilesCopyOption
- type QualityProfilesCreateObject
- type QualityProfilesCreateOption
- type QualityProfilesDeactivateRuleOption
- type QualityProfilesDeactivateRulesOption
- type QualityProfilesDeactiveRulesObject
- type QualityProfilesDeleteOption
- type QualityProfilesEvent
- type QualityProfilesExportOption
- type QualityProfilesExportersObject
- type QualityProfilesImportersObject
- type QualityProfilesInheritanceObject
- type QualityProfilesInheritanceOption
- type QualityProfilesProjectsOption
- type QualityProfilesRemoveProjectOption
- type QualityProfilesRenameOption
- type QualityProfilesRestoreOption
- type QualityProfilesSearchObject
- type QualityProfilesSearchOption
- type QualityProfilesService
- func (s *QualityProfilesService) ActivateRule(opt *QualityProfilesActivateRuleOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) ActivateRules(opt *QualityProfilesActivateRulesOption) (v *QualityProfilesActiveRulesObject, resp *http.Response, err error)
- func (s *QualityProfilesService) AddProject(opt *QualityProfilesAddProjectOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Backup(opt *QualityProfilesBackupOption) (v *string, resp *http.Response, err error)
- func (s *QualityProfilesService) ChangeParent(opt *QualityProfilesChangeParentOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Changelog(opt *QualityProfilesChangelogOption) (v *QualityProfilesChangelogObject, resp *http.Response, err error)
- func (s *QualityProfilesService) Copy(opt *QualityProfilesCopyOption) (v *QualityProfile, resp *http.Response, err error)
- func (s *QualityProfilesService) Create(opt *QualityProfilesCreateOption) (v *QualityProfilesCreateObject, resp *http.Response, err error)
- func (s *QualityProfilesService) DeactivateRule(opt *QualityProfilesDeactivateRuleOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) DeactivateRules(opt *QualityProfilesDeactivateRulesOption) (v *QualityProfilesDeactiveRulesObject, resp *http.Response, err error)
- func (s *QualityProfilesService) Delete(opt *QualityProfilesDeleteOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Export(opt *QualityProfilesExportOption) (v *string, resp *http.Response, err error)
- func (s *QualityProfilesService) Exporters() (v *QualityProfilesExportersObject, resp *http.Response, err error)
- func (s *QualityProfilesService) Importers() (v *QualityProfilesImportersObject, resp *http.Response, err error)
- func (s *QualityProfilesService) Inheritance(opt *QualityProfilesInheritanceOption) (v *QualityProfilesInheritanceObject, resp *http.Response, err error)
- func (s *QualityProfilesService) Projects(opt *QualityProfilesProjectsOption) (v *QualitygatesSearchObject, resp *http.Response, err error)
- func (s *QualityProfilesService) RemoveProject(opt *QualityProfilesRemoveProjectOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Rename(opt *QualityProfilesRenameOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Restore(opt *QualityProfilesRestoreOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) Search(opt *QualityProfilesSearchOption) (v *QualityProfilesSearchObject, resp *http.Response, err error)
- func (s *QualityProfilesService) SetDefault(opt *QualityProfilesSetDefaultOption) (resp *http.Response, err error)
- func (s *QualityProfilesService) ValidateActivateRuleOpt(opt *QualityProfilesActivateRuleOption) error
- func (s *QualityProfilesService) ValidateActivateRulesOpt(opt *QualityProfilesActivateRulesOption) error
- func (s *QualityProfilesService) ValidateAddProjectOpt(opt *QualityProfilesAddProjectOption) error
- func (s *QualityProfilesService) ValidateBackupOpt(opt *QualityProfilesBackupOption) error
- func (s *QualityProfilesService) ValidateChangeParentOpt(opt *QualityProfilesChangeParentOption) error
- func (s *QualityProfilesService) ValidateChangelogOpt(opt *QualityProfilesChangelogOption) error
- func (s *QualityProfilesService) ValidateCopyOpt(opt *QualityProfilesCopyOption) error
- func (s *QualityProfilesService) ValidateCreateOpt(opt *QualityProfilesCreateOption) error
- func (s *QualityProfilesService) ValidateDeactivateRuleOpt(opt *QualityProfilesDeactivateRuleOption) error
- func (s *QualityProfilesService) ValidateDeactivateRulesOpt(opt *QualityProfilesDeactivateRulesOption) error
- func (s *QualityProfilesService) ValidateDeleteOpt(opt *QualityProfilesDeleteOption) error
- func (s *QualityProfilesService) ValidateExportOpt(opt *QualityProfilesExportOption) error
- func (s *QualityProfilesService) ValidateInheritanceOpt(opt *QualityProfilesInheritanceOption) error
- func (s *QualityProfilesService) ValidateProjectsOpt(opt *QualityProfilesProjectsOption) error
- func (s *QualityProfilesService) ValidateRemoveProjectOpt(opt *QualityProfilesRemoveProjectOption) error
- func (s *QualityProfilesService) ValidateRenameOpt(opt *QualityProfilesRenameOption) error
- func (s *QualityProfilesService) ValidateRestoreOpt(opt *QualityProfilesRestoreOption) error
- func (s *QualityProfilesService) ValidateSearchOpt(opt *QualityProfilesSearchOption) error
- func (s *QualityProfilesService) ValidateSetDefaultOpt(opt *QualityProfilesSetDefaultOption) error
- type QualityProfilesSetDefaultOption
- type QualitygatesCopyOption
- type QualitygatesCreateConditionOption
- type QualitygatesCreateOption
- type QualitygatesDeleteConditionOption
- type QualitygatesDeselectOption
- type QualitygatesDestroyOption
- type QualitygatesGetByProjectObject
- type QualitygatesGetByProjectOption
- type QualitygatesListObject
- type QualitygatesListOption
- type QualitygatesProjectStatusObject
- type QualitygatesProjectStatusOption
- type QualitygatesRenameOption
- type QualitygatesSearchObject
- type QualitygatesSearchOption
- type QualitygatesSelectOption
- type QualitygatesService
- func (s *QualitygatesService) Copy(opt *QualitygatesCopyOption) (v *QualityGate, resp *http.Response, err error)
- func (s *QualitygatesService) Create(opt *QualitygatesCreateOption) (v *QualityGate, resp *http.Response, err error)
- func (s *QualitygatesService) CreateCondition(opt *QualitygatesCreateConditionOption) (v *QualityGatesCondition, resp *http.Response, err error)
- func (s *QualitygatesService) DeleteCondition(opt *QualitygatesDeleteConditionOption) (resp *http.Response, err error)
- func (s *QualitygatesService) Deselect(opt *QualitygatesDeselectOption) (resp *http.Response, err error)
- func (s *QualitygatesService) Destroy(opt *QualitygatesDestroyOption) (resp *http.Response, err error)
- func (s *QualitygatesService) GetByProject(opt *QualitygatesGetByProjectOption) (v *QualitygatesGetByProjectObject, resp *http.Response, err error)
- func (s *QualitygatesService) List(opt *QualitygatesListOption) (v *QualitygatesListObject, resp *http.Response, err error)
- func (s *QualitygatesService) ProjectStatus(opt *QualitygatesProjectStatusOption) (v *QualitygatesProjectStatusObject, resp *http.Response, err error)
- func (s *QualitygatesService) Rename(opt *QualitygatesRenameOption) (v *QualityGate, resp *http.Response, err error)
- func (s *QualitygatesService) Search(opt *QualitygatesSearchOption) (v *QualitygatesSearchObject, resp *http.Response, err error)
- func (s *QualitygatesService) Select(opt *QualitygatesSelectOption) (resp *http.Response, err error)
- func (s *QualitygatesService) SetAsDefault(opt *QualitygatesSetAsDefaultOption) (resp *http.Response, err error)
- func (s *QualitygatesService) Show(opt *QualitygatesShowOption) (v *QualityGateV2, resp *http.Response, err error)
- func (s *QualitygatesService) UpdateCondition(opt *QualitygatesUpdateConditionOption) (v *QualityGatesCondition, resp *http.Response, err error)
- func (s *QualitygatesService) ValidateCopyOpt(opt *QualitygatesCopyOption) error
- func (s *QualitygatesService) ValidateCreateConditionOpt(opt *QualitygatesCreateConditionOption) error
- func (s *QualitygatesService) ValidateCreateOpt(opt *QualitygatesCreateOption) error
- func (s *QualitygatesService) ValidateDeleteConditionOpt(opt *QualitygatesDeleteConditionOption) error
- func (s *QualitygatesService) ValidateDeselectOpt(opt *QualitygatesDeselectOption) error
- func (s *QualitygatesService) ValidateDestroyOpt(opt *QualitygatesDestroyOption) error
- func (s *QualitygatesService) ValidateGetByProjectOpt(opt *QualitygatesGetByProjectOption) error
- func (s *QualitygatesService) ValidateListOpt(opt *QualitygatesListOption) error
- func (s *QualitygatesService) ValidateProjectStatusOpt(opt *QualitygatesProjectStatusOption) error
- func (s *QualitygatesService) ValidateRenameOpt(opt *QualitygatesRenameOption) error
- func (s *QualitygatesService) ValidateSearchOpt(opt *QualitygatesSearchOption) error
- func (s *QualitygatesService) ValidateSelectOpt(opt *QualitygatesSelectOption) error
- func (s *QualitygatesService) ValidateSetAsDefaultOpt(opt *QualitygatesSetAsDefaultOption) error
- func (s *QualitygatesService) ValidateShowOpt(opt *QualitygatesShowOption) error
- func (s *QualitygatesService) ValidateUpdateConditionOpt(opt *QualitygatesUpdateConditionOption) error
- type QualitygatesSetAsDefaultOption
- type QualitygatesShowOption
- type QualitygatesUpdateConditionOption
- type Release
- type Repositorie
- type Require
- type RequireUpdate
- type Result
- type Rule
- type RuleCreateObject
- type RuleParam
- type RuleUpdateObject
- type RulesCreateOption
- type RulesDeleteOption
- type RulesRepositoriesObject
- type RulesRepositoriesOption
- type RulesSearchObject
- type RulesSearchOption
- type RulesService
- func (s *RulesService) Create(opt *RulesCreateOption) (v *RuleCreateObject, resp *http.Response, err error)
- func (s *RulesService) Delete(opt *RulesDeleteOption) (resp *http.Response, err error)
- func (s *RulesService) Repositories(opt *RulesRepositoriesOption) (v *RulesRepositoriesObject, resp *http.Response, err error)
- func (s *RulesService) Search(opt *RulesSearchOption) (v *RulesSearchObject, resp *http.Response, err error)
- func (s *RulesService) Show(opt *RulesShowOption) (v *RulesShowObject, resp *http.Response, err error)
- func (s *RulesService) Tags(opt *RulesTagsOption) (v *IssuesTagsObject, resp *http.Response, err error)
- func (s *RulesService) Update(opt *RulesUpdateOption) (v *RuleUpdateObject, resp *http.Response, err error)
- func (s *RulesService) ValidateCreateOpt(opt *RulesCreateOption) error
- func (s *RulesService) ValidateDeleteOpt(opt *RulesDeleteOption) error
- func (s *RulesService) ValidateRepositoriesOpt(opt *RulesRepositoriesOption) error
- func (s *RulesService) ValidateSearchOpt(opt *RulesSearchOption) error
- func (s *RulesService) ValidateShowOpt(opt *RulesShowOption) error
- func (s *RulesService) ValidateTagsOpt(opt *RulesTagsOption) error
- func (s *RulesService) ValidateUpdateOpt(opt *RulesUpdateOption) error
- type RulesShowObject
- type RulesShowOption
- type RulesTagsOption
- type RulesUpdateOption
- type ServerService
- type Setting
- type SettingsListDefinitionsObject
- type SettingsListDefinitionsOption
- type SettingsResetOption
- type SettingsService
- func (s *SettingsService) ListDefinitions(opt *SettingsListDefinitionsOption) (v *SettingsListDefinitionsObject, resp *http.Response, err error)
- func (s *SettingsService) Reset(opt *SettingsResetOption) (resp *http.Response, err error)
- func (s *SettingsService) Set(opt *SettingsSetOption) (resp *http.Response, err error)
- func (s *SettingsService) ValidateListDefinitionsOpt(opt *SettingsListDefinitionsOption) error
- func (s *SettingsService) ValidateResetOpt(opt *SettingsResetOption) error
- func (s *SettingsService) ValidateSetOpt(opt *SettingsSetOption) error
- func (s *SettingsService) ValidateValuesOpt(opt *SettingsValuesOption) error
- func (s *SettingsService) Values(opt *SettingsValuesOption) (v *SettingsValuesObject, resp *http.Response, err error)
- type SettingsSetOption
- type SettingsValuesObject
- type SettingsValuesOption
- type SonarMeasure
- type SourcesRawOption
- type SourcesSCMObject
- type SourcesSCMOption
- type SourcesService
- func (s *SourcesService) Raw(opt *SourcesRawOption) (v *string, resp *http.Response, err error)
- func (s *SourcesService) SCM(opt *SourcesSCMOption) (v *SourcesSCMObject, resp *http.Response, err error)
- func (s *SourcesService) Show(opt *SourcesShowOption) (v *SourcesShowObject, resp *http.Response, err error)
- func (s *SourcesService) ValidateRawOpt(opt *SourcesRawOption) error
- func (s *SourcesService) ValidateSCMOpt(opt *SourcesSCMOption) error
- func (s *SourcesService) ValidateShowOpt(opt *SourcesShowOption) error
- type SourcesShowObject
- type SourcesShowOption
- type SquidClassCyclomaticComplexity
- type SquidParam
- type Status
- type SystemChangeLogLevelOption
- type SystemHealthObject
- type SystemLogsOption
- type SystemService
- func (s *SystemService) ChangeLogLevel(opt *SystemChangeLogLevelOption) (resp *http.Response, err error)
- func (s *SystemService) DbMigrationStatus() (v *Cause, resp *http.Response, err error)
- func (s *SystemService) Health() (v *SystemHealthObject, resp *http.Response, err error)
- func (s *SystemService) Logs(opt *SystemLogsOption) (v *string, resp *http.Response, err error)
- func (s *SystemService) MigrateDb() (v *Cause, resp *http.Response, err error)
- func (s *SystemService) Ping() (v *string, resp *http.Response, err error)
- func (s *SystemService) Restart() (resp *http.Response, err error)
- func (s *SystemService) Status() (v *SystemStatusObject, resp *http.Response, err error)
- func (s *SystemService) Upgrades() (v *SystemUpgradesObject, resp *http.Response, err error)
- func (s *SystemService) ValidateChangeLogLevelOpt(opt *SystemChangeLogLevelOption) error
- func (s *SystemService) ValidateLogsOpt(opt *SystemLogsOption) error
- type SystemStatusObject
- type SystemUpgradesObject
- type Task
- type TextRange
- type Update
- type Upgrade
- type UpgradePlugins
- type User
- type UserGroupsAddUserOption
- type UserGroupsCreateObject
- type UserGroupsCreateOption
- type UserGroupsDeleteOption
- type UserGroupsRemoveUserOption
- type UserGroupsSearchObject
- type UserGroupsSearchOption
- type UserGroupsService
- func (s *UserGroupsService) AddUser(opt *UserGroupsAddUserOption) (resp *http.Response, err error)
- func (s *UserGroupsService) Create(opt *UserGroupsCreateOption) (v *UserGroupsCreateObject, resp *http.Response, err error)
- func (s *UserGroupsService) Delete(opt *UserGroupsDeleteOption) (resp *http.Response, err error)
- func (s *UserGroupsService) RemoveUser(opt *UserGroupsRemoveUserOption) (resp *http.Response, err error)
- func (s *UserGroupsService) Search(opt *UserGroupsSearchOption) (v *UserGroupsSearchObject, resp *http.Response, err error)
- func (s *UserGroupsService) Update(opt *UserGroupsUpdateOption) (v *UserGroupsCreateObject, resp *http.Response, err error)
- func (s *UserGroupsService) Users(opt *UserGroupsUsersOption) (v *UserGroupsUsersObject, resp *http.Response, err error)
- func (s *UserGroupsService) ValidateAddUserOpt(opt *UserGroupsAddUserOption) error
- func (s *UserGroupsService) ValidateCreateOpt(opt *UserGroupsCreateOption) error
- func (s *UserGroupsService) ValidateDeleteOpt(opt *UserGroupsDeleteOption) error
- func (s *UserGroupsService) ValidateRemoveUserOpt(opt *UserGroupsRemoveUserOption) error
- func (s *UserGroupsService) ValidateSearchOpt(opt *UserGroupsSearchOption) error
- func (s *UserGroupsService) ValidateUpdateOpt(opt *UserGroupsUpdateOption) error
- func (s *UserGroupsService) ValidateUsersOpt(opt *UserGroupsUsersOption) error
- type UserGroupsUpdateOption
- type UserGroupsUsersObject
- type UserGroupsUsersOption
- type UserToken
- type UserTokensGenerateObject
- type UserTokensGenerateOption
- type UserTokensRevokeOption
- type UserTokensSearchObject
- type UserTokensSearchOption
- type UserTokensService
- func (s *UserTokensService) Generate(opt *UserTokensGenerateOption) (v *UserTokensGenerateObject, resp *http.Response, err error)
- func (s *UserTokensService) Revoke(opt *UserTokensRevokeOption) (resp *http.Response, err error)
- func (s *UserTokensService) Search(opt *UserTokensSearchOption) (v *UserTokensSearchObject, resp *http.Response, err error)
- func (s *UserTokensService) ValidateGenerateOpt(opt *UserTokensGenerateOption) error
- func (s *UserTokensService) ValidateRevokeOpt(opt *UserTokensRevokeOption) error
- func (s *UserTokensService) ValidateSearchOpt(opt *UserTokensSearchOption) error
- type UsersChangePasswordOption
- type UsersCreateObject
- type UsersCreateOption
- type UsersDeactivateOption
- type UsersGroupsOption
- type UsersSearchObject
- type UsersSearchOption
- type UsersService
- func (s *UsersService) ChangePassword(opt *UsersChangePasswordOption) (resp *http.Response, err error)
- func (s *UsersService) Create(opt *UsersCreateOption) (v *UsersCreateObject, resp *http.Response, err error)
- func (s *UsersService) Deactivate(opt *UsersDeactivateOption) (v *UsersCreateObject, resp *http.Response, err error)
- func (s *UsersService) Groups(opt *UsersGroupsOption) (v *UserGroupsSearchObject, resp *http.Response, err error)
- func (s *UsersService) Search(opt *UsersSearchOption) (v *UsersSearchObject, resp *http.Response, err error)
- func (s *UsersService) Update(opt *UsersUpdateOption) (v *UsersCreateObject, resp *http.Response, err error)
- func (s *UsersService) ValidateChangePasswordOpt(opt *UsersChangePasswordOption) error
- func (s *UsersService) ValidateCreateOpt(opt *UsersCreateOption) error
- func (s *UsersService) ValidateDeactivateOpt(opt *UsersDeactivateOption) error
- func (s *UsersService) ValidateGroupsOpt(opt *UsersGroupsOption) error
- func (s *UsersService) ValidateSearchOpt(opt *UsersSearchOption) error
- func (s *UsersService) ValidateUpdateOpt(opt *UsersUpdateOption) error
- type UsersUpdateOption
- type Webhook
- type WebhooksCreateObject
- type WebhooksCreateOption
- type WebhooksDeleteOption
- type WebhooksDeliveriesObject
- type WebhooksDeliveriesOption
- type WebhooksDeliveryObject
- type WebhooksDeliveryOption
- type WebhooksListObject
- type WebhooksListOption
- type WebhooksService
- func (s *WebhooksService) Create(opt *WebhooksCreateOption) (v *WebhooksCreateObject, resp *http.Response, err error)
- func (s *WebhooksService) Delete(opt *WebhooksDeleteOption) (resp *http.Response, err error)
- func (s *WebhooksService) Deliveries(opt *WebhooksDeliveriesOption) (v *WebhooksDeliveriesObject, resp *http.Response, err error)
- func (s *WebhooksService) Delivery(opt *WebhooksDeliveryOption) (v *WebhooksDeliveryObject, resp *http.Response, err error)
- func (s *WebhooksService) List(opt *WebhooksListOption) (v *WebhooksListObject, resp *http.Response, err error)
- func (s *WebhooksService) Update(opt *WebhooksUpdateOption) (resp *http.Response, err error)
- func (s *WebhooksService) ValidateCreateOpt(opt *WebhooksCreateOption) error
- func (s *WebhooksService) ValidateDeleteOpt(opt *WebhooksDeleteOption) error
- func (s *WebhooksService) ValidateDeliveriesOpt(opt *WebhooksDeliveriesOption) error
- func (s *WebhooksService) ValidateDeliveryOpt(opt *WebhooksDeliveryOption) error
- func (s *WebhooksService) ValidateListOpt(opt *WebhooksListOption) error
- func (s *WebhooksService) ValidateUpdateOpt(opt *WebhooksUpdateOption) error
- type WebhooksUpdateOption
Constants ¶
const ( SeverityINFO = "INFO" SeverityMINOR = "MINOR" SeverityMAJOR = "MAJOR" SeverityCRITICAL = "CRITICAL" SeverityBLOCKER = "BLOCKER" IssueTypeBug = "BUG" IssueTypeCodeSmell = "CODE_SMELL" IssueTypeVulnerability = "VULNERABILITY" )
const ( MetricTypeINT = "INT" MetricTypeFLOAT = "FLOAT" MetricTypePERCENT = "PERCENT" MetricTypeBOOL = "BOOL" MetricTypeSTRING = "STRING" MetricTypeMILLISEC = "MILLISEC" MetricTypeDATA = "DATA" MetricTypeLEVEL = "LEVEL" MetricTypeDISTRIB = "DISTRIB" MetricTypeRATING = "RATING" MetricTypeWORK_DUR = "WORK_DUR" )
const ( ProjectVisibilityPublic = "public" ProjectVisibilityPrivate = "private" )
const ( QualifierSubProject = "BRC" QualifierDirectory = "DIR" QualifierFile = "FIL" QualifierProject = "TRK" QualifierTestFile = "UTS" )
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
func Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func NewRequest ¶
func NewRequest(method, path string, baseURL *url.URL, username, password string, opt interface{}) (*http.Request, error)
NewRequest creates an API request. A relative URL path can be provided in urlStr, in which case it is resolved relative to the base URL of the Client. Relative URL paths should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
Types ¶
type Actions ¶
type Actions struct { Create bool `json:"create,omitempty"` AssociateProjects bool `json:"associateProjects,omitempty"` Copy bool `json:"copy,omitempty"` Delete bool `json:"delete,omitempty"` Edit bool `json:"edit,omitempty"` ManageConditions bool `json:"manageConditions,omitempty"` Rename bool `json:"rename,omitempty"` SetAsDefault bool `json:"setAsDefault,omitempty"` }
type Actives ¶
type Actives struct { SquidClassCyclomaticComplexity []*SquidClassCyclomaticComplexity `json:"squid:ClassCyclomaticComplexity,omitempty"` SquidMethodCyclomaticComplexity []*SquidClassCyclomaticComplexity `json:"squid:MethodCyclomaticComplexity,omitempty"` Squid_S1067 []*SquidClassCyclomaticComplexity `json:"squid:S1067,omitempty"` }
type CeActivityObject ¶
type CeActivityObject struct {
Tasks []*Task `json:"tasks,omitempty"`
}
type CeActivityOption ¶
type CeActivityOption struct { ComponentId string `url:"componentId,omitempty"` // Description:"Id of the component (project) to filter on",ExampleValue:"AU-TpxcA-iU5OvuD2FL0" MaxExecutedAt string `url:"maxExecutedAt,omitempty"` // Description:"Maximum date of end of task processing (inclusive)",ExampleValue:"2017-10-19T13:00:00+0200" MinSubmittedAt string `url:"minSubmittedAt,omitempty"` // Description:"Minimum date of task submission (inclusive)",ExampleValue:"2017-10-19T13:00:00+0200" OnlyCurrents string `url:"onlyCurrents,omitempty"` // Description:"Filter on the last tasks (only the most recent finished task by project)",ExampleValue:"" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 1000",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li><li>task ids that are exactly the same as the supplied string</li></ul>Must not be set together with componentId",ExampleValue:"Apache" Status string `url:"status,omitempty"` // Description:"Comma separated list of task statuses",ExampleValue:"IN_PROGRESS,SUCCESS" Type string `url:"type,omitempty"` // Description:"Task type",ExampleValue:"REPORT" }
type CeComponentObject ¶
type CeComponentOption ¶
type CeService ¶
type CeService struct {
// contains filtered or unexported fields
}
func (*CeService) Activity ¶
func (s *CeService) Activity(opt *CeActivityOption) (v *CeActivityObject, resp *http.Response, err error)
Activity Search for tasks.<br> Requires the system administration permission, or project administration permission if componentId is set.
func (*CeService) Component ¶
func (s *CeService) Component(opt *CeComponentOption) (v *CeComponentObject, resp *http.Response, err error)
Component Get the pending tasks, in-progress tasks and the last executed task of a given component (usually a project).<br>Requires the following permission: 'Browse' on the specified component.<br>Either 'componentId' or 'component' must be provided.
func (*CeService) Task ¶
func (s *CeService) Task(opt *CeTaskOption) (v *CeTaskObject, resp *http.Response, err error)
Task Give Compute Engine task details such as type, status, duration and associated component.<br />Requires 'Administer System' or 'Execute Analysis' permission.<br/>Since 6.1, field "logs" is deprecated and its value is always false.
func (*CeService) ValidateActivityOpt ¶
func (s *CeService) ValidateActivityOpt(opt *CeActivityOption) error
func (*CeService) ValidateComponentOpt ¶
func (s *CeService) ValidateComponentOpt(opt *CeComponentOption) error
func (*CeService) ValidateTaskOpt ¶
func (s *CeService) ValidateTaskOpt(opt *CeTaskOption) error
type CeTaskObject ¶
type CeTaskObject struct {
Task *Task `json:"task,omitempty"`
}
type CeTaskOption ¶
type Client ¶
type Client struct { Ce *CeService Components *ComponentsService Duplications *DuplicationsService Favorites *FavoritesService Issues *IssuesService Languages *LanguagesService Measures *MeasuresService Metrics *MetricsService Notifications *NotificationsService Permissions *PermissionsService Plugins *PluginsService ProjectAnalyses *ProjectAnalysesService ProjectBadges *ProjectBadgesService ProjectBranches *ProjectBranchesService ProjectLinks *ProjectLinksService ProjectPullRequests *ProjectPullRequestsService ProjectTags *ProjectTagsService Projects *ProjectsService Qualitygates *QualitygatesService QualityProfiles *QualityProfilesService Rules *RulesService Server *ServerService Settings *SettingsService Sources *SourcesService System *SystemService UserGroups *UserGroupsService UserTokens *UserTokensService Users *UsersService Webhooks *WebhooksService // contains filtered or unexported fields }
func NewClientWithToken ¶
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL path can be provided in urlStr, in which case it is resolved relative to the base URL of the Client. Relative URL paths should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
func (*Client) SetBaseURL ¶
SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
type Component ¶
type Component struct { AnalysisDate string `json:"analysisDate,omitempty"` Description string `json:"description,omitempty"` Enabled bool `json:"enabled,omitempty"` ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` Language string `json:"language,omitempty"` LastAnalysisDate string `json:"lastAnalysisDate,omitempty"` LeakPeriodDate string `json:"leakPeriodDate,omitempty"` LongName string `json:"longName,omitempty"` Measures []*SonarMeasure `json:"measures,omitempty"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` Path string `json:"path,omitempty"` Project string `json:"project,omitempty"` Qualifier string `json:"qualifier,omitempty"` Tags []string `json:"tags,omitempty"` UUID string `json:"uuid,omitempty"` Version string `json:"version,omitempty"` Visibility string `json:"visibility,omitempty"` }
type ComponentsSearchObject ¶
type ComponentsSearchOption ¶
type ComponentsSearchOption struct { Language string `url:"language,omitempty"` // Description:"Language key. If provided, only components for the given language are returned.",ExampleValue:"py" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>",ExampleValue:"sonar" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>",ExampleValue:"" }
type ComponentsService ¶
type ComponentsService struct {
// contains filtered or unexported fields
}
func (*ComponentsService) Search ¶
func (s *ComponentsService) Search(opt *ComponentsSearchOption) (v *ComponentsSearchObject, resp *http.Response, err error)
Search Search for components
func (*ComponentsService) Show ¶
func (s *ComponentsService) Show(opt *ComponentsShowOption) (v *ComponentsShowObject, resp *http.Response, err error)
Show Returns a component (file, directory, project, view…) and its ancestors. The ancestors are ordered from the parent to the root project. The 'componentId' or 'component' parameter must be provided.<br>Requires the following permission: 'Browse' on the project of the specified component.
func (*ComponentsService) Tree ¶
func (s *ComponentsService) Tree(opt *ComponentsTreeOption) (v *ComponentsTreeObject, resp *http.Response, err error)
Tree Navigate through components based on the chosen strategy. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
func (*ComponentsService) ValidateSearchOpt ¶
func (s *ComponentsService) ValidateSearchOpt(opt *ComponentsSearchOption) error
func (*ComponentsService) ValidateShowOpt ¶
func (s *ComponentsService) ValidateShowOpt(opt *ComponentsShowOption) error
func (*ComponentsService) ValidateTreeOpt ¶
func (s *ComponentsService) ValidateTreeOpt(opt *ComponentsTreeOption) error
type ComponentsShowObject ¶
type ComponentsShowOption ¶
type ComponentsTreeObject ¶
type ComponentsTreeOption ¶
type ComponentsTreeOption struct { Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" Component string `url:"component,omitempty"` // Description:"Base component key. The search is based on this component.",ExampleValue:"my_project" ComponentId string `url:"componentId,omitempty"` // Description:"Base component id. The search is based on this component.",ExampleValue:"AU-TpxcA-iU5OvuD2FLz" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>",ExampleValue:"FILE_NAM" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>",ExampleValue:"" S string `url:"s,omitempty"` // Description:"Comma-separated list of sort fields",ExampleValue:"name, path" Strategy string `url:"strategy,omitempty"` // Description:"Strategy to search for base component descendants:<ul><li>children: return the children components of the base component. Grandchildren components are not returned</li><li>all: return all the descendants components of the base component. Grandchildren are returned.</li><li>leaves: return all the descendant components (files, in general) which don't have other children. They are the leaves of the component tree.</li></ul>",ExampleValue:"" }
type Condition ¶
type Condition struct { ActualValue string `json:"actualValue,omitempty"` Comparator string `json:"comparator,omitempty"` ErrorThreshold string `json:"errorThreshold,omitempty"` MetricKey string `json:"metricKey,omitempty"` PeriodIndex int64 `json:"periodIndex,omitempty"` Status string `json:"status,omitempty"` WarningThreshold string `json:"warningThreshold,omitempty"` }
type DefaultTemplate ¶
type Definition ¶
type Definition struct { Category string `json:"category,omitempty"` DefaultValue string `json:"defaultValue,omitempty"` DeprecatedKey string `json:"deprecatedKey,omitempty"` Description string `json:"description,omitempty"` Fields []*Field `json:"fields,omitempty"` Key string `json:"key,omitempty"` MultiValues bool `json:"multiValues,omitempty"` Name string `json:"name,omitempty"` Options []string `json:"options,omitempty"` SubCategory string `json:"subCategory,omitempty"` Type string `json:"type,omitempty"` }
type Delivery ¶
type Delivery struct { At string `json:"at,omitempty"` CeTaskID string `json:"ceTaskId,omitempty"` ComponentKey string `json:"componentKey,omitempty"` DurationMs int64 `json:"durationMs,omitempty"` HTTPStatus int64 `json:"httpStatus,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Payload string `json:"payload,omitempty"` Success bool `json:"success,omitempty"` URL string `json:"url,omitempty"` ErrorStackTrace string `json:"errorStacktrace,omitempty"` }
type Duplication ¶
type Duplication struct {
Blocks []*Block `json:"blocks,omitempty"`
}
type DuplicationsService ¶
type DuplicationsService struct {
// contains filtered or unexported fields
}
func (*DuplicationsService) Show ¶
func (s *DuplicationsService) Show(opt *DuplicationsShowOption) (v *DuplicationsShowObject, resp *http.Response, err error)
Show Get duplications. Require Browse permission on file's project
func (*DuplicationsService) ValidateShowOpt ¶
func (s *DuplicationsService) ValidateShowOpt(opt *DuplicationsShowOption) error
type DuplicationsShowObject ¶
type DuplicationsShowObject struct { Duplications []*Duplication `json:"duplications,omitempty"` Files *Files `json:"files,omitempty"` }
type DuplicationsShowOption ¶
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type Event ¶
type Event struct { Analysis string `json:"analysis,omitempty"` Key string `json:"key,omitempty"` Category EventCatagory `json:"category,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
type EventCatagory ¶
type EventCatagory string
const ( VersionEventCatagory EventCatagory = "VERSION" OtherEventCatagory EventCatagory = "OTHER" QualityProfileEventCatagory EventCatagory = "QUALITY_PROFILE" QualityGateEventCatagory EventCatagory = "QUALITY_GATE" )
type ExportImporter ¶
type Facet ¶
type Facet struct { Name string `json:"name,omitempty"` Property string `json:"property,omitempty"` Values []*FacetValue `json:"values,omitempty"` }
type FacetValue ¶
type FavoritesAddOption ¶
type FavoritesAddOption struct {
Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project:/src/foo/Bar.php"
}
type FavoritesRemoveOption ¶
type FavoritesRemoveOption struct {
Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project"
}
type FavoritesSearchObject ¶
type FavoritesSearchOption ¶
type FavoritesService ¶
type FavoritesService struct {
// contains filtered or unexported fields
}
func (*FavoritesService) Add ¶
func (s *FavoritesService) Add(opt *FavoritesAddOption) (resp *http.Response, err error)
Add Add a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication and the following permission: 'Browse' on the project of the specified component.
func (*FavoritesService) Remove ¶
func (s *FavoritesService) Remove(opt *FavoritesRemoveOption) (resp *http.Response, err error)
Remove Remove a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication.
func (*FavoritesService) Search ¶
func (s *FavoritesService) Search(opt *FavoritesSearchOption) (v *FavoritesSearchObject, resp *http.Response, err error)
Search Search for the authenticated user favorites.<br>Requires authentication.
func (*FavoritesService) ValidateAddOpt ¶
func (s *FavoritesService) ValidateAddOpt(opt *FavoritesAddOption) error
func (*FavoritesService) ValidateRemoveOpt ¶
func (s *FavoritesService) ValidateRemoveOpt(opt *FavoritesRemoveOption) error
func (*FavoritesService) ValidateSearchOpt ¶
func (s *FavoritesService) ValidateSearchOpt(opt *FavoritesSearchOption) error
type FieldValue ¶
type Group ¶
type Group struct { Default bool `json:"default,omitempty"` Description string `json:"description,omitempty"` ID int `json:"id,omitempty"` MembersCount int64 `json:"membersCount,omitempty"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` Selected bool `json:"selected,omitempty"` }
type Incompatible ¶
type Incompatible struct { Category string `json:"category,omitempty"` Description string `json:"description,omitempty"` EditionBundled bool `json:"editionBundled,omitempty"` Key string `json:"key,omitempty"` License string `json:"license,omitempty"` Name string `json:"name,omitempty"` OrganizationName string `json:"organizationName,omitempty"` OrganizationURL string `json:"organizationUrl,omitempty"` }
type Issue ¶
type Issue struct { Actions []string `json:"actions,omitempty"` Assignee string `json:"assignee,omitempty"` Author string `json:"author,omitempty"` Comments []*Comment `json:"comments,omitempty"` Component string `json:"component,omitempty"` CreationDate string `json:"creationDate,omitempty"` Debt string `json:"debt,omitempty"` Effort string `json:"effort,omitempty"` Flows []interface{} `json:"flows,omitempty"` Hash string `json:"hash,omitempty"` Key string `json:"key,omitempty"` Line int `json:"line,omitempty"` Message string `json:"message,omitempty"` Organization string `json:"organization,omitempty"` Project string `json:"project,omitempty"` Rule string `json:"rule,omitempty"` Severity string `json:"severity,omitempty"` Status string `json:"status,omitempty"` Tags []string `json:"tags,omitempty"` TextRange *TextRange `json:"textRange,omitempty"` Transitions []string `json:"transitions,omitempty"` Type string `json:"type,omitempty"` UpdateDate string `json:"updateDate,omitempty"` FromHotspot bool `json:"fromHotspot,omitempty"` Resolution string `json:"resolution,omitempty"` CloseDate string `json:"closeDate,omitempty"` }
type IssuesAddCommentObject ¶
type IssuesAddCommentOption ¶
type IssuesAssignOption ¶
type IssuesAssignOption struct { Assignee string `url:"assignee,omitempty"` // Description:"Login of the assignee. When not set, it will unassign the issue. Use '_me' to assign to current user",ExampleValue:"admin" Issue string `url:"issue,omitempty"` // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" }
type IssuesAuthorsObject ¶
type IssuesAuthorsObject struct {
Authors []string `json:"authors,omitempty"`
}
type IssuesAuthorsOption ¶
type IssuesBulkChangeObject ¶
type IssuesBulkChangeOption ¶
type IssuesBulkChangeOption struct { AddTags string `url:"add_tags,omitempty"` // Description:"Add tags",ExampleValue:"security,java8" Assign string `url:"assign,omitempty"` // Description:"To assign the list of issues to a specific user (login), or un-assign all the issues",ExampleValue:"john.smith" Comment string `url:"comment,omitempty"` // Description:"To add a comment to a list of issues",ExampleValue:"Here is my comment" DoTransition string `url:"do_transition,omitempty"` // Description:"Transition",ExampleValue:"reopen" Issues string `url:"issues,omitempty"` // Description:"Comma-separated list of issue keys",ExampleValue:"AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz" Plan string `url:"plan,omitempty"` // Description:"In 5.5, action plans are dropped. Has no effect. To plan the list of issues to a specific action plan (key), or unlink all the issues from an action plan",ExampleValue:"" RemoveTags string `url:"remove_tags,omitempty"` // Description:"Remove tags",ExampleValue:"security,java8" SendNotifications string `url:"sendNotifications,omitempty"` // Description:"",ExampleValue:"" SetSeverity string `url:"set_severity,omitempty"` // Description:"To change the severity of the list of issues",ExampleValue:"BLOCKER" SetType string `url:"set_type,omitempty"` // Description:"To change the type of the list of issues",ExampleValue:"BUG" }
type IssuesChangelogObject ¶
type IssuesChangelogObject struct {
Changelog []*Changelog `json:"changelog,omitempty"`
}
type IssuesChangelogOption ¶
type IssuesChangelogOption struct {
Issue string `url:"issue,omitempty"` // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}
type IssuesDeleteCommentOption ¶
type IssuesDeleteCommentOption struct {
Comment string `url:"comment,omitempty"` // Description:"Comment key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}
type IssuesEditCommentOption ¶
type IssuesSearchObject ¶
type IssuesSearchObject struct { Components []*Component `json:"components,omitempty"` EffortTotal int `json:"effortTotal,omitempty"` DebtTotal int `json:"debtTotal,omitempty"` Issues []*Issue `json:"issues,omitempty"` P int `json:"p,omitempty"` Ps int `json:"ps,omitempty"` Paging *Paging `json:"paging,omitempty"` Rules []*Rule `json:"rules,omitempty"` Total int `json:"total,omitempty"` Users []*User `json:"users,omitempty"` Facets []*Facet `json:"facets,omitempty"` }
type IssuesSearchOption ¶
type IssuesSearchOption struct { AdditionalFields string `url:"additionalFields,omitempty"` // Description:"Comma-separated list of the optional fields to be returned in response. Action plans are dropped in 5.5, it is not returned in the response.",ExampleValue:"" Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" Assigned string `url:"assigned,omitempty"` // Description:"To retrieve assigned or unassigned issues",ExampleValue:"" Assignees string `url:"assignees,omitempty"` // Description:"Comma-separated list of assignee logins. The value '__me__' can be used as a placeholder for user who performs the request",ExampleValue:"admin,usera,__me__" Authors string `url:"authors,omitempty"` // Description:"Comma-separated list of SCM accounts",ExampleValue:"torvalds@linux-foundation.org" ComponentKeys string `url:"componentKeys,omitempty"` // Description:"Comma-separated list of component keys. Retrieve issues associated to a specific list of components (and all its descendants). A component can be a portfolio, project, module, directory or file.",ExampleValue:"my_project" ComponentRootUuids string `url:"componentRootUuids,omitempty"` // Description:"If used, will have the same meaning as componentUuids AND onComponentOnly=false.",ExampleValue:"" ComponentRoots string `url:"componentRoots,omitempty"` // Description:"If used, will have the same meaning as componentKeys AND onComponentOnly=false.",ExampleValue:"" ComponentUuids string `url:"componentUuids,omitempty"` // Description:"To retrieve issues associated to a specific list of components their sub-components (comma-separated list of component IDs). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. A component can be a project, module, directory or file.",ExampleValue:"584a89f2-8037-4f7b-b82c-8b45d2d63fb2" Components string `url:"components,omitempty"` // Description:"If used, will have the same meaning as componentKeys AND onComponentOnly=true.",ExampleValue:"" CreatedAfter string `url:"createdAfter,omitempty"` // Description:"To retrieve issues created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided. <br>If this parameter is set, createdSince must not be set",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" CreatedAt string `url:"createdAt,omitempty"` // Description:"Datetime to retrieve issues created during a specific analysis",ExampleValue:"2017-10-19T13:00:00+0200" CreatedBefore string `url:"createdBefore,omitempty"` // Description:"To retrieve issues created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" CreatedInLast string `url:"createdInLast,omitempty"` // Description:"To retrieve issues created during a time span before the current time (exclusive). Accepted units are 'y' for year, 'm' for month, 'w' for week and 'd' for day. If this parameter is set, createdAfter must not be set",ExampleValue:"1m2w (1 month 2 weeks)" Facets string `url:"facets,omitempty"` // Description:"Comma-separated list of the facets to be computed. No facet is computed by default." Issues string `url:"issues,omitempty"` // Description:"Comma-separated list of issue keys",ExampleValue:"5bccd6e8-f525-43a2-8d76-fcb13dde79ef" Languages string `url:"languages,omitempty"` // Description:"Comma-separated list of languages. Available since 4.4",ExampleValue:"java,js" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Resolutions string `url:"resolutions,omitempty"` // Description:"Comma-separated list of resolutions",ExampleValue:"FIXED,REMOVED" Resolved string `url:"resolved,omitempty"` // Description:"To match resolved or unresolved issues",ExampleValue:"" Rules string `url:"rules,omitempty"` // Description:"Comma-separated list of coding rule keys. Format is <repository>:<rule>",ExampleValue:"squid:AvoidCycles" S string `url:"s,omitempty"` // Description:"Sort field",ExampleValue:"" Severities string `url:"severities,omitempty"` // Description:"Comma-separated list of severities",ExampleValue:"BLOCKER,CRITICAL" SinceLeakPeriod string `url:"sinceLeakPeriod,omitempty"` // Description:"To retrieve issues created since the leak period.<br>If this parameter is set to a truthy value, createdAfter must not be set and one component id or key must be provided.",ExampleValue:"" Statuses string `url:"statuses,omitempty"` // Description:"Comma-separated list of statuses",ExampleValue:"OPEN,REOPENED" Tags string `url:"tags,omitempty"` // Description:"Comma-separated list of tags.",ExampleValue:"security,convention" Types string `url:"types,omitempty"` // Description:"Comma-separated list of types.",ExampleValue:"CODE_SMELL,BUG" }
type IssuesService ¶
type IssuesService struct {
// contains filtered or unexported fields
}
func (*IssuesService) AddComment ¶
func (s *IssuesService) AddComment(opt *IssuesAddCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
AddComment Add a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
func (*IssuesService) Assign ¶
func (s *IssuesService) Assign(opt *IssuesAssignOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
Assign Assign/Unassign an issue. Requires authentication and Browse permission on project
func (*IssuesService) Authors ¶
func (s *IssuesService) Authors(opt *IssuesAuthorsOption) (v *IssuesAuthorsObject, resp *http.Response, err error)
Authors Search SCM accounts which match a given query
func (*IssuesService) BulkChange ¶
func (s *IssuesService) BulkChange(opt *IssuesBulkChangeOption) (v *IssuesBulkChangeObject, resp *http.Response, err error)
BulkChange Bulk change on issues.<br/>Requires authentication.
func (*IssuesService) Changelog ¶
func (s *IssuesService) Changelog(opt *IssuesChangelogOption) (v *IssuesChangelogObject, resp *http.Response, err error)
Changelog Display changelog of an issue.<br/>Requires the 'Browse' permission on the project of the specified issue.
func (*IssuesService) DeleteComment ¶
func (s *IssuesService) DeleteComment(opt *IssuesDeleteCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
DeleteComment Delete a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
func (*IssuesService) DoTransition ¶
func (s *IssuesService) DoTransition(opt *IssuesDoTransitionOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
DoTransition Do workflow transition on an issue. Requires authentication and Browse permission on project.<br/>The transitions 'wontfix' and 'falsepositive' require the permission 'Administer Issues'.
func (*IssuesService) EditComment ¶
func (s *IssuesService) EditComment(opt *IssuesEditCommentOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
EditComment Edit a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
func (*IssuesService) Search ¶
func (s *IssuesService) Search(opt *IssuesSearchOption) (v *IssuesSearchObject, resp *http.Response, err error)
Search Search for issues.<br>At most one of the following parameters can be provided at the same time: componentKeys, componentUuids, components, componentRootUuids, componentRoots.<br>Requires the 'Browse' permission on the specified project(s).
func (*IssuesService) SetSeverity ¶
func (s *IssuesService) SetSeverity(opt *IssuesSetSeverityOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
SetSeverity Change severity.<br/>Requires the following permissions:<ul> <li>'Authentication'</li> <li>'Browse' rights on project of the specified issue</li> <li>'Administer Issues' rights on project of the specified issue</li></ul>
func (*IssuesService) SetTags ¶
func (s *IssuesService) SetTags(opt *IssuesSetTagsOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
SetTags Set tags on an issue. <br/>Requires authentication and Browse permission on project
func (*IssuesService) SetType ¶
func (s *IssuesService) SetType(opt *IssuesSetTypeOption) (v *IssuesAddCommentObject, resp *http.Response, err error)
SetType Change type of issue, for instance from 'code smell' to 'bug'.<br/>Requires the following permissions:<ul> <li>'Authentication'</li> <li>'Browse' rights on project of the specified issue</li> <li>'Administer Issues' rights on project of the specified issue</li></ul>
func (*IssuesService) Tags ¶
func (s *IssuesService) Tags(opt *IssuesTagsOption) (v *IssuesTagsObject, resp *http.Response, err error)
Tags List tags matching a given query
func (*IssuesService) ValidateAddCommentOpt ¶
func (s *IssuesService) ValidateAddCommentOpt(opt *IssuesAddCommentOption) error
func (*IssuesService) ValidateAssignOpt ¶
func (s *IssuesService) ValidateAssignOpt(opt *IssuesAssignOption) error
func (*IssuesService) ValidateAuthorsOpt ¶
func (s *IssuesService) ValidateAuthorsOpt(opt *IssuesAuthorsOption) error
func (*IssuesService) ValidateBulkChangeOpt ¶
func (s *IssuesService) ValidateBulkChangeOpt(opt *IssuesBulkChangeOption) error
func (*IssuesService) ValidateChangelogOpt ¶
func (s *IssuesService) ValidateChangelogOpt(opt *IssuesChangelogOption) error
func (*IssuesService) ValidateDeleteCommentOpt ¶
func (s *IssuesService) ValidateDeleteCommentOpt(opt *IssuesDeleteCommentOption) error
func (*IssuesService) ValidateDoTransitionOpt ¶
func (s *IssuesService) ValidateDoTransitionOpt(opt *IssuesDoTransitionOption) error
func (*IssuesService) ValidateEditCommentOpt ¶
func (s *IssuesService) ValidateEditCommentOpt(opt *IssuesEditCommentOption) error
func (*IssuesService) ValidateSearchOpt ¶
func (s *IssuesService) ValidateSearchOpt(opt *IssuesSearchOption) error
func (*IssuesService) ValidateSetSeverityOpt ¶
func (s *IssuesService) ValidateSetSeverityOpt(opt *IssuesSetSeverityOption) error
func (*IssuesService) ValidateSetTagsOpt ¶
func (s *IssuesService) ValidateSetTagsOpt(opt *IssuesSetTagsOption) error
func (*IssuesService) ValidateSetTypeOpt ¶
func (s *IssuesService) ValidateSetTypeOpt(opt *IssuesSetTypeOption) error
func (*IssuesService) ValidateTagsOpt ¶
func (s *IssuesService) ValidateTagsOpt(opt *IssuesTagsOption) error
type IssuesSetSeverityOption ¶
type IssuesSetTagsOption ¶
type IssuesSetTagsOption struct { Issue string `url:"issue,omitempty"` // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Tags string `url:"tags,omitempty"` // Description:"Comma-separated list of tags. All tags are removed if parameter is empty or not set.",ExampleValue:"security,cwe,misra-c" }
type IssuesSetTypeOption ¶
type IssuesTagsObject ¶
type IssuesTagsObject struct {
Tags []string `json:"tags,omitempty"`
}
type IssuesTagsOption ¶
type LanguagesListObject ¶
type LanguagesListObject struct {
Languages []*Language `json:"languages,omitempty"`
}
type LanguagesListOption ¶
type LanguagesService ¶
type LanguagesService struct {
// contains filtered or unexported fields
}
func (*LanguagesService) List ¶
func (s *LanguagesService) List(opt *LanguagesListOption) (v *LanguagesListObject, resp *http.Response, err error)
List List supported programming languages
func (*LanguagesService) ValidateListOpt ¶
func (s *LanguagesService) ValidateListOpt(opt *LanguagesListOption) error
type MeasuresComponentObject ¶
type MeasuresComponentOption ¶
type MeasuresComponentOption struct { AdditionalFields string `url:"additionalFields,omitempty"` // Description:"Comma-separated list of additional fields that can be returned in the response.",ExampleValue:"periods,metrics" Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project" ComponentId string `url:"componentId,omitempty"` // Description:"Component id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" MetricKeys string `url:"metricKeys,omitempty"` // Description:"Comma-separated list of metric keys",ExampleValue:"ncloc,complexity,violations" }
type MeasuresComponentTreeOption ¶
type MeasuresComponentTreeOption struct { AdditionalFields string `url:"additionalFields,omitempty"` // Description:"Comma-separated list of additional fields that can be returned in the response.",ExampleValue:"periods,metrics" Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" BaseComponentId string `url:"baseComponentId,omitempty"` // Description:"Base component id. The search is based on this component.",ExampleValue:"AU-TpxcA-iU5OvuD2FLz" Component string `url:"component,omitempty"` // Description:"Component key. The search is based on this component.",ExampleValue:"my_project" MetricKeys string `url:"metricKeys,omitempty"` // Description:"Comma-separated list of metric keys. Types DISTRIB, DATA are not allowed.",ExampleValue:"ncloc,complexity,violations" MetricPeriodSort string `url:"metricPeriodSort,omitempty"` // Description:"Sort measures by leak period or not ?. The 's' parameter must contain the 'metricPeriod' value.",ExampleValue:"" MetricSort string `url:"metricSort,omitempty"` // Description:"Metric key to sort by. The 's' parameter must contain the 'metric' or 'metricPeriod' value. It must be part of the 'metricKeys' parameter",ExampleValue:"ncloc" MetricSortFilter string `url:"metricSortFilter,omitempty"` // Description:"Filter components. Sort must be on a metric. Possible values are: <ul><li>all: return all components</li><li>withMeasuresOnly: filter out components that do not have a measure on the sorted metric</li></ul>",ExampleValue:"" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>",ExampleValue:"FILE_NAM" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>",ExampleValue:"" S string `url:"s,omitempty"` // Description:"Comma-separated list of sort fields",ExampleValue:"name,path" Strategy string `url:"strategy,omitempty"` // Description:"Strategy to search for base component descendants:<ul><li>children: return the children components of the base component. Grandchildren components are not returned</li><li>all: return all the descendants components of the base component. Grandchildren are returned.</li><li>leaves: return all the descendant components (files, in general) which don't have other children. They are the leaves of the component tree.</li></ul>",ExampleValue:"" }
type MeasuresSearchHistoryObject ¶
type MeasuresSearchHistoryObject struct { Measures []*SonarMeasure `json:"measures,omitempty"` Paging Paging `json:"paging,omitempty"` }
type MeasuresSearchHistoryOption ¶
type MeasuresSearchHistoryOption struct { Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project" From string `url:"from,omitempty"` // Description:"Filter measures created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" Metrics string `url:"metrics,omitempty"` // Description:"Comma-separated list of metric keys",ExampleValue:"ncloc,coverage,new_violations" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 1000",ExampleValue:"20" To string `url:"to,omitempty"` // Description:"Filter measures created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" }
type MeasuresService ¶
type MeasuresService struct {
// contains filtered or unexported fields
}
func (*MeasuresService) Component ¶
func (s *MeasuresService) Component(opt *MeasuresComponentOption) (v *MeasuresComponentObject, resp *http.Response, err error)
Component Return component with specified measures. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the project of specified component.
func (*MeasuresService) ComponentTree ¶
func (s *MeasuresService) ComponentTree(opt *MeasuresComponentTreeOption) (v *MeasuresComponentTreeObject, resp *http.Response, err error)
ComponentTree Navigate through components based on the chosen strategy with specified measures. The baseComponentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
func (*MeasuresService) SearchHistory ¶
func (s *MeasuresService) SearchHistory(opt *MeasuresSearchHistoryOption) (v *MeasuresSearchHistoryObject, resp *http.Response, err error)
SearchHistory Search measures history of a component.<br>Measures are ordered chronologically.<br>Pagination applies to the number of measures for each metric.<br>Requires the following permission: 'Browse' on the specified component
func (*MeasuresService) ValidateComponentOpt ¶
func (s *MeasuresService) ValidateComponentOpt(opt *MeasuresComponentOption) error
func (*MeasuresService) ValidateComponentTreeOpt ¶
func (s *MeasuresService) ValidateComponentTreeOpt(opt *MeasuresComponentTreeOption) error
func (*MeasuresService) ValidateSearchHistoryOpt ¶
func (s *MeasuresService) ValidateSearchHistoryOpt(opt *MeasuresSearchHistoryOption) error
type Metric ¶
type Metric struct { ID string `url:"id,omitempty" json:"id,omitempty"` Description string `url:"description,omitempty"` // Description:"Description",ExampleValue:"Size of the team" Direction int `json:"direction"` Domain string `url:"domain,omitempty"` // Description:"Domain",ExampleValue:"Tests" Key string `url:"key,omitempty"` // Description:"Key",ExampleValue:"team_size" Name string `url:"name,omitempty"` // Description:"Name",ExampleValue:"Team Size" Type string `url:"type,omitempty"` // Description:"Metric type key",ExampleValue:"INT" Qualitative bool `json:"qualitative,omitempty"` Hidden bool `json:"hidden,omitempty"` Custom bool `json:"custom,omitempty"` DecimalScale int `json:"decimalScale,omitempty"` }
type MetricsCreateOption ¶
type MetricsCreateOption Metric
type MetricsDeleteOption ¶
type MetricsDomainsObject ¶
type MetricsDomainsObject struct {
Domains []string `json:"domains,omitempty"`
}
type MetricsSearchObject ¶
type MetricsSearchOption ¶
type MetricsSearchOption struct { F string `url:"f,omitempty"` // Description:"Comma-separated list of the fields to be returned in response. All the fields are returned by default.",ExampleValue:"" IsCustom string `url:"isCustom,omitempty"` // Description:"Choose custom metrics following 3 cases:<ul><li>true: only custom metrics are returned</li><li>false: only non custom metrics are returned</li><li>not specified: all metrics are returned</li></ul>",ExampleValue:"true" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" }
type MetricsService ¶
type MetricsService struct {
// contains filtered or unexported fields
}
func (*MetricsService) Create ¶
func (s *MetricsService) Create(opt *MetricsCreateOption) (v *Metric, resp *http.Response, err error)
Create Create custom metric.<br /> Requires 'Administer System' permission.
func (*MetricsService) Delete ¶
func (s *MetricsService) Delete(opt *MetricsDeleteOption) (resp *http.Response, err error)
Delete Delete metrics and associated measures. Delete only custom metrics.<br />Ids or keys must be provided. <br />Requires 'Administer System' permission.
func (*MetricsService) Domains ¶
func (s *MetricsService) Domains() (v *MetricsDomainsObject, resp *http.Response, err error)
Domains List all custom metric domains.
func (*MetricsService) GetDefaultMetrics ¶
func (s *MetricsService) GetDefaultMetrics() []Metric
func (*MetricsService) Search ¶
func (s *MetricsService) Search(opt *MetricsSearchOption) (v *MetricsSearchObject, resp *http.Response, err error)
Search Search for metrics
func (*MetricsService) Types ¶
func (s *MetricsService) Types() (v *MetricsTypesObject, resp *http.Response, err error)
Types List all available metric types.
func (*MetricsService) Update ¶
func (s *MetricsService) Update(opt *MetricsUpdateOption) (v *Metric, resp *http.Response, err error)
Update Update a custom metric.<br /> Requires 'Administer System' permission.
func (*MetricsService) ValidateCreateOpt ¶
func (s *MetricsService) ValidateCreateOpt(opt *MetricsCreateOption) error
func (*MetricsService) ValidateDeleteOpt ¶
func (s *MetricsService) ValidateDeleteOpt(opt *MetricsDeleteOption) error
func (*MetricsService) ValidateSearchOpt ¶
func (s *MetricsService) ValidateSearchOpt(opt *MetricsSearchOption) error
func (*MetricsService) ValidateUpdateOpt ¶
func (s *MetricsService) ValidateUpdateOpt(opt *MetricsUpdateOption) error
type MetricsTypesObject ¶
type MetricsTypesObject struct {
Types []string `json:"types,omitempty"`
}
type MetricsUpdateOption ¶
type MetricsUpdateOption Metric
type Notification ¶
type NotificationsAddOption ¶
type NotificationsAddOption struct { Channel string `url:"channel,omitempty"` // Description:"Channel through which the notification is sent. For example, notifications can be sent by email.",ExampleValue:"" Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" Type string `url:"type,omitempty"` // Description:"Notification type. Possible values are for:<ul> <li>Global notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li> <li>Per project notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li></ul>",ExampleValue:"SQ-MyNewIssues" }
type NotificationsListObject ¶
type NotificationsListObject struct { Channels []string `json:"channels,omitempty"` GlobalTypes []string `json:"globalTypes,omitempty"` Notifications []*Notification `json:"notifications,omitempty"` PerProjectTypes []string `json:"perProjectTypes,omitempty"` }
type NotificationsListOption ¶
type NotificationsListOption struct {
Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:""
}
type NotificationsRemoveOption ¶
type NotificationsRemoveOption struct { Channel string `url:"channel,omitempty"` // Description:"Channel through which the notification is sent. For example, notifications can be sent by email.",ExampleValue:"" Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" Type string `url:"type,omitempty"` // Description:"Notification type. Possible values are for:<ul> <li>Global notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li> <li>Per project notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li></ul>",ExampleValue:"SQ-MyNewIssues" }
type NotificationsService ¶
type NotificationsService struct {
// contains filtered or unexported fields
}
func (*NotificationsService) Add ¶
func (s *NotificationsService) Add(opt *NotificationsAddOption) (resp *http.Response, err error)
Add Add a notification for the authenticated user.<br>Requires one of the following permissions:<ul> <li>Authentication if no login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li> <li>System administration if a login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li></ul>
func (*NotificationsService) List ¶
func (s *NotificationsService) List(opt *NotificationsListOption) (v *NotificationsListObject, resp *http.Response, err error)
List List notifications of the authenticated user.<br>Requires one of the following permissions:<ul> <li>Authentication if no login is provided</li> <li>System administration if a login is provided</li></ul>
func (*NotificationsService) Remove ¶
func (s *NotificationsService) Remove(opt *NotificationsRemoveOption) (resp *http.Response, err error)
Remove Remove a notification for the authenticated user.<br>Requires one of the following permissions:<ul> <li>Authentication if no login is provided</li> <li>System administration if a login is provided</li></ul>
func (*NotificationsService) ValidateAddOpt ¶
func (s *NotificationsService) ValidateAddOpt(opt *NotificationsAddOption) error
func (*NotificationsService) ValidateListOpt ¶
func (s *NotificationsService) ValidateListOpt(opt *NotificationsListOption) error
func (*NotificationsService) ValidateRemoveOpt ¶
func (s *NotificationsService) ValidateRemoveOpt(opt *NotificationsRemoveOption) error
type Paging ¶
type Paging struct { PageIndex int `json:"pageIndex,omitempty"` PageSize int `json:"pageSize,omitempty"` Total int `json:"total,omitempty"` }
Paging is used in many apis
type Permission ¶
type Permission struct { Description string `json:"description,omitempty"` GroupsCount int64 `json:"groupsCount,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` UsersCount int64 `json:"usersCount,omitempty"` WithProjectCreator bool `json:"withProjectCreator,omitempty"` }
type PermissionTemplate ¶
type PermissionTemplate struct { ID string `json:"id,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` ProjectKeyPattern string `json:"projectKeyPattern,omitempty"` Permissions []*Permission `json:"permissions,omitempty"` }
type PermissionsAddGroupOption ¶
type PermissionsAddGroupOption struct { GroupId int `url:"groupId,omitempty"` // Description:"Group id",ExampleValue:"42" GroupName string `url:"groupName,omitempty"` // Description:"Group name or 'anyone' (case insensitive)",ExampleValue:"sonar-administrators" Permission string `url:"permission,omitempty"` // Description:"Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>",ExampleValue:"" ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"ce4c03d6-430f-40a9-b777-ad877c00aa4d" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" }
type PermissionsAddGroupToTemplateOption ¶
type PermissionsAddGroupToTemplateOption struct { GroupId int `url:"groupId,omitempty"` // Description:"Group id",ExampleValue:"42" GroupName string `url:"groupName,omitempty"` // Description:"Group name or 'anyone' (case insensitive)",ExampleValue:"sonar-administrators" Permission string `url:"permission,omitempty"` // Description:"Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>",ExampleValue:"" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsAddProjectCreatorToTemplateOption ¶
type PermissionsAddProjectCreatorToTemplateOption struct { Permission string `url:"permission,omitempty"` // Description:"Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>",ExampleValue:"" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsAddUserOption ¶
type PermissionsAddUserOption struct { Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"g.hopper" Permission string `url:"permission,omitempty"` // Description:"Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>",ExampleValue:"" ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"ce4c03d6-430f-40a9-b777-ad877c00aa4d" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" }
type PermissionsAddUserToTemplateOption ¶
type PermissionsAddUserToTemplateOption struct { Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"g.hopper" Permission string `url:"permission,omitempty"` // Description:"Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>",ExampleValue:"" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsApplyTemplateOption ¶
type PermissionsApplyTemplateOption struct { ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"ce4c03d6-430f-40a9-b777-ad877c00aa4d" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsBulkApplyTemplateOption ¶
type PermissionsBulkApplyTemplateOption struct { AnalyzedBefore string `url:"analyzedBefore,omitempty"` // Description:"Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" OnProvisionedOnly string `url:"onProvisionedOnly,omitempty"` // Description:"Filter the projects that are provisioned",ExampleValue:"" Projects string `url:"projects,omitempty"` // Description:"Comma-separated list of project keys",ExampleValue:"my_project,another_project" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>project names that contain the supplied string</li><li>project keys that are exactly the same as the supplied string</li></ul>",ExampleValue:"apac" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>TRK - Projects</li></ul>",ExampleValue:"" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsCreateTemplateObject ¶
type PermissionsCreateTemplateObject struct {
PermissionTemplate *PermissionTemplate `json:"permissionTemplate,omitempty"`
}
type PermissionsCreateTemplateOption ¶
type PermissionsCreateTemplateOption struct { Description string `url:"description,omitempty"` // Description:"Description",ExampleValue:"Permissions for all projects related to the financial service" Name string `url:"name,omitempty"` // Description:"Name",ExampleValue:"Financial Service Permissions" ProjectKeyPattern string `url:"projectKeyPattern,omitempty"` // Description:"Project key pattern. Must be a valid Java regular expression",ExampleValue:".*\.finance\..*" }
type PermissionsRemoveGroupFromTemplateOption ¶
type PermissionsRemoveGroupFromTemplateOption PermissionsAddGroupToTemplateOption
type PermissionsRemoveGroupOption ¶
type PermissionsRemoveGroupOption PermissionsAddGroupOption
type PermissionsRemoveProjectCreatorFromTemplateOption ¶
type PermissionsRemoveProjectCreatorFromTemplateOption PermissionsAddProjectCreatorToTemplateOption
type PermissionsRemoveUserFromTemplateOption ¶
type PermissionsRemoveUserFromTemplateOption PermissionsAddUserToTemplateOption
type PermissionsRemoveUserOption ¶
type PermissionsRemoveUserOption PermissionsAddUserOption
type PermissionsSearchTemplatesObject ¶
type PermissionsSearchTemplatesObject struct { DefaultTemplates []*DefaultTemplate `json:"defaultTemplates,omitempty"` PermissionTemplates []*PermissionTemplate `json:"permissionTemplates,omitempty"` Permissions []*Permission `json:"permissions,omitempty"` }
type PermissionsSearchTemplatesOption ¶
type PermissionsSearchTemplatesOption struct {
Q string `url:"q,omitempty"` // Description:"Limit search to permission template names that contain the supplied string.",ExampleValue:"defau"
}
type PermissionsService ¶
type PermissionsService struct {
// contains filtered or unexported fields
}
func (*PermissionsService) AddGroup ¶
func (s *PermissionsService) AddGroup(opt *PermissionsAddGroupOption) (resp *http.Response, err error)
AddGroup Add permission to a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group name or group id must be provided. <br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*PermissionsService) AddGroupToTemplate ¶
func (s *PermissionsService) AddGroupToTemplate(opt *PermissionsAddGroupToTemplateOption) (resp *http.Response, err error)
AddGroupToTemplate Add a group to a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
func (*PermissionsService) AddProjectCreatorToTemplate ¶
func (s *PermissionsService) AddProjectCreatorToTemplate(opt *PermissionsAddProjectCreatorToTemplateOption) (resp *http.Response, err error)
AddProjectCreatorToTemplate Add a project creator to a permission template.<br>Requires the following permission: 'Administer System'.
func (*PermissionsService) AddUser ¶
func (s *PermissionsService) AddUser(opt *PermissionsAddUserOption) (resp *http.Response, err error)
AddUser Add permission to a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*PermissionsService) AddUserToTemplate ¶
func (s *PermissionsService) AddUserToTemplate(opt *PermissionsAddUserToTemplateOption) (resp *http.Response, err error)
AddUserToTemplate Add a user to a permission template.<br /> Requires the following permission: 'Administer System'.
func (*PermissionsService) ApplyTemplate ¶
func (s *PermissionsService) ApplyTemplate(opt *PermissionsApplyTemplateOption) (resp *http.Response, err error)
ApplyTemplate Apply a permission template to one project.<br>The project id or project key must be provided.<br>The template id or name must be provided.<br>Requires the following permission: 'Administer System'.
func (*PermissionsService) BulkApplyTemplate ¶
func (s *PermissionsService) BulkApplyTemplate(opt *PermissionsBulkApplyTemplateOption) (resp *http.Response, err error)
BulkApplyTemplate Apply a permission template to several projects.<br />The template id or name must be provided.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) CreateTemplate ¶
func (s *PermissionsService) CreateTemplate(opt *PermissionsCreateTemplateOption) (v *PermissionsCreateTemplateObject, resp *http.Response, err error)
CreateTemplate Create a permission template.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) DeleteTemplate ¶
func (s *PermissionsService) DeleteTemplate(opt *PermissionsDeleteTemplateOption) (resp *http.Response, err error)
DeleteTemplate Delete a permission template.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) RemoveGroup ¶
func (s *PermissionsService) RemoveGroup(opt *PermissionsRemoveGroupOption) (resp *http.Response, err error)
RemoveGroup Remove a permission from a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group id or group name must be provided, not both.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*PermissionsService) RemoveGroupFromTemplate ¶
func (s *PermissionsService) RemoveGroupFromTemplate(opt *PermissionsRemoveGroupFromTemplateOption) (resp *http.Response, err error)
RemoveGroupFromTemplate Remove a group from a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
func (*PermissionsService) RemoveProjectCreatorFromTemplate ¶
func (s *PermissionsService) RemoveProjectCreatorFromTemplate(opt *PermissionsRemoveProjectCreatorFromTemplateOption) (resp *http.Response, err error)
RemoveProjectCreatorFromTemplate Remove a project creator from a permission template.<br>Requires the following permission: 'Administer System'.
func (*PermissionsService) RemoveUser ¶
func (s *PermissionsService) RemoveUser(opt *PermissionsRemoveUserOption) (resp *http.Response, err error)
RemoveUser Remove permission from a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*PermissionsService) RemoveUserFromTemplate ¶
func (s *PermissionsService) RemoveUserFromTemplate(opt *PermissionsRemoveUserFromTemplateOption) (resp *http.Response, err error)
RemoveUserFromTemplate Remove a user from a permission template.<br /> Requires the following permission: 'Administer System'.
func (*PermissionsService) SearchTemplates ¶
func (s *PermissionsService) SearchTemplates(opt *PermissionsSearchTemplatesOption) (v *PermissionsSearchTemplatesObject, resp *http.Response, err error)
SearchTemplates List permission templates.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) SetDefaultTemplate ¶
func (s *PermissionsService) SetDefaultTemplate(opt *PermissionsSetDefaultTemplateOption) (resp *http.Response, err error)
SetDefaultTemplate Set a permission template as default.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) UpdateTemplate ¶
func (s *PermissionsService) UpdateTemplate(opt *PermissionsUpdateTemplateOption) (v *PermissionsCreateTemplateObject, resp *http.Response, err error)
UpdateTemplate Update a permission template.<br />Requires the following permission: 'Administer System'.
func (*PermissionsService) ValidateAddGroupOpt ¶
func (s *PermissionsService) ValidateAddGroupOpt(opt *PermissionsAddGroupOption) error
func (*PermissionsService) ValidateAddGroupToTemplateOpt ¶
func (s *PermissionsService) ValidateAddGroupToTemplateOpt(opt *PermissionsAddGroupToTemplateOption) error
func (*PermissionsService) ValidateAddProjectCreatorToTemplateOpt ¶
func (s *PermissionsService) ValidateAddProjectCreatorToTemplateOpt(opt *PermissionsAddProjectCreatorToTemplateOption) error
func (*PermissionsService) ValidateAddUserOpt ¶
func (s *PermissionsService) ValidateAddUserOpt(opt *PermissionsAddUserOption) error
func (*PermissionsService) ValidateAddUserToTemplateOpt ¶
func (s *PermissionsService) ValidateAddUserToTemplateOpt(opt *PermissionsAddUserToTemplateOption) error
func (*PermissionsService) ValidateApplyTemplateOpt ¶
func (s *PermissionsService) ValidateApplyTemplateOpt(opt *PermissionsApplyTemplateOption) error
func (*PermissionsService) ValidateBulkApplyTemplateOpt ¶
func (s *PermissionsService) ValidateBulkApplyTemplateOpt(opt *PermissionsBulkApplyTemplateOption) error
func (*PermissionsService) ValidateCreateTemplateOpt ¶
func (s *PermissionsService) ValidateCreateTemplateOpt(opt *PermissionsCreateTemplateOption) error
func (*PermissionsService) ValidateDeleteTemplateOpt ¶
func (s *PermissionsService) ValidateDeleteTemplateOpt(opt *PermissionsDeleteTemplateOption) error
func (*PermissionsService) ValidateRemoveGroupFromTemplateOpt ¶
func (s *PermissionsService) ValidateRemoveGroupFromTemplateOpt(opt *PermissionsRemoveGroupFromTemplateOption) error
func (*PermissionsService) ValidateRemoveGroupOpt ¶
func (s *PermissionsService) ValidateRemoveGroupOpt(opt *PermissionsRemoveGroupOption) error
func (*PermissionsService) ValidateRemoveProjectCreatorFromTemplateOpt ¶
func (s *PermissionsService) ValidateRemoveProjectCreatorFromTemplateOpt(opt *PermissionsRemoveProjectCreatorFromTemplateOption) error
func (*PermissionsService) ValidateRemoveUserFromTemplateOpt ¶
func (s *PermissionsService) ValidateRemoveUserFromTemplateOpt(opt *PermissionsRemoveUserFromTemplateOption) error
func (*PermissionsService) ValidateRemoveUserOpt ¶
func (s *PermissionsService) ValidateRemoveUserOpt(opt *PermissionsRemoveUserOption) error
func (*PermissionsService) ValidateSearchTemplatesOpt ¶
func (s *PermissionsService) ValidateSearchTemplatesOpt(opt *PermissionsSearchTemplatesOption) error
func (*PermissionsService) ValidateSetDefaultTemplateOpt ¶
func (s *PermissionsService) ValidateSetDefaultTemplateOpt(opt *PermissionsSetDefaultTemplateOption) error
func (*PermissionsService) ValidateUpdateTemplateOpt ¶
func (s *PermissionsService) ValidateUpdateTemplateOpt(opt *PermissionsUpdateTemplateOption) error
type PermissionsSetDefaultTemplateOption ¶
type PermissionsSetDefaultTemplateOption struct { Qualifier string `url:"qualifier,omitempty"` // Description:"Project qualifier. Filter the results with the specified qualifier. Possible values are:<ul><li>TRK - Projects</li></ul>",ExampleValue:"" TemplateId string `url:"templateId,omitempty"` // Description:"Template id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" TemplateName string `url:"templateName,omitempty"` // Description:"Template name",ExampleValue:"Default Permission Template for Projects" }
type PermissionsUpdateTemplateOption ¶
type PermissionsUpdateTemplateOption struct { Description string `url:"description,omitempty"` // Description:"Description",ExampleValue:"Permissions for all projects related to the financial service" Id string `url:"id,omitempty"` // Description:"Id",ExampleValue:"af8cb8cc-1e78-4c4e-8c00-ee8e814009a5" Name string `url:"name,omitempty"` // Description:"Name",ExampleValue:"Financial Service Permissions" ProjectKeyPattern string `url:"projectKeyPattern,omitempty"` // Description:"Project key pattern. Must be a valid Java regular expression",ExampleValue:".*\.finance\..*" }
type Plugin ¶
type Plugin struct { Category string `json:"category,omitempty"` Description string `json:"description,omitempty"` EditionBundled bool `json:"editionBundled,omitempty"` Filename string `json:"filename,omitempty"` Hash string `json:"hash,omitempty"` HomepageURL string `json:"homepageUrl,omitempty"` ImplementationBuild string `json:"implementationBuild,omitempty"` IssueTrackerURL string `json:"issueTrackerUrl,omitempty"` Key string `json:"key,omitempty"` License string `json:"license,omitempty"` Name string `json:"name,omitempty"` OrganizationName string `json:"organizationName,omitempty"` OrganizationURL string `json:"organizationUrl,omitempty"` Release *Release `json:"release,omitempty"` SonarLintSupported bool `json:"sonarLintSupported,omitempty"` TermsAndConditionsURL string `json:"termsAndConditionsUrl,omitempty"` Update *Update `json:"update,omitempty"` Updates []*Update `json:"updates,omitempty"` UpdatedAt int64 `json:"updatedAt,omitempty"` Version string `json:"version,omitempty"` }
type PluginsAvailableObject ¶
type PluginsInstallOption ¶
type PluginsInstallOption struct {
Key string `url:"key,omitempty"` // Description:"The key identifying the plugin to install",ExampleValue:""
}
type PluginsInstalledObject ¶
type PluginsInstalledObject struct {
Plugins []*Plugin `json:"plugins,omitempty"`
}
type PluginsInstalledOption ¶
type PluginsInstalledOption struct {
F string `url:"f,omitempty"` // Description:"Comma-separated list of the additional fields to be returned in response. No additional field is returned by default. Possible values are:<ul><li>category - category as defined in the Update Center. A connection to the Update Center is needed</li></lu>",ExampleValue:""
}
type PluginsPendingObject ¶
type PluginsService ¶
type PluginsService struct {
// contains filtered or unexported fields
}
func (*PluginsService) Available ¶
func (s *PluginsService) Available() (v *PluginsAvailableObject, resp *http.Response, err error)
Available Get the list of all the plugins available for installation on the SonarQube instance, sorted by plugin name.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.<br/>Update status values are: <ul><li>COMPATIBLE: plugin is compatible with current SonarQube instance.</li><li>INCOMPATIBLE: plugin is not compatible with current SonarQube instance.</li><li>REQUIRES_SYSTEM_UPGRADE: plugin requires SonarQube to be upgraded before being installed.</li><li>DEPS_REQUIRE_SYSTEM_UPGRADE: at least one plugin on which the plugin is dependent requires SonarQube to be upgraded.</li></ul>Require 'Administer System' permission.
func (*PluginsService) CancelAll ¶
func (s *PluginsService) CancelAll() (resp *http.Response, err error)
CancelAll Cancels any operation pending on any plugin (install, update or uninstall)<br/>Requires user to be authenticated with Administer System permissions
func (*PluginsService) Install ¶
func (s *PluginsService) Install(opt *PluginsInstallOption) (resp *http.Response, err error)
Install Installs the latest version of a plugin specified by its key.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
func (*PluginsService) Installed ¶
func (s *PluginsService) Installed(opt *PluginsInstalledOption) (v *PluginsInstalledObject, resp *http.Response, err error)
Installed Get the list of all the plugins installed on the SonarQube instance, sorted by plugin name.
func (*PluginsService) Pending ¶
func (s *PluginsService) Pending() (v *PluginsPendingObject, resp *http.Response, err error)
Pending Get the list of plugins which will either be installed or removed at the next startup of the SonarQube instance, sorted by plugin name.<br/>Require 'Administer System' permission.
func (*PluginsService) Uninstall ¶
func (s *PluginsService) Uninstall(opt *PluginsUninstallOption) (resp *http.Response, err error)
Uninstall Uninstalls the plugin specified by its key.<br/>Requires user to be authenticated with Administer System permissions.
func (*PluginsService) Update ¶
func (s *PluginsService) Update(opt *PluginsUpdateOption) (resp *http.Response, err error)
Update Updates a plugin specified by its key to the latest version compatible with the SonarQube instance.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
func (*PluginsService) Updates ¶
func (s *PluginsService) Updates() (v *PluginsUpdatesObject, resp *http.Response, err error)
Updates Lists plugins installed on the SonarQube instance for which at least one newer version is available, sorted by plugin name.<br/>Each newer version is listed, ordered from the oldest to the newest, with its own update/compatibility status.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.<br/>Update status values are: [COMPATIBLE, INCOMPATIBLE, REQUIRES_UPGRADE, DEPS_REQUIRE_UPGRADE].<br/>Require 'Administer System' permission.
func (*PluginsService) ValidateInstallOpt ¶
func (s *PluginsService) ValidateInstallOpt(opt *PluginsInstallOption) error
func (*PluginsService) ValidateInstalledOpt ¶
func (s *PluginsService) ValidateInstalledOpt(opt *PluginsInstalledOption) error
func (*PluginsService) ValidateUninstallOpt ¶
func (s *PluginsService) ValidateUninstallOpt(opt *PluginsUninstallOption) error
func (*PluginsService) ValidateUpdateOpt ¶
func (s *PluginsService) ValidateUpdateOpt(opt *PluginsUpdateOption) error
type PluginsUninstallOption ¶
type PluginsUninstallOption struct {
Key string `url:"key,omitempty"` // Description:"The key identifying the plugin to uninstall",ExampleValue:""
}
type PluginsUpdateOption ¶
type PluginsUpdateOption struct {
Key string `url:"key,omitempty"` // Description:"The key identifying the plugin to update",ExampleValue:""
}
type PluginsUpdatesObject ¶
type PluginsUpdatesObject PluginsAvailableObject
type ProjectAnalysesCreateEventOption ¶
type ProjectAnalysesCreateEventOption struct { Analysis string `url:"analysis,omitempty"` // Description:"Analysis key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Category EventCatagory `url:"category,omitempty"` // Description:"Category",ExampleValue:"" Name string `url:"name,omitempty"` // Description:"Name",ExampleValue:"5.6" }
type ProjectAnalysesDeleteEventOption ¶
type ProjectAnalysesDeleteEventOption struct {
Event string `url:"event,omitempty"` // Description:"Event key",ExampleValue:"AU-TpxcA-iU5OvuD2FLz"
}
type ProjectAnalysesDeleteOption ¶
type ProjectAnalysesDeleteOption struct {
Analysis string `url:"analysis,omitempty"` // Description:"Analysis key",ExampleValue:"AU-TpxcA-iU5OvuD2FL1"
}
type ProjectAnalysesEventObject ¶
type ProjectAnalysesEventObject struct {
Event *Event `json:"event,omitempty"`
}
type ProjectAnalysesSearchOption ¶
type ProjectAnalysesSearchOption struct { Category string `url:"category,omitempty"` // Description:"Event category. Filter analyses that have at least one event of the category specified.",ExampleValue:"OTHER" From string `url:"from,omitempty"` // Description:"Filter analyses created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided",ExampleValue:"2013-05-01" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" To string `url:"to,omitempty"` // Description:"Filter analyses created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" }
type ProjectAnalysesService ¶
type ProjectAnalysesService struct {
// contains filtered or unexported fields
}
func (*ProjectAnalysesService) CreateEvent ¶
func (s *ProjectAnalysesService) CreateEvent(opt *ProjectAnalysesCreateEventOption) (v *ProjectAnalysesEventObject, resp *http.Response, err error)
CreateEvent Create a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be created.<br>Requires one of the following permissions:<ul> <li>'Administer System'</li> <li>'Administer' rights on the specified project</li></ul>
func (*ProjectAnalysesService) Delete ¶
func (s *ProjectAnalysesService) Delete(opt *ProjectAnalysesDeleteOption) (resp *http.Response, err error)
Delete Delete a project analysis.<br>Requires one of the following permissions:<ul> <li>'Administer System'</li> <li>'Administer' rights on the project of the specified analysis</li></ul>
func (*ProjectAnalysesService) DeleteEvent ¶
func (s *ProjectAnalysesService) DeleteEvent(opt *ProjectAnalysesDeleteEventOption) (resp *http.Response, err error)
DeleteEvent Delete a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be deleted.<br>Requires one of the following permissions:<ul> <li>'Administer System'</li> <li>'Administer' rights on the specified project</li></ul>
func (*ProjectAnalysesService) Search ¶
func (s *ProjectAnalysesService) Search(opt *ProjectAnalysesSearchOption) (v *ProjectAnalysesSearchObject, resp *http.Response, err error)
Search Search a project analyses and attached events.<br>Requires the following permission: 'Browse' on the specified project
func (*ProjectAnalysesService) UpdateEvent ¶
func (s *ProjectAnalysesService) UpdateEvent(opt *ProjectAnalysesUpdateEventOption) (v *ProjectAnalysesEventObject, resp *http.Response, err error)
UpdateEvent Update a project analysis event.<br>Only events of category 'VERSION' and 'OTHER' can be updated.<br>Requires one of the following permissions:<ul> <li>'Administer System'</li> <li>'Administer' rights on the specified project</li></ul>
func (*ProjectAnalysesService) ValidateCreateEventOpt ¶
func (s *ProjectAnalysesService) ValidateCreateEventOpt(opt *ProjectAnalysesCreateEventOption) error
func (*ProjectAnalysesService) ValidateDeleteEventOpt ¶
func (s *ProjectAnalysesService) ValidateDeleteEventOpt(opt *ProjectAnalysesDeleteEventOption) error
func (*ProjectAnalysesService) ValidateDeleteOpt ¶
func (s *ProjectAnalysesService) ValidateDeleteOpt(opt *ProjectAnalysesDeleteOption) error
func (*ProjectAnalysesService) ValidateSearchOpt ¶
func (s *ProjectAnalysesService) ValidateSearchOpt(opt *ProjectAnalysesSearchOption) error
func (*ProjectAnalysesService) ValidateUpdateEventOpt ¶
func (s *ProjectAnalysesService) ValidateUpdateEventOpt(opt *ProjectAnalysesUpdateEventOption) error
type ProjectBadgesMeasureOption ¶
type ProjectBadgesMeasureOption struct { Branch string `url:"branch,omitempty"` // Description:"Branch key",ExampleValue:"feature/my_branch" Metric string `url:"metric,omitempty"` // Description:"Metric key",ExampleValue:"" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" PullRequest string `url:"pullRequest,omitempty"` // Description:"Pull request id",ExampleValue:"5461" }
type ProjectBadgesQualityGateOption ¶
type ProjectBadgesQualityGateOption struct { Branch string `url:"branch,omitempty"` // Description:"Branch key",ExampleValue:"feature/my_branch" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" PullRequest string `url:"pullRequest,omitempty"` // Description:"Pull request id",ExampleValue:"5461" }
type ProjectBadgesService ¶
type ProjectBadgesService struct {
// contains filtered or unexported fields
}
func (*ProjectBadgesService) Measure ¶
func (s *ProjectBadgesService) Measure(opt *ProjectBadgesMeasureOption) (v *string, resp *http.Response, err error)
Measure Generate badge for project's measure as an SVG.<br/>Requires 'Browse' permission on the specified project.
func (*ProjectBadgesService) QualityGate ¶
func (s *ProjectBadgesService) QualityGate(opt *ProjectBadgesQualityGateOption) (v *string, resp *http.Response, err error)
QualityGate Generate badge for project's quality gate as an SVG.<br/>Requires 'Browse' permission on the specified project.
func (*ProjectBadgesService) ValidateMeasureOpt ¶
func (s *ProjectBadgesService) ValidateMeasureOpt(opt *ProjectBadgesMeasureOption) error
func (*ProjectBadgesService) ValidateQualityGateOpt ¶
func (s *ProjectBadgesService) ValidateQualityGateOpt(opt *ProjectBadgesQualityGateOption) error
type ProjectBranchesListObject ¶
type ProjectBranchesListObject struct {
Branches []*Branch `json:"branches,omitempty"`
}
type ProjectBranchesListOption ¶
type ProjectBranchesListOption struct {
Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
}
type ProjectBranchesService ¶
type ProjectBranchesService struct {
// contains filtered or unexported fields
}
func (*ProjectBranchesService) Delete ¶
func (s *ProjectBranchesService) Delete(opt *ProjectBranchesDeleteOption) (resp *http.Response, err error)
Delete Delete a non-main branch of a project.<br/>Requires 'Administer' rights on the specified project.
func (*ProjectBranchesService) List ¶
func (s *ProjectBranchesService) List(opt *ProjectBranchesListOption) (v *ProjectBranchesListObject, resp *http.Response, err error)
List List the branches of a project.<br/>Requires 'Browse' or 'Execute analysis' rights on the specified project.
func (*ProjectBranchesService) Rename ¶
func (s *ProjectBranchesService) Rename(opt *ProjectBranchesRenameOption) (resp *http.Response, err error)
Rename Rename the main branch of a project.<br/>Requires 'Administer' permission on the specified project.
func (*ProjectBranchesService) ValidateDeleteOpt ¶
func (s *ProjectBranchesService) ValidateDeleteOpt(opt *ProjectBranchesDeleteOption) error
func (*ProjectBranchesService) ValidateListOpt ¶
func (s *ProjectBranchesService) ValidateListOpt(opt *ProjectBranchesListOption) error
func (*ProjectBranchesService) ValidateRenameOpt ¶
func (s *ProjectBranchesService) ValidateRenameOpt(opt *ProjectBranchesRenameOption) error
type ProjectLinksCreateObject ¶
type ProjectLinksCreateObject struct {
Link *Link `json:"link,omitempty"`
}
type ProjectLinksCreateOption ¶
type ProjectLinksCreateOption struct { Name string `url:"name,omitempty"` // Description:"Link name",ExampleValue:"Custom" ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" Url string `url:"url,omitempty"` // Description:"Link url",ExampleValue:"http://example.com" }
type ProjectLinksDeleteOption ¶
type ProjectLinksDeleteOption struct {
Id string `url:"id,omitempty"` // Description:"Link id",ExampleValue:"17"
}
type ProjectLinksSearchObject ¶
type ProjectLinksSearchObject struct {
Links []*Link `json:"links,omitempty"`
}
type ProjectLinksService ¶
type ProjectLinksService struct {
// contains filtered or unexported fields
}
func (*ProjectLinksService) Create ¶
func (s *ProjectLinksService) Create(opt *ProjectLinksCreateOption) (v *ProjectLinksCreateObject, resp *http.Response, err error)
Create Create a new project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*ProjectLinksService) Delete ¶
func (s *ProjectLinksService) Delete(opt *ProjectLinksDeleteOption) (resp *http.Response, err error)
Delete Delete existing project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*ProjectLinksService) Search ¶
func (s *ProjectLinksService) Search(opt *ProjectLinksSearchOption) (v *ProjectLinksSearchObject, resp *http.Response, err error)
Search List links of a project.<br>The 'projectId' or 'projectKey' must be provided.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
func (*ProjectLinksService) ValidateCreateOpt ¶
func (s *ProjectLinksService) ValidateCreateOpt(opt *ProjectLinksCreateOption) error
func (*ProjectLinksService) ValidateDeleteOpt ¶
func (s *ProjectLinksService) ValidateDeleteOpt(opt *ProjectLinksDeleteOption) error
func (*ProjectLinksService) ValidateSearchOpt ¶
func (s *ProjectLinksService) ValidateSearchOpt(opt *ProjectLinksSearchOption) error
type ProjectPullRequestsListObject ¶
type ProjectPullRequestsListObject struct {
PullRequests []*PullRequest `json:"pullRequests,omitempty"`
}
type ProjectPullRequestsListOption ¶
type ProjectPullRequestsListOption struct {
Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
}
type ProjectPullRequestsService ¶
type ProjectPullRequestsService struct {
// contains filtered or unexported fields
}
func (*ProjectPullRequestsService) Delete ¶
func (s *ProjectPullRequestsService) Delete(opt *ProjectPullRequestsDeleteOption) (resp *http.Response, err error)
Delete Delete a pull request.<br/>Requires 'Administer' rights on the specified project.
func (*ProjectPullRequestsService) List ¶
func (s *ProjectPullRequestsService) List(opt *ProjectPullRequestsListOption) (v *ProjectPullRequestsListObject, resp *http.Response, err error)
List List the pull requests of a project.<br/>One of the following permissions is required: <ul><li>'Browse' rights on the specified project</li><li>'Execute Analysis' rights on the specified project</li></ul>
func (*ProjectPullRequestsService) ValidateDeleteOpt ¶
func (s *ProjectPullRequestsService) ValidateDeleteOpt(opt *ProjectPullRequestsDeleteOption) error
func (*ProjectPullRequestsService) ValidateListOpt ¶
func (s *ProjectPullRequestsService) ValidateListOpt(opt *ProjectPullRequestsListOption) error
type ProjectSearchObject ¶
type ProjectSearchObject ComponentsSearchObject
type ProjectStatus ¶
type ProjectTagsSearchOption ¶
type ProjectTagsService ¶
type ProjectTagsService struct {
// contains filtered or unexported fields
}
func (*ProjectTagsService) Search ¶
func (s *ProjectTagsService) Search(opt *ProjectTagsSearchOption) (v *IssuesTagsObject, resp *http.Response, err error)
Search Search tags
func (*ProjectTagsService) Set ¶
func (s *ProjectTagsService) Set(opt *ProjectTagsSetOption) (resp *http.Response, err error)
Set Set tags on a project.<br>Requires the following permission: 'Administer' rights on the specified project
func (*ProjectTagsService) ValidateSearchOpt ¶
func (s *ProjectTagsService) ValidateSearchOpt(opt *ProjectTagsSearchOption) error
func (*ProjectTagsService) ValidateSetOpt ¶
func (s *ProjectTagsService) ValidateSetOpt(opt *ProjectTagsSetOption) error
type ProjectTagsSetOption ¶
type ProjectsBulkDeleteOption ¶
type ProjectsBulkDeleteOption struct { AnalyzedBefore string `url:"analyzedBefore,omitempty"` // Description:"Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" OnProvisionedOnly string `url:"onProvisionedOnly,omitempty"` // Description:"Filter the projects that are provisioned",ExampleValue:"" ProjectIds string `url:"projectIds,omitempty"` // Description:"Comma-separated list of project ids. Only the 1'000 first ids are used. Others are silently ignored.",ExampleValue:"AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz" Projects string `url:"projects,omitempty"` // Description:"Comma-separated list of project keys",ExampleValue:"my_project,another_project" Q string `url:"q,omitempty"` // Description:"Limit to: <ul><li>component names that contain the supplied string</li><li>component keys that contain the supplied string</li></ul>",ExampleValue:"sonar" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers",ExampleValue:"" }
type ProjectsBulkUpdateKeyObject ¶
type ProjectsBulkUpdateKeyObject struct {
Keys []*Key `json:"keys,omitempty"`
}
type ProjectsBulkUpdateKeyOption ¶
type ProjectsBulkUpdateKeyOption struct { DryRun string `url:"dryRun,omitempty"` // Description:"Simulate bulk update. No component key is updated.",ExampleValue:"" From string `url:"from,omitempty"` // Description:"String to match in components keys",ExampleValue:"_old" Project string `url:"project,omitempty"` // Description:"Project or module key",ExampleValue:"my_old_project" ProjectId string `url:"projectId,omitempty"` // Description:"Project or module ID",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" To string `url:"to,omitempty"` // Description:"String replacement in components keys",ExampleValue:"_new" }
type ProjectsCreateObject ¶
type ProjectsCreateObject struct {
Project *Project `json:"project,omitempty"`
}
type ProjectsCreateOption ¶
type ProjectsCreateOption struct { Branch string `url:"branch,omitempty"` // Description:"SCM Branch of the project. The key of the project will become key:branch, for instance 'SonarQube:branch-5.0'",ExampleValue:"branch-5.0" Name string `url:"name,omitempty"` // Description:"Name of the project",ExampleValue:"SonarQube" Project string `url:"project,omitempty"` // Description:"Key of the project",ExampleValue:"my_project" Visibility string `url:"visibility,omitempty"` // Description:"Whether the created project should be visible to everyone, or only specific user/groups.<br/>If no visibility is specified, the default project visibility of the organization will be used.",ExampleValue:"" }
type ProjectsDeleteOption ¶
type ProjectsSearchOption ¶
type ProjectsSearchOption struct { AnalyzedBefore string `url:"analyzedBefore,omitempty"` // Description:"Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" OnProvisionedOnly string `url:"onProvisionedOnly,omitempty"` // Description:"Filter the projects that are provisioned",ExampleValue:"" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" ProjectIds string `url:"projectIds,omitempty"` // Description:"Comma-separated list of project ids",ExampleValue:"AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz" Projects string `url:"projects,omitempty"` // Description:"Comma-separated list of project keys",ExampleValue:"my_project,another_project" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that contain the supplied string</li></ul>",ExampleValue:"sonar" Qualifiers string `url:"qualifiers,omitempty"` // Description:"Comma-separated list of component qualifiers. Filter the results with the specified qualifiers",ExampleValue:"" }
type ProjectsService ¶
type ProjectsService struct {
// contains filtered or unexported fields
}
func (*ProjectsService) BulkDelete ¶
func (s *ProjectsService) BulkDelete(opt *ProjectsBulkDeleteOption) (resp *http.Response, err error)
BulkDelete Delete one or several projects.<br />Requires 'Administer System' permission.
func (*ProjectsService) BulkUpdateKey ¶
func (s *ProjectsService) BulkUpdateKey(opt *ProjectsBulkUpdateKeyOption) (v *ProjectsBulkUpdateKeyObject, resp *http.Response, err error)
BulkUpdateKey Bulk update a project or module key and all its sub-components keys. The bulk update allows to replace a part of the current key by another string on the current project and all its sub-modules.<br>It's possible to simulate the bulk update by setting the parameter 'dryRun' at true. No key is updated with a dry run.<br>Ex: to rename a project with key 'my_project' to 'my_new_project' and all its sub-components keys, call the WS with parameters:<ul> <li>project: my_project</li> <li>from: my_</li> <li>to: my_new_</li></ul>Either 'projectId' or 'project' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*ProjectsService) Create ¶
func (s *ProjectsService) Create(opt *ProjectsCreateOption) (v *ProjectsCreateObject, resp *http.Response, err error)
Create Create a project.<br/>Requires 'Create Projects' permission
func (*ProjectsService) Delete ¶
func (s *ProjectsService) Delete(opt *ProjectsDeleteOption) (resp *http.Response, err error)
Delete Delete a project.<br> Requires 'Administer System' permission or 'Administer' permission on the project.
func (*ProjectsService) Search ¶
func (s *ProjectsService) Search(opt *ProjectsSearchOption) (v *ProjectSearchObject, resp *http.Response, err error)
Search Search for projects or views to administrate them.<br>Requires 'System Administrator' permission
func (*ProjectsService) UpdateKey ¶
func (s *ProjectsService) UpdateKey(opt *ProjectsUpdateKeyOption) (resp *http.Response, err error)
UpdateKey Update a project or module key and all its sub-components keys.<br>Either 'from' or 'projectId' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
func (*ProjectsService) UpdateVisibility ¶
func (s *ProjectsService) UpdateVisibility(opt *ProjectsUpdateVisibilityOption) (resp *http.Response, err error)
UpdateVisibility Updates visibility of a project.<br>Requires 'Project administer' permission on the specified project
func (*ProjectsService) ValidateBulkDeleteOpt ¶
func (s *ProjectsService) ValidateBulkDeleteOpt(opt *ProjectsBulkDeleteOption) error
func (*ProjectsService) ValidateBulkUpdateKeyOpt ¶
func (s *ProjectsService) ValidateBulkUpdateKeyOpt(opt *ProjectsBulkUpdateKeyOption) error
func (*ProjectsService) ValidateCreateOpt ¶
func (s *ProjectsService) ValidateCreateOpt(opt *ProjectsCreateOption) error
func (*ProjectsService) ValidateDeleteOpt ¶
func (s *ProjectsService) ValidateDeleteOpt(opt *ProjectsDeleteOption) error
func (*ProjectsService) ValidateSearchOpt ¶
func (s *ProjectsService) ValidateSearchOpt(opt *ProjectsSearchOption) error
func (*ProjectsService) ValidateUpdateKeyOpt ¶
func (s *ProjectsService) ValidateUpdateKeyOpt(opt *ProjectsUpdateKeyOption) error
func (*ProjectsService) ValidateUpdateVisibilityOpt ¶
func (s *ProjectsService) ValidateUpdateVisibilityOpt(opt *ProjectsUpdateVisibilityOption) error
type ProjectsUpdateKeyOption ¶
type ProjectsUpdateKeyOption struct { From string `url:"from,omitempty"` // Description:"Project or module key",ExampleValue:"my_old_project" ProjectId string `url:"projectId,omitempty"` // Description:"Project or module id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" To string `url:"to,omitempty"` // Description:"New component key",ExampleValue:"my_new_project" }
type PullRequest ¶
type PullRequest struct { AnalysisDate string `json:"analysisDate,omitempty"` Base string `json:"base,omitempty"` Branch string `json:"branch,omitempty"` Key string `json:"key,omitempty"` Status Status `json:"status,omitempty"` Title string `json:"title,omitempty"` URL string `json:"url,omitempty"` }
type QualityGate ¶
type QualityGateV2 ¶
type QualityGatesCondition ¶
type QualityGatesCondition struct { Error string `json:"error,omitempty"` ID int `json:"id,omitempty"` Metric string `json:"metric,omitempty"` Op string `json:"op,omitempty"` Warning string `json:"warning,omitempty"` Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org Period string `url:"period,omitempty"` // Description:"Condition period. If not set, the absolute value is considered.",ExampleValue:"1" }
type QualityProfile ¶
type QualityProfile struct { Actions *Actions `json:"actions,omitempty"` ActiveRuleCount int64 `json:"activeRuleCount,omitempty"` IsBuiltIn bool `json:"isBuiltIn,omitempty"` IsDefault bool `json:"isDefault,omitempty"` IsInherited bool `json:"isInherited,omitempty"` Key string `json:"key,omitempty"` Language string `json:"language,omitempty"` LanguageName string `json:"languageName,omitempty"` Name string `json:"name,omitempty"` OverridingRuleCount int64 `json:"overridingRuleCount,omitempty"` Organization string `json:"organization,omitempty"` Parent string `json:"parent,omitempty"` ParentKey string `json:"parentKey,omitempty"` ActiveDeprecatedRuleCount int `json:"activeDeprecatedRuleCount,omitempty"` RulesUpdatedAt string `json:"rulesUpdatedAt,omitempty"` UserUpdatedAt string `json:"userUpdatedAt,omitempty"` LastUsed string `json:"lastUsed,omitempty"` ProjectCount int `json:"projectCount,omitempty"` }
type QualityProfilesActivateRuleOption ¶
type QualityProfilesActivateRuleOption struct { Key string `url:"key,omitempty"` // Description:"Quality Profile key. Can be obtained through <code>api/qualityprofiles/search</code>",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Params string `url:"params,omitempty"` // Description:"Parameters as semi-colon list of <code>key=value</code>. Ignored if parameter reset is true.",ExampleValue:"params=key1=v1;key2=v2" Reset string `url:"reset,omitempty"` // Description:"Reset severity and parameters of activated rule. Set the values defined on parent profile or from rule default values.",ExampleValue:"" Rule string `url:"rule,omitempty"` // Description:"Rule key",ExampleValue:"squid:AvoidCycles" Severity string `url:"severity,omitempty"` // Description:"Severity. Ignored if parameter reset is true.",ExampleValue:"" }
type QualityProfilesActivateRulesOption ¶
type QualityProfilesActivateRulesOption struct { Activation string `url:"activation,omitempty"` // Description:"Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.",ExampleValue:"" ActiveSeverities string `url:"active_severities,omitempty"` // Description:"Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" AvailableSince string `url:"available_since,omitempty"` // Description:"Filters rules added since date. Format is yyyy-MM-dd",ExampleValue:"2014-06-22" Inheritance string `url:"inheritance,omitempty"` // Description:"Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.",ExampleValue:"INHERITED,OVERRIDES" IsTemplate string `url:"is_template,omitempty"` // Description:"Filter template rules",ExampleValue:"" Languages string `url:"languages,omitempty"` // Description:"Comma-separated list of languages",ExampleValue:"java,js" Q string `url:"q,omitempty"` // Description:"UTF-8 search query",ExampleValue:"xpath" Qprofile string `url:"qprofile,omitempty"` // Description:"Quality profile key to filter on. Used only if the parameter 'activation' is set.",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Repositories string `url:"repositories,omitempty"` // Description:"Comma-separated list of repositories",ExampleValue:"checkstyle,findbugs" RuleKey string `url:"rule_key,omitempty"` // Description:"Key of rule to search for",ExampleValue:"squid:S001" S string `url:"s,omitempty"` // Description:"Sort field",ExampleValue:"name" Severities string `url:"severities,omitempty"` // Description:"Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Statuses string `url:"statuses,omitempty"` // Description:"Comma-separated list of status codes",ExampleValue:"READY" Tags string `url:"tags,omitempty"` // Description:"Comma-separated list of tags. Returned rules match any of the tags (OR operator)",ExampleValue:"security,java8" TargetKey string `url:"targetKey,omitempty"` // Description:"Quality Profile key on which the rule activation is done. To retrieve a quality profile key please see <code>api/qualityprofiles/search</code>",ExampleValue:"AU-TpxcA-iU5OvuD2FL0" TargetSeverity string `url:"targetSeverity,omitempty"` // Description:"Severity to set on the activated rules",ExampleValue:"" TemplateKey string `url:"template_key,omitempty"` // Description:"Key of the template rule to filter on. Used to search for the custom rules based on this template.",ExampleValue:"java:S001" Types string `url:"types,omitempty"` // Description:"Comma-separated list of types. Returned rules match any of the tags (OR operator)",ExampleValue:"BUG" }
type QualityProfilesAddProjectOption ¶
type QualityProfilesAddProjectOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" ProjectUuid string `url:"projectUuid,omitempty"` // Description:"Project ID. Either this parameter or 'project' must be set.",ExampleValue:"AU-TpxcA-iU5OvuD2FL5" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" Organization string `json:"organization,omitempty"` }
type QualityProfilesBackupOption ¶
type QualityProfilesBackupOption struct {
ProfileKey string `url:"profileKey,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}
type QualityProfilesChangeParentOption ¶
type QualityProfilesChangeParentOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" ParentKey string `url:"parentKey,omitempty"` // Description:"New parent profile key.<br> If no profile is provided, the inheritance link with current parent profile (if any) is broken, which deactivates all rules which come from the parent and are not overridden.",ExampleValue:"AU-TpxcA-iU5OvuD2FLz" ParentQualityProfile string `url:"parentQualityProfile,omitempty"` // Description:"Quality profile name. If this parameter is set, 'parentKey' must not be set and 'language' must be set to disambiguate.",ExampleValue:"Sonar way" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" }
type QualityProfilesChangelogObject ¶
type QualityProfilesChangelogObject struct { Events []*QualityProfilesEvent `json:"events,omitempty"` P int64 `json:"p,omitempty"` Ps int64 `json:"ps,omitempty"` Total int64 `json:"total,omitempty"` }
type QualityProfilesChangelogOption ¶
type QualityProfilesChangelogOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" Since string `url:"since,omitempty"` // Description:"Start date for the changelog. <br>Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" To string `url:"to,omitempty"` // Description:"End date for the changelog. <br>Either a date (server timezone) or datetime can be provided.",ExampleValue:"2017-10-19 or 2017-10-19T13:00:00+0200" }
type QualityProfilesCreateObject ¶
type QualityProfilesCreateObject struct { Profile *QualityProfile `json:"profile,omitempty"` Warnings []string `json:"warnings,omitempty"` }
type QualityProfilesCreateOption ¶
type QualityProfilesCreateOption struct { BackupSonarlintVsCsFake string `url:"backup_sonarlint-vs-cs-fake,omitempty"` // Description:"A configuration file for Technical importer for the MSBuild SonarQube Scanner.",ExampleValue:"" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"js" Name string `url:"name,omitempty"` // Description:"Quality profile name",ExampleValue:"My Sonar way" Organization string `url:"organization,omitempty"` }
type QualityProfilesDeactivateRuleOption ¶
type QualityProfilesDeactivateRuleOption struct { Key string `url:"key,omitempty"` // Description:"Quality Profile key. Can be obtained through <code>api/qualityprofiles/search</code>",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Rule string `url:"rule,omitempty"` // Description:"Rule key",ExampleValue:"squid:AvoidCycles" }
type QualityProfilesDeactivateRulesOption ¶
type QualityProfilesDeactivateRulesOption struct { Activation string `url:"activation,omitempty"` // Description:"Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.",ExampleValue:"" ActiveSeverities string `url:"active_severities,omitempty"` // Description:"Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" AvailableSince string `url:"available_since,omitempty"` // Description:"Filters rules added since date. Format is yyyy-MM-dd",ExampleValue:"2014-06-22" Inheritance string `url:"inheritance,omitempty"` // Description:"Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.",ExampleValue:"INHERITED,OVERRIDES" IsTemplate string `url:"is_template,omitempty"` // Description:"Filter template rules",ExampleValue:"" Languages string `url:"languages,omitempty"` // Description:"Comma-separated list of languages",ExampleValue:"java,js" Q string `url:"q,omitempty"` // Description:"UTF-8 search query",ExampleValue:"xpath" Qprofile string `url:"qprofile,omitempty"` // Description:"Quality profile key to filter on. Used only if the parameter 'activation' is set.",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Repositories string `url:"repositories,omitempty"` // Description:"Comma-separated list of repositories",ExampleValue:"checkstyle,findbugs" RuleKey string `url:"rule_key,omitempty"` // Description:"Key of rule to search for",ExampleValue:"squid:S001" S string `url:"s,omitempty"` // Description:"Sort field",ExampleValue:"name" Severities string `url:"severities,omitempty"` // Description:"Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Statuses string `url:"statuses,omitempty"` // Description:"Comma-separated list of status codes",ExampleValue:"READY" Tags string `url:"tags,omitempty"` // Description:"Comma-separated list of tags. Returned rules match any of the tags (OR operator)",ExampleValue:"security,java8" TargetKey string `url:"targetKey,omitempty"` // Description:"Quality Profile key on which the rule deactivation is done. To retrieve a profile key please see <code>api/qualityprofiles/search</code>",ExampleValue:"AU-TpxcA-iU5OvuD2FL1" TemplateKey string `url:"template_key,omitempty"` // Description:"Key of the template rule to filter on. Used to search for the custom rules based on this template.",ExampleValue:"java:S001" Types string `url:"types,omitempty"` // Description:"Comma-separated list of types. Returned rules match any of the tags (OR operator)",ExampleValue:"BUG" }
type QualityProfilesDeactiveRulesObject ¶
type QualityProfilesDeactiveRulesObject QualityProfilesActiveRulesObject
type QualityProfilesDeleteOption ¶
type QualityProfilesDeleteOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" }
type QualityProfilesEvent ¶
type QualityProfilesEvent struct { Action string `json:"action,omitempty"` AuthorLogin string `json:"authorLogin,omitempty"` AuthorName string `json:"authorName,omitempty"` Date string `json:"date,omitempty"` Params interface{} `json:"params,omitempty"` RuleKey string `json:"ruleKey,omitempty"` RuleName string `json:"ruleName,omitempty"` }
type QualityProfilesExportOption ¶
type QualityProfilesExportOption struct { ExporterKey string `url:"exporterKey,omitempty"` // Description:"Output format. If left empty, the same format as api/qualityprofiles/backup is used. Possible values are described by api/qualityprofiles/exporters.",ExampleValue:"" Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"py" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name to export. If left empty, the default profile for the language is exported.",ExampleValue:"My Sonar way" }
type QualityProfilesExportersObject ¶
type QualityProfilesExportersObject struct {
Exporters []*ExportImporter `json:"exporters,omitempty"`
}
type QualityProfilesImportersObject ¶
type QualityProfilesImportersObject struct {
Importers []*ExportImporter `json:"importers,omitempty"`
}
type QualityProfilesInheritanceObject ¶
type QualityProfilesInheritanceObject struct { Ancestors []*QualityProfile `json:"ancestors,omitempty"` Children []*QualityProfile `json:"children,omitempty"` Profile QualityProfile `json:"profile,omitempty"` }
type QualityProfilesInheritanceOption ¶
type QualityProfilesInheritanceOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" }
type QualityProfilesProjectsOption ¶
type QualityProfilesProjectsOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to projects that contain the supplied string.",ExampleValue:"sonar" Selected string `url:"selected,omitempty"` // Description:"Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).",ExampleValue:"" }
type QualityProfilesRemoveProjectOption ¶
type QualityProfilesRemoveProjectOption QualityProfilesAddProjectOption
type QualityProfilesRestoreOption ¶
type QualityProfilesRestoreOption struct {
Backup string `url:"backup,omitempty"` // Description:"A profile backup file in XML format, as generated by api/qualityprofiles/backup or the former api/profiles/backup.",ExampleValue:""
}
type QualityProfilesSearchObject ¶
type QualityProfilesSearchObject struct { Actions *Actions `json:"actions,omitempty"` Profiles []*QualityProfile `json:"profiles,omitempty"` }
type QualityProfilesSearchOption ¶
type QualityProfilesSearchOption struct { Defaults string `url:"defaults,omitempty"` // Description:"If set to true, return only the quality profiles marked as default for each language",ExampleValue:"" Language string `url:"language,omitempty"` // Description:"Language key. If provided, only profiles for the given language are returned.",ExampleValue:"" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"SonarQube Way" }
type QualityProfilesService ¶
type QualityProfilesService struct {
// contains filtered or unexported fields
}
func (*QualityProfilesService) ActivateRule ¶
func (s *QualityProfilesService) ActivateRule(opt *QualityProfilesActivateRuleOption) (resp *http.Response, err error)
ActivateRule Activate a rule on a Quality Profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) ActivateRules ¶
func (s *QualityProfilesService) ActivateRules(opt *QualityProfilesActivateRulesOption) (v *QualityProfilesActiveRulesObject, resp *http.Response, err error)
ActivateRules Bulk-activate rules on one quality profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) AddProject ¶
func (s *QualityProfilesService) AddProject(opt *QualityProfilesAddProjectOption) (resp *http.Response, err error)
AddProject Associate a project with a quality profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li> <li>Administer right on the specified project</li></ul>
func (*QualityProfilesService) Backup ¶
func (s *QualityProfilesService) Backup(opt *QualityProfilesBackupOption) (v *string, resp *http.Response, err error)
Backup Backup a quality profile in XML form. The exported profile can be restored through api/qualityprofiles/restore.
func (*QualityProfilesService) ChangeParent ¶
func (s *QualityProfilesService) ChangeParent(opt *QualityProfilesChangeParentOption) (resp *http.Response, err error)
ChangeParent Change a quality profile's parent.<br>Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) Changelog ¶
func (s *QualityProfilesService) Changelog(opt *QualityProfilesChangelogOption) (v *QualityProfilesChangelogObject, resp *http.Response, err error)
Changelog Get the history of changes on a quality profile: rule activation/deactivation, change in parameters/severity. Events are ordered by date in descending order (most recent first).
func (*QualityProfilesService) Copy ¶
func (s *QualityProfilesService) Copy(opt *QualityProfilesCopyOption) (v *QualityProfile, resp *http.Response, err error)
Copy Copy a quality profile.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
func (*QualityProfilesService) Create ¶
func (s *QualityProfilesService) Create(opt *QualityProfilesCreateOption) (v *QualityProfilesCreateObject, resp *http.Response, err error)
Create Create a quality profile.<br>Requires to be logged in and the 'Administer Quality Profiles' permission.
func (*QualityProfilesService) DeactivateRule ¶
func (s *QualityProfilesService) DeactivateRule(opt *QualityProfilesDeactivateRuleOption) (resp *http.Response, err error)
DeactivateRule Deactivate a rule on a quality profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) DeactivateRules ¶
func (s *QualityProfilesService) DeactivateRules(opt *QualityProfilesDeactivateRulesOption) (v *QualityProfilesDeactiveRulesObject, resp *http.Response, err error)
DeactivateRules Bulk deactivate rules on Quality profiles.<br>Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) Delete ¶
func (s *QualityProfilesService) Delete(opt *QualityProfilesDeleteOption) (resp *http.Response, err error)
Delete Delete a quality profile and all its descendants. The default quality profile cannot be deleted.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) Export ¶
func (s *QualityProfilesService) Export(opt *QualityProfilesExportOption) (v *string, resp *http.Response, err error)
Export Export a quality profile.
func (*QualityProfilesService) Exporters ¶
func (s *QualityProfilesService) Exporters() (v *QualityProfilesExportersObject, resp *http.Response, err error)
Exporters Lists available profile export formats.
func (*QualityProfilesService) Importers ¶
func (s *QualityProfilesService) Importers() (v *QualityProfilesImportersObject, resp *http.Response, err error)
Importers List supported importers.
func (*QualityProfilesService) Inheritance ¶
func (s *QualityProfilesService) Inheritance(opt *QualityProfilesInheritanceOption) (v *QualityProfilesInheritanceObject, resp *http.Response, err error)
Inheritance Show a quality profile's ancestors and children.
func (*QualityProfilesService) Projects ¶
func (s *QualityProfilesService) Projects(opt *QualityProfilesProjectsOption) (v *QualitygatesSearchObject, resp *http.Response, err error)
Projects List projects with their association status regarding a quality profile
func (*QualityProfilesService) RemoveProject ¶
func (s *QualityProfilesService) RemoveProject(opt *QualityProfilesRemoveProjectOption) (resp *http.Response, err error)
RemoveProject Remove a project's association with a quality profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li> <li>Administer right on the specified project</li></ul>
func (*QualityProfilesService) Rename ¶
func (s *QualityProfilesService) Rename(opt *QualityProfilesRenameOption) (resp *http.Response, err error)
Rename Rename a quality profile.<br> Requires one of the following permissions:<ul> <li>'Administer Quality Profiles'</li> <li>Edit right on the specified quality profile</li></ul>
func (*QualityProfilesService) Restore ¶
func (s *QualityProfilesService) Restore(opt *QualityProfilesRestoreOption) (resp *http.Response, err error)
Restore Restore a quality profile using an XML file. The restored profile name is taken from the backup file, so if a profile with the same name and language already exists, it will be overwritten.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
func (*QualityProfilesService) Search ¶
func (s *QualityProfilesService) Search(opt *QualityProfilesSearchOption) (v *QualityProfilesSearchObject, resp *http.Response, err error)
Search Search quality profiles
func (*QualityProfilesService) SetDefault ¶
func (s *QualityProfilesService) SetDefault(opt *QualityProfilesSetDefaultOption) (resp *http.Response, err error)
SetDefault Select the default profile for a given language.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
func (*QualityProfilesService) ValidateActivateRuleOpt ¶
func (s *QualityProfilesService) ValidateActivateRuleOpt(opt *QualityProfilesActivateRuleOption) error
func (*QualityProfilesService) ValidateActivateRulesOpt ¶
func (s *QualityProfilesService) ValidateActivateRulesOpt(opt *QualityProfilesActivateRulesOption) error
func (*QualityProfilesService) ValidateAddProjectOpt ¶
func (s *QualityProfilesService) ValidateAddProjectOpt(opt *QualityProfilesAddProjectOption) error
func (*QualityProfilesService) ValidateBackupOpt ¶
func (s *QualityProfilesService) ValidateBackupOpt(opt *QualityProfilesBackupOption) error
func (*QualityProfilesService) ValidateChangeParentOpt ¶
func (s *QualityProfilesService) ValidateChangeParentOpt(opt *QualityProfilesChangeParentOption) error
func (*QualityProfilesService) ValidateChangelogOpt ¶
func (s *QualityProfilesService) ValidateChangelogOpt(opt *QualityProfilesChangelogOption) error
func (*QualityProfilesService) ValidateCopyOpt ¶
func (s *QualityProfilesService) ValidateCopyOpt(opt *QualityProfilesCopyOption) error
func (*QualityProfilesService) ValidateCreateOpt ¶
func (s *QualityProfilesService) ValidateCreateOpt(opt *QualityProfilesCreateOption) error
func (*QualityProfilesService) ValidateDeactivateRuleOpt ¶
func (s *QualityProfilesService) ValidateDeactivateRuleOpt(opt *QualityProfilesDeactivateRuleOption) error
func (*QualityProfilesService) ValidateDeactivateRulesOpt ¶
func (s *QualityProfilesService) ValidateDeactivateRulesOpt(opt *QualityProfilesDeactivateRulesOption) error
func (*QualityProfilesService) ValidateDeleteOpt ¶
func (s *QualityProfilesService) ValidateDeleteOpt(opt *QualityProfilesDeleteOption) error
func (*QualityProfilesService) ValidateExportOpt ¶
func (s *QualityProfilesService) ValidateExportOpt(opt *QualityProfilesExportOption) error
func (*QualityProfilesService) ValidateInheritanceOpt ¶
func (s *QualityProfilesService) ValidateInheritanceOpt(opt *QualityProfilesInheritanceOption) error
func (*QualityProfilesService) ValidateProjectsOpt ¶
func (s *QualityProfilesService) ValidateProjectsOpt(opt *QualityProfilesProjectsOption) error
func (*QualityProfilesService) ValidateRemoveProjectOpt ¶
func (s *QualityProfilesService) ValidateRemoveProjectOpt(opt *QualityProfilesRemoveProjectOption) error
func (*QualityProfilesService) ValidateRenameOpt ¶
func (s *QualityProfilesService) ValidateRenameOpt(opt *QualityProfilesRenameOption) error
func (*QualityProfilesService) ValidateRestoreOpt ¶
func (s *QualityProfilesService) ValidateRestoreOpt(opt *QualityProfilesRestoreOption) error
func (*QualityProfilesService) ValidateSearchOpt ¶
func (s *QualityProfilesService) ValidateSearchOpt(opt *QualityProfilesSearchOption) error
func (*QualityProfilesService) ValidateSetDefaultOpt ¶
func (s *QualityProfilesService) ValidateSetDefaultOpt(opt *QualityProfilesSetDefaultOption) error
type QualityProfilesSetDefaultOption ¶
type QualityProfilesSetDefaultOption struct { Key string `url:"key,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Language string `url:"language,omitempty"` // Description:"Quality profile language",ExampleValue:"" QualityProfile string `url:"qualityProfile,omitempty"` // Description:"Quality profile name",ExampleValue:"Sonar way" }
type QualitygatesCopyOption ¶
type QualitygatesCopyOption struct { Id int `url:"id,omitempty"` // Description:"The ID of the source quality gate",ExampleValue:"1" Name string `url:"name,omitempty"` // Description:"The name of the quality gate to create",ExampleValue:"My Quality Gate" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" }
type QualitygatesCreateConditionOption ¶
type QualitygatesCreateConditionOption struct { Error string `url:"error,omitempty"` // Description:"Condition error threshold",ExampleValue:"10" GateId int `url:"gateId,omitempty"` // Description:"ID of the quality gate",ExampleValue:"1" Metric string `url:"metric,omitempty"` // Description:"Condition metric",ExampleValue:"blocker_violations" Op string `url:"op,omitempty"` // Description:"Condition operator:<br/><ul><li>EQ = equals</li><li>NE = is not</li><li>LT = is lower than</li><li>GT = is greater than</li></ui>",ExampleValue:"EQ" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" Period string `url:"period,omitempty"` // Description:"Condition period. If not set, the absolute value is considered.",ExampleValue:"" Warning string `url:"warning,omitempty"` // Description:"Condition warning threshold",ExampleValue:"5" }
type QualitygatesCreateOption ¶
type QualitygatesCreateOption struct { Name string `url:"name,omitempty"` // Description:"The name of the quality gate to create",ExampleValue:"My Quality Gate" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" }
type QualitygatesDeleteConditionOption ¶
type QualitygatesDeleteConditionOption struct { ConditionID int `url:"id,omitempty"` // Description:"Condition ID",ExampleValue:"2" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" }
type QualitygatesDeselectOption ¶
type QualitygatesDeselectOption struct { Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" }
type QualitygatesDestroyOption ¶
type QualitygatesDestroyOption struct { Id int `url:"id,omitempty"` // Description:"ID of the quality gate to delete",ExampleValue:"1" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" }
type QualitygatesGetByProjectObject ¶
type QualitygatesGetByProjectObject struct {
QualityGate *QualityGate `json:"qualityGate,omitempty"`
}
type QualitygatesGetByProjectOption ¶
type QualitygatesGetByProjectOption struct { Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project" }
type QualitygatesListObject ¶
type QualitygatesListObject struct { Actions *Actions `json:"actions,omitempty"` Default int64 `json:"default,omitempty"` Qualitygates []*QualityGateV2 `json:"qualitygates,omitempty"` }
type QualitygatesListOption ¶
type QualitygatesListOption struct {
Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org"
}
type QualitygatesProjectStatusObject ¶
type QualitygatesProjectStatusObject struct {
ProjectStatus *ProjectStatus `json:"projectStatus,omitempty"`
}
type QualitygatesProjectStatusOption ¶
type QualitygatesProjectStatusOption struct { AnalysisId string `url:"analysisId,omitempty"` // Description:"Analysis id",ExampleValue:"AU-TpxcA-iU5OvuD2FL1" ProjectId string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" }
type QualitygatesRenameOption ¶
type QualitygatesRenameOption QualitygatesCopyOption
type QualitygatesSearchOption ¶
type QualitygatesSearchOption struct { GateId int `url:"gateId,omitempty"` // Description:"Quality Gate ID",ExampleValue:"1" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" Page string `url:"page,omitempty"` // Description:"Page number",ExampleValue:"2" PageSize string `url:"pageSize,omitempty"` // Description:"Page size",ExampleValue:"10" Query string `url:"query,omitempty"` // Description:"To search for projects containing this string. If this parameter is set, "selected" is set to "all".",ExampleValue:"abc" Selected string `url:"selected,omitempty"` // Description:"Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).",ExampleValue:"" }
type QualitygatesSelectOption ¶
type QualitygatesSelectOption struct { GateId int `url:"gateId,omitempty"` // Description:"Quality gate id",ExampleValue:"1" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" ProjectKey string `url:"projectKey,omitempty"` // Description:"Project key",ExampleValue:"my_project" ProjectID string `url:"projectId,omitempty"` // Description:"Project id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" }
type QualitygatesService ¶
type QualitygatesService struct {
// contains filtered or unexported fields
}
func (*QualitygatesService) Copy ¶
func (s *QualitygatesService) Copy(opt *QualitygatesCopyOption) (v *QualityGate, resp *http.Response, err error)
Copy Copy a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) Create ¶
func (s *QualitygatesService) Create(opt *QualitygatesCreateOption) (v *QualityGate, resp *http.Response, err error)
Create Create a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) CreateCondition ¶
func (s *QualitygatesService) CreateCondition(opt *QualitygatesCreateConditionOption) (v *QualityGatesCondition, resp *http.Response, err error)
CreateCondition Add a new condition to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) DeleteCondition ¶
func (s *QualitygatesService) DeleteCondition(opt *QualitygatesDeleteConditionOption) (resp *http.Response, err error)
DeleteCondition Delete a condition from a quality gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) Deselect ¶
func (s *QualitygatesService) Deselect(opt *QualitygatesDeselectOption) (resp *http.Response, err error)
Deselect Remove the association of a project from a quality gate.<br>Requires one of the following permissions:<ul><li>'Administer Quality Gates'</li><li>'Administer' rights on the project</li></ul>
func (*QualitygatesService) Destroy ¶
func (s *QualitygatesService) Destroy(opt *QualitygatesDestroyOption) (resp *http.Response, err error)
Destroy Delete a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) GetByProject ¶
func (s *QualitygatesService) GetByProject(opt *QualitygatesGetByProjectOption) (v *QualitygatesGetByProjectObject, resp *http.Response, err error)
GetByProject Get the quality gate of a project.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
func (*QualitygatesService) List ¶
func (s *QualitygatesService) List(opt *QualitygatesListOption) (v *QualitygatesListObject, resp *http.Response, err error)
List Get a list of quality gates
func (*QualitygatesService) ProjectStatus ¶
func (s *QualitygatesService) ProjectStatus(opt *QualitygatesProjectStatusOption) (v *QualitygatesProjectStatusObject, resp *http.Response, err error)
ProjectStatus Get the quality gate status of a project or a Compute Engine task.<br />Either 'analysisId', 'projectId' or 'projectKey' must be provided<br />The different statuses returned are: OK, WARN, ERROR, NONE. The NONE status is returned when there is no quality gate associated with the analysis.<br />Returns an HTTP code 404 if the analysis associated with the task is not found or does not exist.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
func (*QualitygatesService) Rename ¶
func (s *QualitygatesService) Rename(opt *QualitygatesRenameOption) (v *QualityGate, resp *http.Response, err error)
Rename Rename a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) Search ¶
func (s *QualitygatesService) Search(opt *QualitygatesSearchOption) (v *QualitygatesSearchObject, resp *http.Response, err error)
Search Search for projects associated (or not) to a quality gate.<br/>Only authorized projects for current user will be returned.
func (*QualitygatesService) Select ¶
func (s *QualitygatesService) Select(opt *QualitygatesSelectOption) (resp *http.Response, err error)
Select Associate a project to a quality gate.<br>The 'projectId' or 'projectKey' must be provided.<br>Project id as a numeric value is deprecated since 6.1. Please use the id similar to 'AU-TpxcA-iU5OvuD2FLz'.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) SetAsDefault ¶
func (s *QualitygatesService) SetAsDefault(opt *QualitygatesSetAsDefaultOption) (resp *http.Response, err error)
SetAsDefault Set a quality gate as the default quality gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) Show ¶
func (s *QualitygatesService) Show(opt *QualitygatesShowOption) (v *QualityGateV2, resp *http.Response, err error)
Show Display the details of a quality gate
func (*QualitygatesService) UpdateCondition ¶
func (s *QualitygatesService) UpdateCondition(opt *QualitygatesUpdateConditionOption) (v *QualityGatesCondition, resp *http.Response, err error)
UpdateCondition Update a condition attached to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
func (*QualitygatesService) ValidateCopyOpt ¶
func (s *QualitygatesService) ValidateCopyOpt(opt *QualitygatesCopyOption) error
func (*QualitygatesService) ValidateCreateConditionOpt ¶
func (s *QualitygatesService) ValidateCreateConditionOpt(opt *QualitygatesCreateConditionOption) error
func (*QualitygatesService) ValidateCreateOpt ¶
func (s *QualitygatesService) ValidateCreateOpt(opt *QualitygatesCreateOption) error
func (*QualitygatesService) ValidateDeleteConditionOpt ¶
func (s *QualitygatesService) ValidateDeleteConditionOpt(opt *QualitygatesDeleteConditionOption) error
func (*QualitygatesService) ValidateDeselectOpt ¶
func (s *QualitygatesService) ValidateDeselectOpt(opt *QualitygatesDeselectOption) error
func (*QualitygatesService) ValidateDestroyOpt ¶
func (s *QualitygatesService) ValidateDestroyOpt(opt *QualitygatesDestroyOption) error
func (*QualitygatesService) ValidateGetByProjectOpt ¶
func (s *QualitygatesService) ValidateGetByProjectOpt(opt *QualitygatesGetByProjectOption) error
func (*QualitygatesService) ValidateListOpt ¶
func (s *QualitygatesService) ValidateListOpt(opt *QualitygatesListOption) error
func (*QualitygatesService) ValidateProjectStatusOpt ¶
func (s *QualitygatesService) ValidateProjectStatusOpt(opt *QualitygatesProjectStatusOption) error
func (*QualitygatesService) ValidateRenameOpt ¶
func (s *QualitygatesService) ValidateRenameOpt(opt *QualitygatesRenameOption) error
func (*QualitygatesService) ValidateSearchOpt ¶
func (s *QualitygatesService) ValidateSearchOpt(opt *QualitygatesSearchOption) error
func (*QualitygatesService) ValidateSelectOpt ¶
func (s *QualitygatesService) ValidateSelectOpt(opt *QualitygatesSelectOption) error
func (*QualitygatesService) ValidateSetAsDefaultOpt ¶
func (s *QualitygatesService) ValidateSetAsDefaultOpt(opt *QualitygatesSetAsDefaultOption) error
func (*QualitygatesService) ValidateShowOpt ¶
func (s *QualitygatesService) ValidateShowOpt(opt *QualitygatesShowOption) error
func (*QualitygatesService) ValidateUpdateConditionOpt ¶
func (s *QualitygatesService) ValidateUpdateConditionOpt(opt *QualitygatesUpdateConditionOption) error
type QualitygatesSetAsDefaultOption ¶
type QualitygatesSetAsDefaultOption QualitygatesDestroyOption
type QualitygatesShowOption ¶
type QualitygatesShowOption QualitygatesRenameOption
type QualitygatesUpdateConditionOption ¶
type QualitygatesUpdateConditionOption struct { Error string `url:"error,omitempty"` // Description:"Condition error threshold",ExampleValue:"10" Id int `url:"id,omitempty"` // Description:"Condition ID",ExampleValue:"10" Metric string `url:"metric,omitempty"` // Description:"Condition metric",ExampleValue:"blocker_violations" Op string `url:"op,omitempty"` // Description:"Condition operator:<br/><ul><li>EQ = equals</li><li>NE = is not</li><li>LT = is lower than</li><li>GT = is greater than</li></ui>",ExampleValue:"EQ" Organization string `url:"organization,omitempty"` // Description:"Organization key. If no organization is provided, the default organization is used.",ExampleValue:"my-org" Period string `url:"period,omitempty"` // Description:"Condition period. If not set, the absolute value is considered.",ExampleValue:"" Warning string `url:"warning,omitempty"` // Description:"Condition warning threshold",ExampleValue:"5" }
type Repositorie ¶
type RequireUpdate ¶
type RequireUpdate struct { Category string `json:"category,omitempty"` Description string `json:"description,omitempty"` EditionBundled bool `json:"editionBundled,omitempty"` Key string `json:"key,omitempty"` License string `json:"license,omitempty"` Name string `json:"name,omitempty"` OrganizationName string `json:"organizationName,omitempty"` OrganizationURL string `json:"organizationUrl,omitempty"` TermsAndConditionsURL string `json:"termsAndConditionsUrl,omitempty"` Version string `json:"version,omitempty"` }
type Rule ¶
type Rule struct { Key string `json:"key,omitempty"` Repo string `json:"repo,omitempty"` Name string `json:"name,omitempty"` CreatedAt string `json:"createdAt,omitempty"` HTMLDesc string `json:"htmlDesc,omitempty"` MdDesc string `json:"mdDesc,omitempty"` Severity string `json:"severity,omitempty"` Status string `json:"status,omitempty"` IsTemplate bool `json:"isTemplate,omitempty"` TemplateKey string `json:"templateKey,omitempty"` Tags []string `json:"tags,omitempty"` SysTags []string `json:"sysTags,omitempty"` Lang string `json:"lang,omitempty"` LangName string `json:"langName,omitempty"` DebtOverloaded bool `json:"debtOverloaded,omitempty"` RemFnOverloaded bool `json:"remFnOverloaded,omitempty"` Params []*RuleParam `json:"params,omitempty"` Scope string `json:"scope,omitempty"` IsExternal bool `json:"isExternal,omitempty"` Type string `json:"type,omitempty"` }
type RuleCreateObject ¶
type RuleCreateObject struct {
Rule *Rule `json:"rule,omitempty"`
}
type RuleUpdateObject ¶
type RuleUpdateObject RuleCreateObject
type RulesCreateOption ¶
type RulesCreateOption struct { CustomKey string `url:"custom_key,omitempty"` // Description:"Key of the custom rule",ExampleValue:"Todo_should_not_be_used" ManualKey string `url:"manual_key,omitempty"` // Description:"Manual rules are no more supported. This parameter is ignored",ExampleValue:"Error_handling" MarkdownDescription string `url:"markdown_description,omitempty"` // Description:"Rule description",ExampleValue:"Description of my custom rule" Name string `url:"name,omitempty"` // Description:"Rule name",ExampleValue:"My custom rule" Params string `url:"params,omitempty"` // Description:"Parameters as semi-colon list of <key>=<value>, for example 'params=key1=v1;key2=v2' (Only for custom rule)",ExampleValue:"" PreventReactivation string `url:"prevent_reactivation,omitempty"` // Description:"If set to true and if the rule has been deactivated (status 'REMOVED'), a status 409 will be returned",ExampleValue:"" Severity string `url:"severity,omitempty"` // Description:"Rule severity",ExampleValue:"" Status string `url:"status,omitempty"` // Description:"Rule status",ExampleValue:"" TemplateKey string `url:"template_key,omitempty"` // Description:"Key of the template rule in order to create a custom rule (mandatory for custom rule)",ExampleValue:"java:XPath" Type string `url:"type,omitempty"` // Description:"Rule type",ExampleValue:"" }
type RulesDeleteOption ¶
type RulesDeleteOption struct {
Key string `url:"key,omitempty"` // Description:"Rule key",ExampleValue:"squid:XPath_1402065390816"
}
type RulesRepositoriesObject ¶
type RulesRepositoriesObject struct {
Repositories []*Repositorie `json:"repositories,omitempty"`
}
type RulesRepositoriesOption ¶
type RulesRepositoriesOption struct { Language string `url:"language,omitempty"` // Description:"A language key; if provided, only repositories for the given language will be returned",ExampleValue:"java" Q string `url:"q,omitempty"` // Description:"A pattern to match repository keys/names against",ExampleValue:"squid" }
type RulesSearchObject ¶
type RulesSearchOption ¶
type RulesSearchOption struct { Activation string `url:"activation,omitempty"` // Description:"Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.",ExampleValue:"" ActiveSeverities string `url:"active_severities,omitempty"` // Description:"Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Asc string `url:"asc,omitempty"` // Description:"Ascending sort",ExampleValue:"" AvailableSince string `url:"available_since,omitempty"` // Description:"Filters rules added since date. Format is yyyy-MM-dd",ExampleValue:"2014-06-22" Facets string `url:"facets,omitempty"` // Description:"Comma-separated list of the facets to be computed. No facet is computed by default.",ExampleValue:"languages,repositories" Inheritance string `url:"inheritance,omitempty"` // Description:"Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.",ExampleValue:"INHERITED,OVERRIDES" IsTemplate string `url:"is_template,omitempty"` // Description:"Filter template rules",ExampleValue:"" Languages string `url:"languages,omitempty"` // Description:"Comma-separated list of languages",ExampleValue:"java,js" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"UTF-8 search query",ExampleValue:"xpath" Qprofile string `url:"qprofile,omitempty"` // Description:"Quality profile key to filter on. Used only if the parameter 'activation' is set.",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" Repositories string `url:"repositories,omitempty"` // Description:"Comma-separated list of repositories",ExampleValue:"checkstyle,findbugs" RuleKey string `url:"rule_key,omitempty"` // Description:"Key of rule to search for",ExampleValue:"squid:S001" S string `url:"s,omitempty"` // Description:"Sort field",ExampleValue:"name" Severities string `url:"severities,omitempty"` // Description:"Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.",ExampleValue:"CRITICAL,BLOCKER" Statuses string `url:"statuses,omitempty"` // Description:"Comma-separated list of status codes",ExampleValue:"READY" Tags string `url:"tags,omitempty"` // Description:"Comma-separated list of tags. Returned rules match any of the tags (OR operator)",ExampleValue:"security,java8" TemplateKey string `url:"template_key,omitempty"` // Description:"Key of the template rule to filter on. Used to search for the custom rules based on this template.",ExampleValue:"java:S001" Types string `url:"types,omitempty"` // Description:"Comma-separated list of types. Returned rules match any of the tags (OR operator)",ExampleValue:"BUG" }
type RulesService ¶
type RulesService struct {
// contains filtered or unexported fields
}
func (*RulesService) Create ¶
func (s *RulesService) Create(opt *RulesCreateOption) (v *RuleCreateObject, resp *http.Response, err error)
Create Create a custom rule.<br>Requires the 'Administer Quality Profiles' permission
func (*RulesService) Delete ¶
func (s *RulesService) Delete(opt *RulesDeleteOption) (resp *http.Response, err error)
Delete Delete custom rule.<br/>Requires the 'Administer Quality Profiles' permission
func (*RulesService) Repositories ¶
func (s *RulesService) Repositories(opt *RulesRepositoriesOption) (v *RulesRepositoriesObject, resp *http.Response, err error)
Repositories List available rule repositories
func (*RulesService) Search ¶
func (s *RulesService) Search(opt *RulesSearchOption) (v *RulesSearchObject, resp *http.Response, err error)
Search Search for a collection of relevant rules matching a specified query.<br/>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
func (*RulesService) Show ¶
func (s *RulesService) Show(opt *RulesShowOption) (v *RulesShowObject, resp *http.Response, err error)
Show Get detailed information about a rule<br>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>In 7.1, the field 'scope' has been added.
func (*RulesService) Tags ¶
func (s *RulesService) Tags(opt *RulesTagsOption) (v *IssuesTagsObject, resp *http.Response, err error)
Tags List rule tags
func (*RulesService) Update ¶
func (s *RulesService) Update(opt *RulesUpdateOption) (v *RuleUpdateObject, resp *http.Response, err error)
Update Update an existing rule.<br>Requires the 'Administer Quality Profiles' permission
func (*RulesService) ValidateCreateOpt ¶
func (s *RulesService) ValidateCreateOpt(opt *RulesCreateOption) error
func (*RulesService) ValidateDeleteOpt ¶
func (s *RulesService) ValidateDeleteOpt(opt *RulesDeleteOption) error
func (*RulesService) ValidateRepositoriesOpt ¶
func (s *RulesService) ValidateRepositoriesOpt(opt *RulesRepositoriesOption) error
func (*RulesService) ValidateSearchOpt ¶
func (s *RulesService) ValidateSearchOpt(opt *RulesSearchOption) error
func (*RulesService) ValidateShowOpt ¶
func (s *RulesService) ValidateShowOpt(opt *RulesShowOption) error
func (*RulesService) ValidateTagsOpt ¶
func (s *RulesService) ValidateTagsOpt(opt *RulesTagsOption) error
func (*RulesService) ValidateUpdateOpt ¶
func (s *RulesService) ValidateUpdateOpt(opt *RulesUpdateOption) error
type RulesShowObject ¶
type RulesShowObject struct { Actives []*SquidClassCyclomaticComplexity `json:"actives,omitempty"` Rule *Rule `json:"rule,omitempty"` }
type RulesShowOption ¶
type RulesTagsOption ¶
type RulesUpdateOption ¶
type RulesUpdateOption struct { DebtRemediationFnOffset string `url:"debt_remediation_fn_offset,omitempty"` // Description:"",ExampleValue:"" DebtRemediationFnType string `url:"debt_remediation_fn_type,omitempty"` // Description:"",ExampleValue:"" DebtRemediationFyCoeff string `url:"debt_remediation_fy_coeff,omitempty"` // Description:"",ExampleValue:"" DebtSubCharacteristic string `url:"debt_sub_characteristic,omitempty"` // Description:"Debt characteristics are no more supported. This parameter is ignored.",ExampleValue:"" Key string `url:"key,omitempty"` // Description:"Key of the rule to update",ExampleValue:"javascript:NullCheck" MarkdownDescription string `url:"markdown_description,omitempty"` // Description:"Rule description (mandatory for custom rule and manual rule)",ExampleValue:"Description of my custom rule" MarkdownNote string `url:"markdown_note,omitempty"` // Description:"Optional note in markdown format. Use empty value to remove current note. Note is not changedif the parameter is not set.",ExampleValue:"my *note*" Name string `url:"name,omitempty"` // Description:"Rule name (mandatory for custom rule)",ExampleValue:"My custom rule" Params string `url:"params,omitempty"` // Description:"Parameters as semi-colon list of <key>=<value>, for example 'params=key1=v1;key2=v2' (Only when updating a custom rule)",ExampleValue:"" RemediationFnBaseEffort string `url:"remediation_fn_base_effort,omitempty"` // Description:"Base effort of the remediation function of the rule",ExampleValue:"1d" RemediationFnType string `url:"remediation_fn_type,omitempty"` // Description:"Type of the remediation function of the rule",ExampleValue:"" RemediationFyGapMultiplier string `url:"remediation_fy_gap_multiplier,omitempty"` // Description:"Gap multiplier of the remediation function of the rule",ExampleValue:"3min" Severity string `url:"severity,omitempty"` // Description:"Rule severity (Only when updating a custom rule)",ExampleValue:"" Status string `url:"status,omitempty"` // Description:"Rule status (Only when updating a custom rule)",ExampleValue:"" Tags string `url:"tags,omitempty"` // Description:"Optional comma-separated list of tags to set. Use blank value to remove current tags. Tags are not changed if the parameter is not set.",ExampleValue:"java8,security" }
type ServerService ¶
type ServerService struct {
// contains filtered or unexported fields
}
type Setting ¶
type Setting struct { Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` Inherited bool `json:"inherited,omitempty"` Values []string `json:"values,omitempty"` FieldValues []*FieldValue `json:"fieldValues,omitempty"` }
type SettingsListDefinitionsObject ¶
type SettingsListDefinitionsObject struct {
Definitions []*Definition `json:"definitions,omitempty"`
}
type SettingsListDefinitionsOption ¶
type SettingsListDefinitionsOption struct {
Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project"
}
type SettingsResetOption ¶
type SettingsService ¶
type SettingsService struct {
// contains filtered or unexported fields
}
func (*SettingsService) ListDefinitions ¶
func (s *SettingsService) ListDefinitions(opt *SettingsListDefinitionsOption) (v *SettingsListDefinitionsObject, resp *http.Response, err error)
ListDefinitions List settings definitions.<br>Requires 'Browse' permission when a component is specified<br/>
func (*SettingsService) Reset ¶
func (s *SettingsService) Reset(opt *SettingsResetOption) (resp *http.Response, err error)
Reset Remove a setting value.<br>The settings defined in config/sonar.properties are read-only and can't be changed.<br/>Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
func (*SettingsService) Set ¶
func (s *SettingsService) Set(opt *SettingsSetOption) (resp *http.Response, err error)
Set Update a setting value.<br>Either 'value' or 'values' must be provided.<br> The settings defined in config/sonar.properties are read-only and can't be changed.<br/>Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
func (*SettingsService) ValidateListDefinitionsOpt ¶
func (s *SettingsService) ValidateListDefinitionsOpt(opt *SettingsListDefinitionsOption) error
func (*SettingsService) ValidateResetOpt ¶
func (s *SettingsService) ValidateResetOpt(opt *SettingsResetOption) error
func (*SettingsService) ValidateSetOpt ¶
func (s *SettingsService) ValidateSetOpt(opt *SettingsSetOption) error
func (*SettingsService) ValidateValuesOpt ¶
func (s *SettingsService) ValidateValuesOpt(opt *SettingsValuesOption) error
func (*SettingsService) Values ¶
func (s *SettingsService) Values(opt *SettingsValuesOption) (v *SettingsValuesObject, resp *http.Response, err error)
Values List settings values.<br>If no value has been set for a setting, then the default value is returned.<br>The settings from conf/sonar.properties are excluded from results.<br>Requires 'Browse' or 'Execute Analysis' permission when a component is specified<br/>
type SettingsSetOption ¶
type SettingsSetOption struct { Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project" FieldValues string `url:"fieldValues,omitempty"` // Description:"Setting field values. To set several values, the parameter must be called once for each value.",ExampleValue:"fieldValues={"firstField":"first value", "secondField":"second value", "thirdField":"third value"}" Key string `url:"key,omitempty"` // Description:"Setting key",ExampleValue:"sonar.links.scm" Value string `url:"value,omitempty"` // Description:"Setting value. To reset a value, please use the reset web service.",ExampleValue:"git@github.com:SonarSource/sonarqube.git" Values []string `url:"values,omitempty"` // Description:"Setting multi value. To set several values, the parameter must be called once for each value.",ExampleValue:"values=firstValue&values=secondValue&values=thirdValue" }
type SettingsValuesObject ¶
type SettingsValuesObject struct {
Settings []*Setting `json:"settings,omitempty"`
}
type SettingsValuesOption ¶
type SonarMeasure ¶
type SourcesRawOption ¶
type SourcesRawOption struct {
Key string `url:"key,omitempty"` // Description:"File key",ExampleValue:"my_project:src/foo/Bar.php"
}
type SourcesSCMObject ¶
type SourcesSCMObject struct {
SCM [][]interface{} `json:"scm,omitempty"`
}
type SourcesSCMOption ¶
type SourcesSCMOption struct { CommitsByLine string `url:"commits_by_line,omitempty"` // Description:"Group lines by SCM commit if value is false, else display commits for each line, even if two consecutive lines relate to the same commit.",ExampleValue:"" From string `url:"from,omitempty"` // Description:"First line to return. Starts at 1",ExampleValue:"10" Key string `url:"key,omitempty"` // Description:"File key",ExampleValue:"my_project:/src/foo/Bar.php" To string `url:"to,omitempty"` // Description:"Last line to return (inclusive)",ExampleValue:"20" }
type SourcesService ¶
type SourcesService struct {
// contains filtered or unexported fields
}
func (*SourcesService) Raw ¶
func (s *SourcesService) Raw(opt *SourcesRawOption) (v *string, resp *http.Response, err error)
Raw Get source code as raw text. Require 'See Source Code' permission on file
func (*SourcesService) SCM ¶
func (s *SourcesService) SCM(opt *SourcesSCMOption) (v *SourcesSCMObject, resp *http.Response, err error)
SCM Get SCM information of source files. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Author of the commit</li><li>Datetime of the commit (before 5.2 it was only the Date)</li><li>Revision of the commit (added in 5.2)</li></ol>
func (*SourcesService) Show ¶
func (s *SourcesService) Show(opt *SourcesShowOption) (v *SourcesShowObject, resp *http.Response, err error)
Show Get source code. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Content of the line</li></ol>
func (*SourcesService) ValidateRawOpt ¶
func (s *SourcesService) ValidateRawOpt(opt *SourcesRawOption) error
func (*SourcesService) ValidateSCMOpt ¶
func (s *SourcesService) ValidateSCMOpt(opt *SourcesSCMOption) error
func (*SourcesService) ValidateShowOpt ¶
func (s *SourcesService) ValidateShowOpt(opt *SourcesShowOption) error
type SourcesShowObject ¶
type SourcesShowObject struct {
Sources [][]interface{} `json:"sources,omitempty"`
}
type SourcesShowOption ¶
type SourcesShowOption struct { From string `url:"from,omitempty"` // Description:"First line to return. Starts at 1",ExampleValue:"10" Key string `url:"key,omitempty"` // Description:"File key",ExampleValue:"my_project:/src/foo/Bar.php" To string `url:"to,omitempty"` // Description:"Last line to return (inclusive)",ExampleValue:"20" }
type SquidClassCyclomaticComplexity ¶
type SquidClassCyclomaticComplexity struct { Inherit string `json:"inherit,omitempty"` Params []*SquidParam `json:"params,omitempty"` QProfile string `json:"qProfile,omitempty"` Severity string `json:"severity,omitempty"` }
type SquidParam ¶
type SystemChangeLogLevelOption ¶
type SystemChangeLogLevelOption struct {
Level LogLevel `url:"level,omitempty"` // Description:"The new level. Be cautious: DEBUG, and even more TRACE, may have performance impacts.",ExampleValue:""
}
type SystemHealthObject ¶
type SystemLogsOption ¶
type SystemLogsOption struct {
Process string `url:"process,omitempty"` // Description:"Process to get logs from",ExampleValue:""
}
type SystemService ¶
type SystemService struct {
// contains filtered or unexported fields
}
func (*SystemService) ChangeLogLevel ¶
func (s *SystemService) ChangeLogLevel(opt *SystemChangeLogLevelOption) (resp *http.Response, err error)
ChangeLogLevel Temporarily changes level of logs. New level is not persistent and is lost when restarting server. Requires system administration permission.
func (*SystemService) DbMigrationStatus ¶
func (s *SystemService) DbMigrationStatus() (v *Cause, resp *http.Response, err error)
DbMigrationStatus Display the database migration status of SonarQube.<br/>State values are:<ul><li>NO_MIGRATION: DB is up to date with current version of SonarQube.</li><li>NOT_SUPPORTED: Migration is not supported on embedded databases.</li><li>MIGRATION_RUNNING: DB migration is under go.</li><li>MIGRATION_SUCCEEDED: DB migration has run and has been successful.</li><li>MIGRATION_FAILED: DB migration has run and failed. SonarQube must be restarted in order to retry a DB migration (optionally after DB has been restored from backup).</li><li>MIGRATION_REQUIRED: DB migration is required.</li></ul>
func (*SystemService) Health ¶
func (s *SystemService) Health() (v *SystemHealthObject, resp *http.Response, err error)
Health Provide health status of SonarQube.<p>Require 'Administer System' permission or authentication with passcode</p><p> <ul> <li>GREEN: SonarQube is fully operational</li> <li>YELLOW: SonarQube is usable, but it needs attention in order to be fully operational</li> <li>RED: SonarQube is not operational</li> </ul></p>
func (*SystemService) Logs ¶
func (s *SystemService) Logs(opt *SystemLogsOption) (v *string, resp *http.Response, err error)
Logs Get system logs in plain-text format. Requires system administration permission.
func (*SystemService) MigrateDb ¶
func (s *SystemService) MigrateDb() (v *Cause, resp *http.Response, err error)
MigrateDb Migrate the database to match the current version of SonarQube.<br/>Sending a POST request to this URL starts the DB migration. It is strongly advised to <strong>make a database backup</strong> before invoking this WS.<br/>State values are:<ul><li>NO_MIGRATION: DB is up to date with current version of SonarQube.</li><li>NOT_SUPPORTED: Migration is not supported on embedded databases.</li><li>MIGRATION_RUNNING: DB migration is under go.</li><li>MIGRATION_SUCCEEDED: DB migration has run and has been successful.</li><li>MIGRATION_FAILED: DB migration has run and failed. SonarQube must be restarted in order to retry a DB migration (optionally after DB has been restored from backup).</li><li>MIGRATION_REQUIRED: DB migration is required.</li></ul>
func (*SystemService) Ping ¶
func (s *SystemService) Ping() (v *string, resp *http.Response, err error)
Ping Answers "pong" as plain-text
func (*SystemService) Restart ¶
func (s *SystemService) Restart() (resp *http.Response, err error)
Restart Restart server. Require 'Administer System' permission. Perform a full restart of the Web, Search and Compute Engine Servers processes.
func (*SystemService) Status ¶
func (s *SystemService) Status() (v *SystemStatusObject, resp *http.Response, err error)
Status Get state information about SonarQube.<p>status: the running status <ul> <li>STARTING: SonarQube Web Server is up and serving some Web Services (eg. api/system/status) but initialization is still ongoing</li> <li>UP: SonarQube instance is up and running</li> <li>DOWN: SonarQube instance is up but not running because migration has failed (refer to WS /api/system/migrate_db for details) or some other reason (check logs).</li> <li>RESTARTING: SonarQube instance is still up but a restart has been requested (refer to WS /api/system/restart for details).</li> <li>DB_MIGRATION_NEEDED: database migration is required. DB migration can be started using WS /api/system/migrate_db.</li> <li>DB_MIGRATION_RUNNING: DB migration is running (refer to WS /api/system/migrate_db for details)</li> </ul></p>
func (*SystemService) Upgrades ¶
func (s *SystemService) Upgrades() (v *SystemUpgradesObject, resp *http.Response, err error)
Upgrades Lists available upgrades for the SonarQube instance (if any) and for each one, lists incompatible plugins and plugins requiring upgrade.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.
func (*SystemService) ValidateChangeLogLevelOpt ¶
func (s *SystemService) ValidateChangeLogLevelOpt(opt *SystemChangeLogLevelOption) error
func (*SystemService) ValidateLogsOpt ¶
func (s *SystemService) ValidateLogsOpt(opt *SystemLogsOption) error
type SystemStatusObject ¶
type SystemUpgradesObject ¶
type Task ¶
type Task struct { AnalysisID string `json:"analysisId,omitempty"` ComponentID string `json:"componentId,omitempty"` ComponentKey string `json:"componentKey,omitempty"` ComponentName string `json:"componentName,omitempty"` ComponentQualifier string `json:"componentQualifier,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` ErrorStacktrace string `json:"errorStacktrace,omitempty"` ErrorType string `json:"errorType,omitempty"` ExecutedAt string `json:"executedAt,omitempty"` ExecutionTimeMs int64 `json:"executionTimeMs,omitempty"` FinishedAt string `json:"finishedAt,omitempty"` HasErrorStacktrace bool `json:"hasErrorStacktrace,omitempty"` HasScannerContext bool `json:"hasScannerContext,omitempty"` ID string `json:"id,omitempty"` Logs bool `json:"logs,omitempty"` Organization string `json:"organization,omitempty"` ScannerContext string `json:"scannerContext,omitempty"` StartedAt string `json:"startedAt,omitempty"` Status string `json:"status,omitempty"` SubmittedAt string `json:"submittedAt,omitempty"` SubmitterLogin string `json:"submitterLogin,omitempty"` TaskType string `json:"taskType,omitempty"` Type string `json:"type,omitempty"` WarningCount int `json:"warningCount,omitempty"` Warnings []string `json:"warnings,omitempty"` }
type Upgrade ¶
type Upgrade struct { ChangeLogURL string `json:"changeLogUrl,omitempty"` Description string `json:"description,omitempty"` DownloadURL string `json:"downloadUrl,omitempty"` Plugins *UpgradePlugins `json:"plugins,omitempty"` ReleaseDate string `json:"releaseDate,omitempty"` Version string `json:"version,omitempty"` }
type UpgradePlugins ¶
type UpgradePlugins struct { Incompatible []*Incompatible `json:"incompatible,omitempty"` RequireUpdate []*RequireUpdate `json:"requireUpdate,omitempty"` }
type User ¶
type User struct { Active bool `json:"active,omitempty"` Email string `json:"email,omitempty"` Local bool `json:"local,omitempty"` Login string `json:"login,omitempty"` Name string `json:"name,omitempty"` ScmAccounts []string `json:"scmAccounts,omitempty"` Selected bool `json:"selected,omitempty"` TokensCount int `json:"tokensCount,omitempty"` ExternalIdentity string `json:"externalIdentity,omitempty"` ExternalProvider string `json:"externalProvider,omitempty"` Groups []string `json:"groups,omitempty"` Avatar string `json:"avatar,omitempty"` }
type UserGroupsAddUserOption ¶
type UserGroupsCreateObject ¶
type UserGroupsCreateObject struct {
Group *Group `json:"group,omitempty"`
}
type UserGroupsCreateOption ¶
type UserGroupsCreateOption struct { Description string `url:"description,omitempty"` // Description:"Description for the new group. A group description cannot be larger than 200 characters.",ExampleValue:"Default group for new users" Name string `url:"name,omitempty"` // Description:"Name for the new group. A group name cannot be larger than 255 characters and must be unique. The value 'anyone' (whatever the case) is reserved and cannot be used.",ExampleValue:"sonar-users" }
type UserGroupsDeleteOption ¶
type UserGroupsRemoveUserOption ¶
type UserGroupsRemoveUserOption struct { Id int `url:"id,omitempty"` // Description:"Group id",ExampleValue:"42" Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"g.hopper" Name string `url:"name,omitempty"` // Description:"Group name",ExampleValue:"sonar-administrators" }
type UserGroupsSearchObject ¶
type UserGroupsSearchOption ¶
type UserGroupsSearchOption struct { F string `url:"f,omitempty"` // Description:"Comma-separated list of the fields to be returned in response. All the fields are returned by default.",ExampleValue:"" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to names that contain the supplied string.",ExampleValue:"sonar-users" }
type UserGroupsService ¶
type UserGroupsService struct {
// contains filtered or unexported fields
}
func (*UserGroupsService) AddUser ¶
func (s *UserGroupsService) AddUser(opt *UserGroupsAddUserOption) (resp *http.Response, err error)
AddUser Add a user to a group.<br />'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
func (*UserGroupsService) Create ¶
func (s *UserGroupsService) Create(opt *UserGroupsCreateOption) (v *UserGroupsCreateObject, resp *http.Response, err error)
Create Create a group.<br>Requires the following permission: 'Administer System'.
func (*UserGroupsService) Delete ¶
func (s *UserGroupsService) Delete(opt *UserGroupsDeleteOption) (resp *http.Response, err error)
Delete Delete a group. The default groups cannot be deleted.<br/>'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
func (*UserGroupsService) RemoveUser ¶
func (s *UserGroupsService) RemoveUser(opt *UserGroupsRemoveUserOption) (resp *http.Response, err error)
RemoveUser Remove a user from a group.<br />'id' or 'name' must be provided.<br>Requires the following permission: 'Administer System'.
func (*UserGroupsService) Search ¶
func (s *UserGroupsService) Search(opt *UserGroupsSearchOption) (v *UserGroupsSearchObject, resp *http.Response, err error)
Search Search for user groups.<br>Requires the following permission: 'Administer System'.
func (*UserGroupsService) Update ¶
func (s *UserGroupsService) Update(opt *UserGroupsUpdateOption) (v *UserGroupsCreateObject, resp *http.Response, err error)
Update Update a group.<br>Requires the following permission: 'Administer System'.
func (*UserGroupsService) Users ¶
func (s *UserGroupsService) Users(opt *UserGroupsUsersOption) (v *UserGroupsUsersObject, resp *http.Response, err error)
Users Search for users with membership information with respect to a group.<br>Requires the following permission: 'Administer System'.
func (*UserGroupsService) ValidateAddUserOpt ¶
func (s *UserGroupsService) ValidateAddUserOpt(opt *UserGroupsAddUserOption) error
func (*UserGroupsService) ValidateCreateOpt ¶
func (s *UserGroupsService) ValidateCreateOpt(opt *UserGroupsCreateOption) error
func (*UserGroupsService) ValidateDeleteOpt ¶
func (s *UserGroupsService) ValidateDeleteOpt(opt *UserGroupsDeleteOption) error
func (*UserGroupsService) ValidateRemoveUserOpt ¶
func (s *UserGroupsService) ValidateRemoveUserOpt(opt *UserGroupsRemoveUserOption) error
func (*UserGroupsService) ValidateSearchOpt ¶
func (s *UserGroupsService) ValidateSearchOpt(opt *UserGroupsSearchOption) error
func (*UserGroupsService) ValidateUpdateOpt ¶
func (s *UserGroupsService) ValidateUpdateOpt(opt *UserGroupsUpdateOption) error
func (*UserGroupsService) ValidateUsersOpt ¶
func (s *UserGroupsService) ValidateUsersOpt(opt *UserGroupsUsersOption) error
type UserGroupsUpdateOption ¶
type UserGroupsUpdateOption struct { Description string `url:"description,omitempty"` // Description:"New optional description for the group. A group description cannot be larger than 200 characters. If value is not defined, then description is not changed.",ExampleValue:"Default group for new users" Id int `url:"id,omitempty"` // Description:"Identifier of the group.",ExampleValue:"42" Name string `url:"name,omitempty"` // Description:"New optional name for the group. A group name cannot be larger than 255 characters and must be unique. Value 'anyone' (whatever the case) is reserved and cannot be used. If value is empty or not defined, then name is not changed.",ExampleValue:"my-group" }
type UserGroupsUsersObject ¶
type UserGroupsUsersOption ¶
type UserGroupsUsersOption struct { Id int `url:"id,omitempty"` // Description:"Group id",ExampleValue:"42" Name string `url:"name,omitempty"` // Description:"Group name",ExampleValue:"sonar-administrators" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0.",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to names or logins that contain the supplied string.",ExampleValue:"freddy" Selected string `url:"selected,omitempty"` // Description:"Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).",ExampleValue:"" }
type UserTokensRevokeOption ¶
type UserTokensSearchObject ¶
type UserTokensSearchOption ¶
type UserTokensSearchOption struct {
Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"g.hopper"
}
type UserTokensService ¶
type UserTokensService struct {
// contains filtered or unexported fields
}
func (*UserTokensService) Generate ¶
func (s *UserTokensService) Generate(opt *UserTokensGenerateOption) (v *UserTokensGenerateObject, resp *http.Response, err error)
Generate Generate a user access token. <br />Please keep your tokens secret. They enable to authenticate and analyze projects.<br />If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
func (*UserTokensService) Revoke ¶
func (s *UserTokensService) Revoke(opt *UserTokensRevokeOption) (resp *http.Response, err error)
Revoke Revoke a user access token. <br/>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
func (*UserTokensService) Search ¶
func (s *UserTokensService) Search(opt *UserTokensSearchOption) (v *UserTokensSearchObject, resp *http.Response, err error)
Search List the access tokens of a user.<br>The login must exist and active.<br>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
func (*UserTokensService) ValidateGenerateOpt ¶
func (s *UserTokensService) ValidateGenerateOpt(opt *UserTokensGenerateOption) error
func (*UserTokensService) ValidateRevokeOpt ¶
func (s *UserTokensService) ValidateRevokeOpt(opt *UserTokensRevokeOption) error
func (*UserTokensService) ValidateSearchOpt ¶
func (s *UserTokensService) ValidateSearchOpt(opt *UserTokensSearchOption) error
type UsersChangePasswordOption ¶
type UsersChangePasswordOption struct { Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"myuser" Password string `url:"password,omitempty"` // Description:"New password",ExampleValue:"mypassword" PreviousPassword string `url:"previousPassword,omitempty"` // Description:"Previous password. Required when changing one's own password.",ExampleValue:"oldpassword" }
type UsersCreateObject ¶
type UsersCreateObject struct {
User *User `json:"user,omitempty"`
}
type UsersCreateOption ¶
type UsersCreateOption struct { Email string `url:"email,omitempty"` // Description:"User email",ExampleValue:"myname@email.com" Local string `url:"local,omitempty"` // Description:"Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false.",ExampleValue:"" Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"myuser" Name string `url:"name,omitempty"` // Description:"User name",ExampleValue:"My Name" Password string `url:"password,omitempty"` // Description:"User password. Only mandatory when creating local user, otherwise it should not be set",ExampleValue:"mypassword" ScmAccount string `url:"scmAccount,omitempty"` // Description:"List of SCM accounts. To set several values, the parameter must be called once for each value.",ExampleValue:"scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue" }
type UsersDeactivateOption ¶
type UsersDeactivateOption struct {
Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"myuser"
}
type UsersGroupsOption ¶
type UsersGroupsOption struct { Login string `url:"login,omitempty"` // Description:"A user login",ExampleValue:"admin" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0.",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Limit search to group names that contain the supplied string.",ExampleValue:"users" Selected string `url:"selected,omitempty"` // Description:"Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).",ExampleValue:"" }
type UsersSearchObject ¶
type UsersSearchOption ¶
type UsersSearchOption struct { F string `url:"f,omitempty"` // Description:"Comma-separated list of the fields to be returned in response. All the fields are returned by default.",ExampleValue:"" P int `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps int `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 500",ExampleValue:"20" Q string `url:"q,omitempty"` // Description:"Filter on login, name and email",ExampleValue:"" }
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
func (*UsersService) ChangePassword ¶
func (s *UsersService) ChangePassword(opt *UsersChangePasswordOption) (resp *http.Response, err error)
ChangePassword Update a user's password. Authenticated users can change their own password, provided that the account is not linked to an external authentication system. Administer System permission is required to change another user's password.
func (*UsersService) Create ¶
func (s *UsersService) Create(opt *UsersCreateOption) (v *UsersCreateObject, resp *http.Response, err error)
Create Create a user.<br/>If a deactivated user account exists with the given login, it will be reactivated.<br/>Requires Administer System permission
func (*UsersService) Deactivate ¶
func (s *UsersService) Deactivate(opt *UsersDeactivateOption) (v *UsersCreateObject, resp *http.Response, err error)
Deactivate Deactivate a user. Requires Administer System permission
func (*UsersService) Groups ¶
func (s *UsersService) Groups(opt *UsersGroupsOption) (v *UserGroupsSearchObject, resp *http.Response, err error)
Groups Lists the groups a user belongs to. <br/>Requires Administer System permission.
func (*UsersService) Search ¶
func (s *UsersService) Search(opt *UsersSearchOption) (v *UsersSearchObject, resp *http.Response, err error)
Search Get a list of active users. <br/>Administer System permission is required to show the 'groups' field.<br/>When accessed anonymously, only logins and names are returned.
func (*UsersService) Update ¶
func (s *UsersService) Update(opt *UsersUpdateOption) (v *UsersCreateObject, resp *http.Response, err error)
Update Update a user. If a deactivated user account exists with the given login, it will be reactivated. Requires Administer System permission
func (*UsersService) ValidateChangePasswordOpt ¶
func (s *UsersService) ValidateChangePasswordOpt(opt *UsersChangePasswordOption) error
func (*UsersService) ValidateCreateOpt ¶
func (s *UsersService) ValidateCreateOpt(opt *UsersCreateOption) error
func (*UsersService) ValidateDeactivateOpt ¶
func (s *UsersService) ValidateDeactivateOpt(opt *UsersDeactivateOption) error
func (*UsersService) ValidateGroupsOpt ¶
func (s *UsersService) ValidateGroupsOpt(opt *UsersGroupsOption) error
func (*UsersService) ValidateSearchOpt ¶
func (s *UsersService) ValidateSearchOpt(opt *UsersSearchOption) error
func (*UsersService) ValidateUpdateOpt ¶
func (s *UsersService) ValidateUpdateOpt(opt *UsersUpdateOption) error
type UsersUpdateOption ¶
type UsersUpdateOption struct { Email string `url:"email,omitempty"` // Description:"User email",ExampleValue:"myname@email.com" Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"myuser" Name string `url:"name,omitempty"` // Description:"User name",ExampleValue:"My Name" ScmAccount string `url:"scmAccount,omitempty"` // Description:"SCM accounts. To set several values, the parameter must be called once for each value.",ExampleValue:"scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue" }
type WebhooksCreateObject ¶
type WebhooksCreateObject struct {
Webhook *Webhook `json:"webhook,omitempty"`
}
type WebhooksCreateOption ¶
type WebhooksCreateOption struct { Name string `url:"name,omitempty"` // Description:"Name displayed in the administration console of webhooks",ExampleValue:"My Webhook" Project string `url:"project,omitempty"` // Description:"The key of the project that will own the webhook",ExampleValue:"my_project" Url string `url:"url,omitempty"` // Description:"Server endpoint that will receive the webhook payload, for example 'http://my_server/foo'. If HTTP Basic authentication is used, HTTPS is recommended to avoid man in the middle attacks. Example: 'https://myLogin:myPassword@my_server/foo'",ExampleValue:"https://www.my-webhook-listener.com/sonar" }
type WebhooksDeleteOption ¶
type WebhooksDeleteOption struct {
Webhook string `url:"webhook,omitempty"` // Description:"The key of the webhook to be deleted,auto-generated value can be obtained through api/webhooks/create or api/webhooks/list",ExampleValue:"my_project"
}
type WebhooksDeliveriesOption ¶
type WebhooksDeliveriesOption struct { CeTaskId string `url:"ceTaskId,omitempty"` // Description:"Id of the Compute Engine task",ExampleValue:"AU-Tpxb--iU5OvuD2FLy" ComponentKey string `url:"componentKey,omitempty"` // Description:"Key of the project",ExampleValue:"my-project" P string `url:"p,omitempty"` // Description:"1-based page number",ExampleValue:"42" Ps string `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less than 500",ExampleValue:"20" Webhook string `url:"webhook,omitempty"` // Description:"Key of the webhook that triggered those deliveries,auto-generated value that can be obtained through api/webhooks/create or api/webhooks/list",ExampleValue:"AU-TpxcA-iU5OvuD2FLz" }
type WebhooksDeliveryObject ¶
type WebhooksDeliveryObject struct {
Delivery *Delivery `json:"delivery,omitempty"`
}
type WebhooksDeliveryOption ¶
type WebhooksDeliveryOption struct {
DeliveryId string `url:"deliveryId,omitempty"` // Description:"Id of delivery",ExampleValue:"AU-TpxcA-iU5OvuD2FL3"
}
type WebhooksListObject ¶
type WebhooksListObject struct {
Webhooks []*Webhook `json:"webhooks,omitempty"`
}
type WebhooksListOption ¶
type WebhooksListOption struct {
Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
}
type WebhooksService ¶
type WebhooksService struct {
// contains filtered or unexported fields
}
func (*WebhooksService) Create ¶
func (s *WebhooksService) Create(opt *WebhooksCreateOption) (v *WebhooksCreateObject, resp *http.Response, err error)
Create Create a Webhook.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*WebhooksService) Delete ¶
func (s *WebhooksService) Delete(opt *WebhooksDeleteOption) (resp *http.Response, err error)
Delete Delete a Webhook.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*WebhooksService) Deliveries ¶
func (s *WebhooksService) Deliveries(opt *WebhooksDeliveriesOption) (v *WebhooksDeliveriesObject, resp *http.Response, err error)
Deliveries Get the recent deliveries for a specified project or Compute Engine task.<br/>Require 'Administer' permission on the related project.<br/>Note that additional information are returned by api/webhooks/delivery.
func (*WebhooksService) Delivery ¶
func (s *WebhooksService) Delivery(opt *WebhooksDeliveryOption) (v *WebhooksDeliveryObject, resp *http.Response, err error)
Delivery Get a webhook delivery by its id.<br/>Require 'Administer System' permission.<br/>Note that additional information are returned by api/webhooks/delivery.
func (*WebhooksService) List ¶
func (s *WebhooksService) List(opt *WebhooksListOption) (v *WebhooksListObject, resp *http.Response, err error)
List Search for global webhooks or project webhooks. Webhooks are ordered by name.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*WebhooksService) Update ¶
func (s *WebhooksService) Update(opt *WebhooksUpdateOption) (resp *http.Response, err error)
Update Update a Webhook.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
func (*WebhooksService) ValidateCreateOpt ¶
func (s *WebhooksService) ValidateCreateOpt(opt *WebhooksCreateOption) error
func (*WebhooksService) ValidateDeleteOpt ¶
func (s *WebhooksService) ValidateDeleteOpt(opt *WebhooksDeleteOption) error
func (*WebhooksService) ValidateDeliveriesOpt ¶
func (s *WebhooksService) ValidateDeliveriesOpt(opt *WebhooksDeliveriesOption) error
func (*WebhooksService) ValidateDeliveryOpt ¶
func (s *WebhooksService) ValidateDeliveryOpt(opt *WebhooksDeliveryOption) error
func (*WebhooksService) ValidateListOpt ¶
func (s *WebhooksService) ValidateListOpt(opt *WebhooksListOption) error
func (*WebhooksService) ValidateUpdateOpt ¶
func (s *WebhooksService) ValidateUpdateOpt(opt *WebhooksUpdateOption) error
type WebhooksUpdateOption ¶
type WebhooksUpdateOption struct { Name string `url:"name,omitempty"` // Description:"new name of the webhook",ExampleValue:"My Webhook" Url string `url:"url,omitempty"` // Description:"new url to be called by the webhook",ExampleValue:"https://www.my-webhook-listener.com/sonar" Webhook string `url:"webhook,omitempty"` // Description:"The key of the webhook to be updated,auto-generated value can be obtained through api/webhooks/create or api/webhooks/list",ExampleValue:"my_project" }
Source Files ¶
- ce_service.go
- client.go
- client_util.go
- components_service.go
- duplications_service.go
- favorites_service.go
- issues_service.go
- languages_service.go
- measures_service.go
- metrics.go
- metrics_service.go
- notifications_service.go
- permissions_service.go
- plugins_service.go
- project_analyses_service.go
- project_badges_service.go
- project_branches_service.go
- project_links_service.go
- project_pull_requests_service.go
- project_tags_service.go
- projects_service.go
- qualitygates_service.go
- qualityprofiles_service.go
- rules_service.go
- server_service.go
- settings_service.go
- sonarqube.go
- sources_service.go
- system_service.go
- user_groups_service.go
- user_tokens_service.go
- users_service.go
- validation.go
- webhooks_service.go