biz

package
v0.0.0-...-c71f170 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdBiz = &cobra.Command{
	Use:   "biz",
	Short: "Generate the go-kratos biz layer implementations",
	Long:  "Generate the go-kratos biz layer implementations (UseCase + validation). Example: kratos proto biz api/xxx.proto --target-dir=internal/biz --domain-pkg=internal/domain",
	Run:   run,
}

CmdBiz the biz layer command.

Functions

This section is empty.

Types

type BizData

type BizData struct {
	ServiceName string       // 服务名(大驼峰)
	Methods     []*BizMethod // 方法列表
	Entities    []*BizEntity // 实体列表
}

------------------------------ 数据结构:适配 biz 层模板变量 ------------------------------

type BizEntity

type BizEntity struct {
	Name   string // 实体名
	Fields []*BizField
}

type BizField

type BizField struct {
	FieldName string // 字段名
	FieldType string // 字段类型
}

type BizMethod

type BizMethod struct {
	ServiceName string // 服务名
	MethodName  string // 方法名
	ParamType   string // 参数类型
	ParamName   string // 参数名
	ReturnType  string // 返回类型
	Comment     string // 注释
}

Jump to

Keyboard shortcuts

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