buf

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breaking

type Breaking struct {
	Use []string `yaml:"use"`
}

Breaking 破坏性变更检测配置

type Build

type Build struct {
	Roots []string `yaml:"roots"`
}

Build 构建配置

type Config

type Config struct {
	Version  string   `yaml:"version"`
	Name     string   `yaml:"name"`
	Deps     []string `yaml:"deps"`
	Build    Build    `yaml:"build"`
	Lint     Lint     `yaml:"lint"`
	Breaking Breaking `yaml:"breaking"`
}

Config buf配置

type GenConfig

type GenConfig struct {
	Version string   `yaml:"version"`
	Managed Managed  `yaml:"managed"`
	Plugins []Plugin `yaml:"plugins"`
}

GenConfig 代码生成配置

type Lint

type Lint struct {
	Use []string `yaml:"use"`
}

Lint lint配置

type Managed

type Managed struct {
	Enabled bool `yaml:"enabled"`
}

Managed 管理配置

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager 管理buf操作

func NewManager

func NewManager(workDir string) *Manager

NewManager 创建新的buf管理器

func (*Manager) Breaking

func (m *Manager) Breaking() error

Breaking 检查破坏性变更

func (*Manager) Format

func (m *Manager) Format() error

Format 格式化protobuf文件

func (*Manager) Generate

func (m *Manager) Generate() error

Generate 生成代码

func (*Manager) Init

func (m *Manager) Init() error

Init 初始化buf模块

func (*Manager) Lint

func (m *Manager) Lint() error

Lint 检查protobuf文件

func (*Manager) ParseProtobufFiles

func (m *Manager) ParseProtobufFiles() ([]*ast.ProtobufFile, error)

ParseProtobufFiles 解析protobuf文件

type Plugin

type Plugin struct {
	Name string `yaml:"name"`
	Out  string `yaml:"out"`
	Opt  string `yaml:"opt"`
}

Plugin 插件配置

Jump to

Keyboard shortcuts

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