commands

package
v0.0.0-...-059fb3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConflictTLSConfig = errors.New("can't use --self-signed-cert and --tls-key at the same time")
	ErrDevFlagRequire    = errors.New("this flag require the --dev flag setup")
)

Functions

func NewConfigFromCmd

func NewConfigFromCmd(cmd *cobra.Command) (server.Config, error)

func NewRunCmd

func NewRunCmd(_ string) *cobra.Command

Types

type Config

type Config struct {
	LogLevel       string   `mapstructure:"log-level"`
	Folder         string   `mapstructure:"folder"`
	TLSCert        string   `mapstructure:"tls-cert"`
	TLSKey         string   `mapstructure:"tls-key"`
	HTTPHost       string   `mapstructure:"http-host"`
	HTTPHostnames  []string `mapstructure:"http-hosts"`
	HTTPPort       int      `mapstructure:"http-port"`
	MemoryFS       bool     `mapstructure:"memory-fs"`
	SelfSignedCert bool     `mapstructure:"self-signed-cert"`
	Debug          bool     `mapstructure:"debug"`
	Dev            bool     `mapstructure:"dev"`
	HotReload      bool     `mapstructure:"hot-reload"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL