config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentDevelopment = "development"
	EnvironmentProduction  = "production"
)

Variables

View Source
var (
	DefaultConfigNames        = []ConfName{Config}
	ValidConfigFileExtensions = []Format{TOML}
)

Functions

This section is empty.

Types

type Compiler

type Compiler interface {
	CompileConfig(logger loggers.Logger) error
}

type ConfName

type ConfName string
const (
	Config ConfName = "config"
)

type Format

type Format string

Format 文件格式类型

const (
	TOML Format = "toml"
)

TOML 支持的格式,为简单示例,只支持TOML格式

type Provider

type Provider interface {
	GetString(key string) string
	GetInt(key string) int
	GetBool(key string) bool
	GetParams(key string) maps.Params
	GetStringMap(key string) map[string]any
	GetStringMapString(key string) map[string]string
	GetStringSlice(key string) []string
	Get(key string) any
	Set(key string, value any)
	Keys() []string
	Merge(key string, value any)
	SetDefaults(params maps.Params)
	SetDefaultMergeStrategy()
	WalkParams(walkFn func(params ...maps.KeyParams) bool)
	IsSet(key string) bool
}

Provider provides the configuration settings for Hugo.

type SourceDescriptor

type SourceDescriptor interface {
	Fs() afero.Fs

	// Filename RelPath to the config file to use, e.g. /my/project/config.toml
	Filename() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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