codegen

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindModels added in v0.7.1

func FindModels(module, modelDir, serviceDir string, excludes []string) ([]*gen.ModelInfo, error)

FindModels finds all model infos in a directory

func FindServiceStruct added in v0.7.1

func FindServiceStruct(file *ast.File, modelName string) *ast.TypeSpec

FindServiceStruct finds the service struct that inherits from service.Base[*Model]

func HasMethod added in v0.7.1

func HasMethod(file *ast.File, structName, methodName string) bool

HasMethod checks if a struct has a specific method

func IsServiceBaseType added in v0.7.1

func IsServiceBaseType(expr ast.Expr, modelName string) bool

IsServiceBaseType checks if the type is service.Base[*ModelName]

Types

This section is empty.

Directories

Path Synopsis
gen
ts

Jump to

Keyboard shortcuts

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