Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaFileName = "schema.json"
	IntentFileName = "intent-%s.json"
	IntentFileGlob = "intent-*.json"
)

Variables

View Source
var (
	ErrTargetUndefined = fmt.Errorf("target not defined")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts ...ConfigOpt) (*Config, error)

func (*Config) DownloadPath

func (c *Config) DownloadPath() string

func (*Config) GetSchemaStore

func (c *Config) GetSchemaStore() store.Store

func (*Config) LogLevel

func (c *Config) LogLevel() string

func (*Config) SchemaPathCleanup

func (c *Config) SchemaPathCleanup() bool

func (*Config) SchemaStorePath

func (c *Config) SchemaStorePath() string

func (*Config) SchemasPath

func (c *Config) SchemasPath() string

func (*Config) Validation

func (c *Config) Validation() *config.Validation

type ConfigOpt

type ConfigOpt func(c *Config) error

func WithCachePath

func WithCachePath(path string) ConfigOpt

func WithLogLevel

func WithLogLevel(loglevel string) ConfigOpt

func WithSchemaPathCleanup

func WithSchemaPathCleanup(cleanup bool) ConfigOpt

func WithValidation

func WithValidation(validation *config.Validation) ConfigOpt

type ConfigOpts

type ConfigOpts []ConfigOpt

type ConfigPersistent

type ConfigPersistent struct {
	*Config
	// contains filtered or unexported fields
}

func NewConfigPersistent

func NewConfigPersistent(opts ConfigOpts, optsP ConfigPersistentOpts) (*ConfigPersistent, error)

func (*ConfigPersistent) ConfigFileGlob

func (c *ConfigPersistent) ConfigFileGlob() string

func (*ConfigPersistent) ConfigFileName

func (c *ConfigPersistent) ConfigFileName(intentName string) string

func (*ConfigPersistent) ExpectSchemaLoadsSuccessful

func (c *ConfigPersistent) ExpectSchemaLoadsSuccessful() bool

func (*ConfigPersistent) SchemaDefinitionFilePath

func (c *ConfigPersistent) SchemaDefinitionFilePath() string

func (*ConfigPersistent) TargetBasePath

func (c *ConfigPersistent) TargetBasePath() string

func (*ConfigPersistent) TargetName

func (c *ConfigPersistent) TargetName() string

func (*ConfigPersistent) TargetPath

func (c *ConfigPersistent) TargetPath() string

type ConfigPersistentOpt

type ConfigPersistentOpt func(c *ConfigPersistent) error

func WithSchemaDefintionFilePath

func WithSchemaDefintionFilePath(schemaDefinitionFile string) ConfigPersistentOpt

func WithSuccessfullSchemaLoad

func WithSuccessfullSchemaLoad() ConfigPersistentOpt

func WithTargetName

func WithTargetName(targetName string) ConfigPersistentOpt

func WithTargetsBasePath

func WithTargetsBasePath(targetBasePath string) ConfigPersistentOpt

type ConfigPersistentOpts

type ConfigPersistentOpts []ConfigPersistentOpt

Jump to

Keyboard shortcuts

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