Documentation ¶
Index ¶
- Constants
- func ParsePluginPath(pluginPath string) (remote string, owner string, name string, _ error)
- func ParsePluginVersionPath(pluginVersionPath string) (remote string, owner string, name string, version string, _ error)
- func ParseTemplatePath(templatePath string) (remote string, owner string, name string, _ error)
- func TemplateConfigToProtoPluginConfigs(templateConfig *TemplateConfig) []*registryv1alpha1.PluginConfig
- func TemplateVersionConfigToProtoPluginVersionMappings(templateVersionConfig *TemplateVersionConfig) []*registryv1alpha1.PluginVersionMapping
- func ValidateTemplateName(templateName string) error
- type PluginConfig
- type PluginVersion
- type TemplateConfig
- type TemplateVersionConfig
Constants ¶
const ( // PluginsPathName is the path prefix used to signify that // a name belongs to a plugin. PluginsPathName = "plugins" // TemplatesPathName is the path prefix used to signify that // a name belongs to a template. TemplatesPathName = "templates" )
Variables ¶
This section is empty.
Functions ¶
func ParsePluginPath ¶
ParsePluginPath parses a string in the format <buf.build/owner/plugins/name> into remote, owner and name.
func ParsePluginVersionPath ¶
func ParsePluginVersionPath(pluginVersionPath string) (remote string, owner string, name string, version string, _ error)
ParsePluginVersionPath parses a string in the format <buf.build/owner/plugins/name[:version]> into remote, owner, name and version. The version is empty if not specified.
func ParseTemplatePath ¶
ParseTemplatePath parses a string in the format <buf.build/owner/templates/name> into remote, owner and name.
func TemplateConfigToProtoPluginConfigs ¶
func TemplateConfigToProtoPluginConfigs(templateConfig *TemplateConfig) []*registryv1alpha1.PluginConfig
TemplateConfigToProtoPluginConfigs converts the template config to a slice of proto plugin configs, suitable for use with the Plugin Service CreateTemplate RPC.
func TemplateVersionConfigToProtoPluginVersionMappings ¶
func TemplateVersionConfigToProtoPluginVersionMappings( templateVersionConfig *TemplateVersionConfig, ) []*registryv1alpha1.PluginVersionMapping
TemplateVersionConfigToProtoPluginVersionMappings converts the template version config to a slice of Plugin version mappings, suitable for use with the Plugin Service CreateTemplateVersion RPC.
func ValidateTemplateName ¶
ValidateTemplateName validates the format of the template name. This is only used for client side validation and attempts to avoid validation constraints that we may want to change.
Types ¶
type PluginConfig ¶
PluginConfig is the config used to describe a plugin in a new template.
type PluginVersion ¶
PluginVersion describes a version of a plugin for use in a template version.
type TemplateConfig ¶
type TemplateConfig struct {
Plugins []PluginConfig
}
TemplateConfig is the config used to describe the plugins of a new template.
func ParseTemplateConfig ¶
func ParseTemplateConfig(config string) (*TemplateConfig, error)
ParseTemplateConfig parses the input template config as a path or JSON/YAML literal.
type TemplateVersionConfig ¶
type TemplateVersionConfig struct {
PluginVersions []PluginVersion
}
TemplateVersionConfig is the config used to describe the plugin version of a new template version.
func ParseTemplateVersionConfig ¶
func ParseTemplateVersionConfig(config string) (*TemplateVersionConfig, error)
ParseTemplateVersionConfig parses the input template version config as a path or JSON/YAML literal.