Path: blob/main/components/public-api/go/config/config.go
2500 views
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package config56import (7"github.com/gitpod-io/gitpod/common-go/baseserver"8)910type Configuration struct {11// PublicURL is the URL under which the API server is publicly reachable12PublicURL string `json:"publicURL"`1314GitpodServiceURL string `json:"gitpodServiceUrl"`1516BillingServiceAddress string `json:"billingServiceAddress,omitempty"`1718// Address to use for creating new sessions19SessionServiceAddress string `json:"sessionServiceAddress"`2021// StripeWebhookSigningSecretPath is a filepath to a secret used to validate incoming webhooks from Stripe22StripeWebhookSigningSecretPath string `json:"stripeWebhookSigningSecretPath"`2324// Path to file which contains personal access token singing key25PersonalAccessTokenSigningKeyPath string `json:"personalAccessTokenSigningKeyPath"`2627// Path to directory containing database configuration files28DatabaseConfigPath string `json:"databaseConfigPath"`2930// Redis configures the connection to Redis31Redis RedisConfiguration `json:"redis"`3233// Authentication configuration34Auth AuthConfiguration `json:"auth"`3536Server *baseserver.Configuration `json:"server,omitempty"`37}3839type RedisConfiguration struct {4041// Address configures the redis connection of this component42Address string `json:"address"`43}4445type AuthConfiguration struct {46PKI AuthPKIConfiguration `json:"pki"`47Session SessionConfig `json:"session"`48}4950type SessionConfig struct {51LifetimeSeconds int64 `json:"lifetimeSeconds"`52Issuer string `json:"issuer"`53Cookie CookieConfig `json:"cookie"`54}5556type CookieConfig struct {57Name string `json:"name"`58MaxAge int64 `json:"maxAge"`59SameSite string `json:"sameSite"`60Secure bool `json:"secure"`61HTTPOnly bool `json:"httpOnly"`62}6364type AuthPKIConfiguration struct {65Signing KeyPair `json:"signing"`66Validating []KeyPair `json:"validating"`67}6869type KeyPair struct {70ID string `json:"id"`71PublicKeyPath string `json:"publicKeyPath"`72PrivateKeyPath string `json:"privateKeyPath"`73}747576