config

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BreakingCheck

type BreakingCheck struct {
	Ignore []string `yaml:"ignore" yaml:"ignore"`
	// git ref to compare with
	AgainstGitRef string `json:"against_git_ref" yaml:"against_git_ref"`
}

BreakingCheck is the configuration for `breaking` command

type Config

type Config struct {
	// LintConfig is the lint configuration.
	Lint LintConfig `json:"lint" yaml:"lint"`

	// Deps is the dependencies repositories
	Deps []string `json:"deps" yaml:"deps"`

	// Generate is the generate configuration.
	Generate Generate `json:"generate" yaml:"generate"`

	// BreakingCheck `breaking` command's configuration
	BreakingCheck BreakingCheck `json:"breaking" yaml:"breaking"`
}

Config is the configuration of easyp.

func New

func New(_ context.Context, filepath string) (*Config, error)

New creates a new configuration from the file.

type Generate

type Generate struct {
	Inputs  []Input  `json:"inputs" yaml:"inputs"`
	Plugins []Plugin `json:"plugins" yaml:"plugins"`
}

Generate is the configuration of the generate command.

type Input

type Input struct {
	Directory string       `yaml:"directory"`
	GitRepo   InputGitRepo `yaml:"git_repo"`
}

Input source for generating code.

type InputDirectory

type InputDirectory struct {
	Path string `yaml:"path"`
}

InputDirectory is the configuration of the directory.

type InputGitRepo

type InputGitRepo struct {
	URL          string `yaml:"url"`
	SubDirectory string `yaml:"sub_directory"`
	Out          string `yaml:"out"`
}

InputGitRepo is the configuration of the git repository.

type LintConfig

type LintConfig struct {
	Use                 []string            `json:"use" yaml:"use" env:"USE"`                                                          // Use rules for linter.
	EnumZeroValueSuffix string              `json:"enum_zero_value_suffix" yaml:"enum_zero_value_suffix" env:"ENUM_ZERO_VALUE_SUFFIX"` // Enum zero value suffix.
	ServiceSuffix       string              `json:"service_suffix" yaml:"service_suffix" env:"SERVICE_SUFFIX"`                         // Service suffix.
	Ignore              []string            `json:"ignore" yaml:"ignore" env:"IGNORE"`                                                 // Ignore dirs with proto file.
	Except              []string            `json:"except" yaml:"except" env:"EXCEPT"`                                                 // Except linter rules.
	AllowCommentIgnores bool                `json:"allow_comment_ignores" yaml:"allow_comment_ignores" env:"ALLOW_COMMENT_IGNORES"`    // Allow comment ignore.
	IgnoreOnly          map[string][]string `json:"ignore_only" yaml:"ignore_only" env:"IGNORE_ONLY"`
}

LintConfig contains linter configuration.

type Plugin

type Plugin struct {
	Name string            `json:"name" yaml:"name"`
	Out  string            `json:"out" yaml:"out"`
	Opts map[string]string `json:"opts" yaml:"opts"`
}

Plugin is the configuration of the plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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