Path: blob/main/components/common-go/baseserver/config.go
2498 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 baseserver56type Configuration struct {7Services ServicesConfiguration `json:"services" yaml:"services"`8}910type ServicesConfiguration struct {11GRPC *ServerConfiguration `json:"grpc,omitempty" yaml:"grpc,omitempty"`12HTTP *ServerConfiguration `json:"http,omitempty" yaml:"http,omitempty"`13}1415type ServerConfiguration struct {16Address string `json:"address" yaml:"address"`17TLS *TLSConfiguration `json:"tls,omitempty" yaml:"tls,omitempty"`18}1920// GetAddress returns the configured address or an empty string of s is nil21func (s *ServerConfiguration) GetAddress() string {22if s == nil {23return ""24}25return s.Address26}2728type TLSConfiguration struct {29CAPath string `json:"caPath" yaml:"caPath"`30CertPath string `json:"certPath" yaml:"certPath"`31KeyPath string `json:"keyPath" yaml:"keyPath"`32}333435