bufpluginconfig

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginConfigPath = "buf.plugin.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveConfig

type ArchiveConfig struct {
	Deps []struct {
		Name    string `json:"name" yaml:"name"`
		Version string `json:"version" yaml:"version"`
	} `json:"deps,omitempty" yaml:"deps,omitempty"`
}

ArchiveConfig is the configuration for a plugin that can be downloaded as an archive instead of a language-specific registry.

type GoConfig

type GoConfig struct {
	// The minimum Go version required by the plugin.
	MinVersion string `json:"min_version" yaml:"min_version"`
	Deps       []struct {
		Module  string `json:"module" yaml:"module"`
		Version string `json:"version" yaml:"version"`
	} `json:"deps,omitempty" yaml:"deps,omitempty"`
}

GoConfig is the configuration for a Go plugin.

type NPMConfig

type NPMConfig struct {
	Deps []struct {
		Package string `json:"package" yaml:"package"`
		Version string `json:"version" yaml:"version"`
	} `json:"deps,omitempty" yaml:"deps,omitempty"`
}

NPMConfig is the configuration for a JavaScript NPM plugin.

type PluginConfig

type PluginConfig struct {
	Owner   string   `json:"owner" yaml:"owner"`
	Name    string   `json:"name" yaml:"name"`
	Version string   `json:"version" yaml:"version"`
	Opts    []string `json:"opts,omitempty" yaml:"opts,omitempty"`
	Deps    []string `json:"deps,omitempty" yaml:"deps,omitempty"`
	Runtime Runtime  `json:"runtime" yaml:"runtime"`
}

PluginConfig is the config used to describe a plugin.

func ParsePluginConfig

func ParsePluginConfig(config string) (*PluginConfig, error)

ParsePluginConfig parses the file at the given path as a PluginConfig.

type Runtime

type Runtime struct {
	Go      *GoConfig      `json:"go,omitempty" yaml:"go,omitempty"`
	NPM     *NPMConfig     `json:"npm,omitempty" yaml:"npm,omitempty"`
	Archive *ArchiveConfig `json:"archive,omitempty" yaml:"archive,omitempty"`
}

Runtime is the configuration for the runtime of a plugin.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL