Path: blob/main/components/blobserve/pkg/config/blobserve.go
2506 views
// Copyright (c) 2023 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 blobserve_config56import "github.com/gitpod-io/gitpod/common-go/util"78// Config configures a server.9type BlobServe struct {10Port int `json:"port"`11Timeout util.Duration `json:"timeout,omitempty"`12Repos map[string]Repo `json:"repos"`13// AllowAnyRepo enables users to access any repo/image, irregardles if they're listed in the14// ref config or not.15AllowAnyRepo bool `json:"allowAnyRepo"`16BlobSpace BlobSpace `json:"blobSpace"`17}1819type StringReplacement struct {20Path string `json:"path"`21Search string `json:"search"`22Replacement string `json:"replacement"`23}2425type InlineReplacement struct {26Search string `json:"search"`27Replacement string `json:"replacement"`28}2930type Repo struct {31PrePull []string `json:"prePull,omitempty"`32Workdir string `json:"workdir,omitempty"`33Replacements []StringReplacement `json:"replacements,omitempty"`34InlineStatic []InlineReplacement `json:"inlineStatic,omitempty"`35}3637type BlobSpace struct {38Location string `json:"location"`39MaxSize int64 `json:"maxSizeBytes,omitempty"`40}414243