Documentation
¶
Index ¶
- func LogConfig(config *Config)
- type ArtifactsServer
- type Auth
- type Cache
- type Config
- func (config *Config) Cache() *Cache
- func (config *Config) DomainConfigSource() string
- func (config *Config) GitlabAPISecret() []byte
- func (config *Config) GitlabClientConnectionTimeout() time.Duration
- func (config *Config) GitlabJWTTokenExpiry() time.Duration
- func (config Config) InternalGitLabServerURL() string
- type Daemon
- type General
- type GitLab
- type Listeners
- type Log
- type MultiStringFlag
- type Sentry
- type TLS
- type ZipServing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactsServer ¶ added in v1.36.0
ArtifactsServer groups settings related to configuring Artifacts server
type Auth ¶ added in v1.36.0
type Auth struct { Secret string ClientID string ClientSecret string RedirectURI string Scope string }
Auth groups settings related to configuring Authentication with GitLab
type Cache ¶ added in v1.36.0
type Cache struct { CacheExpiry time.Duration CacheCleanupInterval time.Duration EntryRefreshTimeout time.Duration RetrievalTimeout time.Duration MaxRetrievalInterval time.Duration MaxRetrievalRetries int }
Cache configuration for GitLab API
type Config ¶ added in v1.31.0
type Config struct { General General ArtifactsServer ArtifactsServer Authentication Auth Daemon Daemon GitLab GitLab Listeners Listeners Log Log Sentry Sentry TLS TLS Zip ZipServing // Fields used to share information between files. These are not directly // set by command line flags, but rather populated based on info from them. // ListenMetrics points to a file descriptor of a socket, whose address is // specified by `Config.General.MetricsAddress`. ListenMetrics uintptr // These fields contain the raw strings passed for listen-http, // listen-https, listen-proxy and listen-https-proxyv2 settings. It is used // by appmain() to create listeners, and the pointers to these listeners // gets assigned to Config.Listeners.* fields ListenHTTPStrings MultiStringFlag ListenHTTPSStrings MultiStringFlag ListenProxyStrings MultiStringFlag ListenHTTPSProxyv2Strings MultiStringFlag }
Config stores all the config options relevant to GitLab Pages.
func LoadConfig ¶ added in v1.36.0
func LoadConfig() *Config
LoadConfig parses configuration settings passed as command line arguments or via config file, and populates a Config object with those values
func (*Config) DomainConfigSource ¶ added in v1.36.0
func (*Config) GitlabAPISecret ¶ added in v1.36.0
GitlabAPISecret returns GitLab server access token.
func (*Config) GitlabClientConnectionTimeout ¶ added in v1.36.0
func (*Config) GitlabJWTTokenExpiry ¶ added in v1.36.0
func (Config) InternalGitLabServerURL ¶ added in v1.36.0
InternalGitLabServerURL returns URL to a GitLab instance.
type General ¶ added in v1.36.0
type General struct { Domain string DomainConfigurationSource string UseLegacyStorage bool HTTP2 bool MaxConns int MetricsAddress string RedirectHTTP bool RootCertificate []byte RootDir string RootKey []byte StatusPath string DisableCrossOriginRequests bool InsecureCiphers bool PropagateCorrelationID bool ShowVersion bool CustomHeaders []string }
General groups settings that are general to GitLab Pages and can not be categorized under other head.
type GitLab ¶ added in v1.36.0
type GitLab struct { Server string InternalServer string APISecretKey []byte ClientHTTPTimeout time.Duration JWTTokenExpiration time.Duration Cache Cache }
GitLab groups settings related to configuring GitLab client used to interact with GitLab API
type Listeners ¶ added in v1.36.0
Listeners groups settings related to configuring various listeners (HTTP, HTTPS, Proxy, HTTPSProxyv2)
type MultiStringFlag ¶ added in v1.36.0
type MultiStringFlag struct {
// contains filtered or unexported fields
}
MultiStringFlag implements the flag.Value interface and allows a string flag to be specified multiple times on the command line.
e.g.: -listen-http 127.0.0.1:80 -listen-http [::1]:80
func (*MultiStringFlag) Set ¶ added in v1.36.0
func (s *MultiStringFlag) Set(value string) error
Set appends the value to the list of parameters
func (*MultiStringFlag) Split ¶ added in v1.36.0
func (s *MultiStringFlag) Split() (result []string)
Split each flag
func (*MultiStringFlag) String ¶ added in v1.36.0
func (s *MultiStringFlag) String() string
String returns the list of parameters joined with a commas (",")
type ZipServing ¶ added in v1.31.0
type ZipServing struct { ExpirationInterval time.Duration CleanupInterval time.Duration RefreshInterval time.Duration OpenTimeout time.Duration AllowedPaths []string // TODO: this is a temporary workaround for https://gitlab.com/gitlab-org/gitlab/-/issues/326117#note_546346101 // where daemon-inplace-chroot=true fails to serve zip archives when pages_serve_with_zip_file_protocol is enabled // To be removed along with chroot support https://gitlab.com/gitlab-org/gitlab-pages/-/issues/561 ChrootPath string }
ZipServing groups settings to be used by the zip VFS opening and caching