config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNamespace  = errorx.NewNamespace("config")
	NotFoundError = ErrNamespace.NewType("not_found", errorx.NotFound())
)

Functions

func Initialize

func Initialize(path string) error

Initialize loads the configuration from the specified file.

Parameters:

  • path: The path to the configuration file.

Returns:

  • An error if the configuration cannot be loaded.

func Set

func Set(c *Config) error

Types

type BlockNodeConfig

type BlockNodeConfig struct {
	Namespace string           `yaml:"namespace" json:"namespace"`
	Release   string           `yaml:"release" json:"release"`
	Chart     string           `yaml:"chart" json:"chart"`
	Version   string           `yaml:"version" json:"version"`
	Storage   BlockNodeStorage `yaml:"storage" json:"storage"`
}

BlockNodeConfig represents the `blockNode` configuration block.

type BlockNodeStorage

type BlockNodeStorage struct {
	BasePath string `yaml:"basePath" json:"basePath"`
}

BlockNodeStorage represents the `storage` section under `blockNode`.

type Config

type Config struct {
	Log       logx.LoggingConfig `yaml:"log" json:"log"`
	BlockNode BlockNodeConfig    `yaml:"blockNode" json:"blockNode"`
}

Config holds the global configuration for the application.

func Get

func Get() Config

Get returns the loaded configuration.

Returns:

  • The global configuration.

Jump to

Keyboard shortcuts

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