codegen

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFile

func GenerateFile(gen *protogen.Plugin, file *protogen.File, config Config) *protogen.GeneratedFile

GenerateFile generates a _errors.pb.go file containing kratos errors definitions This is the main entry point for error code generation from protobuf files

从 protobuf 文件生成包含 kratos 错误定义的 _errors.pb.go 文件 这是从 protobuf 文件生成错误代码的主要入口点

Types

type Config

type Config struct {
	GeneratorName string // e.g. "protoc-gen-go-errors" or "protoc-gen-orzkratos-errors"
	IncludeNested bool   // Include nested enums in generation
	SeparateNamed bool   // Use underscore separator in nested enum function names (e.g. ErrorGetUserResponse_UserNotFound)
}

Config holds generation configuration

Jump to

Keyboard shortcuts

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