Documentation ¶
Index ¶
- func ArgsToCmdResults(cmd *goNixArgParser.Command, args []string) (results []*goNixArgParser.ParseResult, printVersion, printHelp bool, ...)
- func EntriesToKVs(entries []string) [][2]string
- func NewCliCmd() *goNixArgParser.Command
- func NormalizeFsPaths(inputs []string) []string
- func NormalizeRedirectCode(code int) int
- func NormalizeUrlPaths(inputs []string) []string
- func PrintHelp()
- func SplitAllKeyValue(inputs []string) (results [][2]string)
- func SplitAllKeyValues(inputs []string) (results [][]string)
- func SplitKeyValue(input string) (k, v string, ok bool)
- func SplitKeyValues(input string) (key string, values []string, ok bool)
- func TrimKVs(inputs [][2]string)
- func TrimValuesAfterKey(inputs [][]string)
- type Param
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgsToCmdResults ¶ added in v1.15.2
func ArgsToCmdResults(cmd *goNixArgParser.Command, args []string) (results []*goNixArgParser.ParseResult, printVersion, printHelp bool, errs []error)
func EntriesToKVs ¶ added in v1.15.3
EntriesToKVs input element: "key:value" output element: [2]string{"key, "value"}
func NewCliCmd ¶ added in v1.15.2
func NewCliCmd() *goNixArgParser.Command
func NormalizeFsPaths ¶ added in v1.15.3
func NormalizeRedirectCode ¶ added in v1.15.3
func NormalizeUrlPaths ¶ added in v1.15.3
func SplitAllKeyValue ¶ added in v1.15.3
func SplitAllKeyValues ¶ added in v1.15.3
func SplitKeyValue ¶ added in v1.15.3
SplitKeyValue input format: <sep><key><sep><value>
func SplitKeyValues ¶ added in v1.15.3
SplitKeyValues input format: <sep><key>[<sep><value>...]
func TrimValuesAfterKey ¶ added in v1.20.0
func TrimValuesAfterKey(inputs [][]string)
TrimValuesAfterKey only trim values in [][key, value, value, ...]
Types ¶
type Param ¶
type Param struct { Root string EmptyRoot bool PrefixUrls []string AutoDirSlash int DefaultSort string DirIndexes []string Aliases [][2]string // [][url-path, fs-path] // [][username, password] UsersPlain [][2]string UsersBase64 [][2]string UsersMd5 [][2]string UsersSha1 [][2]string UsersSha256 [][2]string UsersSha512 [][2]string GlobalAuth bool AuthUrls []string AuthUrlsUsers [][]string // [][path, user...] AuthDirs []string AuthDirsUsers [][]string // [][path, user...] IndexUrls []string IndexUrlsUsers [][]string // [][path, user...] IndexDirs []string IndexDirsUsers [][]string // [][path, user...] GlobalUpload bool UploadUrls []string UploadUrlsUsers [][]string // [][path, user...] UploadDirs []string UploadDirsUsers [][]string // [][path, user...] GlobalMkdir bool MkdirUrls []string MkdirUrlsUsers [][]string // [][path, user...] MkdirDirs []string MkdirDirsUsers [][]string // [][path, user...] GlobalDelete bool DeleteUrls []string DeleteUrlsUsers [][]string // [][path, user...] DeleteDirs []string DeleteDirsUsers [][]string // [][path, user...] GlobalArchive bool ArchiveUrls []string ArchiveUrlsUsers [][]string // [][path, user...] ArchiveDirs []string ArchiveDirsUsers [][]string // [][path, user...] GlobalCors bool CorsUrls []string CorsDirs []string GlobalRestrictAccess []string // [][restrict-path, allow-hosts...] RestrictAccessUrls [][]string RestrictAccessDirs [][]string GlobalHeaders [][2]string // [][name, value] // [][path, name1, value1, ..., nameN, valueN] HeadersUrls [][]string HeadersDirs [][]string CertKeyPaths [][2]string Listens []string ListensPlain []string ListensTLS []string HostNames []string Theme string ThemeDir string Hsts bool HstsMaxAge int ToHttps bool ToHttpsPort string Shows []string ShowDirs []string ShowFiles []string Hides []string HideDirs []string HideFiles []string AccessLog string ErrorLog string PreMiddlewares []middleware.Middleware PostMiddlewares []middleware.Middleware }
type Params ¶ added in v1.15.2
type Params []*Param
func CmdResultsToParams ¶ added in v1.15.2
func CmdResultsToParams(results []*goNixArgParser.ParseResult) (params Params, errs []error)
func ParseFromCli ¶ added in v1.15.1
Click to show internal directories.
Click to hide internal directories.