config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DuplicateSingularError    = "error"
	DuplicateSingularLastWins = "last-wins"
)

Variables

View Source
var (
	ErrMissingTSInputDir  = errors.New("validate gen-ts config: missing -in")
	ErrMissingTSOutputDir = errors.New("validate gen-ts config: missing -out")
	ErrNoProtoFiles       = errors.New("no .proto files found")
)

Sentinels for gen-ts validation errors, enabling errors.Is matching in callers and tests.

Functions

This section is empty.

Types

type Config

type Config struct {
	InputDir                  string
	OutputDir                 string
	DuplicateSingularStrategy string
	AllowJSONUnknownFields    bool
}

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 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