ent

package
v1.7.16 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: GPL-3.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenEntLogic

func GenEntLogic(g *GenEntLogicContext) error

GenEntLogic generates the ent CRUD logic files of the rpc service.

func GenProtoData

func GenProtoData(schema *load.Schema, g GenEntLogicContext) (string, string, error)

Types

type GenEntLogicContext

type GenEntLogicContext struct {
	Schema          string
	Output          string
	ServiceName     string
	ProjectName     string
	Style           string
	ProtoFieldStyle string
	ModelName       string
	Multiple        bool
	SearchKeyNum    int
	ModuleName      string
	GroupName       string
	UseUUID         bool
	UseI18n         bool
	ProtoOut        string
	ImportPrefix    string
	Overwrite       bool
	IdType          string // default is empty, if ID belongs types of Uint64 and string, use other base message
	HasCreated      bool   // If true means have created and updated field
}

func (GenEntLogicContext) Validate

func (g GenEntLogicContext) Validate() error

type RpcLogicData

type RpcLogicData struct {
	LogicName string
	LogicCode string
}

func GenCRUDData

func GenCRUDData(g *GenEntLogicContext, projectCtx *ctx.ProjectContext, schema *load.Schema) []*RpcLogicData

Jump to

Keyboard shortcuts

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