sonarqube

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NONE   = "NONE"
	MANUAL = "MANUAL"
	TAGS   = "TAGS"
	REGEXP = "REGEXP"
	REST   = "REST"
)

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

Provider for sonarqube

Types

type Actives

type Actives struct {
	QProfile string   `json:"qProfile"`
	Inherit  string   `json:"inherit"`
	Severity string   `json:"severity"`
	Params   []Params `json:"params"`
}

type Branches

type Branches struct {
	Name              string `json:"name"`
	IsMain            bool   `json:"isMain"`
	Type              string `json:"type"`
	Status            Status `json:"status"`
	AnalysisDate      string `json:"analysisDate"`
	ExcludedFromPurge bool   `json:"excludedFromPurge"`
}

type CreateGroupResponse

type CreateGroupResponse struct {
	Group Group `json:"group"`
}

CreateGroupResponse for unmarshalling response body of group creation

type CreatePermissionTemplateResponse

type CreatePermissionTemplateResponse struct {
	PermissionTemplate PermissionTemplate `json:"permissionTemplate"`
}

CreatePermissionTemplateResponse struct

type CreateProjectResponse

type CreateProjectResponse struct {
	Project Project `json:"project"`
}

CreateProjectResponse for unmarshalling response body of project creation

type CreateQualityGateResponse

type CreateQualityGateResponse struct {
	Name string `json:"name"`
}

CreateQualityGateResponse for unmarshalling response body of quality gate creation

type CreateQualityProfileResponse

type CreateQualityProfileResponse struct {
	Profile  QualityProfile `json:"profile"`
	Warnings []string       `json:"warnings"`
}

CreateQualityProfileResponse for unmarshalling response body from creating quality profiles

type CreateRuleResponse

type CreateRuleResponse struct {
	Rule Rule `json:"rule"`
}

type CreateUserResponse

type CreateUserResponse struct {
	User User `json:"user"`
}

CreateUserResponse struct

type CreateWebhookResponse

type CreateWebhookResponse struct {
	Webhook *Webhook `json:"webhook"`
}

type ErrorMessage

type ErrorMessage struct {
	Message string `json:"msg,omitempty"`
}

ErrorMessage struct

type ErrorResponse

type ErrorResponse struct {
	Errors []ErrorMessage `json:"errors,omitempty"`
}

ErrorResponse struct

type GetActiveRules

type GetActiveRules struct {
	Rule    Rule      `json:"rule"`
	Actives []Actives `json:"actives"`
}

type GetAlmAzure

type GetAlmAzure struct {
	Azure []struct {
		Key string `json:"key"`
		URL string `json:"url"`
	} `json:"azure"`
}

GetAlmAzure for unmarshalling response body from alm list definitions. With only azure populated

type GetAlmGithub

type GetAlmGithub struct {
	Github []struct {
		Key      string `json:"key"`
		URL      string `json:"url"`
		AppID    string `json:"appId"`
		ClientID string `json:"clientId"`
	} `json:"github"`
}

GetAlmGithub for unmarshalling response body from alm list definitions. With only github populated

type GetAlmGitlab

type GetAlmGitlab struct {
	Gitlab []struct {
		Key                 string `json:"key"`
		URL                 string `json:"url"`
		PersonalAccessToken string `json:"personalAccessToken,omitempty"`
	} `json:"gitlab"`
}

GetAlmGitlab for unmarshalling response body from alm list definitions. With only gitlab populated

type GetAzureBinding

type GetAzureBinding struct {
	Key        string `json:"key"`
	Alm        string `json:"alm"`
	Repository string `json:"repository"` // Azure DevOps Repository
	Slug       string `json:"slug"`       // Azure DevOps Project
	URL        string `json:"url"`
	Monorepo   bool   `json:"monorepo"`
}

GetAzureBinding for unmarshalling response body from getting project binding details

type GetBinding

type GetBinding struct {
	Key                   string `json:"key"`
	Alm                   string `json:"alm"`
	Repository            string `json:"repository"`
	URL                   string `json:"url"`
	SummaryCommentEnabled bool   `json:"summaryCommentEnabled,omitempty"`
	Monorepo              bool   `json:"monorepo"`
}

GetBinding for unmarshalling response body from getting project binding details

type GetBranches

type GetBranches struct {
	Branches []Branches `json:"branches"`
}

GetBranches for unmarshalling response body from getting project branch details

type GetGroup

type GetGroup struct {
	Paging Paging  `json:"paging"`
	Groups []Group `json:"groups"`
}

GetGroup for unmarshalling response body from getting group details

