buf

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTags = errors.New("no tags found in repository")
)

Functions

func AddArg

func AddArg(arg string) func(*bufArgs)

AddArg adds a simple argument.

func AddPaths

func AddPaths(paths []string) func(*bufArgs)

func Build added in v0.8.4

func Build(binFile string, bufConfigs ...string) error

func BuildDir added in v0.8.6

func BuildDir(dir, binFile string) error

func CreateDevWorkspace added in v0.8.4

func CreateDevWorkspace(protoDirs, dependencies []string) (func() error, error)

func Generate added in v0.8.4

func Generate(binFile string, protoPluginPaths []string) error

Generate proto artifacts.

func GenerateDev added in v0.8.4

func GenerateDev(binFile string, protoDirs, deps, protoPluginPaths []string) error

func GetCommonProtoRepo added in v0.8.4

func GetCommonProtoRepo() string

func Lint added in v0.8.4

func Lint(bufConfigs ...string) error

func LintBin added in v0.8.4

func LintBin(binFile string, bufConfigs ...string) error

func ModUpdate added in v0.8.4

func ModUpdate(dirs ...string) error

func Run

func Run(args ...Arg) error

Run runs the protoc CLI.

func RunWithEnv added in v0.8.5

func RunWithEnv(env map[string]string, args ...Arg) (err error)

Run runs the protoc CLI with the given environment variables.

func WithLogin added in v0.8.5

func WithLogin() func(*bufArgs)

Types

type Arg

type Arg func(*bufArgs)

Arg represents a protoc CLI argument.

type Label added in v0.8.18

type Label struct {
	Name        string `json:"name"`
	Commit      string `json:"commit"`
	CreatedTime string `json:"create_time"`
}

func GetLatestTag added in v0.4.5

func GetLatestTag(repository string) (Label, error)

Gets the latest commit based on create_date.

func GetTags added in v0.4.5

func GetTags(repository string) ([]Label, error)

Gets the 10 most recent labels sorted from newest to oldest.

Jump to

Keyboard shortcuts

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