Documentation
¶
Overview ¶
Package server wires the vx server together: database, blob store, git bridge, API handlers and the HTTP listener.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Addr string // listen address, e.g. ":7070"
DatabaseURL string
DataDir string // git mirrors, and the blob store unless BlobURL is set
// BlobURL names the blob store (blob.Open): empty for the disk store in
// DataDir/objects, or s3://BUCKET/PREFIX?... for object storage, with
// credentials in VX_BLOB_ACCESS_KEY_ID and VX_BLOB_SECRET_ACCESS_KEY.
BlobURL string
// Blobs, when set, is used instead of opening BlobURL (tests).
Blobs blob.Store
Logger *slog.Logger
// Upstream imports branches from git providers; nil disables it.
Upstream func(st *store.Store, blobs blob.Store, dataDir string) (service.UpstreamSyncer, error)
// GitHub configures the GitHub App (VX_PUBLIC_URL, VX_SECRET_KEY,
// VX_SIGNUP). Connect defaults to the internal/github client.
GitHub service.GitHubSettings
// Hosts configures GitLab, Gitea, Forgejo and Bitbucket webhooks
// (VX_<HOST>_WEBHOOK_SECRET).
Hosts service.HostSettings
// MetricsToken turns on /metrics for callers with this bearer token
// (VX_METRICS_TOKEN); empty: no /metrics.
MetricsToken string
// Limits are the rate limits (VX_RATE_*); nil: none.
Limits ratelimit.Config
// Quotas are the organization quotas' defaults (VX_QUOTA_*); the data
// directory's disk is watched either way.
Quotas service.QuotaSettings
// Checks bound the reports of company-defined checks
// (VX_CHECK_ARTIFACT_MAX, VX_CHECK_REPORT_MAX).
Checks service.CheckSettings
// Audit configures the operation log (VX_AUDIT_RETENTION).
Audit service.AuditSettings
// Agreement is the data processing agreement step (VX_REQUIRE_DPA,
// VX_DPA_DIR); off by default.
Agreement service.AgreementSettings
// OrgDeletion is the grace period before a deleted organization is
// purged (VX_ORG_DELETE_GRACE).
OrgDeletion service.OrgDeletionSettings
}
Config is the server configuration.
Click to show internal directories.
Click to hide internal directories.