type GetGroupMembersResponse

type GetGroupMembersResponse struct {
	Paging  Paging        `json:"paging"`
	Members []GroupMember `json:"users"`
}

GetGroupMembersResponse for unmarshalling response body of group creation

type GetGroupPermissions

type GetGroupPermissions struct {
	Paging Paging            `json:"paging"`
	Groups []GroupPermission `json:"groups"`
}

GetGroupPermissions struct

type GetInstalledPlugins

type GetInstalledPlugins struct {
	Plugins []Plugin `json:"plugins"`
}

GetInstalledPlugins for unmarshalling response body from geting installed plugins

type GetPermissionTemplates

type GetPermissionTemplates struct {
	Paging              Paging               `json:"paging"`
	PermissionTemplates []PermissionTemplate `json:"permissionTemplates"`
}

GetPermissionTemplates struct

type GetProject

type GetProject struct {
	Component ProjectComponent `json:"component"`
}

GetProject for unmarshalling response body from getting project details

type GetQualityGate

type GetQualityGate struct {
	ID         string                              `json:"id"`
	Name       string                              `json:"name"`
	Conditions []ReadQualityGateConditionsResponse `json:"conditions"`
	IsBuiltIn  bool                                `json:"isBuiltIn"`
	Actions    QualityGateActions                  `json:"actions"`
}

GetQualityGate for unmarshalling response body of quality gate get

type GetQualityGateAssociation

type GetQualityGateAssociation struct {
	QualityGate struct {
		Id      string `json:"id"`
		Name    string `json:"name"`
		Default bool   `json:"default"`
	} `json:"qualityGate"`
}

GetQualityGateAssociation for unmarshalling response body from getting quality gate association

type GetQualityGateUsergroupAssociation

type GetQualityGateUsergroupAssociation struct {
	Paging Paging                                       `json:"paging"`
	Groups []GetQualityGateUsergroupAssociationProjects `json:"groups,omitempty"`
	Users  []GetQualityGateUsergroupAssociationProjects `json:"users,omitempty"`
}

GetQualityGateUsergroupAssociation for unmarshalling response body from getting quality gate association

type GetQualityGateUsergroupAssociationProjects

type GetQualityGateUsergroupAssociationProjects struct {
	Login       string `json:"login,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Selected    bool   `json:"selected"`
}

GetQualityGateUsergroupAssociationProjects used in GetQualityGateUsergroupAssociation

type GetQualityProfile

type GetQualityProfile struct {
	Key                       string                   `json:"key"`
	Name                      string                   `json:"name"`
	Language                  string                   `json:"language"`
	LanguageName              string                   `json:"languageName"`
	IsInherited               bool                     `json:"isInherited"`
	IsBuiltIn                 bool                     `json:"isBuiltIn"`
	ActiveRuleCount           int                      `json:"activeRuleCount"`
	ActiveDeprecatedRuleCount int                      `json:"activeDeprecatedRuleCount"`
	IsDefault                 bool                     `json:"isDefault"`
	RuleUpdatedAt             string                   `json:"ruleUpdatedAt"`
	LastUsed                  string                   `json:"lastUsed"`
	Actions                   GetQualityProfileActions `json:"actions"`
}

GetQualityProfile for unmarshalling response body of quality gate get

type GetQualityProfileActions

type GetQualityProfileActions struct {
	Edit              bool `json:"edit"`
	SetAsDefault      bool `json:"setAsDefault"`
	Copy              bool `json:"copy"`
	Delete            bool `json:"delete"`
	AssociateProjects bool `json:"associateProjects"`
}

GetQualityProfileActions for unmarshalling response body of quality gate get

type GetQualityProfileList

type GetQualityProfileList struct {
	Profiles []GetQualityProfile `json:"profiles"`
}

GetQualityProfileList for unmarshalling response body of quality gate get

type GetQualityProfileProjectAssociation

type GetQualityProfileProjectAssociation struct {
	Paging  Paging                                       `json:"paging"`
	Results []GetQualityProfileProjectAssociationResults `json:"results"`
}

GetQualityProfileProjectAssociation for unmarshalling response body from getting quality profile association

type GetQualityProfileProjectAssociationResults

type GetQualityProfileProjectAssociationResults struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Key      string `json:"key"`
	Selected bool   `json:"selected"`
}

GetQualityProfileProjectAssociationResults used in GetQualityProfileProjectAssociation

type GetRule

type GetRule struct {
	Rule  []Rule `json:"rules"`
	Total int    `json:"total"`
	P     int    `json:"p"`
	PS    int    `json:"ps"`
}

type GetSettings

type GetSettings struct {
	Setting            []Setting `json:"settings"`
	SetSecuredSettings []string  `json:"setSecuredSettings"`
}

type GetTokens

type GetTokens struct {
	Login  string  `json:"login,omitempty"`
	Tokens []Token `json:"userTokens,omitempty"`
}

GetTokens struct

type GetUser

type GetUser struct {
	Paging Paging `json:"paging"`
	Users  []User `json:"users"`
}

GetUser for unmarshalling response body where users are retured

type Group

type Group struct {
	ID           string   `json:"id,omitempty"`
	Organization string   `json:"organization,omitempty"`
	Name         string   `json:"name,omitempty"`
	Description  string   `json:"description,omitempty"`
	MembersCount int      `json:"membersCount,omitempty"`
	IsDefault    bool     `json:"default,omitempty"`
	Permissions  []string `json:"permissions,omitempty"`
}

Group struct

type GroupMember

type GroupMember struct {
	LoginName string `json:"login,omitempty"`
	Name      string `json:"name,omitempty"`
}

GroupMember struct

type GroupPermission

type GroupPermission struct {
	Id          string   `json:"id"`
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description"`
	Permissions []string `json:"permissions,omitempty"`
}

