config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// gen-dao flags
	ErrMissingInputDir  = ConfigError("validate cli config: missing -in")
	ErrMissingOutputDir = ConfigError("validate cli config: missing -out")

	// flag parsing
	ErrUnknownFlag = ConfigError("parse flags: unknown flag provided")

	// gen-proto flags
	ErrMissingProtoInputDir = ConfigError("validate gen-proto config: missing -in")

	// gen-ts flags
	ErrMissingTSInputDir  = ConfigError("validate gen-ts config: missing -in")
	ErrMissingTSOutputDir = ConfigError("validate gen-ts config: missing -out")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	InputDir  string
	OutputDir string
}

Config holds the parsed and validated CLI configuration for the main gcode command (gen-dao subcommand). It is populated by Parse() and validated by Validate().

func Parse

func Parse(args []string) (Config, error)

Parse parses CLI arguments into a validated configuration.

func (Config) Validate

func (c Config) Validate() error

Validate validates configuration values.

type ConfigError added in v0.3.0

type ConfigError = errorx.Sentinel[configTag]

ConfigError is the domain error type for config validation errors.

type GenProtoConfig

type GenProtoConfig struct {
	InputDir string
}

GenProtoConfig contains configuration for the gen-proto subcommand.

func ParseGenProto

func ParseGenProto(args []string) (GenProtoConfig, error)

ParseGenProto parses CLI arguments for the gen-proto subcommand.

func (GenProtoConfig) Validate

func (c GenProtoConfig) Validate() error

Validate validates gen-proto configuration values.

type GenTSConfig added in v0.2.0

type GenTSConfig struct {
	InputDir  string
	OutputDir string
}

GenTSConfig contains configuration for the gen-ts subcommand.

func ParseGenTS added in v0.2.0

func ParseGenTS(args []string) (GenTSConfig, error)

ParseGenTS parses CLI arguments for the gen-ts subcommand.

func (GenTSConfig) Validate added in v0.2.0

func (c GenTSConfig) Validate() error

Validate validates gen-ts configuration values.

Jump to

Keyboard shortcuts

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