data

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 CmdData = &cobra.Command{
	Use:   "data",
	Short: "Generate the go-kratos data layer implementations",
	Long:  "Generate the go-kratos data layer implementations (Repo interface implementation). Example: kratos proto data api/xxx.proto --target-dir=internal/data --domain-pkg=internal/domain --db-pkg=gorm.io/gorm",
	Run:   run,
}

CmdData the data layer command (Repo implementation)

Functions

This section is empty.

Types

type DataData

type DataData struct {
	Service        string        // 服务名
	UseCasePackage string        // 领域层 UseCase 包路径
	Methods        []*DataMethod // Repo 方法列表
}

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

type DataMethod

type DataMethod 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