types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvDocItem

type EnvDocItem struct {
	// Name of the environment variable.
	Name string
	// Doc is a documentation text for the environment variable.
	Doc string
	// Opts is a set of options for environment variable parsing.
	Opts EnvVarOptions
	// Children is a list of child environment variables.
	Children []*EnvDocItem
}

EnvDocItem is a documentation item for one environment variable.

type EnvScope

type EnvScope struct {
	// Name of the scope.
	Name string
	// Doc is a documentation text for the scope.
	Doc string
	// Vars is a list of environment variables.
	Vars []*EnvDocItem
}

type EnvVarOptions

type EnvVarOptions struct {
	// Separator is a separator for array types.
	Separator string
	// Required is a flag that enables required check.
	Required bool
	// Expand is a flag that enables environment variable expansion.
	Expand bool
	// NonEmpty is a flag that enables non-empty check.
	NonEmpty bool
	// FromFile is a flag that enables reading environment variable from a file.
	FromFile bool
	// Default is a default value for the environment variable.
	Default string
}

EnvVarOptions is a set of options for environment variable parsing.

type OutFormat

type OutFormat string

OutFormat is an output format for the documentation.

const (
	OutFormatMarkdown OutFormat = "markdown"
	OutFormatHTML     OutFormat = "html"
	OutFormatTxt      OutFormat = "plaintext"
	OutFormatEnv      OutFormat = "dotenv"
	OutFormatJSON     OutFormat = "json"
)

type TargetType

type TargetType int

TargetType is an env library target.

const (
	TargetTypeCaarlos0 TargetType = iota
	TargetTypeCleanenv
)

func ParseTargetType

func ParseTargetType(s string) (TargetType, error)

func (TargetType) String

func (i TargetType) String() string

Jump to

Keyboard shortcuts

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