GroupPermission struct

type ListWebhooksResponse

type ListWebhooksResponse struct {
	Webhooks []*Webhook `json:"webhooks"`
}

type NewCodePeriod

type NewCodePeriod struct {
	Project        string `json:"projectKey"`
	Branch         string `json:"branchKey"`
	Type           string `json:"type"`
	Value          string `json:"value,omitempty"`
	EffectiveValue string `json:"effectiveValue"`
	Inherited      bool   `json:"inherited"`
}

NewCodePeriods for unmarshalling response body from new_code_periods list definitions.

type NewCodePeriodType

type NewCodePeriodType string

New Code Period types

const (
	SpecificAnalysis NewCodePeriodType = "SPECIFIC_ANALYSIS"
	PreviousVersion  NewCodePeriodType = "PREVIOUS_VERSION"
	NumberOfDays     NewCodePeriodType = "NUMBER_OF_DAYS"
	ReferenceBranch  NewCodePeriodType = "REFERENCE_BRANCH"
)

type Paging

type Paging struct {
	PageIndex int64 `json:"pageIndex"`
	PageSize  int64 `json:"pageSize"`
	Total     int64 `json:"total"`
}

Paging used in /search API endpoints

type Params

type Params struct {
	ParmKey      string `json:"key"`
	HtmlDesc     string `json:"htmlDesc"`
	DefaultValue string `json:"defaultValue"`
	Type         string `json:"type"`
}

type PermissionTemplate

type PermissionTemplate struct {
	ID                string `json:"id,omitempty"`
	Name              string `json:"name,omitempty"`
	Description       string `json:"description,omitempty"`
	ProjectKeyPattern string `json:"projectKeyPattern,omitempty"`
}

PermissionTemplate struct

type Plugin

