config

package
v0.1.0-beta.202310030452 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithConfig

func ContextWithConfig(ctx context.Context) (context.Context, error)

Types

type ConfigOption

type ConfigOption func(*Configuration) error

ConfigOption defines a type of function to configures the Config.

func WithFlags

func WithFlags() ConfigOption

WithFlags parses the command line, and populates the configuration.

type Configuration

type Configuration struct {
	ConfigPath string
	// contains filtered or unexported fields
}

Configuration represents the configuration as set by command-line flags. All variables will be set, unless explicitly noted.

func GetConfigFromContext

func GetConfigFromContext(ctx context.Context) *Configuration

func NewConfig

func NewConfig(ctx context.Context, opts ...ConfigOption) (*Configuration, error)

NewConfig creates a new Config.

Jump to

Keyboard shortcuts

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