Documentation
¶
Index ¶
- func GetModuleConfigAndPluginConfigsForProtocPlugin(ctx context.Context, configOverride string, module string, ...) (bufconfig.ModuleConfig, []bufconfig.PluginConfig, []bufconfig.CheckConfig, ...)
- func NewAppextContainerForPluginEnv(pluginEnv protoplugin.PluginEnv, appName string, logLevelString string, ...) (appext.Container, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModuleConfigAndPluginConfigsForProtocPlugin ¶ added in v1.56.0
func GetModuleConfigAndPluginConfigsForProtocPlugin( ctx context.Context, configOverride string, module string, pluginPathOverrides map[string]string, ) (bufconfig.ModuleConfig, []bufconfig.PluginConfig, []bufconfig.CheckConfig, error)
GetModuleConfigAndPluginConfigsForProtocPlugin gets the [bufmodule.ModuleConfig] and [bufmodule.PluginConfig]s for the specified module for the protoc plugin implementations.
The caller can provide overrides for plugin paths in the plugin configurations. The protoc plugin implementations do not support remote plugins. Also, for use-cases such as Bazel, access to local binaries might require an explicit path override. So, this allows callers to pass a map of plugin name to local path to override the plugin configuration.
We also return all check configs for the option [bufcheck.WithRelatedCheckConfigs] to validate the plugin configs when running lint/breaking.
This is the same in both plugins so we just pulled it out to a common spot.
func NewAppextContainerForPluginEnv ¶ added in v1.40.0
func NewAppextContainerForPluginEnv( pluginEnv protoplugin.PluginEnv, appName string, logLevelString string, logFormatString string, ) (appext.Container, error)
NewAppextContainerForPluginEnv creates a new appext.Container for the PluginEnv.
This is used by the protoc plugins.
Types ¶
This section is empty.