sonargo

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 11 Imported by: 10

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

View Source
const (
	SeverityINFO     = "INFO"
	SeverityMINOR    = "MINOR"
	SeverityMAJOR    = "MAJOR"
	SeverityCRITICAL = "CRITICAL"
	SeverityBLOCKER  = "BLOCKER"

	IssueTypeBug           = "BUG"
	IssueTypeCodeSmell     = "CODE_SMELL"
	IssueTypeVulnerability = "VULNERABILITY"
)
View Source
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"
)
View Source
const (
	ProjectVisibilityPublic  = "public"
	ProjectVisibilityPrivate = "private"
)
View Source
const (
	QualifierSubProject = "BRC"
	QualifierDirectory  = "DIR"
	QualifierFile       = "FIL"
	QualifierProject    = "TRK"
	QualifierTestFile   = "UTS"
)

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

func Do

func Do(c *http.Client, req *http.Request, v interface{}) (*http.Response, error)

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.

func SetBaseURLUtil

func SetBaseURLUtil(urlStr string) (*url.URL, error)

SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.

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 Analysis

type Analysis struct {
	Key    string   `json:"key,omitempty"`
	Date   string   `json:"date,omitempty"`
	Events []*Event `json:"events,omitempty"`
}

type Block

type Block struct {
	Ref  string `json:"_ref,omitempty"`
	From int64  `json:"from,omitempty"`
	Size int64  `json:"size,omitempty"`
}

type Branch

type Branch struct {
	AnalysisDate string  `json:"analysisDate,omitempty"`
	IsMain       bool    `json:"isMain,omitempty"`
	MergeBranch  string  `json:"mergeBranch,omitempty"`
	Name         string  `json:"name,omitempty"`
	Status       *Status `json:"status,omitempty"`
	Type         string  `json:"type,omitempty"`
}

type Cause