type Plugin struct {
	Key                 string `json:"key"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	Version             string `json:"version"`
	License             string `json:"license"`
	OrganizationName    string `json:"organizationName"`
	OrganizationURL     string `json:"organizationUrl"`
	EditionBundled      bool   `json:"editionBundled"`
	HomepageURL         string `json:"homepageUrl"`
	IssueTrackerURL     string `json:"issueTrackerUrl"`
	ImplementationBuild string `json:"implementationBuild"`
	Filename            string `json:"filename"`
	Hash                string `json:"hash"`
	SonarLintSupported  bool   `json:"sonarLintSupported"`
	DocumentationPath   string `json:"documentationPath"`
	UpdatedAt           int    `json:"updatedAt"`
}

Plugin used in GetInstalledPlugins

type Portfolio

type Portfolio struct {
	Key              string             `json:"key"`
	Name             string             `json:"name"`
	Desc             string             `json:"desc,omitempty"`
	Qualifier        string             `json:"qualifier"`
	Visibility       string             `json:"visibility"`
	SelectionMode    string             `json:"selectionMode"`
	Branch           string             `json:"branch,omitempty"`
	Tags             []string           `json:"tags,omitempty"`
	Regexp           string             `json:"regexp,omitempty"`
	SelectedProjects []PortfolioProject `json:"selectedProjects,omitempty"`
}

Portfolio used in Portfolio

type PortfolioProject

type PortfolioProject struct {
	ProjectKey       string   `json:"projectKey"`
	SelectedBranches []string `json:"selectedBranches,omitempty"`
}

Portfolio project

type Project

type Project struct {
	Key       string `json:"key"`
	Name      string `json:"name"`
	Qualifier string `json:"qualifier"`
}

Project used in CreateProjectResponse

type ProjectComponent

type ProjectComponent struct {
	Key          string   `json:"key"`
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Qualifier    string   `json:"qualifier"`
	AnalysisDate string   `json:"analysisDate"`
	Version      string   `json:"version"`
	Tags         []string `json:"tags,omitempty"`
	Visibility   string   `json:"visibility"`
}

ProjectComponents used in GetProject

type ProviderConfiguration

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

ProviderConfiguration contains the sonarqube providers configuration

type QualityGateActions

type QualityGateActions struct {
	Rename            bool `json:"rename"`
	SetAsDefault      bool `json:"setAsDefault"`
	Copy              bool `json:"copy"`
	AssociateProjects bool `json:"associateProjects"`
	Delete            bool `json:"delete"`
	ManageConditions  bool `json:"manageConditions"`
}

QualityGateActions used in GetQualityGate

type QualityProfile

type QualityProfile struct {
	IsDefault    bool   `json:"isDefault,omitempty"`
	IsInherited  bool   `json:"isInherited,omitempty"`
	Language     string `json:"language"`
	LanguageName string `json:"languageName"`
	Name         string `json:"name"`
	Key          string `json:"key"`
}

QualityProfile struct

type ReadQualityGateConditionsResponse

type ReadQualityGateConditionsResponse struct {
	ID     string `json:"id"`
	Metric string `json:"metric"`
	OP     string `json:"op"`
	Error  string `json:"error"`
}

ReadQualityGateConditionsResponse for unmarshalling response body of Quality Gate read

type Rule

type Rule struct {
	RuleKey     string   `json:"key"`
	Repo        string   `json:"repo"`
	Name        string   `json:"name"`
	CreatedAt   string   `json:"createdAt"`
	UpdatedAt   string   `json:"updatedAt"`
	HtmlDesc    string   `json:"htmlDesc,omitempty"`
	MdDesc      string   `json:"mdDesc,omitempty"`
	Severity    string   `json:"severity"`
	Status      string   `json:"status"`
	InternalKey string   `json:"internalKey"`
	IsTemplate  bool     `json:"isTemplate"`
	Tags        []string `json:"tags"`
	TemplateKey string   `json:"templateKey,omitempty"`
	SysTags     []string `json:"sysTags"`
	Lang        string   `json:"lang"`
	LangName    string   `json:"langName"`
	Scope       string   `json:"scope"`
	IsExternal  bool     `json:"isExternal"`
	Type        string   `json:"type"`
	Params      []Params `json:"params,omitempty"`
}

type Setting

type Setting struct {
	Key         string              `json:"key"`
	Value       string              `json:"value"`
	Values      []string            `json:"values"`
	Inherited   bool                `json:"inherited"`
	FieldValues []map[string]string `json:"fieldValues"`
}

func (Setting) ToMap

func (a Setting) ToMap() map[string]interface{}

type Status

type Status struct {
	QualityGateStatus string `json:"qualityGateStatus"`
}

type Token

type Token struct {
	Login          string       `json:"login,omitempty"`
	Name           string       `json:"name,omitempty"`
	Token          string       `json:"token,omitempty"`
	ExpirationDate string       `json:"expirationDate,omitempty"`
	Type           string       `json:"type,omitempty"`
	CreatedAt      string       `json:"createdAt,omitempty"`
	IsExpired      bool         `json:"isExpired,omitempty"`
	Project        TokenProject `json:"project,omitempty"`
}

Token struct

type TokenProject

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

type TokenType

type TokenType string

Token types

const (
	UserToken            TokenType = "USER_TOKEN"
	GlobalAnalysisToken  TokenType = "GLOBAL_ANALYSIS_TOKEN"
	ProjectAnalysisToken TokenType = "PROJECT_ANALYSIS_TOKEN"
)

type User

type User struct {
	Login       string   `json:"login,omitempty"`
	Name        string   `json:"name,omitempty"`
	Email       string   `json:"email,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
	IsActive    bool     `json:"active,omitempty"`
	IsLocal     bool     `json:"local,omitempty"`
}

User struct

type Webhook

type Webhook struct {
	Key    string `json:"key"`
	Name   string `json:"name"`
	Url    string `json:"url"`
	Secret string `json:"secret"`
}

Jump to

Keyboard shortcuts

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