Documentation ¶
Overview ¶
Package bufconfig contains the configuration functionality.
Index ¶
Constants ¶
View Source
const ConfigFilePath = "buf.yaml"
ConfigFilePath is the configuration file path.
Variables ¶
This section is empty.
Functions ¶
func ConfigCreate ¶ added in v0.25.0
func ConfigCreate(ctx context.Context, writeBucket storage.WriteBucket, name string, deps ...string) error
ConfigCreate writes an initial configuration file into the bucket.
func ConfigExists ¶ added in v0.25.0
ConfigExists checks if a configuration file exists.
Types ¶
type Config ¶
type Config struct { Name bufmodule.ModuleName Build *bufmodulebuild.Config Breaking *bufbreaking.Config Lint *buflint.Config }
Config is the user config.
type Provider ¶
type Provider interface { // GetConfig gets the Config for the given JSON or YAML data. // // If the data is of length 0, returns the default config. GetConfig(ctx context.Context, readBucket storage.ReadBucket) (*Config, error) // GetConfig gets the Config for the given JSON or YAML data. // // If the data is of length 0, returns the default config. GetConfigForData(ctx context.Context, data []byte) (*Config, error) }
Provider is a provider.
func NewProvider ¶
NewProvider returns a new Provider.
Click to show internal directories.
Click to hide internal directories.