type Cause struct {
	Message   string `json:"message,omitempty"`
	StartedAt string `json:"startedAt,omitempty"`
	State     string `json:"state,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 CeComponentObject struct {
	Current *Task   `json:"current,omitempty"`
	Queue   []*Task `json:"queue,omitempty"`
}

type CeComponentOption

type CeComponentOption struct {
	Component   string `url:"component,omitempty"`   // Description:"",ExampleValue:"my_project"
	ComponentId string `url:"componentId,omitempty"` // Description:"",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}

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 CeTaskOption struct {
	AdditionalFields string `url:"additionalFields,omitempty"` // Description:"Comma-separated list of the optional fields to be returned in response.",ExampleValue:""
	Id               string `url:"id,omitempty"`               // Description:"Id of task",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}

type Changelog

type Changelog struct {
	Avatar       string  `json:"avatar,omitempty"`
	CreationDate string  `json:"creationDate,omitempty"`
	Diffs        []*Diff `json:"diffs,omitempty"`
	User         string  `json:"user,omitempty"`
	UserName     string  `json:"userName,omitempty"`
}

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 NewClient

func NewClient(endpoint, username, password string) (*Client, error)

func NewClientWithToken

func NewClientWithToken(endpoint, token string) (*Client, error)

func (*Client) BaseURL

func (c *Client) BaseURL() *url.URL

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)

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

func (c *Client) NewRequest(method, path 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.

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(urlStr string) error

SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.

type Comment

type Comment struct {
	CreatedAt string `json:"createdAt,omitempty"`
	HTMLText  string `json:"htmlText,omitempty"`
	Key       string `json:"key,omitempty"`
	Login     string `json:"login,omitempty"`
	Markdown  string `json:"markdown,omitempty"`
	Updatable bool   `json:"updatable,omitempty"`
}

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 ComponentsSearchObject struct {
	Components []*Component `json:"components,omitempty"`
	Paging     *Paging      `json:"paging,omitempty"`
}

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

Search Search for components

func (*ComponentsService) Show

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

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 ComponentsShowObject struct {
	Ancestors []*Component `json:"ancestors,omitempty"`
	Component *Component   `json:"component,omitempty"`
}

type ComponentsShowOption

type ComponentsShowOption struct {
	Component   string `url:"component,omitempty"`   // Description:"Component key",ExampleValue:"my_project"
	ComponentId string `url:"componentId,omitempty"` // Description:"Component id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
}

type ComponentsTreeObject

type ComponentsTreeObject struct {
	BaseComponent Component    `json:"baseComponent,omitempty"`
	Components    []*Component `json:"components,omitempty"`
	Paging        Paging       `json:"paging,omitempty"`
}

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 DefaultTemplate struct {
	Qualifier  string `json:"qualifier,omitempty"`
	TemplateID string `json:"templateId,omitempty"`
}

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 Diff

type Diff struct {
	Key      string `json:"key,omitempty"`
	NewValue string `json:"newValue,omitempty"`
	OldValue string `json:"oldValue,omitempty"`
}

type Duplication

type Duplication struct {
	Blocks []*Block `json:"blocks,omitempty"`
}

type DuplicationsService

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

func (*DuplicationsService) Show

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 DuplicationsShowOption struct {
	Key  string `url:"key,omitempty"`  // Description:"File key",ExampleValue:"my_project:/src/foo/Bar.php"
	Uuid string `url:"uuid,omitempty"` // Description:"File ID. If provided, 'key' must not be provided.",ExampleValue:"584a89f2-8037-4f7b-b82c-8b45d2d63fb2"
}

type ErrorResponse

type ErrorResponse struct {
	Body     []byte
	Response *http.Response
	Message  string
}

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 ExportImporter struct {
	Key       string   `json:"key,omitempty"`
	Name      string   `json:"name,omitempty"`
	Languages []string `json:"languages,omitempty"`
}

type Facet

type Facet struct {
	Name     string        `json:"name,omitempty"`
	Property string        `json:"property,omitempty"`
	Values   []*FacetValue `json:"values,omitempty"`
}

type FacetValue

type FacetValue struct {
	Count int64  `json:"count,omitempty"`
	Val   string `json:"val,omitempty"`
}

type Favorite

type Favorite struct {
	Key          string `json:"key,omitempty"`
	Name         string `json:"name,omitempty"`
	Organization string `json:"organization,omitempty"`
	Qualifier    string `json:"qualifier,omitempty"`
}

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 FavoritesSearchObject struct {
	Favorites []*Favorite `json:"favorites,omitempty"`
	Paging    Paging      `json:"paging,omitempty"`
}

type FavoritesSearchOption

type FavoritesSearchOption struct {
	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 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

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 Field

type Field struct {
	Description string   `json:"description,omitempty"`
	Key         string   `json:"key,omitempty"`
	Name        string   `json:"name,omitempty"`
	Options     []string `json:"options,omitempty"`
	Type        string   `json:"type,omitempty"`
}

type FieldValue

type FieldValue struct {
	Boolean string `json:"boolean,omitempty"`
	Text    string `json:"text,omitempty"`
}

type File

type File struct {
	Key         string `json:"key,omitempty"`
	Name        string `json:"name,omitempty"`
	ProjectName string `json:"projectName,omitempty"`
}

type Files

type Files struct {
	One   *File `json:"1,omitempty"`
	Two   *File `json:"2,omitempty"`
	Three *File `json:"3,omitempty"`
}

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 History

type History struct {
	Date  string `json:"date,omitempty"`
	Value string `json:"value,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 IssuesAddCommentObject struct {
	Components []*Component `json:"components,omitempty"`
	Issue      *Issue       `json:"issue,omitempty"`
	Rules      []*Rule      `json:"rules,omitempty"`
	Users      []*User      `json:"users,omitempty"`
}

type IssuesAddCommentOption

type IssuesAddCommentOption struct {
	Issue string `url:"issue,omitempty"` // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Text  string `url:"text,omitempty"`  // Description:"Comment text",ExampleValue:"Won't fix because it doesn't apply to the context"
}

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 IssuesAuthorsOption struct {
	Ps int    `url:"ps,omitempty"` // Description:"The size of the list to return",ExampleValue:"25"
	Q  string `url:"q,omitempty"`  // Description:"A pattern to match SCM accounts against",ExampleValue:"luke"
}

