github.com/stackb/rules_proto@v0.0.0-20240221195024-5428336c51f1/pkg/protoc/plugin_context.go (about)

     1  package protoc
     2  
     3  // PluginContext represents the environment available to the plugin when
     4  // invoked.
     5  type PluginContext struct {
     6  	// Rel is the relative path of the package.
     7  	Rel string
     8  	// ProtoLibrary is the proto_library under observation.
     9  	ProtoLibrary ProtoLibrary
    10  	// PackageConfig is the configuration for the package.
    11  	PackageConfig PackageConfig
    12  	// PluginConfig is the configuration object associated with the plugin.
    13  	PluginConfig LanguagePluginConfig
    14  	// Plugin is a reference to the plugin implementation
    15  	Plugin Plugin
    16  }
    17  
    18  // type PluginContextResolver func(c *config.Config, ix *resolve.RuleIndex, r *rule.Rule, imports []string, from label.Label)