Documentation ¶
Overview ¶
SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT
Index ¶
Constants ¶
const ( DockerDefaultName = "local" TailscaleDefaultProviderName = "default" )
Variables ¶
var Config *config
Config is a global variable to store configuration.
Functions ¶
func InitializeConfig ¶
func InitializeConfig() error
GetConfig loads, validates and returns configuration.
Types ¶
type DockerTargetProviderConfig ¶
type DockerTargetProviderConfig struct { Host string `validate:"required,uri" default:"unix:///var/run/docker.sock"` TargetHostname string `validate:"ip|hostname" default:"172.31.0.1"` DefaultProxyProvider string `validate:"omitempty" yaml:",omitempty"` }
DockerTargetProviderConfig struct stores Docker target provider configuration.
type File ¶ added in v1.2.0
type File struct {
// contains filtered or unexported fields
}
type FilesTargetProviderConfig ¶ added in v1.1.0
type FilesTargetProviderConfig struct { Filename string `validate:"required,file"` DefaultProxyProvider string `validate:"omitempty" yaml:",omitempty"` DefaultProxyAccessLog bool `default:"true" validate:"boolean"` }
filesConfig struct stores File target provider configuration.
type HTTPConfig ¶
type HTTPConfig struct { Hostname string `validate:"ip|hostname,required" default:"0.0.0.0"` Port uint16 `validate:"numeric,min=1,max=65535,required" default:"8080"` }
HTTPConfig stores HTTP configuration.
type LogConfig ¶
type LogConfig struct { Level string `validate:"required,oneof=debug info warn error fatal panic trace" default:"info"` JSON bool `validate:"boolean" default:"false"` }
LogConfig stores logging configuration.
type TailscaleProxyProviderConfig ¶
type TailscaleProxyProviderConfig struct { Providers map[string]*TailscaleServerConfig `validate:"dive,required"` DataDir string `validate:"dir" default:"/data/"` }
TailscaleProxyProviderConfig struct stores Tailscale ProxyProvider configuration
type TailscaleServerConfig ¶
type TailscaleServerConfig struct { AuthKey string `default:"" validate:"omitempty" yaml:",omitempty"` AuthKeyFile string `default:"" validate:"omitempty" yaml:",omitempty"` ControlURL string `default:"https://controlplane.tailscale.com" validate:"uri"` }
TailscaleServerConfig struct stores Tailscale Server configuration