type IssuesBulkChangeObject

type IssuesBulkChangeObject struct {
	Failures int `json:"failures,omitempty"`
	Ignored  int `json:"ignored,omitempty"`
	Success  int `json:"success,omitempty"`
	Total    int `json:"total,omitempty"`
}

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 IssuesDoTransitionOption

type IssuesDoTransitionOption struct {
	Issue      string `url:"issue,omitempty"`      // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Transition string `url:"transition,omitempty"` // Description:"Transition",ExampleValue:""
}

type IssuesEditCommentOption

type IssuesEditCommentOption struct {
	Comment string `url:"comment,omitempty"` // Description:"Comment key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Text    string `url:"text,omitempty"`    // Description:"Comment text",ExampleValue:"Won't fix because it doesn't apply to the context"
}

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 &lt;repository&gt;:&lt;rule&gt;",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 IssuesSetSeverityOption struct {
	Issue    string `url:"issue,omitempty"`    // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Severity string `url:"severity,omitempty"` // Description:"New severity",ExampleValue:""
}

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 IssuesSetTypeOption struct {
	Issue string `url:"issue,omitempty"` // Description:"Issue key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Type  string `url:"type,omitempty"`  // Description:"New type",ExampleValue:""
}

type IssuesTagsObject

type IssuesTagsObject struct {
	Tags []string `json:"tags,omitempty"`
}

type IssuesTagsOption

