cloud

package
v2023.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QodanaEndpoint  = "ENDPOINT"
	DefaultEndpoint = "qodana.cloud"
)
View Source
const (
	QodanaLicenseRequestCooldownEnv = "QODANA_LICENSE_REQUEST_COOLDOWN"

	QodanaLicenseRequestTimeoutEnv = "QODANA_LICENSE_REQUEST_TIMEOUT"

	QodanaLicenseRequestAttemptsCountEnv = "QODANA_LICENSE_ATTEMPTS"
)
View Source
const DeclinedTokenErrorMessage = `` /* 257-byte string literal not displayed */
View Source
const InvalidTokenMessage = `QODANA_TOKEN is invalid, please provide a valid token`

Variables

View Source
var (
	GitHubBotSuffix = "[bot]@users.noreply.github.com"
	CommonGitBots   = []string{
		"cla-bot@users.noreply.github.com",
		"codecov-io@users.noreply.github.com",
		"snyk-bot@snyk.io",
		"gitlab-bot@gitlab.com",
		"bot@swc.rs",
	}
)
View Source
var EapWarnTokenMessage = fmt.Sprintf(`
Starting from version 2023.2 release versions of Qodana Linters will require connection to Qodana Cloud. 
For seamless transition to release versions, obtain your token by registering at %s 
and provide the token as the QODANA_TOKEN environment variable.
For more details, please visit: https://www.jetbrains.com/help/qodana/cloud-quickstart.html`, getCloudBaseUrl())
View Source
var EmptyTokenMessage = fmt.Sprintf(`Starting from version 2023.2 release versions of Qodana Linters require connection to Qodana Cloud. 
To continue using Qodana, please ensure you have an access token and provide the token as the QODANA_TOKEN environment variable.
Obtain your token by registering at %s
For more details, please visit: https://www.jetbrains.com/help/qodana/cloud-quickstart.html
We also offer Community versions as an alternative. You can find them here: https://www.jetbrains.com/help/qodana/linters.html
`, getCloudBaseUrl())
View Source
var GeneralLicenseErrorMessage = fmt.Sprintf(`
Please check if %s is accessible from your environment. 
If you encounter any issues, please contact us at qodana-support@jetbrains.com. 
Or use our issue tracker at https://jb.gg/qodana-issue`, getCloudBaseUrl())
View Source
var TokenDeclinedError = errors.New("token was declined by Qodana Cloud server")

Functions

func GetCloudTeamsPageUrl

func GetCloudTeamsPageUrl(origin string, path string) string

GetCloudTeamsPageUrl returns the team page URL on Qodana Cloud

func GetEnvWithDefault

func GetEnvWithDefault(env string, defaultValue string) string

func GetEnvWithDefaultInt

func GetEnvWithDefaultInt(env string, defaultValue int) int

func GetReportUrl added in v2023.3.0

func GetReportUrl(resultsDir string) string

GetReportUrl retrieves the Qodana Cloud report URL from the qodana.sarif.json in the specified results directory.

func RequestLicenseData

func RequestLicenseData(endpoint string, token string) ([]byte, error)

func SaveReportFile added in v2023.3.0

func SaveReportFile(resultsDir, reportUrl string)

SaveReportFile saves the report URL to the resultsDir/open-in-ide.json file if it does not exist.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
}

type LicenseData added in v2023.3.0

type LicenseData struct {
	LicenseID      string `json:"licenseId"`
	LicenseKey     string `json:"licenseKey"`
	ExpirationDate string `json:"expirationDate"`
	ProjectIdHash  string `json:"projectIdHash"`
	LicensePlan    string `json:"licensePlan"`
}

func DeserializeLicenseData added in v2023.3.0

func DeserializeLicenseData(data []byte) LicenseData

type LicenseToken

type LicenseToken struct {
	Token string
	// LicenseOnly is true if the token is used only for license verification
	LicenseOnly bool
}
var Token LicenseToken

func (*LicenseToken) IsAllowedToSendFUS

func (o *LicenseToken) IsAllowedToSendFUS() bool

func (*LicenseToken) IsAllowedToSendReports

func (o *LicenseToken) IsAllowedToSendReports() bool

type QdClient

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

func NewQdClient

func NewQdClient(token string) *QdClient

func (*QdClient) ValidateToken

func (client *QdClient) ValidateToken() interface{}

type RequestError

type RequestError struct {
	Err error
}

type RequestResult

type RequestResult interface {
	// contains filtered or unexported methods
}

type Success

type Success struct {
	Data map[string]interface{}
}

Jump to

Keyboard shortcuts

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