Documentation ¶
Index ¶
- func CargoRegistryConfigToProtoCargoConfig(cargoConfig *bufremotepluginconfig.CargoRegistryConfig) (*registryv1alpha1.CargoConfig, error)
- func MavenDependencyConfigToProtoRuntimeLibrary(dependency bufremotepluginconfig.MavenDependencyConfig) *registryv1alpha1.MavenConfig_RuntimeLibrary
- func MavenProtoRuntimeConfigToRuntimeConfig(proto *registryv1alpha1.MavenConfig_RuntimeConfig) (bufremotepluginconfig.MavenRuntimeConfig, error)
- func MavenRuntimeConfigToProtoRuntimeConfig(runtime bufremotepluginconfig.MavenRuntimeConfig) *registryv1alpha1.MavenConfig_RuntimeConfig
- func OutputLanguagesToProtoLanguages(languages []string) ([]registryv1alpha1.PluginLanguage, error)
- func PluginIdentityToProtoCuratedPluginReference(identity bufremotepluginref.PluginIdentity) *registryv1alpha1.CuratedPluginReference
- func PluginReferenceToProtoCuratedPluginReference(reference bufremotepluginref.PluginReference) *registryv1alpha1.CuratedPluginReference
- func PluginReferencesToCuratedProtoPluginReferences(references []bufremotepluginref.PluginReference) []*registryv1alpha1.CuratedPluginReference
- func PluginRegistryToProtoRegistryConfig(pluginRegistry *bufremotepluginconfig.RegistryConfig) (*registryv1alpha1.RegistryConfig, error)
- func PluginToProtoPluginRegistryType(plugin Plugin) registryv1alpha1.PluginRegistryType
- func ProtoCargoConfigToCargoRegistryConfig(protoCargoConfig *registryv1alpha1.CargoConfig) (*bufremotepluginconfig.CargoRegistryConfig, error)
- func ProtoMavenConfigToMavenRegistryConfig(protoMavenConfig *registryv1alpha1.MavenConfig) (*bufremotepluginconfig.MavenRegistryConfig, error)
- func ProtoMavenRuntimeLibraryToDependencyConfig(proto *registryv1alpha1.MavenConfig_RuntimeLibrary) bufremotepluginconfig.MavenDependencyConfig
- func ProtoPythonConfigToPythonRegistryConfig(protoPythonConfig *registryv1alpha1.PythonConfig) (*bufremotepluginconfig.PythonRegistryConfig, error)
- func ProtoRegistryConfigToPluginRegistry(config *registryv1alpha1.RegistryConfig) (*bufremotepluginconfig.RegistryConfig, error)
- func ProtoSwiftConfigToSwiftRegistryConfig(protoSwiftConfig *registryv1alpha1.SwiftConfig) (*bufremotepluginconfig.SwiftRegistryConfig, error)
- func PythonRegistryConfigToProtoPythonConfig(pythonConfig *bufremotepluginconfig.PythonRegistryConfig) (*registryv1alpha1.PythonConfig, error)
- func SwiftRegistryConfigToProtoSwiftConfig(swiftConfig *bufremotepluginconfig.SwiftRegistryConfig) *registryv1alpha1.SwiftConfig
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CargoRegistryConfigToProtoCargoConfig ¶ added in v1.33.0
func CargoRegistryConfigToProtoCargoConfig(cargoConfig *bufremotepluginconfig.CargoRegistryConfig) (*registryv1alpha1.CargoConfig, error)
CargoRegistryConfigToProtoCargoConfig converts cargoConfig to an equivalent *registryv1alpha1.CargoConfig.
func MavenDependencyConfigToProtoRuntimeLibrary ¶ added in v1.33.0
func MavenDependencyConfigToProtoRuntimeLibrary(dependency bufremotepluginconfig.MavenDependencyConfig) *registryv1alpha1.MavenConfig_RuntimeLibrary
MavenDependencyConfigToProtoRuntimeLibrary converts a bufremotepluginconfig.MavenDependencyConfig to an equivalent registryv1alpha1.MavenConfig_RuntimeLibrary.
func MavenProtoRuntimeConfigToRuntimeConfig ¶ added in v1.33.0
func MavenProtoRuntimeConfigToRuntimeConfig(proto *registryv1alpha1.MavenConfig_RuntimeConfig) (bufremotepluginconfig.MavenRuntimeConfig, error)
MavenProtoRuntimeConfigToRuntimeConfig converts a registryv1alpha1.MavenConfig_RuntimeConfig to a bufremotepluginconfig.MavenRuntimeConfig.
func MavenRuntimeConfigToProtoRuntimeConfig ¶ added in v1.33.0
func MavenRuntimeConfigToProtoRuntimeConfig(runtime bufremotepluginconfig.MavenRuntimeConfig) *registryv1alpha1.MavenConfig_RuntimeConfig
MavenRuntimeConfigToProtoRuntimeConfig converts a bufremotepluginconfig.MavenRuntimeConfig to a registryv1alpha1.MavenConfig_RuntimeLibrary.
func OutputLanguagesToProtoLanguages ¶ added in v1.33.0
func OutputLanguagesToProtoLanguages(languages []string) ([]registryv1alpha1.PluginLanguage, error)
OutputLanguagesToProtoLanguages determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
func PluginIdentityToProtoCuratedPluginReference ¶ added in v1.33.0
func PluginIdentityToProtoCuratedPluginReference(identity bufremotepluginref.PluginIdentity) *registryv1alpha1.CuratedPluginReference
PluginIdentityToProtoCuratedPluginReference converts a bufremotepluginref.PluginIdentity to a registryv1alpha1.CuratedPluginReference.
The returned CuratedPluginReference contains no Version/Revision information.
func PluginReferenceToProtoCuratedPluginReference ¶ added in v1.33.0
func PluginReferenceToProtoCuratedPluginReference(reference bufremotepluginref.PluginReference) *registryv1alpha1.CuratedPluginReference
PluginReferenceToProtoCuratedPluginReference converts a bufremotepluginref.PluginReference to a registryv1alpha1.CuratedPluginReference.
func PluginReferencesToCuratedProtoPluginReferences ¶ added in v1.33.0
func PluginReferencesToCuratedProtoPluginReferences(references []bufremotepluginref.PluginReference) []*registryv1alpha1.CuratedPluginReference
PluginReferencesToCuratedProtoPluginReferences converts a slice of bufremotepluginref.PluginReference to a slice of registryv1alpha1.CuratedPluginReference.
func PluginRegistryToProtoRegistryConfig ¶ added in v1.33.0
func PluginRegistryToProtoRegistryConfig(pluginRegistry *bufremotepluginconfig.RegistryConfig) (*registryv1alpha1.RegistryConfig, error)
PluginRegistryToProtoRegistryConfig converts a bufremotepluginconfig.RegistryConfig to a registryv1alpha1.RegistryConfig.
func PluginToProtoPluginRegistryType ¶ added in v1.33.0
func PluginToProtoPluginRegistryType(plugin Plugin) registryv1alpha1.PluginRegistryType
PluginToProtoPluginRegistryType determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
func ProtoCargoConfigToCargoRegistryConfig ¶ added in v1.33.0
func ProtoCargoConfigToCargoRegistryConfig(protoCargoConfig *registryv1alpha1.CargoConfig) (*bufremotepluginconfig.CargoRegistryConfig, error)
ProtoCargoConfigToCargoRegistryConfig converts protoCargoConfig to an equivalent *bufremotepluginconfig.CargoRegistryConfig.
func ProtoMavenConfigToMavenRegistryConfig ¶ added in v1.33.0
func ProtoMavenConfigToMavenRegistryConfig(protoMavenConfig *registryv1alpha1.MavenConfig) (*bufremotepluginconfig.MavenRegistryConfig, error)
ProtoMavenConfigToMavenRegistryConfig converts a registryv1alpha1.MavenConfig to a bufremotepluginconfig.MavenRegistryConfig.
func ProtoMavenRuntimeLibraryToDependencyConfig ¶ added in v1.33.0
func ProtoMavenRuntimeLibraryToDependencyConfig(proto *registryv1alpha1.MavenConfig_RuntimeLibrary) bufremotepluginconfig.MavenDependencyConfig
ProtoMavenRuntimeLibraryToDependencyConfig converts a registryv1alpha1 to a bufremotepluginconfig.MavenDependencyConfig.
func ProtoPythonConfigToPythonRegistryConfig ¶ added in v1.33.0
func ProtoPythonConfigToPythonRegistryConfig(protoPythonConfig *registryv1alpha1.PythonConfig) (*bufremotepluginconfig.PythonRegistryConfig, error)
ProtoPythonConfigToPythonRegistryConfig converts protoPythonConfig to an equivalent *bufremotepluginconfig.PythonRegistryConfig.
func ProtoRegistryConfigToPluginRegistry ¶ added in v1.33.0
func ProtoRegistryConfigToPluginRegistry(config *registryv1alpha1.RegistryConfig) (*bufremotepluginconfig.RegistryConfig, error)
ProtoRegistryConfigToPluginRegistry converts a registryv1alpha1.RegistryConfig to a bufremotepluginconfig.RegistryConfig .
func ProtoSwiftConfigToSwiftRegistryConfig ¶ added in v1.33.0
func ProtoSwiftConfigToSwiftRegistryConfig(protoSwiftConfig *registryv1alpha1.SwiftConfig) (*bufremotepluginconfig.SwiftRegistryConfig, error)
ProtoSwiftConfigToSwiftRegistryConfig converts protoSwiftConfig to an equivalent *bufremotepluginconfig.SwiftRegistryConfig.
func PythonRegistryConfigToProtoPythonConfig ¶ added in v1.33.0
func PythonRegistryConfigToProtoPythonConfig(pythonConfig *bufremotepluginconfig.PythonRegistryConfig) (*registryv1alpha1.PythonConfig, error)
PythonRegistryConfigToProtoPythonConfig converts pythonConfig to an equivalent *registryv1alpha1.PythonConfig.
func SwiftRegistryConfigToProtoSwiftConfig ¶ added in v1.33.0
func SwiftRegistryConfigToProtoSwiftConfig(swiftConfig *bufremotepluginconfig.SwiftRegistryConfig) *registryv1alpha1.SwiftConfig
SwiftRegistryConfigToProtoSwiftConfig converts swiftConfig to an equivalent *registryv1alpha1.SwiftConfig.
Types ¶
type Plugin ¶ added in v1.33.0
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() []bufremotepluginref.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() *bufremotepluginconfig.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 ¶ added in v1.33.0
func NewPlugin( version string, dependencies []bufremotepluginref.PluginReference, registryConfig *bufremotepluginconfig.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 bufremotepluginconfig defines the buf.plugin.yaml file.
|
Package bufremotepluginconfig defines the buf.plugin.yaml file. |
Package bufremoteplugindocker contains utilities for building Buf plugins using the Docker API.
|
Package bufremoteplugindocker contains utilities for building Buf plugins using the Docker API. |