mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:31:48 +00:00
Updates and improves docs for package repos, including an overview page with a section on filters, rust package repos and improvements to the rendered extsvc schemas ## Test plan N/A, docs changes
2834 lines
199 KiB
Go
2834 lines
199 KiB
Go
// Code generated by go-jsonschema-compiler. DO NOT EDIT.
|
||
|
||
package schema
|
||
|
||
import (
|
||
"encoding/json"
|
||
"errors"
|
||
"fmt"
|
||
)
|
||
|
||
// AWSCodeCommitConnection description: Configuration for a connection to AWS CodeCommit.
|
||
type AWSCodeCommitConnection struct {
|
||
// AccessKeyID description: The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy.
|
||
AccessKeyID string `json:"accessKeyID"`
|
||
// Exclude description: A list of repositories to never mirror from AWS CodeCommit.
|
||
//
|
||
// Supports excluding by name ({"name": "git-codecommit.us-west-1.amazonaws.com/repo-name"}) or by ARN ({"id": "arn:aws:codecommit:us-west-1:999999999999:name"}).
|
||
Exclude []*ExcludedAWSCodeCommitRepo `json:"exclude,omitempty"`
|
||
// GitCredentials description: The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.
|
||
//
|
||
// See the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit.
|
||
// For detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
|
||
GitCredentials AWSCodeCommitGitCredentials `json:"gitCredentials"`
|
||
// InitialRepositoryEnablement description: Deprecated and ignored field which will be removed entirely in the next release. AWS CodeCommit repositories can no longer be enabled or disabled explicitly. Configure which repositories should not be mirrored via "exclude" instead.
|
||
InitialRepositoryEnablement bool `json:"initialRepositoryEnablement,omitempty"`
|
||
// Region description: The AWS region in which to access AWS CodeCommit. See the list of supported regions at https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-git.
|
||
Region string `json:"region"`
|
||
// RepositoryPathPattern description: The pattern used to generate a the corresponding Sourcegraph repository name for an AWS CodeCommit repository. In the pattern, the variable "{name}" is replaced with the repository's name.
|
||
//
|
||
// For example, if your Sourcegraph instance is at https://src.example.com, then a repositoryPathPattern of "awsrepos/{name}" would mean that a AWS CodeCommit repository named "myrepo" is available on Sourcegraph at https://src.example.com/awsrepos/myrepo.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// SecretAccessKey description: The AWS secret access key (that corresponds to the AWS access key ID set in `accessKeyID`).
|
||
SecretAccessKey string `json:"secretAccessKey"`
|
||
}
|
||
|
||
// AWSCodeCommitGitCredentials description: The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.
|
||
//
|
||
// See the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit.
|
||
// For detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
|
||
type AWSCodeCommitGitCredentials struct {
|
||
// Password description: The Git password
|
||
Password string `json:"password"`
|
||
// Username description: The Git username
|
||
Username string `json:"username"`
|
||
}
|
||
|
||
// AWSKMSEncryptionKey description: AWS KMS Encryption Key, used to encrypt data in AWS environments
|
||
type AWSKMSEncryptionKey struct {
|
||
CredentialsFile string `json:"credentialsFile,omitempty"`
|
||
KeyId string `json:"keyId"`
|
||
Region string `json:"region,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// ApiRatelimit description: Configuration for API rate limiting
|
||
type ApiRatelimit struct {
|
||
// Enabled description: Whether API rate limiting is enabled
|
||
Enabled bool `json:"enabled"`
|
||
// Overrides description: An array of rate limit overrides
|
||
Overrides []*Overrides `json:"overrides,omitempty"`
|
||
// PerIP description: Limit granted per IP per hour, only applied to anonymous users
|
||
PerIP int `json:"perIP"`
|
||
// PerUser description: Limit granted per user per hour
|
||
PerUser int `json:"perUser"`
|
||
}
|
||
|
||
// App description: Configuration options for App only.
|
||
type App struct {
|
||
// DotcomAuthToken description: Authentication token for Sourcegraph.com. If present, indicates that the App account is connected to a Sourcegraph.com account.
|
||
DotcomAuthToken string `json:"dotcomAuthToken,omitempty"`
|
||
}
|
||
type AppNotifications struct {
|
||
// Key description: e.g. '2023-03-10-my-key'; MUST START WITH YYYY-MM-DD; a globally unique key used to track whether the message has been dismissed.
|
||
Key string `json:"key"`
|
||
// Message description: The Markdown message to display
|
||
Message string `json:"message"`
|
||
// VersionMax description: If present, this message will only be shown to Sourcegraph App instances in this inclusive version range.
|
||
VersionMax string `json:"version.max,omitempty"`
|
||
// VersionMin description: If present, this message will only be shown to Sourcegraph App instances in this inclusive version range.
|
||
VersionMin string `json:"version.min,omitempty"`
|
||
}
|
||
|
||
// AuditLog description: EXPERIMENTAL: Configuration for audit logging (specially formatted log entries for tracking sensitive events)
|
||
type AuditLog struct {
|
||
// GitserverAccess description: Capture gitserver access logs as part of the audit log.
|
||
GitserverAccess bool `json:"gitserverAccess"`
|
||
// GraphQL description: Capture GraphQL requests and responses as part of the audit log.
|
||
GraphQL bool `json:"graphQL"`
|
||
// InternalTraffic description: Capture security events performed by the internal traffic (adds significant noise).
|
||
InternalTraffic bool `json:"internalTraffic"`
|
||
// SeverityLevel description: Severity logging level for the audit log.
|
||
SeverityLevel string `json:"severityLevel,omitempty"`
|
||
}
|
||
|
||
// AuthAccessTokens description: Settings for access tokens, which enable external tools to access the Sourcegraph API with the privileges of the user.
|
||
type AuthAccessTokens struct {
|
||
// Allow description: Allow or restrict the use of access tokens. The default is "all-users-create", which enables all users to create access tokens. Use "none" to disable access tokens entirely. Use "site-admin-create" to restrict creation of new tokens to admin users (existing tokens will still work until revoked).
|
||
Allow string `json:"allow,omitempty"`
|
||
}
|
||
|
||
// AuthLockout description: The config options for account lockout
|
||
type AuthLockout struct {
|
||
// ConsecutivePeriod description: The number of seconds to be considered as a consecutive period
|
||
ConsecutivePeriod int `json:"consecutivePeriod,omitempty"`
|
||
// FailedAttemptThreshold description: The threshold of failed sign-in attempts in a consecutive period
|
||
FailedAttemptThreshold int `json:"failedAttemptThreshold,omitempty"`
|
||
// LockoutPeriod description: The number of seconds for the lockout period
|
||
LockoutPeriod int `json:"lockoutPeriod,omitempty"`
|
||
}
|
||
|
||
// AuthPasswordPolicy description: Enables and configures password policy. This will allow admins to enforce password complexity and length requirements.
|
||
type AuthPasswordPolicy struct {
|
||
// Enabled description: Enables password policy
|
||
Enabled bool `json:"enabled,omitempty"`
|
||
// NumberOfSpecialCharacters description: The required number of special characters
|
||
NumberOfSpecialCharacters int `json:"numberOfSpecialCharacters,omitempty"`
|
||
// RequireAtLeastOneNumber description: Does the password require a number
|
||
RequireAtLeastOneNumber bool `json:"requireAtLeastOneNumber,omitempty"`
|
||
// RequireUpperandLowerCase description: Require Mixed characters
|
||
RequireUpperandLowerCase bool `json:"requireUpperandLowerCase,omitempty"`
|
||
}
|
||
|
||
// AuthProviderCommon description: Common properties for authentication providers.
|
||
type AuthProviderCommon struct {
|
||
// DisplayName description: The name to use when displaying this authentication provider in the UI. Defaults to an auto-generated name with the type of authentication provider and other relevant identifiers (such as a hostname).
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
}
|
||
type AuthProviders struct {
|
||
AzureDevOps *AzureDevOpsAuthProvider
|
||
Bitbucketcloud *BitbucketCloudAuthProvider
|
||
Builtin *BuiltinAuthProvider
|
||
Gerrit *GerritAuthProvider
|
||
Github *GitHubAuthProvider
|
||
Gitlab *GitLabAuthProvider
|
||
HttpHeader *HTTPHeaderAuthProvider
|
||
Openidconnect *OpenIDConnectAuthProvider
|
||
Saml *SAMLAuthProvider
|
||
}
|
||
|
||
func (v AuthProviders) MarshalJSON() ([]byte, error) {
|
||
if v.AzureDevOps != nil {
|
||
return json.Marshal(v.AzureDevOps)
|
||
}
|
||
if v.Bitbucketcloud != nil {
|
||
return json.Marshal(v.Bitbucketcloud)
|
||
}
|
||
if v.Builtin != nil {
|
||
return json.Marshal(v.Builtin)
|
||
}
|
||
if v.Gerrit != nil {
|
||
return json.Marshal(v.Gerrit)
|
||
}
|
||
if v.Github != nil {
|
||
return json.Marshal(v.Github)
|
||
}
|
||
if v.Gitlab != nil {
|
||
return json.Marshal(v.Gitlab)
|
||
}
|
||
if v.HttpHeader != nil {
|
||
return json.Marshal(v.HttpHeader)
|
||
}
|
||
if v.Openidconnect != nil {
|
||
return json.Marshal(v.Openidconnect)
|
||
}
|
||
if v.Saml != nil {
|
||
return json.Marshal(v.Saml)
|
||
}
|
||
return nil, errors.New("tagged union type must have exactly 1 non-nil field value")
|
||
}
|
||
func (v *AuthProviders) UnmarshalJSON(data []byte) error {
|
||
var d struct {
|
||
DiscriminantProperty string `json:"type"`
|
||
}
|
||
if err := json.Unmarshal(data, &d); err != nil {
|
||
return err
|
||
}
|
||
switch d.DiscriminantProperty {
|
||
case "azureDevOps":
|
||
return json.Unmarshal(data, &v.AzureDevOps)
|
||
case "bitbucketcloud":
|
||
return json.Unmarshal(data, &v.Bitbucketcloud)
|
||
case "builtin":
|
||
return json.Unmarshal(data, &v.Builtin)
|
||
case "gerrit":
|
||
return json.Unmarshal(data, &v.Gerrit)
|
||
case "github":
|
||
return json.Unmarshal(data, &v.Github)
|
||
case "gitlab":
|
||
return json.Unmarshal(data, &v.Gitlab)
|
||
case "http-header":
|
||
return json.Unmarshal(data, &v.HttpHeader)
|
||
case "openidconnect":
|
||
return json.Unmarshal(data, &v.Openidconnect)
|
||
case "saml":
|
||
return json.Unmarshal(data, &v.Saml)
|
||
}
|
||
return fmt.Errorf("tagged union type must have a %q property whose value is one of %s", "type", []string{"azureDevOps", "bitbucketcloud", "builtin", "gerrit", "github", "gitlab", "http-header", "openidconnect", "saml"})
|
||
}
|
||
|
||
// AzureDevOpsAuthProvider description: Azure auth provider for dev.azure.com
|
||
type AzureDevOpsAuthProvider struct {
|
||
// AllowOrgs description: Restricts new logins and signups (if allowSignup is true) to members of these Azure DevOps organizations only. Existing sessions won't be invalidated. Leave empty or unset for no org restrictions.
|
||
AllowOrgs []string `json:"allowOrgs,omitempty"`
|
||
// AllowSignup description: Allows new visitors to sign up for accounts Azure DevOps authentication. If false, users signing in via Azure DevOps must have an existing Sourcegraph account, which will be linked to their Azure DevOps identity after sign-in.
|
||
AllowSignup *bool `json:"allowSignup,omitempty"`
|
||
// ApiScope description: The OAuth API scope that should be used
|
||
ApiScope string `json:"apiScope,omitempty"`
|
||
// ClientID description: The app ID of the Azure OAuth app.
|
||
ClientID string `json:"clientID"`
|
||
// ClientSecret description: The client Secret of the Azure OAuth app.
|
||
ClientSecret string `json:"clientSecret"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// AzureDevOpsConnection description: Configuration for a connection to Azure DevOps.
|
||
type AzureDevOpsConnection struct {
|
||
// EnforcePermissions description: A flag to enforce Azure DevOps repository access permissions
|
||
EnforcePermissions bool `json:"enforcePermissions,omitempty"`
|
||
// Exclude description: A list of repositories to never mirror from Azure DevOps Services.
|
||
Exclude []*ExcludedAzureDevOpsServerRepo `json:"exclude,omitempty"`
|
||
// Orgs description: An array of organization names identifying Azure DevOps organizations whose repositories should be mirrored on Sourcegraph.
|
||
Orgs []string `json:"orgs,omitempty"`
|
||
// Projects description: An array of projects "org/project" strings specifying which Azure DevOps projects' repositories should be mirrored on Sourcegraph.
|
||
Projects []string `json:"projects,omitempty"`
|
||
// Token description: The Personal Access Token associated with the Azure DevOps username used for authentication.
|
||
Token string `json:"token"`
|
||
// Url description: URL for Azure DevOps Services, set to https://dev.azure.com.
|
||
Url string `json:"url"`
|
||
// Username description: A username for authentication with the Azure DevOps code host.
|
||
Username string `json:"username"`
|
||
}
|
||
type BackendInsight struct {
|
||
// Description description: The description of this insight
|
||
Description string `json:"description,omitempty"`
|
||
Filters *InsightFilters `json:"filters,omitempty"`
|
||
// Series description: Each query will be represented by one line on the chart.
|
||
Series []*BackendInsightSeries `json:"series"`
|
||
// Title description: The short title of this insight
|
||
Title string `json:"title"`
|
||
}
|
||
type BackendInsightSeries struct {
|
||
// Name description: The name to use for the series in the graph.
|
||
Name string `json:"name"`
|
||
// Query description: Performs a search query and shows the number of results returned.
|
||
Query string `json:"query"`
|
||
// Stroke description: The color of the line for the series.
|
||
Stroke string `json:"stroke,omitempty"`
|
||
}
|
||
type BatchChangeRolloutWindow struct {
|
||
// Days description: Day(s) the window applies to. If omitted, this rule applies to all days of the week.
|
||
Days []string `json:"days,omitempty"`
|
||
// End description: Window end time. If omitted, no time window is applied to the day(s) that match this rule.
|
||
End string `json:"end,omitempty"`
|
||
// Rate description: The rate changesets will be published at.
|
||
Rate any `json:"rate"`
|
||
// Start description: Window start time. If omitted, no time window is applied to the day(s) that match this rule.
|
||
Start string `json:"start,omitempty"`
|
||
}
|
||
|
||
// BatchSpec description: A batch specification, which describes the batch change and what kinds of changes to make (or what existing changesets to track).
|
||
type BatchSpec struct {
|
||
// ChangesetTemplate description: A template describing how to create (and update) changesets with the file changes produced by the command steps.
|
||
ChangesetTemplate *ChangesetTemplate `json:"changesetTemplate,omitempty"`
|
||
// Description description: The description of the batch change.
|
||
Description string `json:"description,omitempty"`
|
||
// ImportChangesets description: Import existing changesets on code hosts.
|
||
ImportChangesets []*ImportChangesets `json:"importChangesets,omitempty"`
|
||
// Name description: The name of the batch change, which is unique among all batch changes in the namespace. A batch change's name is case-preserving.
|
||
Name string `json:"name"`
|
||
// On description: The set of repositories (and branches) to run the batch change on, specified as a list of search queries (that match repositories) and/or specific repositories.
|
||
On []any `json:"on,omitempty"`
|
||
// Steps description: The sequence of commands to run (for each repository branch matched in the `on` property) to produce the workspace changes that will be included in the batch change.
|
||
Steps []*Step `json:"steps,omitempty"`
|
||
// TransformChanges description: Optional transformations to apply to the changes produced in each repository.
|
||
TransformChanges *TransformChanges `json:"transformChanges,omitempty"`
|
||
// Workspaces description: Individual workspace configurations for one or more repositories that define which workspaces to use for the execution of steps in the repositories.
|
||
Workspaces []*WorkspaceConfiguration `json:"workspaces,omitempty"`
|
||
}
|
||
|
||
// BitbucketCloudAuthProvider description: Configures the Bitbucket Cloud OAuth authentication provider for SSO. In addition to specifying this configuration object, you must also create a OAuth App on your Bitbucket Cloud workspace: https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/. The application should have account, email, and repository scopes and the callback URL set to the concatenation of your Sourcegraph instance URL and "/.auth/bitbucketcloud/callback".
|
||
type BitbucketCloudAuthProvider struct {
|
||
// AllowSignup description: Allows new visitors to sign up for accounts via Bitbucket Cloud authentication. If false, users signing in via Bitbucket Cloud must have an existing Sourcegraph account, which will be linked to their Bitbucket Cloud identity after sign-in.
|
||
AllowSignup bool `json:"allowSignup,omitempty"`
|
||
// ApiScope description: The OAuth API scope that should be used
|
||
ApiScope string `json:"apiScope,omitempty"`
|
||
// ClientKey description: The Key of the Bitbucket OAuth app.
|
||
ClientKey string `json:"clientKey"`
|
||
// ClientSecret description: The Client Secret of the Bitbucket OAuth app.
|
||
ClientSecret string `json:"clientSecret"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
Type string `json:"type"`
|
||
// Url description: URL of the Bitbucket Cloud instance.
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// BitbucketCloudAuthorization description: If non-null, enforces Bitbucket Cloud repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "bitbucketcloud" with the same `url` field as specified in this `BitbucketCloudConnection`.
|
||
type BitbucketCloudAuthorization struct {
|
||
// IdentityProvider description: The identity provider to use for user information. If not set, the `url` field is used.
|
||
IdentityProvider string `json:"identityProvider,omitempty"`
|
||
}
|
||
|
||
// BitbucketCloudConnection description: Configuration for a connection to Bitbucket Cloud.
|
||
type BitbucketCloudConnection struct {
|
||
// ApiURL description: The API URL of Bitbucket Cloud, such as https://api.bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.
|
||
ApiURL string `json:"apiURL,omitempty"`
|
||
// AppPassword description: The app password to use when authenticating to the Bitbucket Cloud. Also set the corresponding "username" field.
|
||
AppPassword string `json:"appPassword"`
|
||
// Authorization description: If non-null, enforces Bitbucket Cloud repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "bitbucketcloud" with the same `url` field as specified in this `BitbucketCloudConnection`.
|
||
Authorization *BitbucketCloudAuthorization `json:"authorization,omitempty"`
|
||
// Exclude description: A list of repositories to never mirror from Bitbucket Cloud. Takes precedence over "teams" configuration.
|
||
//
|
||
// Supports excluding by name ({"name": "myorg/myrepo"}) or by UUID ({"uuid": "{fceb73c7-cef6-4abe-956d-e471281126bd}"}).
|
||
Exclude []*ExcludedBitbucketCloudRepo `json:"exclude,omitempty"`
|
||
// GitURLType description: The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Cloud.
|
||
//
|
||
// If "http", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form https://bitbucket.org/myteam/myproject.git.
|
||
//
|
||
// If "ssh", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form git@bitbucket.org:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://docs.sourcegraph.com/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
|
||
GitURLType string `json:"gitURLType,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to Bitbucket Cloud.
|
||
RateLimit *BitbucketCloudRateLimit `json:"rateLimit,omitempty"`
|
||
// RepositoryPathPattern description: The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Cloud repository.
|
||
//
|
||
// - "{host}" is replaced with the Bitbucket Cloud URL's host (such as bitbucket.org), and "{nameWithOwner}" is replaced with the Bitbucket Cloud repository's "owner/path" (such as "myorg/myrepo").
|
||
//
|
||
// For example, if your Bitbucket Cloud is https://bitbucket.org and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{nameWithOwner}" would mean that a Bitbucket Cloud repository at https://bitbucket.org/alice/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.org/alice/my-repo.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// Teams description: An array of team names identifying Bitbucket Cloud teams whose repositories should be mirrored on Sourcegraph.
|
||
Teams []string `json:"teams,omitempty"`
|
||
// Url description: URL of Bitbucket Cloud, such as https://bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.
|
||
Url string `json:"url"`
|
||
// Username description: The username to use when authenticating to the Bitbucket Cloud. Also set the corresponding "appPassword" field.
|
||
Username string `json:"username"`
|
||
// WebhookSecret description: A shared secret used to authenticate incoming webhooks (minimum 12 characters).
|
||
WebhookSecret string `json:"webhookSecret,omitempty"`
|
||
}
|
||
|
||
// BitbucketCloudRateLimit description: Rate limit applied when making background API requests to Bitbucket Cloud.
|
||
type BitbucketCloudRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 500, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 500 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// BitbucketServerAuthorization description: If non-null, enforces Bitbucket Server / Bitbucket Data Center repository permissions.
|
||
type BitbucketServerAuthorization struct {
|
||
// IdentityProvider description: The source of identity to use when computing permissions. This defines how to compute the Bitbucket Server / Bitbucket Data Center identity to use for a given Sourcegraph user. When 'username' is used, Sourcegraph assumes usernames are identical in Sourcegraph and Bitbucket Server / Bitbucket Data Center accounts and `auth.enableUsernameChanges` must be set to false for security reasons.
|
||
IdentityProvider BitbucketServerIdentityProvider `json:"identityProvider"`
|
||
// Oauth description: OAuth configuration specified when creating the Bitbucket Server / Bitbucket Data Center Application Link with incoming authentication. Two Legged OAuth with 'ExecuteAs=admin' must be enabled as well as user impersonation.
|
||
Oauth BitbucketServerOAuth `json:"oauth"`
|
||
}
|
||
|
||
// BitbucketServerConnection description: Configuration for a connection to Bitbucket Server / Bitbucket Data Center.
|
||
type BitbucketServerConnection struct {
|
||
// Authorization description: If non-null, enforces Bitbucket Server / Bitbucket Data Center repository permissions.
|
||
Authorization *BitbucketServerAuthorization `json:"authorization,omitempty"`
|
||
// Certificate description: TLS certificate of the Bitbucket Server / Bitbucket Data Center instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
Certificate string `json:"certificate,omitempty"`
|
||
// Exclude description: A list of repositories to never mirror from this Bitbucket Server / Bitbucket Data Center instance. Takes precedence over "repos" and "repositoryQuery".
|
||
//
|
||
// Supports excluding by name ({"name": "projectKey/repositorySlug"}) or by ID ({"id": 42}).
|
||
Exclude []*ExcludedBitbucketServerRepo `json:"exclude,omitempty"`
|
||
// ExcludePersonalRepositories description: Whether or not personal repositories should be excluded or not. When true, Sourcegraph will ignore personal repositories it may have access to. See https://docs.sourcegraph.com/integration/bitbucket_server#excluding-personal-repositories for more information.
|
||
ExcludePersonalRepositories bool `json:"excludePersonalRepositories,omitempty"`
|
||
// GitURLType description: The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Server / Bitbucket Data Center instance.
|
||
//
|
||
// If "http", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form http(s)://bitbucket.example.com/scm/myproject/myrepo.git (using https: if the Bitbucket Server / Bitbucket Data Center instance uses HTTPS).
|
||
//
|
||
// If "ssh", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form ssh://git@example.bitbucket.org/myproject/myrepo.git. See the documentation for how to provide SSH private keys and known_hosts: https://docs.sourcegraph.com/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
|
||
GitURLType string `json:"gitURLType,omitempty"`
|
||
// InitialRepositoryEnablement description: Deprecated and ignored field which will be removed entirely in the next release. BitBucket repositories can no longer be enabled or disabled explicitly.
|
||
InitialRepositoryEnablement bool `json:"initialRepositoryEnablement,omitempty"`
|
||
// Password description: The password to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "username" field.
|
||
//
|
||
// For Bitbucket Server / Bitbucket Data Center instances that support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.5 and newer), it is recommended to provide a token instead (in the "token" field).
|
||
Password string `json:"password,omitempty"`
|
||
// Plugin description: Configuration for Bitbucket Server / Bitbucket Data Center Sourcegraph plugin
|
||
Plugin *BitbucketServerPlugin `json:"plugin,omitempty"`
|
||
// ProjectKeys description: An array of project key strings that defines a collection of repositories related to their associated project keys
|
||
ProjectKeys []string `json:"projectKeys,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to BitbucketServer.
|
||
RateLimit *BitbucketServerRateLimit `json:"rateLimit,omitempty"`
|
||
// Repos description: An array of repository "projectKey/repositorySlug" strings specifying repositories to mirror on Sourcegraph.
|
||
Repos []string `json:"repos,omitempty"`
|
||
// RepositoryPathPattern description: The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Server / Bitbucket Data Center repository.
|
||
//
|
||
// - "{host}" is replaced with the Bitbucket Server / Bitbucket Data Center URL's host (such as bitbucket.example.com)
|
||
// - "{projectKey}" is replaced with the Bitbucket repository's parent project key (such as "PRJ")
|
||
// - "{repositorySlug}" is replaced with the Bitbucket repository's slug key (such as "my-repo").
|
||
//
|
||
// For example, if your Bitbucket Server / Bitbucket Data Center is https://bitbucket.example.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{projectKey}/{repositorySlug}" would mean that a Bitbucket Server / Bitbucket Data Center repository at https://bitbucket.example.com/projects/PRJ/repos/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.example.com/PRJ/my-repo.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// RepositoryQuery description: An array of strings specifying which repositories to mirror on Sourcegraph. Each string is a URL query string with parameters that filter the list of returned repos. Examples: "?name=my-repo&projectname=PROJECT&visibility=private".
|
||
//
|
||
// The special string "none" can be used as the only element to disable this feature. Repositories matched by multiple query strings are only imported once. Here's the official Bitbucket Server / Bitbucket Data Center documentation about which query string parameters are valid: https://docs.atlassian.com/bitbucket-server/rest/6.1.2/bitbucket-rest.html#idp355
|
||
RepositoryQuery []string `json:"repositoryQuery,omitempty"`
|
||
// Token description: A Bitbucket Server / Bitbucket Data Center personal access token with Read permissions. When using batch changes, the token needs Write permissions. Create one at https://[your-bitbucket-hostname]/plugins/servlet/access-tokens/add. Also set the corresponding "username" field.
|
||
//
|
||
// For Bitbucket Server / Bitbucket Data Center instances that don't support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.4 and older), specify user-password credentials in the "username" and "password" fields.
|
||
Token string `json:"token,omitempty"`
|
||
// Url description: URL of a Bitbucket Server / Bitbucket Data Center instance, such as https://bitbucket.example.com.
|
||
Url string `json:"url"`
|
||
// Username description: The username to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "token" or "password" field.
|
||
Username string `json:"username"`
|
||
// Webhooks description: DEPRECATED: Switch to "plugin.webhooks"
|
||
Webhooks *Webhooks `json:"webhooks,omitempty"`
|
||
}
|
||
|
||
// BitbucketServerIdentityProvider description: The source of identity to use when computing permissions. This defines how to compute the Bitbucket Server / Bitbucket Data Center identity to use for a given Sourcegraph user. When 'username' is used, Sourcegraph assumes usernames are identical in Sourcegraph and Bitbucket Server / Bitbucket Data Center accounts and `auth.enableUsernameChanges` must be set to false for security reasons.
|
||
type BitbucketServerIdentityProvider struct {
|
||
Username *BitbucketServerUsernameIdentity
|
||
}
|
||
|
||
func (v BitbucketServerIdentityProvider) MarshalJSON() ([]byte, error) {
|
||
if v.Username != nil {
|
||
return json.Marshal(v.Username)
|
||
}
|
||
return nil, errors.New("tagged union type must have exactly 1 non-nil field value")
|
||
}
|
||
func (v *BitbucketServerIdentityProvider) UnmarshalJSON(data []byte) error {
|
||
var d struct {
|
||
DiscriminantProperty string `json:"type"`
|
||
}
|
||
if err := json.Unmarshal(data, &d); err != nil {
|
||
return err
|
||
}
|
||
switch d.DiscriminantProperty {
|
||
case "username":
|
||
return json.Unmarshal(data, &v.Username)
|
||
}
|
||
return fmt.Errorf("tagged union type must have a %q property whose value is one of %s", "type", []string{"username"})
|
||
}
|
||
|
||
// BitbucketServerOAuth description: OAuth configuration specified when creating the Bitbucket Server / Bitbucket Data Center Application Link with incoming authentication. Two Legged OAuth with 'ExecuteAs=admin' must be enabled as well as user impersonation.
|
||
type BitbucketServerOAuth struct {
|
||
// ConsumerKey description: The OAuth consumer key specified when creating the Bitbucket Server / Bitbucket Data Center Application Link with incoming authentication.
|
||
ConsumerKey string `json:"consumerKey"`
|
||
// SigningKey description: Base64 encoding of the OAuth PEM encoded RSA private key used to generate the public key specified when creating the Bitbucket Server / Bitbucket Data Center Application Link with incoming authentication.
|
||
SigningKey string `json:"signingKey"`
|
||
}
|
||
|
||
// BitbucketServerPlugin description: Configuration for Bitbucket Server / Bitbucket Data Center Sourcegraph plugin
|
||
type BitbucketServerPlugin struct {
|
||
// Permissions description: Enables fetching Bitbucket Server / Bitbucket Data Center permissions through the roaring bitmap endpoint. Warning: there may be performance degradation under significant load.
|
||
Permissions string `json:"permissions,omitempty"`
|
||
Webhooks *BitbucketServerPluginWebhooks `json:"webhooks,omitempty"`
|
||
}
|
||
type BitbucketServerPluginWebhooks struct {
|
||
// DisableSync description: Disallow Sourcegraph from automatically syncing webhook config with the Bitbucket Server / Bitbucket Data Center instance. For details of how the webhook is configured, see our docs: https://docs.sourcegraph.com/admin/external_service/bitbucket_server#webhooks
|
||
DisableSync bool `json:"disableSync,omitempty"`
|
||
// Secret description: Secret for authenticating incoming webhook payloads
|
||
Secret string `json:"secret"`
|
||
}
|
||
|
||
// BitbucketServerRateLimit description: Rate limit applied when making background API requests to BitbucketServer.
|
||
type BitbucketServerRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 500, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 500 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type BitbucketServerUsernameIdentity struct {
|
||
Type string `json:"type"`
|
||
}
|
||
type BranchChangesetSpec struct {
|
||
// BaseRef description: The full name of the Git ref in the base repository that this changeset is based on (and is proposing to be merged into). This ref must exist on the base repository.
|
||
BaseRef string `json:"baseRef"`
|
||
// BaseRepository description: The GraphQL ID of the repository that this changeset spec is proposing to change.
|
||
BaseRepository string `json:"baseRepository"`
|
||
// BaseRev description: The base revision this changeset is based on. It is the latest commit in baseRef at the time when the changeset spec was created.
|
||
BaseRev string `json:"baseRev"`
|
||
// Body description: The body (description) of the changeset on the code host.
|
||
Body string `json:"body"`
|
||
// Commits description: The Git commits with the proposed changes. These commits are pushed to the head ref.
|
||
Commits []*GitCommitDescription `json:"commits"`
|
||
// HeadRef description: The full name of the Git ref that holds the changes proposed by this changeset. This ref will be created or updated with the commits.
|
||
HeadRef string `json:"headRef"`
|
||
// HeadRepository description: The GraphQL ID of the repository that contains the branch with this changeset's changes. Fork repositories and cross-repository changesets are not yet supported. Therefore, headRepository must be equal to baseRepository.
|
||
HeadRepository string `json:"headRepository"`
|
||
// Published description: Whether to publish the changeset. An unpublished changeset can be previewed on Sourcegraph by any person who can view the batch change, but its commit, branch, and pull request aren't created on the code host. A published changeset results in a commit, branch, and pull request being created on the code host.
|
||
Published any `json:"published,omitempty"`
|
||
// Title description: The title of the changeset on the code host.
|
||
Title string `json:"title"`
|
||
// Version description: A field for versioning the payload.
|
||
Version int `json:"version,omitempty"`
|
||
}
|
||
type BrandAssets struct {
|
||
// Logo description: The URL to the image used on the homepage. This will replace the Sourcegraph logo on the homepage. Maximum width: 320px. We recommend using the following file formats: SVG, PNG
|
||
Logo string `json:"logo,omitempty"`
|
||
// Symbol description: The URL to the symbol used as the search icon. Recommended size: 24x24px. We recommend using the following file formats: SVG, PNG, ICO
|
||
Symbol string `json:"symbol,omitempty"`
|
||
}
|
||
|
||
// Branding description: Customize Sourcegraph homepage logo and search icon.
|
||
//
|
||
// Only available in Sourcegraph Enterprise.
|
||
type Branding struct {
|
||
// BrandName description: String to display everywhere the brand name should be displayed. Defaults to "Sourcegraph"
|
||
BrandName string `json:"brandName,omitempty"`
|
||
Dark *BrandAssets `json:"dark,omitempty"`
|
||
// DisableSymbolSpin description: Prevents the icon in the top-left corner of the screen from spinning on hover.
|
||
DisableSymbolSpin bool `json:"disableSymbolSpin,omitempty"`
|
||
// Favicon description: The URL of the favicon to be used for your instance. We recommend using the following file format: ICO
|
||
Favicon string `json:"favicon,omitempty"`
|
||
Light *BrandAssets `json:"light,omitempty"`
|
||
}
|
||
|
||
// BuiltinAuthProvider description: Configures the builtin username-password authentication provider.
|
||
type BuiltinAuthProvider struct {
|
||
// AllowSignup description: Allows new visitors to sign up for accounts. The sign-up page will be enabled and accessible to all visitors.
|
||
//
|
||
// SECURITY: If the site has no users (i.e., during initial setup), it will always allow the first user to sign up and become site admin **without any approval** (first user to sign up becomes the admin).
|
||
AllowSignup bool `json:"allowSignup,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// ChangesetTemplate description: A template describing how to create (and update) changesets with the file changes produced by the command steps.
|
||
type ChangesetTemplate struct {
|
||
// Body description: The body (description) of the changeset.
|
||
Body string `json:"body,omitempty"`
|
||
// Branch description: The name of the Git branch to create or update on each repository with the changes.
|
||
Branch string `json:"branch"`
|
||
// Commit description: The Git commit to create with the changes.
|
||
Commit ExpandedGitCommitDescription `json:"commit"`
|
||
// Published description: Whether to publish the changeset. An unpublished changeset can be previewed on Sourcegraph by any person who can view the batch change, but its commit, branch, and pull request aren't created on the code host. A published changeset results in a commit, branch, and pull request being created on the code host. If omitted, the publication state is controlled from the Batch Changes UI.
|
||
Published any `json:"published,omitempty"`
|
||
// Title description: The title of the changeset.
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
// CloneURLToRepositoryName description: Describes a mapping from clone URL to repository name. The `from` field contains a regular expression with named capturing groups. The `to` field contains a template string that references capturing group names. For instance, if `from` is "^../(?P<name>\w+)$" and `to` is "github.com/user/{name}", the clone URL "../myRepository" would be mapped to the repository name "github.com/user/myRepository".
|
||
type CloneURLToRepositoryName struct {
|
||
// From description: A regular expression that matches a set of clone URLs. The regular expression should use the Go regular expression syntax (https://golang.org/pkg/regexp/) and contain at least one named capturing group. The regular expression matches partially by default, so use "^...$" if whole-string matching is desired.
|
||
From string `json:"from"`
|
||
// To description: The repository name output pattern. This should use `{matchGroup}` syntax to reference the capturing groups from the `from` field.
|
||
To string `json:"to"`
|
||
}
|
||
|
||
// CloudKMSEncryptionKey description: Google Cloud KMS Encryption Key, used to encrypt data in Google Cloud environments
|
||
type CloudKMSEncryptionKey struct {
|
||
CredentialsFile string `json:"credentialsFile,omitempty"`
|
||
Keyname string `json:"keyname"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// Completions description: Configuration for the completions service.
|
||
type Completions struct {
|
||
// AccessToken description: The access token used to authenticate with the external completions provider.
|
||
AccessToken string `json:"accessToken"`
|
||
// Enabled description: Toggles whether completions are enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// Model description: The model used for completions.
|
||
Model string `json:"model"`
|
||
// Provider description: The external completions provider.
|
||
Provider string `json:"provider"`
|
||
}
|
||
|
||
// CustomGitFetchMapping description: Mapping from Git clone URl domain/path to git fetch command. The `domainPath` field contains the Git clone URL domain/path part. The `fetch` field contains the custom git fetch command.
|
||
type CustomGitFetchMapping struct {
|
||
// DomainPath description: Git clone URL domain/path
|
||
DomainPath string `json:"domainPath"`
|
||
// Fetch description: Git fetch command
|
||
Fetch string `json:"fetch"`
|
||
}
|
||
|
||
// DebugLog description: Turns on debug logging for specific debugging scenarios.
|
||
type DebugLog struct {
|
||
// ExtsvcGitlab description: Log GitLab API requests.
|
||
ExtsvcGitlab bool `json:"extsvc.gitlab,omitempty"`
|
||
}
|
||
|
||
// Dotcom description: Configuration options for Sourcegraph.com only.
|
||
type Dotcom struct {
|
||
// AppNotifications description: Notifications to display in the Sourcegraph app.
|
||
AppNotifications []*AppNotifications `json:"app.notifications,omitempty"`
|
||
// SlackLicenseExpirationWebhook description: Slack webhook for upcoming license expiration notifications.
|
||
SlackLicenseExpirationWebhook string `json:"slackLicenseExpirationWebhook,omitempty"`
|
||
// SrcCliVersionCache description: Configuration related to the src-cli version cache. This should only be used on sourcegraph.com.
|
||
SrcCliVersionCache *SrcCliVersionCache `json:"srcCliVersionCache,omitempty"`
|
||
}
|
||
type EmailTemplate struct {
|
||
// Html description: Template for HTML body
|
||
Html string `json:"html"`
|
||
// Subject description: Template for email subject header
|
||
Subject string `json:"subject"`
|
||
// Text description: Optional template for plain-text body. If not provided, a plain-text body will be automatically generated from the HTML template.
|
||
Text string `json:"text,omitempty"`
|
||
}
|
||
|
||
// EmailTemplates description: Configurable templates for some email types sent by Sourcegraph.
|
||
type EmailTemplates struct {
|
||
// ResetPassword description: Email sent on password resets. Available template variables: {{.Host}}, {{.Username}}, {{.URL}}
|
||
ResetPassword *EmailTemplate `json:"resetPassword,omitempty"`
|
||
// SetPassword description: Email sent on account creation, if a password reset URL is created. Available template variables: {{.Host}}, {{.Username}}, {{.URL}}
|
||
SetPassword *EmailTemplate `json:"setPassword,omitempty"`
|
||
}
|
||
|
||
// Embeddings description: Configuration for embeddings service.
|
||
type Embeddings struct {
|
||
// AccessToken description: The access token used to authenticate with the external embedding API service.
|
||
AccessToken string `json:"accessToken"`
|
||
// Dimensions description: The dimensionality of the embedding vectors.
|
||
Dimensions int `json:"dimensions"`
|
||
// Enabled description: Toggles whether embedding service is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// Model description: The model used for embedding.
|
||
Model string `json:"model"`
|
||
// Url description: The url to the external embedding API service.
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
// EncryptionKey description: Config for a key
|
||
type EncryptionKey struct {
|
||
Cloudkms *CloudKMSEncryptionKey
|
||
Awskms *AWSKMSEncryptionKey
|
||
Mounted *MountedEncryptionKey
|
||
Noop *NoOpEncryptionKey
|
||
}
|
||
|
||
func (v EncryptionKey) MarshalJSON() ([]byte, error) {
|
||
if v.Cloudkms != nil {
|
||
return json.Marshal(v.Cloudkms)
|
||
}
|
||
if v.Awskms != nil {
|
||
return json.Marshal(v.Awskms)
|
||
}
|
||
if v.Mounted != nil {
|
||
return json.Marshal(v.Mounted)
|
||
}
|
||
if v.Noop != nil {
|
||
return json.Marshal(v.Noop)
|
||
}
|
||
return nil, errors.New("tagged union type must have exactly 1 non-nil field value")
|
||
}
|
||
func (v *EncryptionKey) UnmarshalJSON(data []byte) error {
|
||
var d struct {
|
||
DiscriminantProperty string `json:"type"`
|
||
}
|
||
if err := json.Unmarshal(data, &d); err != nil {
|
||
return err
|
||
}
|
||
switch d.DiscriminantProperty {
|
||
case "awskms":
|
||
return json.Unmarshal(data, &v.Awskms)
|
||
case "cloudkms":
|
||
return json.Unmarshal(data, &v.Cloudkms)
|
||
case "mounted":
|
||
return json.Unmarshal(data, &v.Mounted)
|
||
case "noop":
|
||
return json.Unmarshal(data, &v.Noop)
|
||
}
|
||
return fmt.Errorf("tagged union type must have a %q property whose value is one of %s", "type", []string{"cloudkms", "awskms", "mounted", "noop"})
|
||
}
|
||
|
||
// EncryptionKeys description: Configuration for encryption keys used to encrypt data at rest in the database.
|
||
type EncryptionKeys struct {
|
||
BatchChangesCredentialKey *EncryptionKey `json:"batchChangesCredentialKey,omitempty"`
|
||
// CacheSize description: number of values to keep in LRU cache
|
||
CacheSize int `json:"cacheSize,omitempty"`
|
||
// EnableCache description: enable LRU cache for decryption APIs
|
||
EnableCache bool `json:"enableCache,omitempty"`
|
||
ExecutorSecretKey *EncryptionKey `json:"executorSecretKey,omitempty"`
|
||
ExternalServiceKey *EncryptionKey `json:"externalServiceKey,omitempty"`
|
||
OutboundWebhookKey *EncryptionKey `json:"outboundWebhookKey,omitempty"`
|
||
UserExternalAccountKey *EncryptionKey `json:"userExternalAccountKey,omitempty"`
|
||
WebhookKey *EncryptionKey `json:"webhookKey,omitempty"`
|
||
WebhookLogKey *EncryptionKey `json:"webhookLogKey,omitempty"`
|
||
}
|
||
type ExcludedAWSCodeCommitRepo struct {
|
||
// Id description: The ID of an AWS Code Commit repository (as returned by the AWS API) to exclude from mirroring. Use this to exclude the repository, even if renamed, or to differentiate between repositories with the same name in multiple regions.
|
||
Id string `json:"id,omitempty"`
|
||
// Name description: The name of an AWS CodeCommit repository ("repo-name") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
}
|
||
type ExcludedAzureDevOpsServerRepo struct {
|
||
// Name description: The name of an Azure DevOps Services organization, project, and repository ("orgName/projectName/repositoryName") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of an Azure DevOps Services repo.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
}
|
||
type ExcludedBitbucketCloudRepo struct {
|
||
// Name description: The name of a Bitbucket Cloud repo ("myorg/myrepo") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of a Bitbucket Cloud repo.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
// Uuid description: The UUID of a Bitbucket Cloud repo (as returned by the Bitbucket Cloud's API) to exclude from mirroring.
|
||
Uuid string `json:"uuid,omitempty"`
|
||
}
|
||
type ExcludedBitbucketServerRepo struct {
|
||
// Id description: The ID of a Bitbucket Server / Bitbucket Data Center repo (as returned by the Bitbucket Server / Bitbucket Data Center instance's API) to exclude from mirroring.
|
||
Id int `json:"id,omitempty"`
|
||
// Name description: The name of a Bitbucket Server / Bitbucket Data Center repo ("projectKey/repositorySlug") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of a Bitbucket Server / Bitbucket Data Center repo.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
}
|
||
type ExcludedGitHubRepo struct {
|
||
// Archived description: If set to true, archived repositories will be excluded.
|
||
Archived bool `json:"archived,omitempty"`
|
||
// Forks description: If set to true, forks will be excluded.
|
||
Forks bool `json:"forks,omitempty"`
|
||
// Id description: The node ID of a GitHub repository (as returned by the GitHub instance's API) to exclude from mirroring. Use this to exclude the repository, even if renamed. Note: This is the GraphQL ID, not the GitHub database ID. eg: "curl https://api.github.com/repos/vuejs/vue | jq .node_id"
|
||
Id string `json:"id,omitempty"`
|
||
// Name description: The name of a GitHub repository ("owner/name") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of a GitHub repository ("owner/name").
|
||
Pattern string `json:"pattern,omitempty"`
|
||
}
|
||
type ExcludedGitLabProject struct {
|
||
// Id description: The ID of a GitLab project (as returned by the GitLab instance's API) to exclude from mirroring.
|
||
Id int `json:"id,omitempty"`
|
||
// Name description: The name of a GitLab project ("group/name") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
}
|
||
type ExcludedGitoliteRepo struct {
|
||
// Name description: The name of a Gitolite repo ("my-repo") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of a Gitolite repo to exclude from mirroring.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
}
|
||
type ExcludedOtherRepo struct {
|
||
// Name description: The name of a Other repo ("my-repo") to exclude from mirroring.
|
||
Name string `json:"name,omitempty"`
|
||
// Pattern description: Regular expression which matches against the name of a Other repo to exclude from mirroring.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
}
|
||
type ExistingChangesetSpec struct {
|
||
// BaseRepository description: The GraphQL ID of the repository that contains the existing changeset on the code host.
|
||
BaseRepository string `json:"baseRepository"`
|
||
// ExternalID description: The ID that uniquely identifies the existing changeset on the code host
|
||
ExternalID string `json:"externalID"`
|
||
// Version description: A field for versioning the payload.
|
||
Version int `json:"version,omitempty"`
|
||
}
|
||
|
||
// ExpandedGitCommitDescription description: The Git commit to create with the changes.
|
||
type ExpandedGitCommitDescription struct {
|
||
// Author description: The author of the Git commit.
|
||
Author *GitCommitAuthor `json:"author,omitempty"`
|
||
// Message description: The Git commit message.
|
||
Message string `json:"message"`
|
||
}
|
||
|
||
// ExperimentalFeatures description: Experimental features and settings.
|
||
type ExperimentalFeatures struct {
|
||
// AccessRequestEnabled description: Enables/disables the request access feature, which allows users to request access if built-in signup is disabled.
|
||
AccessRequestEnabled *bool `json:"accessRequest.enabled,omitempty"`
|
||
// BitbucketServerFastPerm description: DEPRECATED: Configure in Bitbucket Server config.
|
||
BitbucketServerFastPerm string `json:"bitbucketServerFastPerm,omitempty"`
|
||
// CustomGitFetch description: JSON array of configuration that maps from Git clone URL domain/path to custom git fetch command. To enable this feature set environment variable `ENABLE_CUSTOM_GIT_FETCH` as `true` on gitserver.
|
||
CustomGitFetch []*CustomGitFetchMapping `json:"customGitFetch,omitempty"`
|
||
// DebugLog description: Turns on debug logging for specific debugging scenarios.
|
||
DebugLog *DebugLog `json:"debug.log,omitempty"`
|
||
// EnableGRPC description: Enables gRPC for communication between internal services
|
||
EnableGRPC bool `json:"enableGRPC,omitempty"`
|
||
// EnableGithubInternalRepoVisibility description: Enable support for visibility of internal Github repositories
|
||
EnableGithubInternalRepoVisibility bool `json:"enableGithubInternalRepoVisibility,omitempty"`
|
||
// EnablePermissionsWebhooks description: Enables webhook consumers to sync permissions from external services faster than the defaults schedule
|
||
EnablePermissionsWebhooks bool `json:"enablePermissionsWebhooks,omitempty"`
|
||
// EnableStorm description: Enables the Storm frontend architecture changes.
|
||
EnableStorm bool `json:"enableStorm,omitempty"`
|
||
// EventLogging description: Enables user event logging inside of the Sourcegraph instance. This will allow admins to have greater visibility of user activity, such as frequently viewed pages, frequent searches, and more. These event logs (and any specific user actions) are only stored locally, and never leave this Sourcegraph instance.
|
||
EventLogging string `json:"eventLogging,omitempty"`
|
||
// GitServerPinnedRepos description: List of repositories pinned to specific gitserver instances. The specified repositories will remain at their pinned servers on scaling the cluster. If the specified pinned server differs from the current server that stores the repository, then it must be re-cloned to the specified server.
|
||
GitServerPinnedRepos map[string]string `json:"gitServerPinnedRepos,omitempty"`
|
||
// GoPackages description: Allow adding Go package host connections
|
||
GoPackages string `json:"goPackages,omitempty"`
|
||
// InsightsAlternateLoadingStrategy description: Use an in-memory strategy of loading Code Insights. Should only be used for benchmarking on large instances, not for customer use currently.
|
||
InsightsAlternateLoadingStrategy bool `json:"insightsAlternateLoadingStrategy,omitempty"`
|
||
// InsightsBackfillerV2 description: DEPRECATED: Setting any value to this flag has no effect.
|
||
InsightsBackfillerV2 *bool `json:"insightsBackfillerV2,omitempty"`
|
||
// InsightsDataRetention description: Code insights data points beyond the sample size defined in the site configuration will be periodically archived
|
||
InsightsDataRetention *bool `json:"insightsDataRetention,omitempty"`
|
||
// JvmPackages description: Allow adding JVM package host connections
|
||
JvmPackages string `json:"jvmPackages,omitempty"`
|
||
// NpmPackages description: Allow adding npm package code host connections
|
||
NpmPackages string `json:"npmPackages,omitempty"`
|
||
// Pagure description: Allow adding Pagure code host connections
|
||
Pagure string `json:"pagure,omitempty"`
|
||
// PasswordPolicy description: DEPRECATED: this is now a standard feature see: auth.passwordPolicy
|
||
PasswordPolicy *PasswordPolicy `json:"passwordPolicy,omitempty"`
|
||
// Perforce description: Allow adding Perforce code host connections
|
||
Perforce string `json:"perforce,omitempty"`
|
||
// PythonPackages description: Allow adding Python package code host connections
|
||
PythonPackages string `json:"pythonPackages,omitempty"`
|
||
// Ranking description: Experimental search result ranking options.
|
||
Ranking *Ranking `json:"ranking,omitempty"`
|
||
// RateLimitAnonymous description: Configures the hourly rate limits for anonymous calls to the GraphQL API. Setting limit to 0 disables the limiter. This is only relevant if unauthenticated calls to the API are permitted.
|
||
RateLimitAnonymous int `json:"rateLimitAnonymous,omitempty"`
|
||
// RubyPackages description: Allow adding Ruby package host connections
|
||
RubyPackages string `json:"rubyPackages,omitempty"`
|
||
// RustPackages description: Allow adding Rust package code host connections
|
||
RustPackages string `json:"rustPackages,omitempty"`
|
||
// SearchIndexBranches description: A map from repository name to a list of extra revs (branch, ref, tag, commit sha, etc) to index for a repository. We always index the default branch ("HEAD") and revisions in version contexts. This allows specifying additional revisions. Sourcegraph can index up to 64 branches per repository.
|
||
SearchIndexBranches map[string][]string `json:"search.index.branches,omitempty"`
|
||
// SearchIndexQueryContexts description: Enables indexing of revisions of repos matching any query defined in search contexts.
|
||
SearchIndexQueryContexts bool `json:"search.index.query.contexts,omitempty"`
|
||
// SearchIndexRevisions description: An array of objects describing rules for extra revisions (branch, ref, tag, commit sha, etc) to be indexed for all repositories that match them. We always index the default branch ("HEAD") and revisions in version contexts. This allows specifying additional revisions. Sourcegraph can index up to 64 branches per repository.
|
||
SearchIndexRevisions []*SearchIndexRevisionsRule `json:"search.index.revisions,omitempty"`
|
||
// SearchSanitization description: Allows site admins to specify a list of regular expressions representing matched content that should be omitted from search results. Also allows admins to specify the name of an organization within their Sourcegraph instance whose members are trusted and will not have their search results sanitized. Enable this feature by adding at least one valid regular expression to the value of the `sanitizePatterns` field on this object. Site admins will not have their searches sanitized.
|
||
SearchSanitization *SearchSanitization `json:"search.sanitization,omitempty"`
|
||
// StructuralSearch description: Enables structural search.
|
||
StructuralSearch string `json:"structuralSearch,omitempty"`
|
||
SubRepoPermissions *SubRepoPermissions `json:"subRepoPermissions,omitempty"`
|
||
// TlsExternal description: Global TLS/SSL settings for Sourcegraph to use when communicating with code hosts.
|
||
TlsExternal *TlsExternal `json:"tls.external,omitempty"`
|
||
// UnifiedPermissions description: Enables the new unified permissions model, which stores repository permissions in a single table and a row for each permission instead of postgres arrays.
|
||
UnifiedPermissions bool `json:"unifiedPermissions,omitempty"`
|
||
Additional map[string]any `json:"-"` // additionalProperties not explicitly defined in the schema
|
||
}
|
||
|
||
func (v ExperimentalFeatures) MarshalJSON() ([]byte, error) {
|
||
m := make(map[string]any, len(v.Additional))
|
||
for k, v := range v.Additional {
|
||
m[k] = v
|
||
}
|
||
type wrapper ExperimentalFeatures
|
||
b, err := json.Marshal(wrapper(v))
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
var m2 map[string]any
|
||
if err := json.Unmarshal(b, &m2); err != nil {
|
||
return nil, err
|
||
}
|
||
for k, v := range m2 {
|
||
m[k] = v
|
||
}
|
||
return json.Marshal(m)
|
||
}
|
||
func (v *ExperimentalFeatures) UnmarshalJSON(data []byte) error {
|
||
type wrapper ExperimentalFeatures
|
||
var s wrapper
|
||
if err := json.Unmarshal(data, &s); err != nil {
|
||
return err
|
||
}
|
||
*v = ExperimentalFeatures(s)
|
||
var m map[string]any
|
||
if err := json.Unmarshal(data, &m); err != nil {
|
||
return err
|
||
}
|
||
delete(m, "accessRequest.enabled")
|
||
delete(m, "bitbucketServerFastPerm")
|
||
delete(m, "customGitFetch")
|
||
delete(m, "debug.log")
|
||
delete(m, "enableGRPC")
|
||
delete(m, "enableGithubInternalRepoVisibility")
|
||
delete(m, "enablePermissionsWebhooks")
|
||
delete(m, "enableStorm")
|
||
delete(m, "eventLogging")
|
||
delete(m, "gitServerPinnedRepos")
|
||
delete(m, "goPackages")
|
||
delete(m, "insightsAlternateLoadingStrategy")
|
||
delete(m, "insightsBackfillerV2")
|
||
delete(m, "insightsDataRetention")
|
||
delete(m, "jvmPackages")
|
||
delete(m, "npmPackages")
|
||
delete(m, "pagure")
|
||
delete(m, "passwordPolicy")
|
||
delete(m, "perforce")
|
||
delete(m, "pythonPackages")
|
||
delete(m, "ranking")
|
||
delete(m, "rateLimitAnonymous")
|
||
delete(m, "rubyPackages")
|
||
delete(m, "rustPackages")
|
||
delete(m, "search.index.branches")
|
||
delete(m, "search.index.query.contexts")
|
||
delete(m, "search.index.revisions")
|
||
delete(m, "search.sanitization")
|
||
delete(m, "structuralSearch")
|
||
delete(m, "subRepoPermissions")
|
||
delete(m, "tls.external")
|
||
delete(m, "unifiedPermissions")
|
||
if len(m) > 0 {
|
||
v.Additional = make(map[string]any, len(m))
|
||
}
|
||
for k, vv := range m {
|
||
v.Additional[k] = vv
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type ExportUsageTelemetry struct {
|
||
// BatchSize description: Maximum number of events scraped from the events table in a single scrape.
|
||
BatchSize int `json:"batchSize,omitempty"`
|
||
// Enabled description: Toggles whether or not to export Sourcegraph telemetry. If enabled events will be scraped and sent to an analytics store. This is an opt-in setting, and only should only be enabled for customers that have agreed to event level data collection.
|
||
Enabled bool `json:"enabled,omitempty"`
|
||
// TopicName description: Destination pubsub topic name to export usage data
|
||
TopicName string `json:"topicName,omitempty"`
|
||
// TopicProjectName description: GCP project name containing the usage data pubsub topic
|
||
TopicProjectName string `json:"topicProjectName,omitempty"`
|
||
}
|
||
type ExternalIdentity struct {
|
||
// AuthProviderID description: The value of the `configID` field of the targeted authentication provider.
|
||
AuthProviderID string `json:"authProviderID"`
|
||
// AuthProviderType description: The `type` field of the targeted authentication provider.
|
||
AuthProviderType string `json:"authProviderType"`
|
||
// GitlabProvider description: The name that identifies the authentication provider to GitLab. This is passed to the `?provider=` query parameter in calls to the GitLab Users API. If you're not sure what this value is, you can look at the `identities` field of the GitLab Users API result (`curl -H 'PRIVATE-TOKEN: $YOUR_TOKEN' $GITLAB_URL/api/v4/users`).
|
||
GitlabProvider string `json:"gitlabProvider"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// FusionClient description: Configuration for the experimental p4-fusion client
|
||
type FusionClient struct {
|
||
// Enabled description: Enable the p4-fusion client for cloning and fetching repos
|
||
Enabled bool `json:"enabled"`
|
||
// FsyncEnable description: Enable fsync() while writing objects to disk to ensure they get written to permanent storage immediately instead of being cached. This is to mitigate data loss in events of hardware failure.
|
||
FsyncEnable bool `json:"fsyncEnable,omitempty"`
|
||
// IncludeBinaries description: Whether to include binary files
|
||
IncludeBinaries bool `json:"includeBinaries,omitempty"`
|
||
// LookAhead description: How many CLs in the future, at most, shall we keep downloaded by the time it is to commit them
|
||
LookAhead int `json:"lookAhead"`
|
||
// MaxChanges description: How many changes to fetch during initial clone. The default of -1 will fetch all known changes
|
||
MaxChanges int `json:"maxChanges,omitempty"`
|
||
// NetworkThreads description: The number of threads in the threadpool for running network calls. Defaults to the number of logical CPUs.
|
||
NetworkThreads int `json:"networkThreads,omitempty"`
|
||
// NetworkThreadsFetch description: The number of threads in the threadpool for running network calls when performing fetches. Defaults to the number of logical CPUs.
|
||
NetworkThreadsFetch int `json:"networkThreadsFetch,omitempty"`
|
||
// PrintBatch description: The p4 print batch size
|
||
PrintBatch int `json:"printBatch,omitempty"`
|
||
// Refresh description: How many times a connection should be reused before it is refreshed
|
||
Refresh int `json:"refresh,omitempty"`
|
||
// Retries description: How many times a command should be retried before the process exits in a failure
|
||
Retries int `json:"retries,omitempty"`
|
||
}
|
||
|
||
// GerritAuthProvider description: Gerrit auth provider
|
||
type GerritAuthProvider struct {
|
||
Type string `json:"type"`
|
||
// Url description: URL of the Gerrit instance, such as https://gerrit-review.googlesource.com or https://gerrit.example.com.
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
// GerritAuthorization description: If non-null, enforces Gerrit repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "gerrit" with the same `url` field as specified in this `GerritConnection`.
|
||
type GerritAuthorization struct {
|
||
// IdentityProvider description: The identity provider to use for user information. If not set, the `url` field is used.
|
||
IdentityProvider string `json:"identityProvider,omitempty"`
|
||
}
|
||
|
||
// GerritConnection description: Configuration for a connection to Gerrit.
|
||
type GerritConnection struct {
|
||
// Authorization description: If non-null, enforces Gerrit repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "gerrit" with the same `url` field as specified in this `GerritConnection`.
|
||
Authorization *GerritAuthorization `json:"authorization,omitempty"`
|
||
// Password description: The password associated with the Gerrit username used for authentication.
|
||
Password string `json:"password"`
|
||
// Projects description: An array of project strings specifying which Gerrit projects to mirror on Sourcegraph. If empty, all projects will be mirrored.
|
||
Projects []string `json:"projects,omitempty"`
|
||
// Url description: URL of a Gerrit instance, such as https://gerrit.example.com.
|
||
Url string `json:"url"`
|
||
// Username description: A username for authentication withe the Gerrit code host.
|
||
Username string `json:"username"`
|
||
}
|
||
|
||
// GitCommitAuthor description: The author of the Git commit.
|
||
type GitCommitAuthor struct {
|
||
// Email description: The Git commit author email.
|
||
Email string `json:"email"`
|
||
// Name description: The Git commit author name.
|
||
Name string `json:"name"`
|
||
}
|
||
|
||
// GitCommitDescription description: The Git commit to create with the changes.
|
||
type GitCommitDescription struct {
|
||
// AuthorEmail description: The Git commit author email.
|
||
AuthorEmail string `json:"authorEmail"`
|
||
// AuthorName description: The Git commit author name.
|
||
AuthorName string `json:"authorName"`
|
||
// Diff description: The commit diff (in unified diff format).
|
||
Diff string `json:"diff"`
|
||
// Message description: The Git commit message.
|
||
Message string `json:"message"`
|
||
// Version description: A field for versioning the payload.
|
||
Version int `json:"version,omitempty"`
|
||
}
|
||
|
||
// GitHubApp description: The config options for Sourcegraph GitHub App.
|
||
type GitHubApp struct {
|
||
// AppID description: The app ID of the GitHub App for Sourcegraph.
|
||
AppID string `json:"appID,omitempty"`
|
||
// ClientID description: The Client ID of the GitHub App for Sourcegraph, accessible from https://github.com/settings/apps .
|
||
ClientID string `json:"clientID,omitempty"`
|
||
// ClientSecret description: The Client Secret of the GitHub App for Sourcegraph, accessible from https://github.com/settings/apps .
|
||
ClientSecret string `json:"clientSecret,omitempty"`
|
||
// PrivateKey description: The base64-encoded private key of the GitHub App for Sourcegraph.
|
||
PrivateKey string `json:"privateKey,omitempty"`
|
||
// Slug description: The slug of the GitHub App for Sourcegraph.
|
||
Slug string `json:"slug,omitempty"`
|
||
}
|
||
|
||
// GitHubAuthProvider description: Configures the GitHub (or GitHub Enterprise) OAuth authentication provider for SSO. In addition to specifying this configuration object, you must also create a OAuth App on your GitHub instance: https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/. When a user signs into Sourcegraph or links their GitHub account to their existing Sourcegraph account, GitHub will prompt the user for the repo scope.
|
||
type GitHubAuthProvider struct {
|
||
// AllowGroupsPermissionsSync description: Experimental: Allows sync of GitHub teams and organizations permissions across all external services associated with this provider to allow enabling of [repository permissions caching](https://docs.sourcegraph.com/admin/external_service/github#teams-and-organizations-permissions-caching).
|
||
AllowGroupsPermissionsSync bool `json:"allowGroupsPermissionsSync,omitempty"`
|
||
// AllowOrgs description: Restricts new logins and signups (if allowSignup is true) to members of these GitHub organizations. Existing sessions won't be invalidated. Leave empty or unset for no org restrictions.
|
||
AllowOrgs []string `json:"allowOrgs,omitempty"`
|
||
// AllowOrgsMap description: Restricts new logins and signups (if allowSignup is true) to members of GitHub teams. Each list of teams should have their Github org name as a key. Subteams inheritance is not supported, therefore only members of the listed teams will be granted access. Existing sessions won't be invalidated. Leave empty or unset for no team restrictions.
|
||
AllowOrgsMap map[string][]string `json:"allowOrgsMap,omitempty"`
|
||
// AllowSignup description: Allows new visitors to sign up for accounts via GitHub authentication. If false, users signing in via GitHub must have an existing Sourcegraph account, which will be linked to their GitHub identity after sign-in.
|
||
AllowSignup bool `json:"allowSignup,omitempty"`
|
||
// ClientID description: The Client ID of the GitHub OAuth app, accessible from https://github.com/settings/developers (or the same path on GitHub Enterprise).
|
||
ClientID string `json:"clientID"`
|
||
// ClientSecret description: The Client Secret of the GitHub OAuth app, accessible from https://github.com/settings/developers (or the same path on GitHub Enterprise).
|
||
ClientSecret string `json:"clientSecret"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
// Hidden description: Hides the configured auth provider from regular use through our web interface by omitting it from the JSContext, useful for experimental auth setups.
|
||
Hidden bool `json:"hidden,omitempty"`
|
||
Type string `json:"type"`
|
||
// Url description: URL of the GitHub instance, such as https://github.com or https://github-enterprise.example.com.
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// GitHubAuthorization description: If non-null, enforces GitHub repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "github" with the same `url` field as specified in this `GitHubConnection`.
|
||
type GitHubAuthorization struct {
|
||
// GroupsCacheTTL description: Experimental: If set, configures hours cached permissions from teams and organizations should be kept for. Setting a negative value disables syncing from teams and organizations, and falls back to the default behaviour of syncing all permisisons directly from user-repository affiliations instead. [Learn more](https://docs.sourcegraph.com/admin/external_service/github#teams-and-organizations-permissions-caching).
|
||
GroupsCacheTTL float64 `json:"groupsCacheTTL,omitempty"`
|
||
}
|
||
|
||
// GitHubConnection description: Configuration for a connection to GitHub or GitHub Enterprise.
|
||
type GitHubConnection struct {
|
||
// Authorization description: If non-null, enforces GitHub repository permissions. This requires that there is an item in the [site configuration json](https://docs.sourcegraph.com/admin/config/site_config#auth-providers) `auth.providers` field, of type "github" with the same `url` field as specified in this `GitHubConnection`.
|
||
Authorization *GitHubAuthorization `json:"authorization,omitempty"`
|
||
// Certificate description: TLS certificate of the GitHub Enterprise instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
Certificate string `json:"certificate,omitempty"`
|
||
// CloudDefault description: Only used to override the cloud_default column from a config file specified by EXTSVC_CONFIG_FILE
|
||
CloudDefault bool `json:"cloudDefault,omitempty"`
|
||
// CloudGlobal description: When set to true, this external service will be chosen as our 'Global' GitHub service. Only valid on Sourcegraph.com. Only one service can have this flag set.
|
||
CloudGlobal bool `json:"cloudGlobal,omitempty"`
|
||
// Exclude description: A list of repositories to never mirror from this GitHub instance. Takes precedence over "orgs", "repos", and "repositoryQuery" configuration.
|
||
//
|
||
// Supports excluding by name ({"name": "owner/name"}) or by ID ({"id": "MDEwOlJlcG9zaXRvcnkxMTczMDM0Mg=="}).
|
||
//
|
||
// Note: ID is the GitHub GraphQL ID, not the GitHub database ID. eg: "curl https://api.github.com/repos/vuejs/vue | jq .node_id"
|
||
Exclude []*ExcludedGitHubRepo `json:"exclude,omitempty"`
|
||
// GitURLType description: The type of Git URLs to use for cloning and fetching Git repositories on this GitHub instance.
|
||
//
|
||
// If "http", Sourcegraph will access GitHub repositories using Git URLs of the form http(s)://github.com/myteam/myproject.git (using https: if the GitHub instance uses HTTPS).
|
||
//
|
||
// If "ssh", Sourcegraph will access GitHub repositories using Git URLs of the form git@github.com:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://docs.sourcegraph.com/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
|
||
GitURLType string `json:"gitURLType,omitempty"`
|
||
// GithubAppInstallationID description: The installation ID of the GitHub App.
|
||
GithubAppInstallationID string `json:"githubAppInstallationID,omitempty"`
|
||
// InitialRepositoryEnablement description: Deprecated and ignored field which will be removed entirely in the next release. GitHub repositories can no longer be enabled or disabled explicitly. Configure repositories to be mirrored via "repos", "exclude" and "repositoryQuery" instead.
|
||
InitialRepositoryEnablement bool `json:"initialRepositoryEnablement,omitempty"`
|
||
// Orgs description: An array of organization names identifying GitHub organizations whose repositories should be mirrored on Sourcegraph.
|
||
Orgs []string `json:"orgs,omitempty"`
|
||
// Pending description: Whether the code host connection is in a pending state.
|
||
Pending bool `json:"pending,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to GitHub.
|
||
RateLimit *GitHubRateLimit `json:"rateLimit,omitempty"`
|
||
// Repos description: An array of repository "owner/name" strings specifying which GitHub or GitHub Enterprise repositories to mirror on Sourcegraph.
|
||
Repos []string `json:"repos,omitempty"`
|
||
// RepositoryPathPattern description: The pattern used to generate the corresponding Sourcegraph repository name for a GitHub or GitHub Enterprise repository. In the pattern, the variable "{host}" is replaced with the GitHub host (such as github.example.com), and "{nameWithOwner}" is replaced with the GitHub repository's "owner/path" (such as "myorg/myrepo").
|
||
//
|
||
// For example, if your GitHub Enterprise URL is https://github.example.com and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of "{host}/{nameWithOwner}" would mean that a GitHub repository at https://github.example.com/myorg/myrepo is available on Sourcegraph at https://src.example.com/github.example.com/myorg/myrepo.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// RepositoryQuery description: An array of strings specifying which GitHub or GitHub Enterprise repositories to mirror on Sourcegraph. The valid values are:
|
||
//
|
||
// - `public` mirrors all public repositories for GitHub Enterprise and is the equivalent of `none` for GitHub
|
||
//
|
||
// - `affiliated` mirrors all repositories affiliated with the configured token's user:
|
||
// - Private repositories with read access
|
||
// - Public repositories owned by the user or their orgs
|
||
// - Public repositories with write access
|
||
//
|
||
// - `none` mirrors no repositories (except those specified in the `repos` configuration property or added manually)
|
||
//
|
||
// - All other values are executed as a GitHub advanced repository search as described at https://github.com/search/advanced. Example: to sync all repositories from the "sourcegraph" organization including forks the query would be "org:sourcegraph fork:true".
|
||
//
|
||
// If multiple values are provided, their results are unioned.
|
||
//
|
||
// If you need to narrow the set of mirrored repositories further (and don't want to enumerate it with a list or query set as above), create a new bot/machine user on GitHub or GitHub Enterprise that is only affiliated with the desired repositories.
|
||
RepositoryQuery []string `json:"repositoryQuery,omitempty"`
|
||
// Token description: A GitHub personal access token. Create one for GitHub.com at https://github.com/settings/tokens/new?description=Sourcegraph (for GitHub Enterprise, replace github.com with your instance's hostname). See https://docs.sourcegraph.com/admin/external_service/github#github-api-token-and-access for which scopes are required for which use cases.
|
||
Token string `json:"token,omitempty"`
|
||
// Url description: URL of a GitHub instance, such as https://github.com or https://github-enterprise.example.com.
|
||
Url string `json:"url"`
|
||
// Webhooks description: An array of configurations defining existing GitHub webhooks that send updates back to Sourcegraph.
|
||
Webhooks []*GitHubWebhook `json:"webhooks,omitempty"`
|
||
}
|
||
|
||
// GitHubRateLimit description: Rate limit applied when making background API requests to GitHub.
|
||
type GitHubRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type GitHubWebhook struct {
|
||
// Org description: The name of the GitHub organization to which the webhook belongs
|
||
Org string `json:"org"`
|
||
// Secret description: The secret used when creating the webhook
|
||
Secret string `json:"secret"`
|
||
}
|
||
|
||
// GitLabAuthProvider description: Configures the GitLab OAuth authentication provider for SSO. In addition to specifying this configuration object, you must also create a OAuth App on your GitLab instance: https://docs.gitlab.com/ee/integration/oauth_provider.html. The application should have `api` and `read_user` scopes and the callback URL set to the concatenation of your Sourcegraph instance URL and "/.auth/gitlab/callback".
|
||
type GitLabAuthProvider struct {
|
||
// AllowGroups description: Restricts new logins and signups (if allowSignup is true) to members of these GitLab groups. Existing sessions won't be invalidated. Make sure to inform the full path for groups or subgroups instead of their names. Leave empty or unset for no group restrictions.
|
||
AllowGroups []string `json:"allowGroups,omitempty"`
|
||
// AllowSignup description: Allows new visitors to sign up for accounts via GitLab authentication. If false, users signing in via GitLab must have an existing Sourcegraph account, which will be linked to their GitLab identity after sign-in.
|
||
AllowSignup *bool `json:"allowSignup,omitempty"`
|
||
// ApiScope description: The OAuth API scope that should be used
|
||
ApiScope string `json:"apiScope,omitempty"`
|
||
// ClientID description: The Client ID of the GitLab OAuth app, accessible from https://gitlab.com/oauth/applications (or the same path on your private GitLab instance).
|
||
ClientID string `json:"clientID"`
|
||
// ClientSecret description: The Client Secret of the GitLab OAuth app, accessible from https://gitlab.com/oauth/applications (or the same path on your private GitLab instance).
|
||
ClientSecret string `json:"clientSecret"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
// TokenRefreshWindowMinutes description: Time in minutes before token expiry when we should attempt to refresh it
|
||
TokenRefreshWindowMinutes int `json:"tokenRefreshWindowMinutes,omitempty"`
|
||
Type string `json:"type"`
|
||
// Url description: URL of the GitLab instance, such as https://gitlab.com or https://gitlab.example.com.
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// GitLabAuthorization description: If non-null, enforces GitLab repository permissions. This requires that there be an item in the `auth.providers` field of type "gitlab" with the same `url` field as specified in this `GitLabConnection`.
|
||
type GitLabAuthorization struct {
|
||
// IdentityProvider description: The source of identity to use when computing permissions. This defines how to compute the GitLab identity to use for a given Sourcegraph user.
|
||
IdentityProvider IdentityProvider `json:"identityProvider"`
|
||
}
|
||
|
||
// GitLabConnection description: Configuration for a connection to GitLab (GitLab.com or GitLab self-managed).
|
||
type GitLabConnection struct {
|
||
// Authorization description: If non-null, enforces GitLab repository permissions. This requires that there be an item in the `auth.providers` field of type "gitlab" with the same `url` field as specified in this `GitLabConnection`.
|
||
Authorization *GitLabAuthorization `json:"authorization,omitempty"`
|
||
// Certificate description: TLS certificate of the GitLab instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
Certificate string `json:"certificate,omitempty"`
|
||
// CloudDefault description: Only used to override the cloud_default column from a config file specified by EXTSVC_CONFIG_FILE
|
||
CloudDefault bool `json:"cloudDefault,omitempty"`
|
||
// CloudGlobal description: When set to true, this external service will be chosen as our 'Global' GitLab service. Only valid on Sourcegraph.com. Only one service can have this flag set.
|
||
CloudGlobal bool `json:"cloudGlobal,omitempty"`
|
||
// Exclude description: A list of projects to never mirror from this GitLab instance. Takes precedence over "projects" and "projectQuery" configuration. Supports excluding by name ({"name": "group/name"}) or by ID ({"id": 42}).
|
||
Exclude []*ExcludedGitLabProject `json:"exclude,omitempty"`
|
||
// GitURLType description: The type of Git URLs to use for cloning and fetching Git repositories on this GitLab instance.
|
||
//
|
||
// If "http", Sourcegraph will access GitLab repositories using Git URLs of the form http(s)://gitlab.example.com/myteam/myproject.git (using https: if the GitLab instance uses HTTPS).
|
||
//
|
||
// If "ssh", Sourcegraph will access GitLab repositories using Git URLs of the form git@example.gitlab.com:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://docs.sourcegraph.com/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
|
||
GitURLType string `json:"gitURLType,omitempty"`
|
||
// InitialRepositoryEnablement description: Deprecated and ignored field which will be removed entirely in the next release. GitLab repositories can no longer be enabled or disabled explicitly.
|
||
InitialRepositoryEnablement bool `json:"initialRepositoryEnablement,omitempty"`
|
||
// NameTransformations description: An array of transformations will apply to the repository name. Currently, only regex replacement is supported. All transformations happen after "repositoryPathPattern" is processed.
|
||
NameTransformations []*GitLabNameTransformation `json:"nameTransformations,omitempty"`
|
||
// ProjectQuery description: An array of strings specifying which GitLab projects to mirror on Sourcegraph. Each string is a URL path and query that targets a GitLab API endpoint returning a list of projects. If the string only contains a query, then "projects" is used as the path. Examples: "?membership=true&search=foo", "groups/mygroup/projects".
|
||
//
|
||
// The special string "none" can be used as the only element to disable this feature. Projects matched by multiple query strings are only imported once. Here are a few endpoints that return a list of projects: https://docs.gitlab.com/ee/api/projects.html#list-all-projects, https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects, https://docs.gitlab.com/ee/api/search.html#scope-projects.
|
||
ProjectQuery []string `json:"projectQuery"`
|
||
// Projects description: A list of projects to mirror from this GitLab instance. Supports including by name ({"name": "group/name"}) or by ID ({"id": 42}).
|
||
Projects []*GitLabProject `json:"projects,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to GitLab.
|
||
RateLimit *GitLabRateLimit `json:"rateLimit,omitempty"`
|
||
// RepositoryPathPattern description: The pattern used to generate a the corresponding Sourcegraph repository name for a GitLab project. In the pattern, the variable "{host}" is replaced with the GitLab URL's host (such as gitlab.example.com), and "{pathWithNamespace}" is replaced with the GitLab project's "namespace/path" (such as "myteam/myproject").
|
||
//
|
||
// For example, if your GitLab is https://gitlab.example.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{pathWithNamespace}" would mean that a GitLab project at https://gitlab.example.com/myteam/myproject is available on Sourcegraph at https://src.example.com/gitlab.example.com/myteam/myproject.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// Token description: A GitLab access token with "api" scope. Can be a personal access token (PAT) or an OAuth token. If you are enabling permissions with identity provider type "external", this token should also have "sudo" scope.
|
||
Token string `json:"token"`
|
||
// TokenOauthExpiry description: The OAuth token expiry (Unix timestamp in seconds)
|
||
TokenOauthExpiry int `json:"token.oauth.expiry,omitempty"`
|
||
// TokenOauthRefresh description: The OAuth refresh token
|
||
TokenOauthRefresh string `json:"token.oauth.refresh,omitempty"`
|
||
// TokenType description: The type of the token
|
||
TokenType string `json:"token.type,omitempty"`
|
||
// Url description: URL of a GitLab instance, such as https://gitlab.example.com or (for GitLab.com) https://gitlab.com.
|
||
Url string `json:"url"`
|
||
// Webhooks description: An array of webhook configurations
|
||
Webhooks []*GitLabWebhook `json:"webhooks,omitempty"`
|
||
}
|
||
type GitLabNameTransformation struct {
|
||
// Regex description: The regex to match for the occurrences of its replacement.
|
||
Regex string `json:"regex,omitempty"`
|
||
// Replacement description: The replacement used to replace all matched occurrences by the regex.
|
||
Replacement string `json:"replacement,omitempty"`
|
||
}
|
||
type GitLabProject struct {
|
||
// Id description: The ID of a GitLab project (as returned by the GitLab instance's API) to mirror.
|
||
Id int `json:"id,omitempty"`
|
||
// Name description: The name of a GitLab project ("group/name") to mirror.
|
||
Name string `json:"name,omitempty"`
|
||
}
|
||
|
||
// GitLabRateLimit description: Rate limit applied when making background API requests to GitLab.
|
||
type GitLabRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type GitLabWebhook struct {
|
||
// Secret description: The secret used to authenticate incoming webhook requests
|
||
Secret string `json:"secret"`
|
||
}
|
||
|
||
// GitRecorder description: Record git operations that are executed on configured repositories. The following commands are not recorded: show, log, rev-parse and diff.
|
||
type GitRecorder struct {
|
||
// Repos description: List of repositories whose git operations should be recorded.
|
||
Repos []string `json:"repos,omitempty"`
|
||
// Size description: Defines how many recordings to keep. Once this size is reached, the oldest entry will be removed.
|
||
Size int `json:"size,omitempty"`
|
||
}
|
||
|
||
// Github description: GitHub configuration, both for queries and receiving release webhooks.
|
||
type Github struct {
|
||
// Repository description: The repository to get the latest version of.
|
||
Repository *Repository `json:"repository,omitempty"`
|
||
// Token description: The access token to use when communicating with GitHub.
|
||
Token string `json:"token"`
|
||
// Uri description: The URI of the GitHub instance.
|
||
Uri string `json:"uri,omitempty"`
|
||
// WebhookSecret description: The release webhook secret.
|
||
WebhookSecret string `json:"webhookSecret"`
|
||
}
|
||
|
||
// GitoliteConnection description: Configuration for a connection to Gitolite.
|
||
type GitoliteConnection struct {
|
||
// Exclude description: A list of repositories to never mirror from this Gitolite instance. Supports excluding by exact name ({"name": "foo"}).
|
||
Exclude []*ExcludedGitoliteRepo `json:"exclude,omitempty"`
|
||
// Host description: Gitolite host that stores the repositories (e.g., git@gitolite.example.com, ssh://git@gitolite.example.com:2222/).
|
||
Host string `json:"host"`
|
||
// Phabricator description: This is DEPRECATED
|
||
Phabricator *Phabricator `json:"phabricator,omitempty"`
|
||
// PhabricatorMetadataCommand description: This is DEPRECATED
|
||
PhabricatorMetadataCommand string `json:"phabricatorMetadataCommand,omitempty"`
|
||
// Prefix description: Repository name prefix that will map to this Gitolite host. This should likely end with a trailing slash. E.g., "gitolite.example.com/".
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this prefix be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
Prefix string `json:"prefix"`
|
||
}
|
||
|
||
// GoModulesConnection description: Configuration for a connection to Go module proxies
|
||
type GoModulesConnection struct {
|
||
// Dependencies description: An array of strings specifying Go modules to mirror in Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the configured Go module proxies.
|
||
RateLimit *GoRateLimit `json:"rateLimit,omitempty"`
|
||
// Urls description: The list of Go module proxy URLs to fetch modules from. 404 Not found or 410 Gone responses will result in the next URL to be attempted.
|
||
Urls []string `json:"urls"`
|
||
}
|
||
|
||
// GoRateLimit description: Rate limit applied when making background API requests to the configured Go module proxies.
|
||
type GoRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// HTTPHeaderAuthProvider description: Configures the HTTP header authentication provider (which authenticates users by consulting an HTTP request header set by an authentication proxy such as https://github.com/bitly/oauth2_proxy).
|
||
type HTTPHeaderAuthProvider struct {
|
||
// EmailHeader description: The name (case-insensitive) of an HTTP header whose value is taken to be the email of the client requesting the page. Set this value when using an HTTP proxy that authenticates requests, and you don't want the extra configurability of the other authentication methods.
|
||
EmailHeader string `json:"emailHeader,omitempty"`
|
||
// StripUsernameHeaderPrefix description: The prefix that precedes the username portion of the HTTP header specified in `usernameHeader`. If specified, the prefix will be stripped from the header value and the remainder will be used as the username. For example, if using Google Identity-Aware Proxy (IAP) with Google Sign-In, set this value to `accounts.google.com:`.
|
||
StripUsernameHeaderPrefix string `json:"stripUsernameHeaderPrefix,omitempty"`
|
||
Type string `json:"type"`
|
||
// UsernameHeader description: The name (case-insensitive) of an HTTP header whose value is taken to be the username of the client requesting the page. Set this value when using an HTTP proxy that authenticates requests, and you don't want the extra configurability of the other authentication methods.
|
||
UsernameHeader string `json:"usernameHeader"`
|
||
}
|
||
type Header struct {
|
||
Key string `json:"key"`
|
||
Sensitive bool `json:"sensitive,omitempty"`
|
||
Value string `json:"value"`
|
||
}
|
||
|
||
// IdentityProvider description: The source of identity to use when computing permissions. This defines how to compute the GitLab identity to use for a given Sourcegraph user.
|
||
type IdentityProvider struct {
|
||
Oauth *OAuthIdentity
|
||
Username *UsernameIdentity
|
||
External *ExternalIdentity
|
||
}
|
||
|
||
func (v IdentityProvider) MarshalJSON() ([]byte, error) {
|
||
if v.Oauth != nil {
|
||
return json.Marshal(v.Oauth)
|
||
}
|
||
if v.Username != nil {
|
||
return json.Marshal(v.Username)
|
||
}
|
||
if v.External != nil {
|
||
return json.Marshal(v.External)
|
||
}
|
||
return nil, errors.New("tagged union type must have exactly 1 non-nil field value")
|
||
}
|
||
func (v *IdentityProvider) UnmarshalJSON(data []byte) error {
|
||
var d struct {
|
||
DiscriminantProperty string `json:"type"`
|
||
}
|
||
if err := json.Unmarshal(data, &d); err != nil {
|
||
return err
|
||
}
|
||
switch d.DiscriminantProperty {
|
||
case "external":
|
||
return json.Unmarshal(data, &v.External)
|
||
case "oauth":
|
||
return json.Unmarshal(data, &v.Oauth)
|
||
case "username":
|
||
return json.Unmarshal(data, &v.Username)
|
||
}
|
||
return fmt.Errorf("tagged union type must have a %q property whose value is one of %s", "type", []string{"oauth", "username", "external"})
|
||
}
|
||
|
||
type ImportChangesets struct {
|
||
// ExternalIDs description: The changesets to import from the code host. For GitHub this is the PR number, for GitLab this is the MR number, for Bitbucket Server this is the PR number.
|
||
ExternalIDs []any `json:"externalIDs"`
|
||
// Repository description: The repository name as configured on your Sourcegraph instance.
|
||
Repository string `json:"repository"`
|
||
}
|
||
type Insight struct {
|
||
// Description description: The description of this insight
|
||
Description string `json:"description"`
|
||
// Id description: A globally unique identifier for this insight.
|
||
Id string `json:"id"`
|
||
// Series description: Series of data to show for this insight
|
||
Series []*InsightSeries `json:"series"`
|
||
// Title description: The short title of this insight
|
||
Title string `json:"title"`
|
||
}
|
||
type InsightDashboard struct {
|
||
Id string `json:"id"`
|
||
// InsightIds description: Insights ids that will be included in the dashboard.
|
||
InsightIds []string `json:"insightIds,omitempty"`
|
||
// Title description: Title of the dashboard.
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
// InsightFilters description: Performs a filter
|
||
type InsightFilters struct {
|
||
ExcludeRepoRegexp string `json:"excludeRepoRegexp"`
|
||
IncludeRepoRegexp string `json:"includeRepoRegexp"`
|
||
Repositories []string `json:"repositories,omitempty"`
|
||
}
|
||
type InsightSeries struct {
|
||
// Label description: The label to use for the series in the graph.
|
||
Label string `json:"label"`
|
||
// RepositoriesList description: Performs a search query and shows the number of results returned.
|
||
RepositoriesList []any `json:"repositoriesList,omitempty"`
|
||
// Search description: Performs a search query and shows the number of results returned.
|
||
Search string `json:"search,omitempty"`
|
||
// Webhook description: (not yet supported) Fetch data from a webhook URL.
|
||
Webhook string `json:"webhook,omitempty"`
|
||
}
|
||
|
||
// JVMPackagesConnection description: Configuration for a connection to a JVM packages repository.
|
||
type JVMPackagesConnection struct {
|
||
// Maven description: Configuration for resolving from Maven repositories.
|
||
Maven Maven `json:"maven"`
|
||
}
|
||
|
||
// Log description: Configuration for logging and alerting, including to external services.
|
||
type Log struct {
|
||
// AuditLog description: EXPERIMENTAL: Configuration for audit logging (specially formatted log entries for tracking sensitive events)
|
||
AuditLog *AuditLog `json:"auditLog,omitempty"`
|
||
// Sentry description: Configuration for Sentry
|
||
Sentry *Sentry `json:"sentry,omitempty"`
|
||
}
|
||
|
||
// Maven description: Configuration for resolving from Maven repositories.
|
||
type Maven struct {
|
||
// Credentials description: Contents of a coursier.credentials file needed for accessing the Maven repositories. See the 'Inline' section at https://get-coursier.io/docs/other-credentials#inline for more details.
|
||
Credentials string `json:"credentials,omitempty"`
|
||
// Dependencies description: An array of artifact "groupID:artifactID:version" strings specifying which Maven artifacts to mirror on Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the Maven repository.
|
||
RateLimit *MavenRateLimit `json:"rateLimit,omitempty"`
|
||
// Repositories description: The url at which the maven repository can be found.
|
||
Repositories []string `json:"repositories,omitempty"`
|
||
}
|
||
|
||
// MavenRateLimit description: Rate limit applied when making background API requests to the Maven repository.
|
||
type MavenRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type Mount struct {
|
||
// Mountpoint description: The path in the container to mount the path on the local machine to.
|
||
Mountpoint string `json:"mountpoint"`
|
||
// Path description: The path on the local machine to mount. The path must be in the same directory or a subdirectory of the batch spec.
|
||
Path string `json:"path"`
|
||
}
|
||
|
||
// MountedEncryptionKey description: This encryption key is mounted from a given file path or an environment variable.
|
||
type MountedEncryptionKey struct {
|
||
EnvVarName string `json:"envVarName,omitempty"`
|
||
Filepath string `json:"filepath,omitempty"`
|
||
Keyname string `json:"keyname"`
|
||
Type string `json:"type"`
|
||
Version string `json:"version,omitempty"`
|
||
}
|
||
|
||
// NoOpEncryptionKey description: This encryption key is a no op, leaving your data in plaintext (not recommended).
|
||
type NoOpEncryptionKey struct {
|
||
Type string `json:"type"`
|
||
}
|
||
type Notice struct {
|
||
// Dismissible description: Whether this notice can be dismissed (closed) by the user.
|
||
Dismissible bool `json:"dismissible,omitempty"`
|
||
// Location description: The location where this notice is shown: "top" for the top of every page, "home" for the homepage.
|
||
Location string `json:"location"`
|
||
// Message description: The message to display. Markdown formatting is supported.
|
||
Message string `json:"message"`
|
||
}
|
||
type Notifications struct {
|
||
// Key description: e.g. '2023-03-10-my-key'; MUST START WITH YYYY-MM-DD; a globally unique key used to track whether the message has been dismissed.
|
||
Key string `json:"key"`
|
||
// Message description: The Markdown message to display
|
||
Message string `json:"message"`
|
||
}
|
||
type Notifier struct {
|
||
Slack *NotifierSlack
|
||
Pagerduty *NotifierPagerduty
|
||
Webhook *NotifierWebhook
|
||
Email *NotifierEmail
|
||
Opsgenie *NotifierOpsGenie
|
||
}
|
||
|
||
func (v Notifier) MarshalJSON() ([]byte, error) {
|
||
if v.Slack != nil {
|
||
return json.Marshal(v.Slack)
|
||
}
|
||
if v.Pagerduty != nil {
|
||
return json.Marshal(v.Pagerduty)
|
||
}
|
||
if v.Webhook != nil {
|
||
return json.Marshal(v.Webhook)
|
||
}
|
||
if v.Email != nil {
|
||
return json.Marshal(v.Email)
|
||
}
|
||
if v.Opsgenie != nil {
|
||
return json.Marshal(v.Opsgenie)
|
||
}
|
||
return nil, errors.New("tagged union type must have exactly 1 non-nil field value")
|
||
}
|
||
func (v *Notifier) UnmarshalJSON(data []byte) error {
|
||
var d struct {
|
||
DiscriminantProperty string `json:"type"`
|
||
}
|
||
if err := json.Unmarshal(data, &d); err != nil {
|
||
return err
|
||
}
|
||
switch d.DiscriminantProperty {
|
||
case "email":
|
||
return json.Unmarshal(data, &v.Email)
|
||
case "opsgenie":
|
||
return json.Unmarshal(data, &v.Opsgenie)
|
||
case "pagerduty":
|
||
return json.Unmarshal(data, &v.Pagerduty)
|
||
case "slack":
|
||
return json.Unmarshal(data, &v.Slack)
|
||
case "webhook":
|
||
return json.Unmarshal(data, &v.Webhook)
|
||
}
|
||
return fmt.Errorf("tagged union type must have a %q property whose value is one of %s", "type", []string{"slack", "pagerduty", "webhook", "email", "opsgenie"})
|
||
}
|
||
|
||
// NotifierEmail description: Email notifier
|
||
type NotifierEmail struct {
|
||
// Address description: Address to send email to
|
||
Address string `json:"address"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// NotifierOpsGenie description: OpsGenie notifier
|
||
type NotifierOpsGenie struct {
|
||
ApiKey string `json:"apiKey,omitempty"`
|
||
ApiUrl string `json:"apiUrl,omitempty"`
|
||
// Priority description: Defines the importance of an alert. Allowed values are P1, P2, P3, P4, P5 - or a Go template that resolves to one of those values. By default, Sourcegraph will fill this in for you if a value isn't specified here.
|
||
Priority string `json:"priority,omitempty"`
|
||
// Responders description: List of responders responsible for notifications.
|
||
Responders []*Responders `json:"responders,omitempty"`
|
||
// Tags description: Comma separated list of tags attached to the notifications - or a Go template that produces such a list. Sourcegraph provides some default ones if this value isn't specified.
|
||
Tags string `json:"tags,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// NotifierPagerduty description: PagerDuty notifier
|
||
type NotifierPagerduty struct {
|
||
ApiUrl string `json:"apiUrl,omitempty"`
|
||
// IntegrationKey description: Integration key for the PagerDuty Events API v2 - see https://developer.pagerduty.com/docs/events-api-v2/overview
|
||
IntegrationKey string `json:"integrationKey"`
|
||
// Severity description: Severity level for PagerDuty alert
|
||
Severity string `json:"severity,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// NotifierSlack description: Slack notifier
|
||
type NotifierSlack struct {
|
||
// Icon_emoji description: Provide an emoji to use as the icon for the bot’s message. Ex :smile:
|
||
Icon_emoji string `json:"icon_emoji,omitempty"`
|
||
// Icon_url description: Provide a URL to an image to use as the icon for the bot’s message.
|
||
Icon_url string `json:"icon_url,omitempty"`
|
||
// Recipient description: Allows you to override the Slack recipient. You must either provide a channel Slack ID, a user Slack ID, a username reference (@<user>, all lowercase, no whitespace), or a channel reference (#<channel>, all lowercase, no whitespace).
|
||
Recipient string `json:"recipient,omitempty"`
|
||
Type string `json:"type"`
|
||
// Url description: Slack incoming webhook URL.
|
||
Url string `json:"url,omitempty"`
|
||
// Username description: Set the username for the bot’s message.
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
|
||
// NotifierWebhook description: Webhook notifier
|
||
type NotifierWebhook struct {
|
||
BearerToken string `json:"bearerToken,omitempty"`
|
||
Password string `json:"password,omitempty"`
|
||
Type string `json:"type"`
|
||
Url string `json:"url"`
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
|
||
// NpmPackagesConnection description: Configuration for a connection to an npm packages repository.
|
||
type NpmPackagesConnection struct {
|
||
// Credentials description: Access token for logging into the npm registry.
|
||
Credentials string `json:"credentials,omitempty"`
|
||
// Dependencies description: An array of "(@scope/)?packageName@version" strings specifying which npm packages to mirror on Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the npm registry.
|
||
RateLimit *NpmRateLimit `json:"rateLimit,omitempty"`
|
||
// Registry description: The URL at which the npm registry can be found.
|
||
Registry string `json:"registry"`
|
||
}
|
||
|
||
// NpmRateLimit description: Rate limit applied when making background API requests to the npm registry.
|
||
type NpmRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type OAuthIdentity struct {
|
||
Type string `json:"type"`
|
||
}
|
||
type ObservabilityAlerts struct {
|
||
// DisableSendResolved description: Disable notifications when alerts resolve themselves.
|
||
DisableSendResolved bool `json:"disableSendResolved,omitempty"`
|
||
// Level description: Sourcegraph alert level to subscribe to notifications for.
|
||
Level string `json:"level"`
|
||
Notifier Notifier `json:"notifier"`
|
||
// Owners description: Do not use. When set, only receive alerts owned by the specified teams. Used by Sourcegraph internally.
|
||
Owners []string `json:"owners,omitempty"`
|
||
}
|
||
|
||
// ObservabilityClient description: EXPERIMENTAL: Configuration for client observability
|
||
type ObservabilityClient struct {
|
||
// OpenTelemetry description: Configuration for the client OpenTelemetry exporter
|
||
OpenTelemetry *OpenTelemetry `json:"openTelemetry,omitempty"`
|
||
}
|
||
|
||
// ObservabilityTracing description: Configures distributed tracing within Sourcegraph. To learn more, refer to https://docs.sourcegraph.com/admin/observability/tracing
|
||
type ObservabilityTracing struct {
|
||
// Debug description: Turns on debug logging of tracing client requests. This can be useful for debugging connectivity issues between the tracing client and tracing backend, the performance overhead of tracing, and other issues related to the use of distributed tracing. May have performance implications in production.
|
||
Debug bool `json:"debug,omitempty"`
|
||
// Sampling description: Determines the conditions under which distributed traces are recorded. "none" turns off tracing entirely. "selective" (default) sends traces whenever `?trace=1` is present in the URL (though background jobs may still emit traces). "all" sends traces on every request. Note that this only affects the behavior of the distributed tracing client. To learn more about additional sampling and traace export configuration with the default tracing type "opentelemetry", refer to https://docs.sourcegraph.com/admin/observability/opentelemetry#tracing
|
||
Sampling string `json:"sampling,omitempty"`
|
||
// Type description: Determines what tracing provider to enable. For "opentelemetry", the required backend is an OpenTelemetry collector instance (deployed by default with Sourcegraph). For "jaeger", a Jaeger instance is required to be configured via Jaeger client environment variables: https://github.com/jaegertracing/jaeger-client-go#environment-variables
|
||
Type string `json:"type,omitempty"`
|
||
// UrlTemplate description: Template for linking to trace URLs - '{{ .TraceID }}' is replaced with the trace ID, and {{ .ExternalURL }} is replaced with the value of 'externalURL'. If none is set, no links are generated.
|
||
UrlTemplate string `json:"urlTemplate,omitempty"`
|
||
}
|
||
|
||
// OnQuery description: A Sourcegraph search query that matches a set of repositories (and branches). Each matched repository branch is added to the list of repositories that the batch change will be run on.
|
||
type OnQuery struct {
|
||
// RepositoriesMatchingQuery description: A Sourcegraph search query that matches a set of repositories (and branches). If the query matches files, symbols, or some other object inside a repository, the object's repository is included.
|
||
RepositoriesMatchingQuery string `json:"repositoriesMatchingQuery"`
|
||
}
|
||
|
||
// OnRepository description: A specific repository (and branch) that is added to the list of repositories that the batch change will be run on.
|
||
type OnRepository struct {
|
||
// Branch description: The repository branch to propose changes to. If unset, the repository's default branch is used. If this field is defined, branches cannot be.
|
||
Branch string `json:"branch,omitempty"`
|
||
// Branches description: The repository branches to propose changes to. If unset, the repository's default branch is used. If this field is defined, branch cannot be.
|
||
Branches []string `json:"branches,omitempty"`
|
||
// Repository description: The name of the repository (as it is known to Sourcegraph).
|
||
Repository string `json:"repository"`
|
||
}
|
||
|
||
// OpenIDConnectAuthProvider description: Configures the OpenID Connect authentication provider for SSO.
|
||
type OpenIDConnectAuthProvider struct {
|
||
// AllowSignup description: Allows new visitors to sign up for accounts via OpenID Connect authentication. If false, users signing in via OpenID Connect must have an existing Sourcegraph account, which will be linked to their OpenID Connect identity after sign-in.
|
||
AllowSignup *bool `json:"allowSignup,omitempty"`
|
||
// ClientID description: The client ID for the OpenID Connect client for this site.
|
||
//
|
||
// For Google Apps: obtain this value from the API console (https://console.developers.google.com), as described at https://developers.google.com/identity/protocols/OpenIDConnect#getcredentials
|
||
ClientID string `json:"clientID"`
|
||
// ClientSecret description: The client secret for the OpenID Connect client for this site.
|
||
//
|
||
// For Google Apps: obtain this value from the API console (https://console.developers.google.com), as described at https://developers.google.com/identity/protocols/OpenIDConnect#getcredentials
|
||
ClientSecret string `json:"clientSecret"`
|
||
// ConfigID description: An identifier that can be used to reference this authentication provider in other parts of the config. For example, in configuration for a code host, you may want to designate this authentication provider as the identity provider for the code host.
|
||
ConfigID string `json:"configID,omitempty"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
// Issuer description: The URL of the OpenID Connect issuer.
|
||
//
|
||
// For Google Apps: https://accounts.google.com
|
||
Issuer string `json:"issuer"`
|
||
// RequireEmailDomain description: Only allow users to authenticate if their email domain is equal to this value (example: mycompany.com). Do not include a leading "@". If not set, all users on this OpenID Connect provider can authenticate to Sourcegraph.
|
||
RequireEmailDomain string `json:"requireEmailDomain,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// OpenTelemetry description: Configuration for the client OpenTelemetry exporter
|
||
type OpenTelemetry struct {
|
||
// Endpoint description: OpenTelemetry tracing collector endpoint. By default, Sourcegraph's "/-/debug/otlp" endpoint forwards data to the configured collector backend.
|
||
Endpoint string `json:"endpoint,omitempty"`
|
||
}
|
||
|
||
// OrganizationInvitations description: Configuration for organization invitations.
|
||
type OrganizationInvitations struct {
|
||
// ExpiryTime description: Time before the invitation expires, in hours (experimental, not enforced at the moment).
|
||
ExpiryTime int `json:"expiryTime,omitempty"`
|
||
// SigningKey description: Base64 encoded HMAC Signing key to sign a JWT token, which is attached to each invitation URL.
|
||
// More documentation here: https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodHMAC
|
||
//
|
||
// If not provided, will fall back to legacy invitation to an organization.
|
||
//
|
||
// The legacy invitation will be deprecated in the future and creating an organization invitation will fail with an error if this setting is not present.
|
||
SigningKey string `json:"signingKey"`
|
||
}
|
||
|
||
// OtherExternalServiceConnection description: Configuration for a Connection to Git repositories for which an external service integration isn't yet available.
|
||
type OtherExternalServiceConnection struct {
|
||
// Exclude description: A list of repositories to never mirror by name after applying repositoryPathPattern. Supports excluding by exact name ({"name": "myrepo"}) or regular expression ({"pattern": ".*secret.*"}).
|
||
Exclude []*ExcludedOtherRepo `json:"exclude,omitempty"`
|
||
Repos []string `json:"repos"`
|
||
// RepositoryPathPattern description: The pattern used to generate the corresponding Sourcegraph repository name for the repositories. In the pattern, the variable "{base}" is replaced with the Git clone base URL host and path, and "{repo}" is replaced with the repository path taken from the `repos` field.
|
||
//
|
||
// For example, if your Git clone base URL is https://git.example.com/repos and `repos` contains the value "my/repo", then a repositoryPathPattern of "{base}/{repo}" would mean that a repository at https://git.example.com/repos/my/repo is available on Sourcegraph at https://sourcegraph.example.com/git.example.com/repos/my/repo.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
//
|
||
// Note: These patterns are ignored if using src-expose / src-serve / src-serve-local.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
// Root description: The root directory to walk for discovering local git repositories to mirror. To sync with local repositories and use this root property one must run Sourcegraph App and define the repos configuration property such as ["src-serve-local"].
|
||
Root string `json:"root,omitempty"`
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
type OutputVariable struct {
|
||
// Format description: The expected format of the output. If set, the output is being parsed in that format before being stored in the var. If not set, 'text' is assumed to the format.
|
||
Format string `json:"format,omitempty"`
|
||
// Value description: The value of the output, which can be a template string.
|
||
Value string `json:"value"`
|
||
}
|
||
type Overrides struct {
|
||
// Key description: The key that we want to override for example a username
|
||
Key string `json:"key,omitempty"`
|
||
// Limit description: The limit per hour, 'unlimited' or 'blocked'
|
||
Limit any `json:"limit,omitempty"`
|
||
}
|
||
|
||
// PagureConnection description: Configuration for a connection to Pagure.
|
||
type PagureConnection struct {
|
||
// Forks description: If true, it includes forks in the returned projects.
|
||
Forks bool `json:"forks,omitempty"`
|
||
// Namespace description: Filters projects by namespace.
|
||
Namespace string `json:"namespace,omitempty"`
|
||
// Pattern description: Filters projects by pattern string.
|
||
Pattern string `json:"pattern,omitempty"`
|
||
// RateLimit description: Rate limit applied when making API requests to Pagure.
|
||
RateLimit *PagureRateLimit `json:"rateLimit,omitempty"`
|
||
// Tags description: Filters the projects returned by their tags.
|
||
Tags []string `json:"tags,omitempty"`
|
||
// Token description: API token for the Pagure instance.
|
||
Token string `json:"token,omitempty"`
|
||
// Url description: URL of a Pagure instance, such as https://pagure.example.com
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// PagureRateLimit description: Rate limit applied when making API requests to Pagure.
|
||
type PagureRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 500, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 500 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// ParentSourcegraph description: URL to fetch unreachable repository details from. Defaults to "https://sourcegraph.com"
|
||
type ParentSourcegraph struct {
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// PasswordPolicy description: DEPRECATED: this is now a standard feature see: auth.passwordPolicy
|
||
type PasswordPolicy struct {
|
||
// Enabled description: Enables password policy
|
||
Enabled bool `json:"enabled,omitempty"`
|
||
// MinimumLength description: DEPRECATED: replaced by auth.minPasswordLength
|
||
MinimumLength int `json:"minimumLength,omitempty"`
|
||
// NumberOfSpecialCharacters description: The required number of special characters
|
||
NumberOfSpecialCharacters int `json:"numberOfSpecialCharacters,omitempty"`
|
||
// RequireAtLeastOneNumber description: Does the password require a number
|
||
RequireAtLeastOneNumber bool `json:"requireAtLeastOneNumber,omitempty"`
|
||
// RequireUpperandLowerCase description: Require Mixed characters
|
||
RequireUpperandLowerCase bool `json:"requireUpperandLowerCase,omitempty"`
|
||
}
|
||
|
||
// PerforceAuthorization description: If non-null, enforces Perforce depot permissions.
|
||
type PerforceAuthorization struct {
|
||
// SubRepoPermissions description: Experimental: infer sub-repository permissions from protection rules.
|
||
SubRepoPermissions bool `json:"subRepoPermissions,omitempty"`
|
||
}
|
||
|
||
// PerforceConnection description: Configuration for a connection to Perforce Server.
|
||
type PerforceConnection struct {
|
||
// Authorization description: If non-null, enforces Perforce depot permissions.
|
||
Authorization *PerforceAuthorization `json:"authorization,omitempty"`
|
||
// Depots description: Depots can have arbitrary paths, e.g. a path to depot root or a subdirectory.
|
||
Depots []string `json:"depots,omitempty"`
|
||
// FusionClient description: Configuration for the experimental p4-fusion client
|
||
FusionClient *FusionClient `json:"fusionClient,omitempty"`
|
||
// MaxChanges description: Only import at most n changes when possible (git p4 clone --max-changes).
|
||
MaxChanges float64 `json:"maxChanges,omitempty"`
|
||
// P4Client description: Client specified as an option for p4 CLI (P4CLIENT, also enables '--use-client-spec')
|
||
P4Client string `json:"p4.client,omitempty"`
|
||
// P4Passwd description: The ticket value for the user (P4PASSWD). You can get this by running `p4 login -p` or `p4 login -pa`. It should look like `6211C5E719EDE6925855039E8F5CC3D2`.
|
||
P4Passwd string `json:"p4.passwd"`
|
||
// P4Port description: The Perforce Server address to be used for p4 CLI (P4PORT).
|
||
P4Port string `json:"p4.port"`
|
||
// P4User description: The user to be authenticated for p4 CLI (P4USER).
|
||
P4User string `json:"p4.user"`
|
||
// RateLimit description: Rate limit applied when making background API requests to Perforce.
|
||
RateLimit *PerforceRateLimit `json:"rateLimit,omitempty"`
|
||
// RepositoryPathPattern description: The pattern used to generate the corresponding Sourcegraph repository name for a Perforce depot. In the pattern, the variable "{depot}" is replaced with the Perforce depot's path.
|
||
//
|
||
// For example, if your Perforce depot path is "//Sourcegraph/" and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of "perforce/{depot}" would mean that the Perforce depot is available on Sourcegraph at https://src.example.com/perforce/Sourcegraph.
|
||
//
|
||
// It is important that the Sourcegraph repository name generated with this pattern be unique to this Perforce Server. If different Perforce Servers generate repository names that collide, Sourcegraph's behavior is undefined.
|
||
RepositoryPathPattern string `json:"repositoryPathPattern,omitempty"`
|
||
}
|
||
|
||
// PerforceRateLimit description: Rate limit applied when making background API requests to Perforce.
|
||
type PerforceRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// PermissionsUserMapping description: Settings for Sourcegraph permissions, which allow the site admin to explicitly manage repository permissions via the GraphQL API. This setting cannot be enabled if repository permissions for any specific external service are enabled (i.e., when the external service's `authorization` field is set).
|
||
type PermissionsUserMapping struct {
|
||
// BindID description: The type of identifier to identify a user. The default is "email", which uses the email address to identify a user. Use "username" to identify a user by their username. Changing this setting will erase any permissions created for users that do not yet exist.
|
||
BindID string `json:"bindID,omitempty"`
|
||
// Enabled description: Whether permissions user mapping is enabled. There must be no `authorization` field in any external service configuration before enabling this.
|
||
Enabled bool `json:"enabled,omitempty"`
|
||
}
|
||
|
||
// Phabricator description: This is DEPRECATED
|
||
type Phabricator struct {
|
||
// CallsignCommand description: Bash command that prints out the Phabricator callsign for a Gitolite repository. This will be run with environment variable $REPO set to the name of the repository and used to obtain the Phabricator metadata for a Gitolite repository. (Note: this requires `bash` to be installed.)
|
||
CallsignCommand string `json:"callsignCommand"`
|
||
// Url description: URL of the Phabricator instance that integrates with this Gitolite instance. This should be set
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
// PhabricatorConnection description: Configuration for a connection to Phabricator.
|
||
type PhabricatorConnection struct {
|
||
// Repos description: The list of repositories available on Phabricator.
|
||
Repos []*Repos `json:"repos,omitempty"`
|
||
// Token description: API token for the Phabricator instance.
|
||
Token string `json:"token,omitempty"`
|
||
// Url description: URL of a Phabricator instance, such as https://phabricator.example.com
|
||
Url string `json:"url,omitempty"`
|
||
}
|
||
|
||
// PythonPackagesConnection description: Configuration for a connection to Python simple repository APIs compatible with PEP 503
|
||
type PythonPackagesConnection struct {
|
||
// Dependencies description: An array of strings specifying Python packages to mirror in Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the configured Python simple repository APIs.
|
||
RateLimit *PythonRateLimit `json:"rateLimit,omitempty"`
|
||
// Urls description: The list of Python simple repository URLs to fetch packages from. 404 Not found or 410 Gone responses will result in the next URL to be attempted.
|
||
Urls []string `json:"urls"`
|
||
}
|
||
|
||
// PythonRateLimit description: Rate limit applied when making background API requests to the configured Python simple repository APIs.
|
||
type PythonRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
type QuickLink struct {
|
||
// Description description: A description for this quick link
|
||
Description string `json:"description,omitempty"`
|
||
// Name description: The human-readable name for this quick link
|
||
Name string `json:"name"`
|
||
// Url description: The URL of this quick link (absolute or relative)
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
// Ranking description: Experimental search result ranking options.
|
||
type Ranking struct {
|
||
// DocumentRanksWeight description: Controls the impact of document ranks on the final ranking when the 'search-ranking' feature is enabled. This is intended for internal testing purposes only, it's not recommended for users to change this.
|
||
DocumentRanksWeight *float64 `json:"documentRanksWeight,omitempty"`
|
||
// FlushWallTimeMS description: Controls the amount of time that Zoekt shards collect and rank results when the 'search-ranking' feature is enabled. Larger values give a more stable ranking, but searches can take longer to return an initial result.
|
||
FlushWallTimeMS int `json:"flushWallTimeMS,omitempty"`
|
||
// MaxQueueMatchCount description: The maximum number of matches that can be buffered to sort results. The default is -1 (unbounded). Setting this to a positive integer protects frontend against OOMs for queries with extremely high count of matches per repository.
|
||
MaxQueueMatchCount *int `json:"maxQueueMatchCount,omitempty"`
|
||
// MaxQueueSizeBytes description: The maximum number of bytes that can be buffered to sort results. The default is -1 (unbounded). Setting this to a positive integer protects frontend against OOMs.
|
||
MaxQueueSizeBytes *int `json:"maxQueueSizeBytes,omitempty"`
|
||
// MaxReorderDurationMS description: The maximum time in milliseconds we wait until we flush the results queue. The default is 0 (unbounded). The larger the value the more stable the ranking and the higher the MEM pressure on frontend.
|
||
MaxReorderDurationMS int `json:"maxReorderDurationMS,omitempty"`
|
||
// MaxReorderQueueSize description: The maximum number of search results that can be buffered to sort results. -1 is unbounded. The default is 24. Set this to small integers to limit latency increases from slow backends.
|
||
MaxReorderQueueSize *int `json:"maxReorderQueueSize,omitempty"`
|
||
// RepoScores description: a map of URI directories to numeric scores for specifying search result importance, like {"github.com": 500, "github.com/sourcegraph": 300, "github.com/sourcegraph/sourcegraph": 100}. Would rank "github.com/sourcegraph/sourcegraph" as 500+300+100=900, and "github.com/other/foo" as 500.
|
||
RepoScores map[string]float64 `json:"repoScores,omitempty"`
|
||
}
|
||
|
||
// RepoPurgeWorker description: Configuration for repository purge worker.
|
||
type RepoPurgeWorker struct {
|
||
// DeletedTTLMinutes description: Repository TTL in minutes after deletion before it becomes eligible to be purged. A migration or admin could accidentally remove all or a significant number of repositories - recloning all of them is slow, so a TTL acts as a grace period so that admins can recover from accidental deletions
|
||
DeletedTTLMinutes int `json:"deletedTTLMinutes,omitempty"`
|
||
// IntervalMinutes description: Interval in minutes at which to run purge jobs. Set to 0 to disable.
|
||
IntervalMinutes int `json:"intervalMinutes,omitempty"`
|
||
}
|
||
type Repos struct {
|
||
// Callsign description: The unique Phabricator identifier for the repository, like 'MUX'.
|
||
Callsign string `json:"callsign"`
|
||
// Path description: Display path for the url e.g. gitolite/my/repo
|
||
Path string `json:"path"`
|
||
}
|
||
|
||
// Repository description: The repository to get the latest version of.
|
||
type Repository struct {
|
||
// Name description: The repository name.
|
||
Name string `json:"name,omitempty"`
|
||
// Owner description: The repository namespace.
|
||
Owner string `json:"owner,omitempty"`
|
||
}
|
||
type Responders struct {
|
||
Id string `json:"id,omitempty"`
|
||
Name string `json:"name,omitempty"`
|
||
Type string `json:"type,omitempty"`
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
|
||
// RubyPackagesConnection description: Configuration for a connection to Ruby packages
|
||
type RubyPackagesConnection struct {
|
||
// Dependencies description: An array of strings specifying Ruby packages to mirror in Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the configured Ruby repository APIs.
|
||
RateLimit *RubyRateLimit `json:"rateLimit,omitempty"`
|
||
// Repository description: The URL at which the maven repository can be found.
|
||
Repository string `json:"repository,omitempty"`
|
||
}
|
||
|
||
// RubyRateLimit description: Rate limit applied when making background API requests to the configured Ruby repository APIs.
|
||
type RubyRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// RustPackagesConnection description: Configuration for a connection to Rust packages
|
||
type RustPackagesConnection struct {
|
||
// Dependencies description: An array of strings specifying Rust packages to mirror in Sourcegraph.
|
||
Dependencies []string `json:"dependencies,omitempty"`
|
||
// IndexRepositoryName description: Name of the git repository containing the crates.io index. Only set if you intend to sync every crate from the index. Updating this setting does not trigger a sync immediately, you must wait until the next scheduled sync for the value to get picked up.
|
||
IndexRepositoryName string `json:"indexRepositoryName,omitempty"`
|
||
// IndexRepositorySyncInterval description: How frequently to sync with the index repository. String formatted as a Go time.Duration. The Sourcegraph server needs to be restarted to pick up a new value of this configuration option.
|
||
IndexRepositorySyncInterval string `json:"indexRepositorySyncInterval,omitempty"`
|
||
// RateLimit description: Rate limit applied when making background API requests to the configured Rust repository APIs.
|
||
RateLimit *RustRateLimit `json:"rateLimit,omitempty"`
|
||
}
|
||
|
||
// RustRateLimit description: Rate limit applied when making background API requests to the configured Rust repository APIs.
|
||
type RustRateLimit struct {
|
||
// Enabled description: true if rate limiting is enabled.
|
||
Enabled bool `json:"enabled"`
|
||
// RequestsPerHour description: Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.
|
||
RequestsPerHour float64 `json:"requestsPerHour"`
|
||
}
|
||
|
||
// SAMLAuthProvider description: Configures the SAML authentication provider for SSO.
|
||
//
|
||
// Note: if you are using IdP-initiated login, you must have *at most one* SAMLAuthProvider in the `auth.providers` array.
|
||
type SAMLAuthProvider struct {
|
||
// AllowGroups description: Restrict login to members of these groups
|
||
AllowGroups []string `json:"allowGroups,omitempty"`
|
||
// AllowSignup description: Allows new visitors to sign up for accounts via SAML authentication. If false, users signing in via SAML must have an existing Sourcegraph account, which will be linked to their SAML identity after sign-in.
|
||
AllowSignup *bool `json:"allowSignup,omitempty"`
|
||
// ConfigID description: An identifier that can be used to reference this authentication provider in other parts of the config. For example, in configuration for a code host, you may want to designate this authentication provider as the identity provider for the code host.
|
||
ConfigID string `json:"configID,omitempty"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
// GroupsAttributeName description: Name of the SAML assertion attribute that holds group membership for allowGroups setting
|
||
GroupsAttributeName string `json:"groupsAttributeName,omitempty"`
|
||
// IdentityProviderMetadata description: The SAML Identity Provider metadata XML contents (for static configuration of the SAML Service Provider). The value of this field should be an XML document whose root element is `<EntityDescriptor>` or `<EntityDescriptors>`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
IdentityProviderMetadata string `json:"identityProviderMetadata,omitempty"`
|
||
// IdentityProviderMetadataURL description: The SAML Identity Provider metadata URL (for dynamic configuration of the SAML Service Provider).
|
||
IdentityProviderMetadataURL string `json:"identityProviderMetadataURL,omitempty"`
|
||
// InsecureSkipAssertionSignatureValidation description: Whether the Service Provider should (insecurely) accept assertions from the Identity Provider without a valid signature.
|
||
InsecureSkipAssertionSignatureValidation bool `json:"insecureSkipAssertionSignatureValidation,omitempty"`
|
||
// NameIDFormat description: The SAML NameID format to use when performing user authentication.
|
||
NameIDFormat string `json:"nameIDFormat,omitempty"`
|
||
// ServiceProviderCertificate description: The SAML Service Provider certificate in X.509 encoding (begins with "-----BEGIN CERTIFICATE-----"). This certificate is used by the Identity Provider to validate the Service Provider's AuthnRequests and LogoutRequests. It corresponds to the Service Provider's private key (`serviceProviderPrivateKey`). To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
ServiceProviderCertificate string `json:"serviceProviderCertificate,omitempty"`
|
||
// ServiceProviderIssuer description: The SAML Service Provider name, used to identify this Service Provider. This is required if the "externalURL" field is not set (as the SAML metadata endpoint is computed as "<externalURL>.auth/saml/metadata"), or when using multiple SAML authentication providers.
|
||
ServiceProviderIssuer string `json:"serviceProviderIssuer,omitempty"`
|
||
// ServiceProviderPrivateKey description: The SAML Service Provider private key in PKCS#8 encoding (begins with "-----BEGIN PRIVATE KEY-----"). This private key is used to sign AuthnRequests and LogoutRequests. It corresponds to the Service Provider's certificate (`serviceProviderCertificate`). To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
ServiceProviderPrivateKey string `json:"serviceProviderPrivateKey,omitempty"`
|
||
// SignRequests description: Sign AuthnRequests and LogoutRequests sent to the Identity Provider using the Service Provider's private key (`serviceProviderPrivateKey`). It defaults to true if the `serviceProviderPrivateKey` and `serviceProviderCertificate` are set, and false otherwise.
|
||
SignRequests *bool `json:"signRequests,omitempty"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// SMTPServerConfig description: The SMTP server used to send transactional emails.
|
||
// Please see https://docs.sourcegraph.com/admin/config/email
|
||
type SMTPServerConfig struct {
|
||
// AdditionalHeaders description: Additional headers to include on SMTP messages that cannot be configured with other 'email.smtp' fields.
|
||
AdditionalHeaders []*Header `json:"additionalHeaders,omitempty"`
|
||
// Authentication description: The type of authentication to use for the SMTP server.
|
||
Authentication string `json:"authentication"`
|
||
// Domain description: The HELO domain to provide to the SMTP server (if needed).
|
||
Domain string `json:"domain,omitempty"`
|
||
// Host description: The SMTP server host.
|
||
Host string `json:"host"`
|
||
// NoVerifyTLS description: Disable TLS verification
|
||
NoVerifyTLS bool `json:"noVerifyTLS,omitempty"`
|
||
// Password description: The password to use when communicating with the SMTP server.
|
||
Password string `json:"password,omitempty"`
|
||
// Port description: The SMTP server port.
|
||
Port int `json:"port"`
|
||
// Username description: The username to use when communicating with the SMTP server.
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
type SearchIndexRevisionsRule struct {
|
||
// Name description: Regular expression which matches against the name of a repository (e.g. "^github\.com/owner/name$").
|
||
Name string `json:"name,omitempty"`
|
||
// Revisions description: Revisions to index
|
||
Revisions []string `json:"revisions"`
|
||
}
|
||
|
||
// SearchLimits description: Limits that search applies for number of repositories searched and timeouts.
|
||
type SearchLimits struct {
|
||
// CommitDiffMaxRepos description: The maximum number of repositories to search across when doing a "type:diff" or "type:commit". The user is prompted to narrow their query if the limit is exceeded. There is a separate limit (commitDiffWithTimeFilterMaxRepos) when "after:" or "before:" is specified because those queries are faster. Defaults to 50.
|
||
CommitDiffMaxRepos int `json:"commitDiffMaxRepos,omitempty"`
|
||
// CommitDiffWithTimeFilterMaxRepos description: The maximum number of repositories to search across when doing a "type:diff" or "type:commit" with a "after:" or "before:" filter. The user is prompted to narrow their query if the limit is exceeded. There is a separate limit (commitDiffMaxRepos) when "after:" or "before:" is not specified because those queries are slower. Defaults to 10000.
|
||
CommitDiffWithTimeFilterMaxRepos int `json:"commitDiffWithTimeFilterMaxRepos,omitempty"`
|
||
// MaxRepos description: The maximum number of repositories to search across. The user is prompted to narrow their query if exceeded. Any value less than or equal to zero means unlimited.
|
||
MaxRepos int `json:"maxRepos,omitempty"`
|
||
// MaxTimeoutSeconds description: The maximum value for "timeout:" that search will respect. "timeout:" values larger than maxTimeoutSeconds are capped at maxTimeoutSeconds. Note: You need to ensure your load balancer / reverse proxy in front of Sourcegraph won't timeout the request for larger values. Note: Too many large rearch requests may harm Soucregraph for other users. Defaults to 1 minute.
|
||
MaxTimeoutSeconds int `json:"maxTimeoutSeconds,omitempty"`
|
||
}
|
||
|
||
// SearchSanitization description: Allows site admins to specify a list of regular expressions representing matched content that should be omitted from search results. Also allows admins to specify the name of an organization within their Sourcegraph instance whose members are trusted and will not have their search results sanitized. Enable this feature by adding at least one valid regular expression to the value of the `sanitizePatterns` field on this object. Site admins will not have their searches sanitized.
|
||
type SearchSanitization struct {
|
||
// OrgName description: Optionally specify the name of an organization within this Sourcegraph instance containing users whose searches should not be sanitized. Admins: ensure that ALL members of this org are trusted users. If no org exists with the given name then there will be no effect. If no org name is specified then all non-admin users will have their searches sanitized if this feature is enabled.
|
||
OrgName string `json:"orgName,omitempty"`
|
||
// SanitizePatterns description: An array of regular expressions representing matched content that should be omitted from search result events. This does not prevent users from accessing file contents through other means if they have read access. Values added to this array must be valid Go regular expressions. Site admins will not have their search results sanitized.
|
||
SanitizePatterns []string `json:"sanitizePatterns,omitempty"`
|
||
}
|
||
type SearchSavedQueries struct {
|
||
// Description description: Description of this saved query
|
||
Description string `json:"description"`
|
||
// Key description: Unique key for this query in this file
|
||
Key string `json:"key"`
|
||
// Notify description: Notify the owner of this configuration file when new results are available
|
||
Notify bool `json:"notify,omitempty"`
|
||
// NotifySlack description: Notify Slack via the organization's Slack webhook URL when new results are available
|
||
NotifySlack bool `json:"notifySlack,omitempty"`
|
||
// Query description: Query string
|
||
Query string `json:"query"`
|
||
}
|
||
type SearchScope struct {
|
||
// Name description: The human-readable name for this search scope
|
||
Name string `json:"name"`
|
||
// Value description: The query string of this search scope
|
||
Value string `json:"value"`
|
||
}
|
||
|
||
// Sentry description: Configuration for Sentry
|
||
type Sentry struct {
|
||
// BackendDSN description: Sentry Data Source Name (DSN) for backend errors. Per the Sentry docs (https://docs.sentry.io/quickstart/#about-the-dsn), it should match the following pattern: '{PROTOCOL}://{PUBLIC_KEY}@{HOST}/{PATH}{PROJECT_ID}'.
|
||
BackendDSN string `json:"backendDSN,omitempty"`
|
||
// CodeIntelDSN description: Sentry Data Source Name (DSN) for code intel errors. Per the Sentry docs (https://docs.sentry.io/quickstart/#about-the-dsn), it should match the following pattern: '{PROTOCOL}://{PUBLIC_KEY}@{HOST}/{PATH}{PROJECT_ID}'.
|
||
CodeIntelDSN string `json:"codeIntelDSN,omitempty"`
|
||
// Dsn description: Sentry Data Source Name (DSN). Per the Sentry docs (https://docs.sentry.io/quickstart/#about-the-dsn), it should match the following pattern: '{PROTOCOL}://{PUBLIC_KEY}@{HOST}/{PATH}{PROJECT_ID}'.
|
||
Dsn string `json:"dsn,omitempty"`
|
||
}
|
||
|
||
// Settings description: Configuration settings for users and organizations on Sourcegraph.
|
||
type Settings struct {
|
||
// AlertsCodeHostIntegrationMessaging description: What in-app messaging to use around availability of Sourcegraph's code intelligence on code hosts. If the native code host integration is installed, this should be set to "native-integration" and users won't need to install the Sourcegraph browser extension to get code intelligence on code hosts.
|
||
AlertsCodeHostIntegrationMessaging string `json:"alerts.codeHostIntegrationMessaging,omitempty"`
|
||
// AlertsHideObservabilitySiteAlerts description: Disables observability-related site alert banners.
|
||
AlertsHideObservabilitySiteAlerts *bool `json:"alerts.hideObservabilitySiteAlerts,omitempty"`
|
||
// AlertsShowMajorMinorUpdates description: Whether to show alerts for major and minor version updates. Alerts for patch version updates will be shown if `alerts.showPatchUpdates` is true.
|
||
AlertsShowMajorMinorUpdates bool `json:"alerts.showMajorMinorUpdates,omitempty"`
|
||
// AlertsShowPatchUpdates description: Whether to show alerts for patch version updates. Alerts for major and minor version updates will be shown if `alerts.showMajorMinorUpdatess` is true.
|
||
AlertsShowPatchUpdates bool `json:"alerts.showPatchUpdates,omitempty"`
|
||
// BasicCodeIntelGlobalSearchesEnabled description: Whether to run global searches over all repositories. On instances with many repositories, this can lead to issues such as: low quality results, slow response times, or significant load on the Sourcegraph instance. Defaults to true.
|
||
BasicCodeIntelGlobalSearchesEnabled bool `json:"basicCodeIntel.globalSearchesEnabled,omitempty"`
|
||
// BasicCodeIntelIncludeArchives description: Whether to include archived repositories in search results.
|
||
BasicCodeIntelIncludeArchives bool `json:"basicCodeIntel.includeArchives,omitempty"`
|
||
// BasicCodeIntelIncludeForks description: Whether to include forked repositories in search results.
|
||
BasicCodeIntelIncludeForks bool `json:"basicCodeIntel.includeForks,omitempty"`
|
||
// BasicCodeIntelIndexOnly description: Whether to use only indexed requests to the search API.
|
||
BasicCodeIntelIndexOnly bool `json:"basicCodeIntel.indexOnly,omitempty"`
|
||
// BasicCodeIntelUnindexedSearchTimeout description: The timeout (in milliseconds) for un-indexed search requests.
|
||
BasicCodeIntelUnindexedSearchTimeout float64 `json:"basicCodeIntel.unindexedSearchTimeout,omitempty"`
|
||
// CodeIntelDisableRangeQueries description: Whether to fetch multiple precise definitions and references on hover.
|
||
CodeIntelDisableRangeQueries bool `json:"codeIntel.disableRangeQueries,omitempty"`
|
||
// CodeIntelDisableSearchBased description: Never fall back to search-based code intelligence.
|
||
CodeIntelDisableSearchBased bool `json:"codeIntel.disableSearchBased,omitempty"`
|
||
// CodeIntelMixPreciseAndSearchBasedReferences description: Whether to supplement precise references with search-based results.
|
||
CodeIntelMixPreciseAndSearchBasedReferences bool `json:"codeIntel.mixPreciseAndSearchBasedReferences,omitempty"`
|
||
// CodeIntelTraceExtension description: Whether to enable trace logging on the extension.
|
||
CodeIntelTraceExtension bool `json:"codeIntel.traceExtension,omitempty"`
|
||
// CodeIntelligenceAutoIndexPopularRepoLimit description: Up to this number of repos are auto-indexed automatically. Ordered by star count.
|
||
CodeIntelligenceAutoIndexPopularRepoLimit int `json:"codeIntelligence.autoIndexPopularRepoLimit,omitempty"`
|
||
// ExperimentalFeatures description: Experimental features and settings.
|
||
ExperimentalFeatures *SettingsExperimentalFeatures `json:"experimentalFeatures,omitempty"`
|
||
// FileSidebarVisibleByDefault description: Whether the sidebar on the repo view should be open by default.
|
||
FileSidebarVisibleByDefault bool `json:"fileSidebarVisibleByDefault,omitempty"`
|
||
// HistoryDefaultPageSize description: Custom page size for the history tab. If set, the history tab will populate that number of commits the first time the history tab is opened and then double the number of commits progressively.
|
||
HistoryDefaultPageSize int `json:"history.defaultPageSize,omitempty"`
|
||
// HistoryPreferAbsoluteTimestamps description: Show absolute timestamps in the history panel and only show relative timestamps (e.g.: "5 days ago") in tooltip when hovering.
|
||
HistoryPreferAbsoluteTimestamps bool `json:"history.preferAbsoluteTimestamps,omitempty"`
|
||
// InsightsAggregationsExtendedTimeout description: The number of seconds to execute the aggregation for when running in extended timeout mode. This value should always be less than any proxy timeout if one exists. The maximum value is equal to searchLimits.maxTimeoutSeconds
|
||
InsightsAggregationsExtendedTimeout int `json:"insights.aggregations.extendedTimeout,omitempty"`
|
||
InsightsDisplayLocationDirectory *bool `json:"insights.displayLocation.directory,omitempty"`
|
||
InsightsDisplayLocationHomepage *bool `json:"insights.displayLocation.homepage,omitempty"`
|
||
InsightsDisplayLocationInsightsPage *bool `json:"insights.displayLocation.insightsPage,omitempty"`
|
||
// Motd description: DEPRECATED: Use `notices` instead.
|
||
//
|
||
// An array (often with just one element) of messages to display at the top of all pages, including for unauthenticated users. Users may dismiss a message (and any message with the same string value will remain dismissed for the user).
|
||
//
|
||
// Markdown formatting is supported.
|
||
//
|
||
// Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that user. (This is useful for testing the correctness of the message's Markdown formatting.)
|
||
//
|
||
// MOTD stands for "message of the day" (which is the conventional Unix name for this type of message).
|
||
Motd []string `json:"motd,omitempty"`
|
||
// Notices description: Custom informational messages to display to users at specific locations in the Sourcegraph user interface.
|
||
//
|
||
// Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user.
|
||
Notices []*Notice `json:"notices,omitempty"`
|
||
// OpenInEditor description: Group of settings related to opening files in an editor.
|
||
OpenInEditor *SettingsOpenInEditor `json:"openInEditor,omitempty"`
|
||
// PerforceCodeHostToSwarmMap description: Key-value pairs of code host URLs to Swarm URLs. Keys should have no prefix and should not end with a slash, like "perforce.company.com:1666". Values should look like "https://swarm.company.com/", with a slash at the end.
|
||
PerforceCodeHostToSwarmMap map[string]string `json:"perforce.codeHostToSwarmMap,omitempty"`
|
||
// Quicklinks description: DEPRECATED: This setting will be removed in a future version of Sourcegraph.
|
||
Quicklinks []*QuickLink `json:"quicklinks,omitempty"`
|
||
// SearchContextLines description: The default number of lines to show as context below and above search results. Default is 1.
|
||
SearchContextLines int `json:"search.contextLines,omitempty"`
|
||
// SearchDefaultCaseSensitive description: Whether query patterns are treated case sensitively. Patterns are case insensitive by default.
|
||
SearchDefaultCaseSensitive bool `json:"search.defaultCaseSensitive,omitempty"`
|
||
// SearchDefaultMode description: Defines default properties for search behavior. The default is `smart`, which provides query assistance that automatically runs alternative queries when appropriate. When `precise`, search behavior strictly searches for the precise meaning of the query.
|
||
SearchDefaultMode string `json:"search.defaultMode,omitempty"`
|
||
// SearchDefaultPatternType description: The default pattern type that search queries will be intepreted as. `lucky` is an experimental mode that will interpret the query in multiple ways.
|
||
SearchDefaultPatternType string `json:"search.defaultPatternType,omitempty"`
|
||
// SearchHideSuggestions description: Disable search suggestions below the search bar when constructing queries. Defaults to false.
|
||
SearchHideSuggestions *bool `json:"search.hideSuggestions,omitempty"`
|
||
// SearchIncludeArchived description: Whether searches should include searching archived repositories.
|
||
SearchIncludeArchived *bool `json:"search.includeArchived,omitempty"`
|
||
// SearchIncludeForks description: Whether searches should include searching forked repositories.
|
||
SearchIncludeForks *bool `json:"search.includeForks,omitempty"`
|
||
// SearchSavedQueries description: DEPRECATED: Saved search queries
|
||
SearchSavedQueries []*SearchSavedQueries `json:"search.savedQueries,omitempty"`
|
||
// SearchScopes description: Predefined search snippets that can be appended to any search (also known as search scopes)
|
||
SearchScopes []*SearchScope `json:"search.scopes,omitempty"`
|
||
Additional map[string]any `json:"-"` // additionalProperties not explicitly defined in the schema
|
||
}
|
||
|
||
func (v Settings) MarshalJSON() ([]byte, error) {
|
||
m := make(map[string]any, len(v.Additional))
|
||
for k, v := range v.Additional {
|
||
m[k] = v
|
||
}
|
||
type wrapper Settings
|
||
b, err := json.Marshal(wrapper(v))
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
var m2 map[string]any
|
||
if err := json.Unmarshal(b, &m2); err != nil {
|
||
return nil, err
|
||
}
|
||
for k, v := range m2 {
|
||
m[k] = v
|
||
}
|
||
return json.Marshal(m)
|
||
}
|
||
func (v *Settings) UnmarshalJSON(data []byte) error {
|
||
type wrapper Settings
|
||
var s wrapper
|
||
if err := json.Unmarshal(data, &s); err != nil {
|
||
return err
|
||
}
|
||
*v = Settings(s)
|
||
var m map[string]any
|
||
if err := json.Unmarshal(data, &m); err != nil {
|
||
return err
|
||
}
|
||
delete(m, "alerts.codeHostIntegrationMessaging")
|
||
delete(m, "alerts.hideObservabilitySiteAlerts")
|
||
delete(m, "alerts.showMajorMinorUpdates")
|
||
delete(m, "alerts.showPatchUpdates")
|
||
delete(m, "basicCodeIntel.globalSearchesEnabled")
|
||
delete(m, "basicCodeIntel.includeArchives")
|
||
delete(m, "basicCodeIntel.includeForks")
|
||
delete(m, "basicCodeIntel.indexOnly")
|
||
delete(m, "basicCodeIntel.unindexedSearchTimeout")
|
||
delete(m, "codeIntel.disableRangeQueries")
|
||
delete(m, "codeIntel.disableSearchBased")
|
||
delete(m, "codeIntel.mixPreciseAndSearchBasedReferences")
|
||
delete(m, "codeIntel.traceExtension")
|
||
delete(m, "codeIntelligence.autoIndexPopularRepoLimit")
|
||
delete(m, "experimentalFeatures")
|
||
delete(m, "fileSidebarVisibleByDefault")
|
||
delete(m, "history.defaultPageSize")
|
||
delete(m, "history.preferAbsoluteTimestamps")
|
||
delete(m, "insights.aggregations.extendedTimeout")
|
||
delete(m, "insights.displayLocation.directory")
|
||
delete(m, "insights.displayLocation.homepage")
|
||
delete(m, "insights.displayLocation.insightsPage")
|
||
delete(m, "motd")
|
||
delete(m, "notices")
|
||
delete(m, "openInEditor")
|
||
delete(m, "perforce.codeHostToSwarmMap")
|
||
delete(m, "quicklinks")
|
||
delete(m, "search.contextLines")
|
||
delete(m, "search.defaultCaseSensitive")
|
||
delete(m, "search.defaultMode")
|
||
delete(m, "search.defaultPatternType")
|
||
delete(m, "search.hideSuggestions")
|
||
delete(m, "search.includeArchived")
|
||
delete(m, "search.includeForks")
|
||
delete(m, "search.savedQueries")
|
||
delete(m, "search.scopes")
|
||
if len(m) > 0 {
|
||
v.Additional = make(map[string]any, len(m))
|
||
}
|
||
for k, vv := range m {
|
||
v.Additional[k] = vv
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// SettingsExperimentalFeatures description: Experimental features and settings.
|
||
type SettingsExperimentalFeatures struct {
|
||
// ApplySearchQuerySuggestionOnEnter description: This changes the behavior of the autocompletion feature in the search query input. If set the first suggestion won't be selected by default and a selected suggestion can be selected by pressing Enter (application by pressing Tab continues to work)
|
||
ApplySearchQuerySuggestionOnEnter *bool `json:"applySearchQuerySuggestionOnEnter,omitempty"`
|
||
// BatchChangesExecution description: Enables/disables the Batch Changes server side execution feature.
|
||
BatchChangesExecution *bool `json:"batchChangesExecution,omitempty"`
|
||
// ClientSearchResultRanking description: How to rank search results in the client
|
||
ClientSearchResultRanking *string `json:"clientSearchResultRanking,omitempty"`
|
||
// CodeInsights description: Enables code insights on directory pages.
|
||
CodeInsights *bool `json:"codeInsights,omitempty"`
|
||
// CodeInsightsCompute description: Enables Compute powered Code Insights
|
||
CodeInsightsCompute *bool `json:"codeInsightsCompute,omitempty"`
|
||
// CodeInsightsLandingPage description: DEPRECATED: Enables code insights landing page layout.
|
||
CodeInsightsLandingPage *bool `json:"codeInsightsLandingPage,omitempty"`
|
||
// CodeInsightsRepoUI description: Specifies which (code insight repo) editor to use for repo query UI
|
||
CodeInsightsRepoUI *string `json:"codeInsightsRepoUI,omitempty"`
|
||
// CodeMonitoringWebHooks description: Shows code monitor webhook and Slack webhook actions in the UI, allowing users to configure them.
|
||
CodeMonitoringWebHooks *bool `json:"codeMonitoringWebHooks,omitempty"`
|
||
// EnableCodeMirrorFileView description: Uses CodeMirror to display files. In this first iteration not all features of the current file view are available.
|
||
EnableCodeMirrorFileView *bool `json:"enableCodeMirrorFileView,omitempty"`
|
||
// EnableLazyBlobSyntaxHighlighting description: Fetch un-highlighted blob contents to render immediately, decorate with syntax highlighting once loaded.
|
||
EnableLazyBlobSyntaxHighlighting *bool `json:"enableLazyBlobSyntaxHighlighting,omitempty"`
|
||
// EnableLazyFileResultSyntaxHighlighting description: Fetch un-highlighted file result contents to render immediately, decorate with syntax highlighting once loaded.
|
||
EnableLazyFileResultSyntaxHighlighting *bool `json:"enableLazyFileResultSyntaxHighlighting,omitempty"`
|
||
// EnableSearchFilePrefetch description: Pre-fetch plaintext file revisions from search results on hover/focus.
|
||
EnableSearchFilePrefetch *bool `json:"enableSearchFilePrefetch,omitempty"`
|
||
// EnableSidebarFilePrefetch description: Pre-fetch plaintext file revisions from sidebar on hover/focus.
|
||
EnableSidebarFilePrefetch *bool `json:"enableSidebarFilePrefetch,omitempty"`
|
||
// FuzzyFinder description: Enables fuzzy finder with the keyboard shortcut `Cmd+K` on macOS and `Ctrl+K` on Linux/Windows.
|
||
FuzzyFinder *bool `json:"fuzzyFinder,omitempty"`
|
||
// FuzzyFinderActions description: Enables the 'Actions' tab of the fuzzy finder
|
||
FuzzyFinderActions *bool `json:"fuzzyFinderActions,omitempty"`
|
||
// FuzzyFinderAll description: Enables the 'All' tab of the fuzzy finder
|
||
FuzzyFinderAll *bool `json:"fuzzyFinderAll,omitempty"`
|
||
// FuzzyFinderCaseInsensitiveFileCountThreshold description: The maximum number of files a repo can have to use case-insensitive fuzzy finding
|
||
FuzzyFinderCaseInsensitiveFileCountThreshold *float64 `json:"fuzzyFinderCaseInsensitiveFileCountThreshold,omitempty"`
|
||
// FuzzyFinderNavbar description: Enables the 'Fuzzy finder' action in the global navigation bar
|
||
FuzzyFinderNavbar *bool `json:"fuzzyFinderNavbar,omitempty"`
|
||
// FuzzyFinderRepositories description: Enables the 'Repositories' tab of the fuzzy finder
|
||
FuzzyFinderRepositories *bool `json:"fuzzyFinderRepositories,omitempty"`
|
||
// FuzzyFinderSymbols description: Enables the 'Symbols' tab of the fuzzy finder
|
||
FuzzyFinderSymbols *bool `json:"fuzzyFinderSymbols,omitempty"`
|
||
// GoCodeCheckerTemplates description: Shows a panel with code insights templates for go code checker results.
|
||
GoCodeCheckerTemplates *bool `json:"goCodeCheckerTemplates,omitempty"`
|
||
// ProactiveSearchResultsAggregations description: Search results aggregations are triggered automatically with a search.
|
||
ProactiveSearchResultsAggregations *bool `json:"proactiveSearchResultsAggregations,omitempty"`
|
||
// SearchContextsQuery description: DEPRECATED: This feature is now permanently enabled. Enables query based search contexts
|
||
SearchContextsQuery *bool `json:"searchContextsQuery,omitempty"`
|
||
// SearchQueryInput description: Specify which version of the search query input to use
|
||
SearchQueryInput *string `json:"searchQueryInput,omitempty"`
|
||
// SearchResultsAggregations description: Display aggregations for your search results on the search screen.
|
||
SearchResultsAggregations *bool `json:"searchResultsAggregations,omitempty"`
|
||
// ShowCodeMonitoringLogs description: Shows code monitoring logs tab.
|
||
ShowCodeMonitoringLogs *bool `json:"showCodeMonitoringLogs,omitempty"`
|
||
// ShowMultilineSearchConsole description: Enables the multiline search console at search/console
|
||
ShowMultilineSearchConsole *bool `json:"showMultilineSearchConsole,omitempty"`
|
||
// SymbolKindTags description: Show the initial letter of the symbol kind instead of icons.
|
||
SymbolKindTags bool `json:"symbolKindTags,omitempty"`
|
||
Additional map[string]any `json:"-"` // additionalProperties not explicitly defined in the schema
|
||
}
|
||
|
||
func (v SettingsExperimentalFeatures) MarshalJSON() ([]byte, error) {
|
||
m := make(map[string]any, len(v.Additional))
|
||
for k, v := range v.Additional {
|
||
m[k] = v
|
||
}
|
||
type wrapper SettingsExperimentalFeatures
|
||
b, err := json.Marshal(wrapper(v))
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
var m2 map[string]any
|
||
if err := json.Unmarshal(b, &m2); err != nil {
|
||
return nil, err
|
||
}
|
||
for k, v := range m2 {
|
||
m[k] = v
|
||
}
|
||
return json.Marshal(m)
|
||
}
|
||
func (v *SettingsExperimentalFeatures) UnmarshalJSON(data []byte) error {
|
||
type wrapper SettingsExperimentalFeatures
|
||
var s wrapper
|
||
if err := json.Unmarshal(data, &s); err != nil {
|
||
return err
|
||
}
|
||
*v = SettingsExperimentalFeatures(s)
|
||
var m map[string]any
|
||
if err := json.Unmarshal(data, &m); err != nil {
|
||
return err
|
||
}
|
||
delete(m, "applySearchQuerySuggestionOnEnter")
|
||
delete(m, "batchChangesExecution")
|
||
delete(m, "clientSearchResultRanking")
|
||
delete(m, "codeInsights")
|
||
delete(m, "codeInsightsCompute")
|
||
delete(m, "codeInsightsLandingPage")
|
||
delete(m, "codeInsightsRepoUI")
|
||
delete(m, "codeMonitoringWebHooks")
|
||
delete(m, "enableCodeMirrorFileView")
|
||
delete(m, "enableLazyBlobSyntaxHighlighting")
|
||
delete(m, "enableLazyFileResultSyntaxHighlighting")
|
||
delete(m, "enableSearchFilePrefetch")
|
||
delete(m, "enableSidebarFilePrefetch")
|
||
delete(m, "fuzzyFinder")
|
||
delete(m, "fuzzyFinderActions")
|
||
delete(m, "fuzzyFinderAll")
|
||
delete(m, "fuzzyFinderCaseInsensitiveFileCountThreshold")
|
||
delete(m, "fuzzyFinderNavbar")
|
||
delete(m, "fuzzyFinderRepositories")
|
||
delete(m, "fuzzyFinderSymbols")
|
||
delete(m, "goCodeCheckerTemplates")
|
||
delete(m, "proactiveSearchResultsAggregations")
|
||
delete(m, "searchContextsQuery")
|
||
delete(m, "searchQueryInput")
|
||
delete(m, "searchResultsAggregations")
|
||
delete(m, "showCodeMonitoringLogs")
|
||
delete(m, "showMultilineSearchConsole")
|
||
delete(m, "symbolKindTags")
|
||
if len(m) > 0 {
|
||
v.Additional = make(map[string]any, len(m))
|
||
}
|
||
for k, vv := range m {
|
||
v.Additional[k] = vv
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// SettingsOpenInEditor description: Group of settings related to opening files in an editor.
|
||
type SettingsOpenInEditor struct {
|
||
// CustomUrlPattern description: If you add "custom" to openineditor.editorIds, this must be set. Use the placeholders "%file", "%line", and "%col" to mark where the file path, line number, and column number must be insterted. Example URL for IntelliJ IDEA: "idea://open?file=%file&line=%line&column=%col"
|
||
CustomUrlPattern string `json:"custom.urlPattern,omitempty"`
|
||
// EditorIds description: The editor to open files in. If set to this to "custom", you must also set "custom.urlPattern"
|
||
EditorIds []string `json:"editorIds,omitempty"`
|
||
// JetbrainsForceApi description: Forces using protocol handlers (like ikea://open?file=...) or the built-in REST API (http://localhost:63342/api/file...). If omitted, protocol handlers are used if available, otherwise the built-in REST API is used.
|
||
JetbrainsForceApi string `json:"jetbrains.forceApi,omitempty"`
|
||
// ProjectPathsDefault description: The absolute path on your computer where your git repositories live. All git repos to open have to be cloned under this path with their original names. "/Users/yourusername/src" is a valid absolute path, "~/src" is not. Works both with and without a trailing slash.
|
||
ProjectPathsDefault string `json:"projectPaths.default,omitempty"`
|
||
// ProjectPathsLinux description: Overrides the default path when the browser detects Linux. Works both with and without a trailing slash.
|
||
ProjectPathsLinux string `json:"projectPaths.linux,omitempty"`
|
||
// ProjectPathsMac description: Overrides the default path when the browser detects macOS. Works both with and without a trailing slash.
|
||
ProjectPathsMac string `json:"projectPaths.mac,omitempty"`
|
||
// ProjectPathsWindows description: Overrides the default path when the browser detects Windows. Doesn't need a trailing backslash.
|
||
ProjectPathsWindows string `json:"projectPaths.windows,omitempty"`
|
||
// Replacements description: Each key will be replaced by the corresponding value in the final URL. Keys are regular expressions, values can contain backreferences ($1, $2, ...).
|
||
Replacements map[string]string `json:"replacements,omitempty"`
|
||
// VscodeIsProjectPathUNCPath description: Indicates that the given project path is a UNC (Universal Naming Convention) path.
|
||
VscodeIsProjectPathUNCPath bool `json:"vscode.isProjectPathUNCPath,omitempty"`
|
||
// VscodeRemoteHostForSSH description: The remote host as "USER@HOSTNAME". This needs you to install the extension called "Remote Development by Microsoft" in your VS Code.
|
||
VscodeRemoteHostForSSH string `json:"vscode.remoteHostForSSH,omitempty"`
|
||
// VscodeUseInsiders description: If set, files will open in VS Code Insiders rather than VS Code.
|
||
VscodeUseInsiders bool `json:"vscode.useInsiders,omitempty"`
|
||
// VscodeUseSSH description: If set, files will open on a remote server via SSH. This requires vscode.remoteHostForSSH to be specified and VS Code extension "Remote Development by Microsoft" installed in your VS Code.
|
||
VscodeUseSSH bool `json:"vscode.useSSH,omitempty"`
|
||
}
|
||
|
||
// SiteConfiguration description: Configuration for a Sourcegraph site.
|
||
type SiteConfiguration struct {
|
||
// RedirectUnsupportedBrowser description: Prompts user to install new browser for non es5
|
||
RedirectUnsupportedBrowser bool `json:"RedirectUnsupportedBrowser,omitempty"`
|
||
// ApiRatelimit description: Configuration for API rate limiting
|
||
ApiRatelimit *ApiRatelimit `json:"api.ratelimit,omitempty"`
|
||
// App description: Configuration options for App only.
|
||
App *App `json:"app,omitempty"`
|
||
// AuthAccessTokens description: Settings for access tokens, which enable external tools to access the Sourcegraph API with the privileges of the user.
|
||
AuthAccessTokens *AuthAccessTokens `json:"auth.accessTokens,omitempty"`
|
||
// AuthEnableUsernameChanges description: Enables users to change their username after account creation. Warning: setting this to be true has security implications if you have enabled (or will at any point in the future enable) repository permissions with an option that relies on username equivalency between Sourcegraph and an external service or authentication provider. Do NOT set this to true if you are using non-built-in authentication OR rely on username equivalency for repository permissions.
|
||
AuthEnableUsernameChanges bool `json:"auth.enableUsernameChanges,omitempty"`
|
||
// AuthLockout description: The config options for account lockout
|
||
AuthLockout *AuthLockout `json:"auth.lockout,omitempty"`
|
||
// AuthMinPasswordLength description: The minimum number of Unicode code points that a password must contain.
|
||
AuthMinPasswordLength int `json:"auth.minPasswordLength,omitempty"`
|
||
// AuthPasswordPolicy description: Enables and configures password policy. This will allow admins to enforce password complexity and length requirements.
|
||
AuthPasswordPolicy *AuthPasswordPolicy `json:"auth.passwordPolicy,omitempty"`
|
||
// AuthPasswordResetLinkExpiry description: The duration (in seconds) that a password reset link is considered valid.
|
||
AuthPasswordResetLinkExpiry int `json:"auth.passwordResetLinkExpiry,omitempty"`
|
||
// AuthProviders description: The authentication providers to use for identifying and signing in users. See instructions below for configuring SAML, OpenID Connect (including Google Workspace), and HTTP authentication proxies. Multiple authentication providers are supported (by specifying multiple elements in this array).
|
||
AuthProviders []AuthProviders `json:"auth.providers,omitempty"`
|
||
// AuthPublic description: WARNING: This option has been removed as of 3.8.
|
||
AuthPublic bool `json:"auth.public,omitempty"`
|
||
// AuthSessionExpiry description: The duration of a user session, after which it expires and the user is required to re-authenticate. The default is 90 days. There is typically no need to set this, but some users may have specific internal security requirements.
|
||
//
|
||
// The string format is that of the Duration type in the Go time package (https://golang.org/pkg/time/#ParseDuration). E.g., "720h", "43200m", "2592000s" all indicate a timespan of 30 days.
|
||
//
|
||
// Note: changing this field does not affect the expiration of existing sessions. If you would like to enforce this limit for existing sessions, you must log out currently signed-in users. You can force this by removing all keys beginning with "session_" from the Redis store:
|
||
//
|
||
// * For deployments using `sourcegraph/server`: `docker exec $CONTAINER_ID redis-cli --raw keys 'session_*' | xargs docker exec $CONTAINER_ID redis-cli del`
|
||
// * For cluster deployments:
|
||
// ```
|
||
// REDIS_POD="$(kubectl get pods -l app=redis-store -o jsonpath={.items[0].metadata.name})";
|
||
// kubectl exec "$REDIS_POD" -- redis-cli --raw keys 'session_*' | xargs kubectl exec "$REDIS_POD" -- redis-cli --raw del;
|
||
// ```
|
||
//
|
||
AuthSessionExpiry string `json:"auth.sessionExpiry,omitempty"`
|
||
// AuthUnlockAccountLinkExpiry description: Validity expressed in minutes of the unlock account token
|
||
AuthUnlockAccountLinkExpiry int `json:"auth.unlockAccountLinkExpiry,omitempty"`
|
||
// AuthUnlockAccountLinkSigningKey description: Base64-encoded HMAC signing key to sign the JWT token for account unlock URLs
|
||
AuthUnlockAccountLinkSigningKey string `json:"auth.unlockAccountLinkSigningKey,omitempty"`
|
||
// AuthUserOrgMap description: Ensure that matching users are members of the specified orgs (auto-joining users to the orgs if they are not already a member). Provide a JSON object of the form `{"*": ["org1", "org2"]}`, where org1 and org2 are orgs that all users are automatically joined to. Currently the only supported key is `"*"`.
|
||
AuthUserOrgMap map[string][]string `json:"auth.userOrgMap,omitempty"`
|
||
// AuthzEnforceForSiteAdmins description: When true, site admins will only be able to see private code they have access to via our authz system.
|
||
AuthzEnforceForSiteAdmins bool `json:"authz.enforceForSiteAdmins,omitempty"`
|
||
// AuthzRefreshInterval description: Time interval (in seconds) of how often each component picks up authorization changes in external services.
|
||
AuthzRefreshInterval int `json:"authz.refreshInterval,omitempty"`
|
||
// BatchChangesChangesetsRetention description: How long changesets will be retained after they have been detached from a batch change.
|
||
BatchChangesChangesetsRetention string `json:"batchChanges.changesetsRetention,omitempty"`
|
||
// BatchChangesDisableWebhooksWarning description: Hides Batch Changes warnings about webhooks not being configured.
|
||
BatchChangesDisableWebhooksWarning bool `json:"batchChanges.disableWebhooksWarning,omitempty"`
|
||
// BatchChangesEnabled description: Enables/disables the Batch Changes feature.
|
||
BatchChangesEnabled *bool `json:"batchChanges.enabled,omitempty"`
|
||
// BatchChangesEnforceForks description: When enabled, all branches created by batch changes will be pushed to forks of the original repository.
|
||
BatchChangesEnforceForks bool `json:"batchChanges.enforceForks,omitempty"`
|
||
// BatchChangesRestrictToAdmins description: When enabled, only site admins can create and apply batch changes.
|
||
BatchChangesRestrictToAdmins *bool `json:"batchChanges.restrictToAdmins,omitempty"`
|
||
// BatchChangesRolloutWindows description: Specifies specific windows, which can have associated rate limits, to be used when reconciling published changesets (creating or updating). All days and times are handled in UTC.
|
||
BatchChangesRolloutWindows *[]*BatchChangeRolloutWindow `json:"batchChanges.rolloutWindows,omitempty"`
|
||
// Branding description: Customize Sourcegraph homepage logo and search icon.
|
||
//
|
||
// Only available in Sourcegraph Enterprise.
|
||
Branding *Branding `json:"branding,omitempty"`
|
||
// CloneProgressLog description: Whether clone progress should be logged to a file. If enabled, logs are written to files in the OS default path for temporary files.
|
||
CloneProgressLog bool `json:"cloneProgress.log,omitempty"`
|
||
// CodeIntelAutoIndexingAllowGlobalPolicies description: Whether auto-indexing policies may apply to all repositories on the Sourcegraph instance. Default is false. The policyRepositoryMatchLimit setting still applies to such auto-indexing policies.
|
||
CodeIntelAutoIndexingAllowGlobalPolicies *bool `json:"codeIntelAutoIndexing.allowGlobalPolicies,omitempty"`
|
||
// CodeIntelAutoIndexingEnabled description: Enables/disables the code intel auto-indexing feature. Currently experimental.
|
||
CodeIntelAutoIndexingEnabled *bool `json:"codeIntelAutoIndexing.enabled,omitempty"`
|
||
// CodeIntelAutoIndexingIndexerMap description: Overrides the default Docker images used by auto-indexing.
|
||
CodeIntelAutoIndexingIndexerMap map[string]string `json:"codeIntelAutoIndexing.indexerMap,omitempty"`
|
||
// CodeIntelAutoIndexingPolicyRepositoryMatchLimit description: The maximum number of repositories to which a single auto-indexing policy can apply. Default is -1, which is unlimited.
|
||
CodeIntelAutoIndexingPolicyRepositoryMatchLimit *int `json:"codeIntelAutoIndexing.policyRepositoryMatchLimit,omitempty"`
|
||
// CodeIntelRankingDocumentReferenceCountsDerivativeGraphKeyPrefix description: An arbitrary identifier used to group calculated rankings from SCIP data (excluding the SCIP export).
|
||
CodeIntelRankingDocumentReferenceCountsDerivativeGraphKeyPrefix string `json:"codeIntelRanking.documentReferenceCountsDerivativeGraphKeyPrefix,omitempty"`
|
||
// CodeIntelRankingDocumentReferenceCountsEnabled description: Enables/disables the document reference counts feature. Currently experimental.
|
||
CodeIntelRankingDocumentReferenceCountsEnabled *bool `json:"codeIntelRanking.documentReferenceCountsEnabled,omitempty"`
|
||
// CodeIntelRankingDocumentReferenceCountsGraphKey description: An arbitrary identifier used to group calculated rankings from SCIP data (including the SCIP export).
|
||
CodeIntelRankingDocumentReferenceCountsGraphKey string `json:"codeIntelRanking.documentReferenceCountsGraphKey,omitempty"`
|
||
// CodeIntelRankingStaleResultsAge description: The interval at which to run the reduce job that computes document reference counts. Default is 24hrs.
|
||
CodeIntelRankingStaleResultsAge int `json:"codeIntelRanking.staleResultsAge,omitempty"`
|
||
// Completions description: Configuration for the completions service.
|
||
Completions *Completions `json:"completions,omitempty"`
|
||
// CorsOrigin description: Required when using any of the native code host integrations for Phabricator, GitLab, or Bitbucket Server. It is a space-separated list of allowed origins for cross-origin HTTP requests which should be the base URL for your Phabricator, GitLab, or Bitbucket Server instance.
|
||
CorsOrigin string `json:"corsOrigin,omitempty"`
|
||
// DebugSearchSymbolsParallelism description: (debug) controls the amount of symbol search parallelism. Defaults to 20. It is not recommended to change this outside of debugging scenarios. This option will be removed in a future version.
|
||
DebugSearchSymbolsParallelism int `json:"debug.search.symbolsParallelism,omitempty"`
|
||
// DefaultRateLimit description: The rate limit (in requests per hour) for the default rate limiter in the rate limiters registry. By default this is disabled and the default rate limit is infinity.
|
||
DefaultRateLimit float64 `json:"defaultRateLimit,omitempty"`
|
||
// DisableAutoCodeHostSyncs description: Disable periodic syncs of configured code host connections (repository metadata, permissions, batch changes changesets, etc)
|
||
DisableAutoCodeHostSyncs bool `json:"disableAutoCodeHostSyncs,omitempty"`
|
||
// DisableAutoGitUpdates description: Disable periodically fetching git contents for existing repositories.
|
||
DisableAutoGitUpdates bool `json:"disableAutoGitUpdates,omitempty"`
|
||
// DisableFeedbackSurvey description: Disable the feedback survey
|
||
DisableFeedbackSurvey bool `json:"disableFeedbackSurvey,omitempty"`
|
||
// DisableNonCriticalTelemetry description: DEPRECATED. Has no effect.
|
||
DisableNonCriticalTelemetry bool `json:"disableNonCriticalTelemetry,omitempty"`
|
||
// DisablePublicRepoRedirects description: Disable redirects to sourcegraph.com when visiting public repositories that can't exist on this server.
|
||
DisablePublicRepoRedirects bool `json:"disablePublicRepoRedirects,omitempty"`
|
||
// Dotcom description: Configuration options for Sourcegraph.com only.
|
||
Dotcom *Dotcom `json:"dotcom,omitempty"`
|
||
// EmailAddress description: The "from" address for emails sent by this server.
|
||
// Please see https://docs.sourcegraph.com/admin/config/email
|
||
EmailAddress string `json:"email.address,omitempty"`
|
||
// EmailSmtp description: The SMTP server used to send transactional emails.
|
||
// Please see https://docs.sourcegraph.com/admin/config/email
|
||
EmailSmtp *SMTPServerConfig `json:"email.smtp,omitempty"`
|
||
// EmailTemplates description: Configurable templates for some email types sent by Sourcegraph.
|
||
EmailTemplates *EmailTemplates `json:"email.templates,omitempty"`
|
||
// Embeddings description: Configuration for embeddings service.
|
||
Embeddings *Embeddings `json:"embeddings,omitempty"`
|
||
// EncryptionKeys description: Configuration for encryption keys used to encrypt data at rest in the database.
|
||
EncryptionKeys *EncryptionKeys `json:"encryption.keys,omitempty"`
|
||
// ExecutorsAccessToken description: The shared secret between Sourcegraph and executors.
|
||
ExecutorsAccessToken string `json:"executors.accessToken,omitempty"`
|
||
// ExecutorsBatcheshelperImage description: The image to use for batch changes in executors. Use this value to pull from a custom image registry.
|
||
ExecutorsBatcheshelperImage string `json:"executors.batcheshelperImage,omitempty"`
|
||
// ExecutorsBatcheshelperImageTag description: The tag to use for the batcheshelper image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated.
|
||
ExecutorsBatcheshelperImageTag string `json:"executors.batcheshelperImageTag,omitempty"`
|
||
// ExecutorsFrontendURL description: The URL where Sourcegraph executors can reach the Sourcegraph instance. If not set, defaults to externalURL. URLs with a path (other than `/`) are not allowed. For Docker executors, the special hostname `host.docker.internal` can be used to refer to the Docker container's host.
|
||
ExecutorsFrontendURL string `json:"executors.frontendURL,omitempty"`
|
||
// ExecutorsSrcCLIImage description: The image to use for src-cli in executors. Use this value to pull from a custom image registry.
|
||
ExecutorsSrcCLIImage string `json:"executors.srcCLIImage,omitempty"`
|
||
// ExecutorsSrcCLIImageTag description: The tag to use for the src-cli image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated.
|
||
ExecutorsSrcCLIImageTag string `json:"executors.srcCLIImageTag,omitempty"`
|
||
// ExperimentalFeatures description: Experimental features and settings.
|
||
ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"`
|
||
ExportUsageTelemetry *ExportUsageTelemetry `json:"exportUsageTelemetry,omitempty"`
|
||
// ExternalServiceUserMode description: Enable to allow users to add external services for public and private repositories to the Sourcegraph instance.
|
||
ExternalServiceUserMode string `json:"externalService.userMode,omitempty"`
|
||
// ExternalURL description: The externally accessible URL for Sourcegraph (i.e., what you type into your browser). Previously called `appURL`. Only root URLs are allowed.
|
||
ExternalURL string `json:"externalURL,omitempty"`
|
||
// GitCloneURLToRepositoryName description: JSON array of configuration that maps from Git clone URL to repository name. Sourcegraph automatically resolves remote clone URLs to their proper code host. However, there may be non-remote clone URLs (e.g., in submodule declarations) that Sourcegraph cannot automatically map to a code host. In this case, use this field to specify the mapping. The mappings are tried in the order they are specified and take precedence over automatic mappings.
|
||
GitCloneURLToRepositoryName []*CloneURLToRepositoryName `json:"git.cloneURLToRepositoryName,omitempty"`
|
||
// GitHubApp description: The config options for Sourcegraph GitHub App.
|
||
GitHubApp *GitHubApp `json:"gitHubApp,omitempty"`
|
||
// GitLongCommandTimeout description: Maximum number of seconds that a long Git command (e.g. clone or remote update) is allowed to execute. The default is 3600 seconds, or 1 hour.
|
||
GitLongCommandTimeout int `json:"gitLongCommandTimeout,omitempty"`
|
||
// GitMaxCodehostRequestsPerSecond description: Maximum number of remote code host git operations (e.g. clone or ls-remote) to be run per second per gitserver. Default is -1, which is unlimited.
|
||
GitMaxCodehostRequestsPerSecond *int `json:"gitMaxCodehostRequestsPerSecond,omitempty"`
|
||
// GitMaxConcurrentClones description: Maximum number of git clone processes that will be run concurrently per gitserver to update repositories. Note: the global git update scheduler respects gitMaxConcurrentClones. However, we allow each gitserver to run upto gitMaxConcurrentClones to allow for urgent fetches. Urgent fetches are used when a user is browsing a PR and we do not have the commit yet.
|
||
GitMaxConcurrentClones int `json:"gitMaxConcurrentClones,omitempty"`
|
||
// GitRecorder description: Record git operations that are executed on configured repositories. The following commands are not recorded: show, log, rev-parse and diff.
|
||
GitRecorder *GitRecorder `json:"gitRecorder,omitempty"`
|
||
// GitUpdateInterval description: JSON array of repo name patterns and update intervals. If a repo matches a pattern, the associated interval will be used. If it matches no patterns a default backoff heuristic will be used. Pattern matches are attempted in the order they are provided.
|
||
GitUpdateInterval []*UpdateIntervalRule `json:"gitUpdateInterval,omitempty"`
|
||
// HtmlBodyBottom description: HTML to inject at the bottom of the `<body>` element on each page, for analytics scripts
|
||
HtmlBodyBottom string `json:"htmlBodyBottom,omitempty"`
|
||
// HtmlBodyTop description: HTML to inject at the top of the `<body>` element on each page, for analytics scripts
|
||
HtmlBodyTop string `json:"htmlBodyTop,omitempty"`
|
||
// HtmlHeadBottom description: HTML to inject at the bottom of the `<head>` element on each page, for analytics scripts
|
||
HtmlHeadBottom string `json:"htmlHeadBottom,omitempty"`
|
||
// HtmlHeadTop description: HTML to inject at the top of the `<head>` element on each page, for analytics scripts
|
||
HtmlHeadTop string `json:"htmlHeadTop,omitempty"`
|
||
// InsightsAggregationsBufferSize description: The size of the buffer for aggregations ran in-memory. A higher limit might strain memory for the frontend
|
||
InsightsAggregationsBufferSize int `json:"insights.aggregations.bufferSize,omitempty"`
|
||
// InsightsAggregationsProactiveResultLimit description: The maximum number of results a proactive search aggregation can accept before stopping
|
||
InsightsAggregationsProactiveResultLimit int `json:"insights.aggregations.proactiveResultLimit,omitempty"`
|
||
// InsightsBackfillInterruptAfter description: Set the number of seconds an insight series will spend backfilling before being interrupted. Series are interrupted to prevent long running insights from exhausting all of the available workers. Interrupted series will be placed back in the queue and retried based on their priority.
|
||
InsightsBackfillInterruptAfter int `json:"insights.backfill.interruptAfter,omitempty"`
|
||
// InsightsBackfillRepositoryConcurrency description: Number of repositories within the batch to backfill concurrently.
|
||
InsightsBackfillRepositoryConcurrency int `json:"insights.backfill.repositoryConcurrency,omitempty"`
|
||
// InsightsBackfillRepositoryGroupSize description: Set the number of repositories to batch in a group during backfilling.
|
||
InsightsBackfillRepositoryGroupSize int `json:"insights.backfill.repositoryGroupSize,omitempty"`
|
||
// InsightsHistoricalWorkerRateLimit description: Maximum number of historical Code Insights data frames that may be analyzed per second.
|
||
InsightsHistoricalWorkerRateLimit *float64 `json:"insights.historical.worker.rateLimit,omitempty"`
|
||
// InsightsHistoricalWorkerRateLimitBurst description: The allowed burst rate for the Code Insights historical worker rate limiter.
|
||
InsightsHistoricalWorkerRateLimitBurst int `json:"insights.historical.worker.rateLimitBurst,omitempty"`
|
||
// InsightsMaximumSampleSize description: The maximum number of data points that will be available to view for a series on a code insight. Points beyond that will be stored in a separate table and available for data export.
|
||
InsightsMaximumSampleSize int `json:"insights.maximumSampleSize,omitempty"`
|
||
// InsightsQueryWorkerConcurrency description: Number of concurrent executions of a code insight query on a worker node
|
||
InsightsQueryWorkerConcurrency int `json:"insights.query.worker.concurrency,omitempty"`
|
||
// InsightsQueryWorkerRateLimit description: Maximum number of Code Insights queries initiated per second on a worker node.
|
||
InsightsQueryWorkerRateLimit *float64 `json:"insights.query.worker.rateLimit,omitempty"`
|
||
// InsightsQueryWorkerRateLimitBurst description: The allowed burst rate for the Code Insights queries per second rate limiter.
|
||
InsightsQueryWorkerRateLimitBurst int `json:"insights.query.worker.rateLimitBurst,omitempty"`
|
||
// LicenseKey description: The license key associated with a Sourcegraph product subscription, which is necessary to activate Sourcegraph Enterprise functionality. To obtain this value, contact Sourcegraph to purchase a subscription. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
|
||
LicenseKey string `json:"licenseKey,omitempty"`
|
||
// Log description: Configuration for logging and alerting, including to external services.
|
||
Log *Log `json:"log,omitempty"`
|
||
// LsifEnforceAuth description: Whether or not LSIF uploads will be blocked unless a valid LSIF upload token is provided.
|
||
LsifEnforceAuth bool `json:"lsifEnforceAuth,omitempty"`
|
||
// MaxReposToSearch description: DEPRECATED: Configure maxRepos in search.limits. The maximum number of repositories to search across. The user is prompted to narrow their query if exceeded. Any value less than or equal to zero means unlimited.
|
||
MaxReposToSearch int `json:"maxReposToSearch,omitempty"`
|
||
// Notifications description: Notifications recieved from Sourcegraph.com to display in Sourcegraph.
|
||
Notifications []*Notifications `json:"notifications,omitempty"`
|
||
// ObservabilityAlerts description: Configure notifications for Sourcegraph's built-in alerts.
|
||
ObservabilityAlerts []*ObservabilityAlerts `json:"observability.alerts,omitempty"`
|
||
// ObservabilityCaptureSlowGraphQLRequestsLimit description: (debug) Set a limit to the amount of captured slow GraphQL requests being stored for visualization. For defining the threshold for a slow GraphQL request, see observability.logSlowGraphQLRequests.
|
||
ObservabilityCaptureSlowGraphQLRequestsLimit int `json:"observability.captureSlowGraphQLRequestsLimit,omitempty"`
|
||
// ObservabilityClient description: EXPERIMENTAL: Configuration for client observability
|
||
ObservabilityClient *ObservabilityClient `json:"observability.client,omitempty"`
|
||
// ObservabilityLogSlowGraphQLRequests description: (debug) logs all GraphQL requests slower than the specified number of milliseconds.
|
||
ObservabilityLogSlowGraphQLRequests int `json:"observability.logSlowGraphQLRequests,omitempty"`
|
||
// ObservabilityLogSlowSearches description: (debug) logs all search queries (issued by users, code intelligence, or API requests) slower than the specified number of milliseconds.
|
||
ObservabilityLogSlowSearches int `json:"observability.logSlowSearches,omitempty"`
|
||
// ObservabilitySilenceAlerts description: Silence individual Sourcegraph alerts by identifier.
|
||
ObservabilitySilenceAlerts []string `json:"observability.silenceAlerts,omitempty"`
|
||
// ObservabilityTracing description: Configures distributed tracing within Sourcegraph. To learn more, refer to https://docs.sourcegraph.com/admin/observability/tracing
|
||
ObservabilityTracing *ObservabilityTracing `json:"observability.tracing,omitempty"`
|
||
// OrganizationInvitations description: Configuration for organization invitations.
|
||
OrganizationInvitations *OrganizationInvitations `json:"organizationInvitations,omitempty"`
|
||
// OutboundRequestLogLimit description: The maximum number of outbound requests to retain. This is a global limit across all outbound requests. If the limit is exceeded, older items will be deleted. If the limit is 0, no outbound requests are logged.
|
||
OutboundRequestLogLimit int `json:"outboundRequestLogLimit,omitempty"`
|
||
// OwnBestEffortTeamMatching description: The Own service will attempt to match a Team by the last part of its handle if it contains a slash and no match is found for its full handle.
|
||
OwnBestEffortTeamMatching *bool `json:"own.bestEffortTeamMatching,omitempty"`
|
||
// ParentSourcegraph description: URL to fetch unreachable repository details from. Defaults to "https://sourcegraph.com"
|
||
ParentSourcegraph *ParentSourcegraph `json:"parentSourcegraph,omitempty"`
|
||
// PermissionsSyncJobCleanupInterval description: Time interval (in seconds) of how often cleanup worker should remove old jobs from permissions sync jobs table.
|
||
PermissionsSyncJobCleanupInterval int `json:"permissions.syncJobCleanupInterval,omitempty"`
|
||
// PermissionsSyncJobsHistorySize description: The number of last repo/user permission jobs to keep for history.
|
||
PermissionsSyncJobsHistorySize *int `json:"permissions.syncJobsHistorySize,omitempty"`
|
||
// PermissionsSyncOldestRepos description: Number of repo permissions to schedule for syncing in single scheduler iteration.
|
||
PermissionsSyncOldestRepos int `json:"permissions.syncOldestRepos,omitempty"`
|
||
// PermissionsSyncOldestUsers description: Number of user permissions to schedule for syncing in single scheduler iteration.
|
||
PermissionsSyncOldestUsers int `json:"permissions.syncOldestUsers,omitempty"`
|
||
// PermissionsSyncReposBackoffSeconds description: Don't sync a repo's permissions if it has synced within the last n seconds.
|
||
PermissionsSyncReposBackoffSeconds int `json:"permissions.syncReposBackoffSeconds,omitempty"`
|
||
// PermissionsSyncScheduleInterval description: Time interval (in seconds) of how often each component picks up authorization changes in external services.
|
||
PermissionsSyncScheduleInterval int `json:"permissions.syncScheduleInterval,omitempty"`
|
||
// PermissionsSyncUsersBackoffSeconds description: Don't sync a user's permissions if they have synced within the last n seconds.
|
||
PermissionsSyncUsersBackoffSeconds int `json:"permissions.syncUsersBackoffSeconds,omitempty"`
|
||
// PermissionsSyncUsersMaxConcurrency description: The maximum number of user-centric permissions syncing jobs that can be spawned concurrently. Service restart is required to take effect for changes.
|
||
PermissionsSyncUsersMaxConcurrency int `json:"permissions.syncUsersMaxConcurrency,omitempty"`
|
||
// PermissionsUserMapping description: Settings for Sourcegraph permissions, which allow the site admin to explicitly manage repository permissions via the GraphQL API. This setting cannot be enabled if repository permissions for any specific external service are enabled (i.e., when the external service's `authorization` field is set).
|
||
PermissionsUserMapping *PermissionsUserMapping `json:"permissions.userMapping,omitempty"`
|
||
// ProductResearchPageEnabled description: Enables users access to the product research page in their settings.
|
||
ProductResearchPageEnabled *bool `json:"productResearchPage.enabled,omitempty"`
|
||
// RedactOutboundRequestHeaders description: Enables redacting sensitive information from outbound requests. Important: We only respect this setting in development environments. In production, we always redact outbound requests.
|
||
RedactOutboundRequestHeaders *bool `json:"redactOutboundRequestHeaders,omitempty"`
|
||
// RepoConcurrentExternalServiceSyncers description: The number of concurrent external service syncers that can run.
|
||
RepoConcurrentExternalServiceSyncers int `json:"repoConcurrentExternalServiceSyncers,omitempty"`
|
||
// RepoListUpdateInterval description: Interval (in minutes) for checking code hosts (such as GitHub, Gitolite, etc.) for new repositories.
|
||
RepoListUpdateInterval int `json:"repoListUpdateInterval,omitempty"`
|
||
// RepoPurgeWorker description: Configuration for repository purge worker.
|
||
RepoPurgeWorker *RepoPurgeWorker `json:"repoPurgeWorker,omitempty"`
|
||
// ScimAuthToken description: DISCLAIMER: UNDER DEVELOPMENT. THE ENDPOINT DOES NOT COMPLY WITH THE SCIM STANDARD YET. The SCIM auth token is used to authenticate SCIM requests. If not set, SCIM is disabled.
|
||
ScimAuthToken string `json:"scim.authToken,omitempty"`
|
||
// ScimIdentityProvider description: Identity provider used for SCIM support. "STANDARD" should be used unless a more specific value is available
|
||
ScimIdentityProvider string `json:"scim.identityProvider,omitempty"`
|
||
// SearchIndexSymbolsEnabled description: Whether indexed symbol search is enabled. This is contingent on the indexed search configuration, and is true by default for instances with indexed search enabled. Enabling this will cause every repository to re-index, which is a time consuming (several hours) operation. Additionally, it requires more storage and ram to accommodate the added symbols information in the search index.
|
||
SearchIndexSymbolsEnabled *bool `json:"search.index.symbols.enabled,omitempty"`
|
||
// SearchLargeFiles description: A list of file glob patterns where matching files will be indexed and searched regardless of their size. Files still need to be valid utf-8 to be indexed. The glob pattern syntax can be found here: https://github.com/bmatcuk/doublestar#patterns.
|
||
SearchLargeFiles []string `json:"search.largeFiles,omitempty"`
|
||
// SearchLimits description: Limits that search applies for number of repositories searched and timeouts.
|
||
SearchLimits *SearchLimits `json:"search.limits,omitempty"`
|
||
// SyntaxHighlighting description: Syntax highlighting configuration
|
||
SyntaxHighlighting *SyntaxHighlighting `json:"syntaxHighlighting,omitempty"`
|
||
// UpdateChannel description: The channel on which to automatically check for Sourcegraph updates.
|
||
UpdateChannel string `json:"update.channel,omitempty"`
|
||
// WebhookLogging description: Configuration for logging incoming webhooks.
|
||
WebhookLogging *WebhookLogging `json:"webhook.logging,omitempty"`
|
||
Additional map[string]any `json:"-"` // additionalProperties not explicitly defined in the schema
|
||
}
|
||
|
||
func (v SiteConfiguration) MarshalJSON() ([]byte, error) {
|
||
m := make(map[string]any, len(v.Additional))
|
||
for k, v := range v.Additional {
|
||
m[k] = v
|
||
}
|
||
type wrapper SiteConfiguration
|
||
b, err := json.Marshal(wrapper(v))
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
var m2 map[string]any
|
||
if err := json.Unmarshal(b, &m2); err != nil {
|
||
return nil, err
|
||
}
|
||
for k, v := range m2 {
|
||
m[k] = v
|
||
}
|
||
return json.Marshal(m)
|
||
}
|
||
func (v *SiteConfiguration) UnmarshalJSON(data []byte) error {
|
||
type wrapper SiteConfiguration
|
||
var s wrapper
|
||
if err := json.Unmarshal(data, &s); err != nil {
|
||
return err
|
||
}
|
||
*v = SiteConfiguration(s)
|
||
var m map[string]any
|
||
if err := json.Unmarshal(data, &m); err != nil {
|
||
return err
|
||
}
|
||
delete(m, "RedirectUnsupportedBrowser")
|
||
delete(m, "api.ratelimit")
|
||
delete(m, "app")
|
||
delete(m, "auth.accessTokens")
|
||
delete(m, "auth.enableUsernameChanges")
|
||
delete(m, "auth.lockout")
|
||
delete(m, "auth.minPasswordLength")
|
||
delete(m, "auth.passwordPolicy")
|
||
delete(m, "auth.passwordResetLinkExpiry")
|
||
delete(m, "auth.providers")
|
||
delete(m, "auth.public")
|
||
delete(m, "auth.sessionExpiry")
|
||
delete(m, "auth.unlockAccountLinkExpiry")
|
||
delete(m, "auth.unlockAccountLinkSigningKey")
|
||
delete(m, "auth.userOrgMap")
|
||
delete(m, "authz.enforceForSiteAdmins")
|
||
delete(m, "authz.refreshInterval")
|
||
delete(m, "batchChanges.changesetsRetention")
|
||
delete(m, "batchChanges.disableWebhooksWarning")
|
||
delete(m, "batchChanges.enabled")
|
||
delete(m, "batchChanges.enforceForks")
|
||
delete(m, "batchChanges.restrictToAdmins")
|
||
delete(m, "batchChanges.rolloutWindows")
|
||
delete(m, "branding")
|
||
delete(m, "cloneProgress.log")
|
||
delete(m, "codeIntelAutoIndexing.allowGlobalPolicies")
|
||
delete(m, "codeIntelAutoIndexing.enabled")
|
||
delete(m, "codeIntelAutoIndexing.indexerMap")
|
||
delete(m, "codeIntelAutoIndexing.policyRepositoryMatchLimit")
|
||
delete(m, "codeIntelRanking.documentReferenceCountsDerivativeGraphKeyPrefix")
|
||
delete(m, "codeIntelRanking.documentReferenceCountsEnabled")
|
||
delete(m, "codeIntelRanking.documentReferenceCountsGraphKey")
|
||
delete(m, "codeIntelRanking.staleResultsAge")
|
||
delete(m, "completions")
|
||
delete(m, "corsOrigin")
|
||
delete(m, "debug.search.symbolsParallelism")
|
||
delete(m, "defaultRateLimit")
|
||
delete(m, "disableAutoCodeHostSyncs")
|
||
delete(m, "disableAutoGitUpdates")
|
||
delete(m, "disableFeedbackSurvey")
|
||
delete(m, "disableNonCriticalTelemetry")
|
||
delete(m, "disablePublicRepoRedirects")
|
||
delete(m, "dotcom")
|
||
delete(m, "email.address")
|
||
delete(m, "email.smtp")
|
||
delete(m, "email.templates")
|
||
delete(m, "embeddings")
|
||
delete(m, "encryption.keys")
|
||
delete(m, "executors.accessToken")
|
||
delete(m, "executors.batcheshelperImage")
|
||
delete(m, "executors.batcheshelperImageTag")
|
||
delete(m, "executors.frontendURL")
|
||
delete(m, "executors.srcCLIImage")
|
||
delete(m, "executors.srcCLIImageTag")
|
||
delete(m, "experimentalFeatures")
|
||
delete(m, "exportUsageTelemetry")
|
||
delete(m, "externalService.userMode")
|
||
delete(m, "externalURL")
|
||
delete(m, "git.cloneURLToRepositoryName")
|
||
delete(m, "gitHubApp")
|
||
delete(m, "gitLongCommandTimeout")
|
||
delete(m, "gitMaxCodehostRequestsPerSecond")
|
||
delete(m, "gitMaxConcurrentClones")
|
||
delete(m, "gitRecorder")
|
||
delete(m, "gitUpdateInterval")
|
||
delete(m, "htmlBodyBottom")
|
||
delete(m, "htmlBodyTop")
|
||
delete(m, "htmlHeadBottom")
|
||
delete(m, "htmlHeadTop")
|
||
delete(m, "insights.aggregations.bufferSize")
|
||
delete(m, "insights.aggregations.proactiveResultLimit")
|
||
delete(m, "insights.backfill.interruptAfter")
|
||
delete(m, "insights.backfill.repositoryConcurrency")
|
||
delete(m, "insights.backfill.repositoryGroupSize")
|
||
delete(m, "insights.historical.worker.rateLimit")
|
||
delete(m, "insights.historical.worker.rateLimitBurst")
|
||
delete(m, "insights.maximumSampleSize")
|
||
delete(m, "insights.query.worker.concurrency")
|
||
delete(m, "insights.query.worker.rateLimit")
|
||
delete(m, "insights.query.worker.rateLimitBurst")
|
||
delete(m, "licenseKey")
|
||
delete(m, "log")
|
||
delete(m, "lsifEnforceAuth")
|
||
delete(m, "maxReposToSearch")
|
||
delete(m, "notifications")
|
||
delete(m, "observability.alerts")
|
||
delete(m, "observability.captureSlowGraphQLRequestsLimit")
|
||
delete(m, "observability.client")
|
||
delete(m, "observability.logSlowGraphQLRequests")
|
||
delete(m, "observability.logSlowSearches")
|
||
delete(m, "observability.silenceAlerts")
|
||
delete(m, "observability.tracing")
|
||
delete(m, "organizationInvitations")
|
||
delete(m, "outboundRequestLogLimit")
|
||
delete(m, "own.bestEffortTeamMatching")
|
||
delete(m, "parentSourcegraph")
|
||
delete(m, "permissions.syncJobCleanupInterval")
|
||
delete(m, "permissions.syncJobsHistorySize")
|
||
delete(m, "permissions.syncOldestRepos")
|
||
delete(m, "permissions.syncOldestUsers")
|
||
delete(m, "permissions.syncReposBackoffSeconds")
|
||
delete(m, "permissions.syncScheduleInterval")
|
||
delete(m, "permissions.syncUsersBackoffSeconds")
|
||
delete(m, "permissions.syncUsersMaxConcurrency")
|
||
delete(m, "permissions.userMapping")
|
||
delete(m, "productResearchPage.enabled")
|
||
delete(m, "redactOutboundRequestHeaders")
|
||
delete(m, "repoConcurrentExternalServiceSyncers")
|
||
delete(m, "repoListUpdateInterval")
|
||
delete(m, "repoPurgeWorker")
|
||
delete(m, "scim.authToken")
|
||
delete(m, "scim.identityProvider")
|
||
delete(m, "search.index.symbols.enabled")
|
||
delete(m, "search.largeFiles")
|
||
delete(m, "search.limits")
|
||
delete(m, "syntaxHighlighting")
|
||
delete(m, "update.channel")
|
||
delete(m, "webhook.logging")
|
||
if len(m) > 0 {
|
||
v.Additional = make(map[string]any, len(m))
|
||
}
|
||
for k, vv := range m {
|
||
v.Additional[k] = vv
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// SrcCliVersionCache description: Configuration related to the src-cli version cache. This should only be used on sourcegraph.com.
|
||
type SrcCliVersionCache struct {
|
||
// Enabled description: Enables the src-cli version cache API endpoint.
|
||
Enabled bool `json:"enabled"`
|
||
// Github description: GitHub configuration, both for queries and receiving release webhooks.
|
||
Github Github `json:"github"`
|
||
// Interval description: The interval between version checks, expressed as a string that can be parsed by Go's time.ParseDuration.
|
||
Interval string `json:"interval,omitempty"`
|
||
}
|
||
|
||
// Step description: A command to run (as part of a sequence) in a repository branch to produce the required changes.
|
||
type Step struct {
|
||
// Container description: The Docker image used to launch the Docker container in which the shell command is run.
|
||
Container string `json:"container"`
|
||
// Env description: Environment variables to set in the step environment.
|
||
Env any `json:"env,omitempty"`
|
||
// Files description: Files that should be mounted into or be created inside the Docker container.
|
||
Files map[string]string `json:"files,omitempty"`
|
||
// If description: A condition to check before executing steps. Supports templating. The value 'true' is interpreted as true.
|
||
If any `json:"if,omitempty"`
|
||
// Mount description: Files that are mounted to the Docker container.
|
||
Mount []*Mount `json:"mount,omitempty"`
|
||
// Outputs description: Output variables of this step that can be referenced in the changesetTemplate or other steps via outputs.<name-of-output>
|
||
Outputs map[string]OutputVariable `json:"outputs,omitempty"`
|
||
// Run description: The shell command to run in the container. It can also be a multi-line shell script. The working directory is the root directory of the repository checkout.
|
||
Run string `json:"run"`
|
||
}
|
||
type SubRepoPermissions struct {
|
||
// Enabled description: Enables sub-repo permission checking
|
||
Enabled bool `json:"enabled,omitempty"`
|
||
// UserCacheSize description: The number of user permissions to cache
|
||
UserCacheSize int `json:"userCacheSize,omitempty"`
|
||
// UserCacheTTLSeconds description: The TTL in seconds for cached user permissions
|
||
UserCacheTTLSeconds int `json:"userCacheTTLSeconds,omitempty"`
|
||
}
|
||
|
||
// SyntaxHighlighting description: Syntax highlighting configuration
|
||
type SyntaxHighlighting struct {
|
||
Engine SyntaxHighlightingEngine `json:"engine"`
|
||
Languages SyntaxHighlightingLanguage `json:"languages"`
|
||
}
|
||
type SyntaxHighlightingEngine struct {
|
||
// Default description: The default syntax highlighting engine to use
|
||
Default string `json:"default"`
|
||
// Overrides description: Manually specify overrides for syntax highlighting engine per language
|
||
Overrides map[string]string `json:"overrides,omitempty"`
|
||
}
|
||
type SyntaxHighlightingLanguage struct {
|
||
// Extensions description: Map of extension to language
|
||
Extensions map[string]string `json:"extensions"`
|
||
// Patterns description: Map of patterns to language. Will return after first match, if any.
|
||
Patterns []*SyntaxHighlightingLanguagePatterns `json:"patterns"`
|
||
}
|
||
type SyntaxHighlightingLanguagePatterns struct {
|
||
// Language description: Name of the language if pattern matches
|
||
Language string `json:"language"`
|
||
// Pattern description: Regular expression which matches the filepath
|
||
Pattern string `json:"pattern"`
|
||
}
|
||
|
||
// TlsExternal description: Global TLS/SSL settings for Sourcegraph to use when communicating with code hosts.
|
||
type TlsExternal struct {
|
||
// Certificates description: TLS certificates to accept. This is only necessary if you are using self-signed certificates or an internal CA. Can be an internal CA certificate or a self-signed certificate. To get the certificate of a webserver run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. NOTE: System Certificate Authorities are automatically included.
|
||
Certificates []string `json:"certificates,omitempty"`
|
||
// InsecureSkipVerify description: insecureSkipVerify controls whether a client verifies the server's certificate chain and host name.
|
||
// If InsecureSkipVerify is true, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks.
|
||
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
|
||
}
|
||
|
||
// TransformChanges description: Optional transformations to apply to the changes produced in each repository.
|
||
type TransformChanges struct {
|
||
// Group description: A list of groups of changes in a repository that each create a separate, additional changeset for this repository, with all ungrouped changes being in the default changeset.
|
||
Group []*TransformChangesGroup `json:"group,omitempty"`
|
||
}
|
||
type TransformChangesGroup struct {
|
||
// Branch description: The branch on the repository to propose changes to. If unset, the repository's default branch is used.
|
||
Branch string `json:"branch"`
|
||
// Directory description: The directory path (relative to the repository root) of the changes to include in this group.
|
||
Directory string `json:"directory"`
|
||
// Repository description: Only apply this transformation in the repository with this name (as it is known to Sourcegraph).
|
||
Repository string `json:"repository,omitempty"`
|
||
}
|
||
type UpdateIntervalRule struct {
|
||
// Interval description: An integer representing the number of minutes to wait until the next update
|
||
Interval int `json:"interval"`
|
||
// Pattern description: A regular expression matching a repo name
|
||
Pattern string `json:"pattern"`
|
||
}
|
||
type UsernameIdentity struct {
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// WebhookLogging description: Configuration for logging incoming webhooks.
|
||
type WebhookLogging struct {
|
||
// Enabled description: Whether incoming webhooks are logged. If omitted, logging is enabled on sites without encryption. If one or more encryption keys are present, this setting must be enabled manually; as webhooks may contain sensitive data, admins of encrypted sites may want to enable webhook encryption via encryption.keys.webhookLogKey.
|
||
Enabled *bool `json:"enabled,omitempty"`
|
||
// Retention description: How long incoming webhooks are retained. The string format is that of the Duration type in the Go time package (https://golang.org/pkg/time/#ParseDuration). Values lower than 1 hour will be treated as 1 hour. By default, this is "72h", or three days.
|
||
Retention string `json:"retention,omitempty"`
|
||
}
|
||
|
||
// Webhooks description: DEPRECATED: Switch to "plugin.webhooks"
|
||
type Webhooks struct {
|
||
// Secret description: Secret for authenticating incoming webhook payloads
|
||
Secret string `json:"secret,omitempty"`
|
||
}
|
||
|
||
// WorkspaceConfiguration description: Configuration for how to setup workspaces in repositories
|
||
type WorkspaceConfiguration struct {
|
||
// In description: The repositories in which to apply the workspace configuration. Supports globbing.
|
||
In string `json:"in,omitempty"`
|
||
// OnlyFetchWorkspace description: If this is true only the files in the workspace (and additional .gitignore) are downloaded instead of an archive of the full repository.
|
||
OnlyFetchWorkspace bool `json:"onlyFetchWorkspace,omitempty"`
|
||
// RootAtLocationOf description: The name of the file that sits at the root of the desired workspace.
|
||
RootAtLocationOf string `json:"rootAtLocationOf"`
|
||
}
|