type IssuesTagsOption struct {
	Ps int    `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 100",ExampleValue:"20"
	Q  string `url:"q,omitempty"`  // Description:"Limit search to tags that contain the supplied string.",ExampleValue:"misra"
}

type Key

type Key struct {
	Duplicate bool   `json:"duplicate,omitempty"`
	Key       string `json:"key,omitempty"`
	NewKey    string `json:"newKey,omitempty"`
}

type Language

type Language struct {
	Key  string `json:"key,omitempty"`
	Name string `json:"name,omitempty"`
}

type LanguagesListObject

type LanguagesListObject struct {
	Languages []*Language `json:"languages,omitempty"`
}

type LanguagesListOption

type LanguagesListOption struct {
	Ps int    `url:"ps,omitempty"` // Description:"The size of the list to return, 0 for all languages",ExampleValue:"25"
	Q  string `url:"q,omitempty"`  // Description:"A pattern to match language keys/names against",ExampleValue:"java"
}

type LanguagesService

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

func (*LanguagesService) List

List List supported programming languages

func (*LanguagesService) ValidateListOpt

func (s *LanguagesService) ValidateListOpt(opt *LanguagesListOption) error
type Link struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	URL  string `json:"url,omitempty"`
	Type string `json:"type,omitempty"`
}

type LogLevel

type LogLevel string
const (
	LogLevelInfo  LogLevel = "INFO"
	LogLevelDebug LogLevel = "DEBUG"
	LogLevelTrace LogLevel = "TRACE"
)

type MeasuresComponentObject

type MeasuresComponentObject struct {
	Component *Component `json:"component,omitempty"`
	Metrics   []*Metric  `json:"metrics,omitempty"`
	Periods   []*Period  `json:"periods,omitempty"`
}

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 MeasuresComponentTreeObject

type MeasuresComponentTreeObject struct {
	BaseComponent Component    `json:"baseComponent,omitempty"`
	Components    []*Component `json:"components,omitempty"`
	Metrics       []*Metric    `json:"metrics,omitempty"`
	Paging        Paging       `json:"paging,omitempty"`
	Periods       []*Period    `json:"periods,omitempty"`
}

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

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

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

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 MetricsDeleteOption struct {
	Ids  string `url:"ids,omitempty"`  // Description:"Metrics ids to delete.",ExampleValue:"5, 23, 42"
	Keys string `url:"keys,omitempty"` // Description:"Metrics keys to delete",ExampleValue:"team_size, business_value"
}

type MetricsDomainsObject

type MetricsDomainsObject struct {
	Domains []string `json:"domains,omitempty"`
}

type MetricsSearchObject

type MetricsSearchObject struct {
	Metrics []*Metric `json:"metrics,omitempty"`
	P       int64     `json:"p,omitempty"`
	Ps      int64     `json:"ps,omitempty"`
	Total   int64     `json:"total,omitempty"`
}

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 Node

type Node struct {
	Causes    []*Cause `json:"causes,omitempty"`
	Health    string   `json:"health,omitempty"`
	Host      string   `json:"host,omitempty"`
	Name      string   `json:"name,omitempty"`
	Port      int64    `json:"port,omitempty"`
	StartedAt string   `json:"startedAt,omitempty"`
	Type      string   `json:"type,omitempty"`
}

type Notification

type Notification struct {
	Channel      string `json:"channel,omitempty"`
	Organization string `json:"organization,omitempty"`
	Project      string `json:"project,omitempty"`
	ProjectName  string `json:"projectName,omitempty"`
	Type         string `json:"type,omitempty"`
}

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

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

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 Period

type Period struct {
	Date      string `json:"date,omitempty"`
	Index     int64  `json:"index,omitempty"`
	Mode      string `json:"mode,omitempty"`
	Parameter string `json:"parameter,omitempty"`
	Value     string `json:"value,omitempty"`
	BestValue bool   `json:"bestValue,omitempty"`
}

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 PermissionsDeleteTemplateOption

type PermissionsDeleteTemplateOption struct {
	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 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

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

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

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 PluginsAvailableObject struct {
	Plugins             []*Plugin `json:"plugins,omitempty"`
	UpdateCenterRefresh string    `json:"updateCenterRefresh,omitempty"`
}

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 PluginsPendingObject struct {
	Installing []*Plugin `json:"installing,omitempty"`
	Removing   []*Plugin `json:"removing,omitempty"`
	Updating   []*Plugin `json:"updating,omitempty"`
}

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 Project

type Project struct {
	CreationDate string `json:"creationDate,omitempty"`
	Key          string `json:"key,omitempty"`
	Name         string `json:"name,omitempty"`
	Qualifier    string `json:"qualifier,omitempty"`
	UUID         string `json:"uuid,omitempty"`
	Visibility   string `json:"visibility,omitempty"`
}

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 ProjectAnalysesSearchObject

type ProjectAnalysesSearchObject struct {
	Paging   *Paging     `json:"paging,omitempty"`
	Analyses []*Analysis `json:"analyses,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

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

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

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

Search Search a project analyses and attached events.<br>Requires the following permission: 'Browse' on the specified project

func (*ProjectAnalysesService) UpdateEvent

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 ProjectAnalysesUpdateEventOption

type ProjectAnalysesUpdateEventOption struct {
	Event string `url:"event,omitempty"` // Description:"Event key",ExampleValue:"AU-TpxcA-iU5OvuD2FL5"
	Name  string `url:"name,omitempty"`  // Description:"New name",ExampleValue:"5.6"
}

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 ProjectBranchesDeleteOption

type ProjectBranchesDeleteOption struct {
	Branch  string `url:"branch,omitempty"`  // Description:"Name of the branch",ExampleValue:"branch1"
	Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
}

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 ProjectBranchesRenameOption

type ProjectBranchesRenameOption struct {
	Name    string `url:"name,omitempty"`    // Description:"New name of the main branch",ExampleValue:"branch1"
	Project string `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
}

type ProjectBranchesService

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

func (*ProjectBranchesService) Delete

Delete Delete a non-main branch of a project.<br/>Requires 'Administer' rights on the specified project.

func (*ProjectBranchesService) List

List List the branches of a project.<br/>Requires 'Browse' or 'Execute analysis' rights on the specified project.

func (*ProjectBranchesService) Rename

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 ProjectLinksSearchOption

type ProjectLinksSearchOption struct {
	ProjectId  string `url:"projectId,omitempty"`  // Description:"Project Id",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	ProjectKey string `url:"projectKey,omitempty"` // Description:"Project Key",ExampleValue:"my_project"
}

type ProjectLinksService

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

func (*ProjectLinksService) Create

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

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 ProjectPullRequestsDeleteOption

type ProjectPullRequestsDeleteOption struct {
	Project     string `url:"project,omitempty"`     // Description:"Project key",ExampleValue:"my_project"
	PullRequest int    `url:"pullRequest,omitempty"` // Description:"Pull request id",ExampleValue:"1543"
}

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

Delete Delete a pull request.<br/>Requires 'Administer' rights on the specified project.

func (*ProjectPullRequestsService) List

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 (*ProjectPullRequestsService) ValidateListOpt

type ProjectSearchObject

type ProjectSearchObject ComponentsSearchObject

type ProjectStatus

type ProjectStatus struct {
	Conditions        []*Condition `json:"conditions,omitempty"`
	IgnoredConditions bool         `json:"ignoredConditions,omitempty"`
	Periods           []*Period    `json:"periods,omitempty"`
	Status            string       `json:"status,omitempty"`
}

type ProjectTagsSearchOption

type ProjectTagsSearchOption struct {
	Ps int    `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 100",ExampleValue:"20"
	Q  string `url:"q,omitempty"`  // Description:"Limit search to tags that contain the supplied string.",ExampleValue:"off"
}

type ProjectTagsService

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

func (*ProjectTagsService) Search

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 ProjectTagsSetOption struct {
	Project string  `url:"project,omitempty"` // Description:"Project key",ExampleValue:"my_project"
	Tags    *string `url:"tags,omitempty"`    // Description:"Comma-separated list of tags",ExampleValue:"finance, offshore"
}

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 ProjectsDeleteOption struct {
	Project   string `url:"project,omitempty"`   // Description:"Project key",ExampleValue:"my_project"
	ProjectId string `url:"projectId,omitempty"` // Description:"Project ID",ExampleValue:"ce4c03d6-430f-40a9-b777-ad877c00aa4d"
}

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

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

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

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 ProjectsUpdateVisibilityOption

type ProjectsUpdateVisibilityOption struct {
	Project    string `url:"project,omitempty"`    // Description:"Project key",ExampleValue:"my_project"
	Visibility string `url:"visibility,omitempty"` // Description:"New visibility",ExampleValue:""
}

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 QualityGate struct {
	Default bool   `json:"default,omitempty"`
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
}

type QualityGateV2

type QualityGateV2 struct {
	Actions    *Actions                 `json:"actions,omitempty"`
	Conditions []*QualityGatesCondition `json:"conditions,omitempty"`
	ID         int                      `json:"id,omitempty"`
	IsBuiltIn  bool                     `json:"isBuiltIn,omitempty"`
	IsDefault  bool                     `json:"isDefault,omitempty"`
	Name       string                   `json:"name,omitempty"`
}

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 QualityProfilesActiveRulesObject

type QualityProfilesActiveRulesObject struct {
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
	Errors    []struct {
		Msg string `json:"msg"`
	} `json:"errors"`
}

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 QualityProfilesCopyOption

type QualityProfilesCopyOption struct {
	FromKey string `url:"fromKey,omitempty"` // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	ToName  string `url:"toName,omitempty"`  // Description:"Name for the new quality profile.",ExampleValue:"My Sonar way"
}

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 QualityProfilesRenameOption

type QualityProfilesRenameOption struct {
	Key  string `url:"key,omitempty"`  // Description:"Quality profile key",ExampleValue:"AU-Tpxb--iU5OvuD2FLy"
	Name string `url:"name,omitempty"` // Description:"New quality profile name",ExampleValue:"My Sonar way"
}

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

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

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

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

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

Copy Copy a quality profile.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.

func (*QualityProfilesService) Create

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

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

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

Export Export a quality profile.

func (*QualityProfilesService) Exporters

Exporters Lists available profile export formats.

func (*QualityProfilesService) Importers

Importers List supported importers.

func (*QualityProfilesService) Inheritance

Inheritance Show a quality profile's ancestors and children.

func (*QualityProfilesService) Projects

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

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

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

Search Search quality profiles

func (*QualityProfilesService) SetDefault

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 QualitygatesSearchObject

type QualitygatesSearchObject struct {
	Paging  *Paging   `json:"paging,omitempty"`
	More    bool      `json:"more,omitempty"`
	Results []*Result `json:"results,omitempty"`
}

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

Copy Copy a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.

func (*QualitygatesService) Create

Create Create a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.

func (*QualitygatesService) CreateCondition

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

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

List Get a list of quality gates

func (*QualitygatesService) ProjectStatus

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

Rename Rename a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.

func (*QualitygatesService) Search

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

Show Display the details of a quality gate

func (*QualitygatesService) UpdateCondition

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 Release

type Release struct {
	Date         string `json:"date,omitempty"`
	Version      string `json:"version,omitempty"`
	Description  string `json:"description,omitempty"`
	ChangeLogURL string `json:"changeLogUrl,omitempty"`
}

type Repositorie

type Repositorie struct {
	Key      string `json:"key,omitempty"`
	Language string `json:"language,omitempty"`
	Name     string `json:"name,omitempty"`
}

type Require

type Require struct {
	Description string `json:"description,omitempty"`
	Key         string `json:"key,omitempty"`
	Name        string `json:"name,omitempty"`
}

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 Result

type Result struct {
	ID       int    `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Selected bool   `json:"selected,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 RuleParam

type RuleParam struct {
	DefaultValue string `json:"defaultValue,omitempty"`
	Key          string `json:"key,omitempty"`
	HTMLDesc     string `json:"htmlDesc,omitempty"`
	Type         string `json:"type,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 RulesSearchObject struct {
	Actives *Actives `json:"actives,omitempty"`
	Facets  []*Facet `json:"facets,omitempty"`
	P       int64    `json:"p,omitempty"`
	Ps      int64    `json:"ps,omitempty"`
	Rules   []*Rule  `json:"rules,omitempty"`
	Total   int64    `json:"total,omitempty"`
}

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 RulesShowOption struct {
	Actives string `url:"actives,omitempty"` // Description:"Show rule's activations for all profiles ("active rules")",ExampleValue:""
	Key     string `url:"key,omitempty"`     // Description:"Rule key",ExampleValue:"javascript:EmptyBlock"
}

type RulesTagsOption

type RulesTagsOption struct {
	Ps int    `url:"ps,omitempty"` // Description:"Page size. Must be greater than 0 and less or equal than 100",ExampleValue:"20"
	Q  string `url:"q,omitempty"`  // Description:"Limit search to tags that contain the supplied string.",ExampleValue:"misra"
}

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
}

func (*ServerService) Version

func (s *ServerService) Version() (v *string, resp *http.Response, err error)

Version Version of SonarQube in plain text

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 SettingsResetOption struct {
	Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project"
	Keys      string `url:"keys,omitempty"`      // Description:"Comma-separated list of keys",ExampleValue:"sonar.links.scm,sonar.debt.hoursInDay"
}

type SettingsService

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

func (*SettingsService) ListDefinitions

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

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 SettingsValuesOption struct {
	Component string `url:"component,omitempty"` // Description:"Component key",ExampleValue:"my_project"
	Keys      string `url:"keys,omitempty"`      // Description:"List of setting keys",ExampleValue:"sonar.test.inclusions,sonar.dbcleaner.cleanDirectory"
}

type SonarMeasure

type SonarMeasure struct {
	Metric    string     `json:"metric,omitempty"`
	Periods   []*Period  `json:"periods,omitempty"`
	Value     string     `json:"value,omitempty"`
	Histories []*History `json:"history,omitempty"`
	BestValue bool       `json:"bestValue,omitempty"`
}

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 SquidParam struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type Status

type Status struct {
	Bugs              int64  `json:"bugs,omitempty"`
	CodeSmells        int64  `json:"codeSmells,omitempty"`
	QualityGateStatus string `json:"qualityGateStatus,omitempty"`
	Vulnerabilities   int64  `json:"vulnerabilities,omitempty"`
}

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 SystemHealthObject struct {
	Causes []*Cause `json:"causes,omitempty"`
	Health string   `json:"health,omitempty"`
	Nodes  []*Node  `json:"nodes,omitempty"`
}

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 SystemStatusObject struct {
	ID      string `json:"id,omitempty"`
	Status  string `json:"status,omitempty"`
	Version string `json:"version,omitempty"`
}

type SystemUpgradesObject

type SystemUpgradesObject struct {
	UpdateCenterRefresh string     `json:"updateCenterRefresh,omitempty"`
	Upgrades            []*Upgrade `json:"upgrades,omitempty"`
}

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 TextRange

type TextRange struct {
	EndLine     int `json:"endLine,omitempty"`
	EndOffset   int `json:"endOffset,omitempty"`
	StartLine   int `json:"startLine,omitempty"`
	StartOffset int `json:"startOffset,omitempty"`
}

type Update

type Update struct {
	Release  *Release   `json:"release,omitempty"`
	Requires []*Require `json:"requires,omitempty"`
	Status   string     `json:"status,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 UserGroupsAddUserOption 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 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 UserGroupsDeleteOption struct {
	Id   int    `url:"id,omitempty"`   // Description:"Group id",ExampleValue:"42"
	Name string `url:"name,omitempty"` // Description:"Group name",ExampleValue:"sonar-administrators"
}

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 UserGroupsSearchObject struct {
	Groups []*Group `json:"groups,omitempty"`
	Paging *Paging  `json:"paging,omitempty"`
}

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

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

Search Search for user groups.<br>Requires the following permission: 'Administer System'.

func (*UserGroupsService) Update

Update Update a group.<br>Requires the following permission: 'Administer System'.

func (*UserGroupsService) Users

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 UserGroupsUsersObject struct {
	Users []*User `json:"users,omitempty"`
	Total int     `json:"total,omitempty"`
	P     int     `json:"p,omitempty"`
	Ps    int     `json:"ps,omitempty"`
}

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 UserToken

type UserToken struct {
	CreatedAt string `json:"createdAt,omitempty"`
	Name      string `json:"name,omitempty"`
}

type UserTokensGenerateObject

type UserTokensGenerateObject struct {
	CreatedAt string `json:"createdAt,omitempty"`
	Login     string `json:"login,omitempty"`
	Name      string `json:"name,omitempty"`
	Token     string `json:"token,omitempty"`
}

type UserTokensGenerateOption

type UserTokensGenerateOption struct {
	Login string `url:"login,omitempty"` // Description:"User login. If not set, the token is generated for the authenticated user.",ExampleValue:"g.hopper"
	Name  string `url:"name,omitempty"`  // Description:"Token name",ExampleValue:"Project scan on Travis"
}

type UserTokensRevokeOption

type UserTokensRevokeOption struct {
	Login string `url:"login,omitempty"` // Description:"User login",ExampleValue:"g.hopper"
	Name  string `url:"name,omitempty"`  // Description:"Token name",ExampleValue:"Project scan on Travis"
}

type UserTokensSearchObject

type UserTokensSearchObject struct {
	Login      string       `json:"login,omitempty"`
	UserTokens []*UserToken `json:"userTokens,omitempty"`
}

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

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

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 UsersSearchObject struct {
	Paging *Paging `json:"paging,omitempty"`
	Users  []*User `json:"users,omitempty"`
}

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 Webhook

type Webhook struct {
	Key            string    `json:"key,omitempty"`
	Name           string    `json:"name,omitempty"`
	URL            string    `json:"url,omitempty"`
	LatestDelivery *Delivery `json:"latestDelivery,omitempty"`
}

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 WebhooksDeliveriesObject

type WebhooksDeliveriesObject struct {
	Deliveries []*Delivery `json:"deliveries,omitempty"`
	Paging     Paging      `json:"paging,omitempty"`
}

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

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

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

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

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"
}

Jump to

Keyboard shortcuts

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