Documentation ¶
Index ¶
- func MavenDependencyConfigToProtoRuntimeLibrary(dependency bufpluginconfig.MavenDependencyConfig) *registryv1alpha1.MavenConfig_RuntimeLibrary
- func MavenProtoRuntimeConfigToRuntimeConfig(proto *registryv1alpha1.MavenConfig_RuntimeConfig) (bufpluginconfig.MavenRuntimeConfig, error)
- func MavenRuntimeConfigToProtoRuntimeConfig(runtime bufpluginconfig.MavenRuntimeConfig) *registryv1alpha1.MavenConfig_RuntimeConfig
- func OutputLanguagesToProtoLanguages(languages []string) ([]registryv1alpha1.PluginLanguage, error)
- func PluginIdentityToProtoCuratedPluginReference(identity bufpluginref.PluginIdentity) *registryv1alpha1.CuratedPluginReference
- func PluginReferenceToProtoCuratedPluginReference(reference bufpluginref.PluginReference) *registryv1alpha1.CuratedPluginReference
- func PluginReferencesToCuratedProtoPluginReferences(references []bufpluginref.PluginReference) []*registryv1alpha1.CuratedPluginReference
- func PluginRegistryToProtoRegistryConfig(pluginRegistry *bufpluginconfig.RegistryConfig) (*registryv1alpha1.RegistryConfig, error)
- func PluginToProtoPluginRegistryType(plugin Plugin) registryv1alpha1.PluginRegistryType
- func ProtoMavenConfigToMavenRegistryConfig(protoMavenConfig *registryv1alpha1.MavenConfig) (*bufpluginconfig.MavenRegistryConfig, error)
- func ProtoMavenRuntimeLibraryToDependencyConfig(proto *registryv1alpha1.MavenConfig_RuntimeLibrary) bufpluginconfig.MavenDependencyConfig
- func ProtoPythonConfigToPythonRegistryConfig(protoPythonConfig *registryv1alpha1.PythonConfig) (*bufpluginconfig.PythonRegistryConfig, error)
- func ProtoRegistryConfigToPluginRegistry(config *registryv1alpha1.RegistryConfig) (*bufpluginconfig.RegistryConfig, error)
- func ProtoSwiftConfigToSwiftRegistryConfig(protoSwiftConfig *registryv1alpha1.SwiftConfig) (*bufpluginconfig.SwiftRegistryConfig, error)
- func PythonRegistryConfigToProtoPythonConfig(pythonConfig *bufpluginconfig.PythonRegistryConfig) (*registryv1alpha1.PythonConfig, error)
- func SwiftRegistryConfigToProtoSwiftConfig(swiftConfig *bufpluginconfig.SwiftRegistryConfig) *registryv1alpha1.SwiftConfig
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MavenDependencyConfigToProtoRuntimeLibrary ¶
func MavenDependencyConfigToProtoRuntimeLibrary(dependency bufpluginconfig.MavenDependencyConfig) *registryv1alpha1.MavenConfig_RuntimeLibrary
MavenDependencyConfigToProtoRuntimeLibrary converts a bufpluginconfig.MavenDependencyConfig to an equivalent registryv1alpha1.MavenConfig_RuntimeLibrary.
func MavenProtoRuntimeConfigToRuntimeConfig ¶
func MavenProtoRuntimeConfigToRuntimeConfig(proto *registryv1alpha1.MavenConfig_RuntimeConfig) (bufpluginconfig.MavenRuntimeConfig, error)
MavenProtoRuntimeConfigToRuntimeConfig converts a registryv1alpha1.MavenConfig_RuntimeConfig to a bufpluginconfig.MavenRuntimeConfig.
func MavenRuntimeConfigToProtoRuntimeConfig ¶
func MavenRuntimeConfigToProtoRuntimeConfig(runtime bufpluginconfig.MavenRuntimeConfig) *registryv1alpha1.MavenConfig_RuntimeConfig
MavenRuntimeConfigToProtoRuntimeConfig converts a bufpluginconfig.MavenRuntimeConfig to a registryv1alpha1.MavenConfig_RuntimeLibrary.
func OutputLanguagesToProtoLanguages ¶
func OutputLanguagesToProtoLanguages(languages []string) ([]registryv1alpha1.PluginLanguage, error)
OutputLanguagesToProtoLanguages determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
func PluginIdentityToProtoCuratedPluginReference ¶
func PluginIdentityToProtoCuratedPluginReference(identity bufpluginref.PluginIdentity) *registryv1alpha1.CuratedPluginReference
PluginIdentityToProtoCuratedPluginReference converts a bufpluginref.PluginIdentity to a registryv1alpha1.CuratedPluginReference.
The returned CuratedPluginReference contains no Version/Revision information.
func PluginReferenceToProtoCuratedPluginReference ¶
func PluginReferenceToProtoCuratedPluginReference(reference bufpluginref.PluginReference) *registryv1alpha1.CuratedPluginReference
PluginReferenceToProtoCuratedPluginReference converts a bufpluginref.PluginReference to a registryv1alpha1.CuratedPluginReference.
func PluginReferencesToCuratedProtoPluginReferences ¶
func PluginReferencesToCuratedProtoPluginReferences(references []bufpluginref.PluginReference) []*registryv1alpha1.CuratedPluginReference
PluginReferencesToCuratedProtoPluginReferences converts a slice of bufpluginref.PluginReference to a slice of registryv1alpha1.CuratedPluginReference.
func PluginRegistryToProtoRegistryConfig ¶
func PluginRegistryToProtoRegistryConfig(pluginRegistry *bufpluginconfig.RegistryConfig) (*registryv1alpha1.RegistryConfig, error)
PluginRegistryToProtoRegistryConfig converts a bufpluginconfig.RegistryConfig to a registryv1alpha1.RegistryConfig.
func PluginToProtoPluginRegistryType ¶
func PluginToProtoPluginRegistryType(plugin Plugin) registryv1alpha1.PluginRegistryType
PluginToProtoPluginRegistryType determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
func ProtoMavenConfigToMavenRegistryConfig ¶
func ProtoMavenConfigToMavenRegistryConfig(protoMavenConfig *registryv1alpha1.MavenConfig) (*bufpluginconfig.MavenRegistryConfig, error)
ProtoMavenConfigToMavenRegistryConfig converts a registryv1alpha1.MavenConfig to a bufpluginconfig.MavenRegistryConfig.
func ProtoMavenRuntimeLibraryToDependencyConfig ¶
func ProtoMavenRuntimeLibraryToDependencyConfig(proto *registryv1alpha1.MavenConfig_RuntimeLibrary) bufpluginconfig.MavenDependencyConfig
ProtoMavenRuntimeLibraryToDependencyConfig converts a registryv1alpha1 to a bufpluginconfig.MavenDependencyConfig.
func ProtoPythonConfigToPythonRegistryConfig ¶
func ProtoPythonConfigToPythonRegistryConfig(protoPythonConfig *registryv1alpha1.PythonConfig) (*bufpluginconfig.PythonRegistryConfig, error)
func ProtoRegistryConfigToPluginRegistry ¶
func ProtoRegistryConfigToPluginRegistry(config *registryv1alpha1.RegistryConfig) (*bufpluginconfig.RegistryConfig, error)
ProtoRegistryConfigToPluginRegistry converts a registryv1alpha1.RegistryConfig to a bufpluginconfig.RegistryConfig .
func ProtoSwiftConfigToSwiftRegistryConfig ¶
func ProtoSwiftConfigToSwiftRegistryConfig(protoSwiftConfig *registryv1alpha1.SwiftConfig) (*bufpluginconfig.SwiftRegistryConfig, error)
func PythonRegistryConfigToProtoPythonConfig ¶
func PythonRegistryConfigToProtoPythonConfig(pythonConfig *bufpluginconfig.PythonRegistryConfig) (*registryv1alpha1.PythonConfig, error)
func SwiftRegistryConfigToProtoSwiftConfig ¶
func SwiftRegistryConfigToProtoSwiftConfig(swiftConfig *bufpluginconfig.SwiftRegistryConfig) *registryv1alpha1.SwiftConfig
Types ¶
type Plugin ¶
type Plugin interface { // Version is the version of the plugin's implementation // (e.g. the protoc-gen-connect-go implementation is v0.2.0). Version() string // SourceURL is an optional attribute used to specify where the source // for the plugin can be found. SourceURL() string // Description is an optional attribute to provide a more detailed // description for the plugin. Description() string // Dependencies are the dependencies this plugin has on other plugins. // // An example of a dependency might be a 'protoc-gen-go-grpc' plugin // which depends on the 'protoc-gen-go' generated code. Dependencies() []bufpluginref.PluginReference // Registry is the registry configuration, which lets the user specify // registry dependencies, and other metadata that applies to a specific // remote generation registry (e.g. the Go module proxy, NPM registry, // etc). Registry() *bufpluginconfig.RegistryConfig // ContainerImageDigest returns the plugin's source image digest. // // For now, we only support docker image sources, but this // might evolve to support others later on. ContainerImageDigest() string }
Plugin represents a plugin defined by a buf.plugin.yaml.
func NewPlugin ¶
func NewPlugin( version string, dependencies []bufpluginref.PluginReference, registryConfig *bufpluginconfig.RegistryConfig, imageDigest string, sourceURL string, description string, ) (Plugin, error)
NewPlugin creates a new plugin from the given configuration and image digest.
Directories ¶
Path | Synopsis |
---|---|
Package bufpluginconfig defines the buf.plugin.yaml file.
|
Package bufpluginconfig defines the buf.plugin.yaml file. |
Package bufplugindocker contains utilities for building Buf plugins using the Docker API.
|
Package bufplugindocker contains utilities for building Buf plugins using the Docker API. |