Documentation
¶
Overview ¶
Package files provides config files and customizations for buf.
Index ¶
- Variables
- func ModuleRoot() (string, error)
- func WriteBufGenYaml(path string, config *BufGenYaml) error
- func WriteBufWorkYaml(path string, dirs ...string) error
- func WriteBufYaml(path string) error
- type BreakingRuleSet
- type BufGenYaml
- func (r *BufGenYaml) BoolManagedValue(key string) (bool, bool)
- func (r *BufGenYaml) DefaultGoPrefix() string
- func (r *BufGenYaml) HasPlugins() bool
- func (r *BufGenYaml) IsManaged() bool
- func (r *BufGenYaml) SetDefaultGoPrefix(outputDir string) error
- func (r *BufGenYaml) StringManagedValue(key string) (string, bool)
- type BufWorkYaml
- type BufYaml
- type GenerationPlugin
- type LintRuleSet
- type ManagedRules
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotAModule = errors.New("not a go module")
)
Functions ¶
func ModuleRoot ¶
func WriteBufGenYaml ¶
func WriteBufGenYaml(path string, config *BufGenYaml) error
func WriteBufWorkYaml ¶
func WriteBufYaml ¶
Types ¶
type BreakingRuleSet ¶
type BreakingRuleSet struct {
RulesUsed []string `yaml:"use"`
}
type BufGenYaml ¶
type BufGenYaml struct {
Version string
Managed ManagedRules
Plugins []GenerationPlugin
UseGoGrpc bool
UseGoJson bool
GoOut string
}
func (*BufGenYaml) BoolManagedValue ¶
func (r *BufGenYaml) BoolManagedValue(key string) (bool, bool)
func (*BufGenYaml) DefaultGoPrefix ¶
func (r *BufGenYaml) DefaultGoPrefix() string
func (*BufGenYaml) HasPlugins ¶
func (r *BufGenYaml) HasPlugins() bool
func (*BufGenYaml) IsManaged ¶
func (r *BufGenYaml) IsManaged() bool
func (*BufGenYaml) SetDefaultGoPrefix ¶
func (r *BufGenYaml) SetDefaultGoPrefix(outputDir string) error
func (*BufGenYaml) StringManagedValue ¶
func (r *BufGenYaml) StringManagedValue(key string) (string, bool)
type BufWorkYaml ¶
type BufYaml ¶
type BufYaml struct {
Version string `yaml:"version"`
LintRules LintRuleSet `yaml:"lint"`
BreakingRules BreakingRuleSet `yaml:"breaking"`
}
type GenerationPlugin ¶
type GenerationPlugin struct {
Name string `yaml:"name"`
OutputPath string `yaml:"out"`
Options []string `yaml:"opt,omitempty"`
}
func (*GenerationPlugin) OptionString ¶
func (p *GenerationPlugin) OptionString() string
type LintRuleSet ¶
type ManagedRules ¶
type ManagedRules = map[string]interface{}
Click to show internal directories.
Click to hide internal directories.