service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, opts GeneratorOptions) error

Generate 生成服务脚手架代码

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator 服务代码生成器

func NewGenerator

func NewGenerator() *Generator

NewGenerator 创建服务代码生成器

func (*Generator) Generate

func (g *Generator) Generate(_ context.Context, opts GeneratorOptions) error

Generate 执行服务代码生成

type GeneratorOptions

type GeneratorOptions struct {
	OutputPath string

	ProjectModule string
	ProjectName   string
	ServiceName   string

	Servers   []string
	DbClients []string

	GenerateServer   bool
	GenerateService  bool
	GenerateData     bool
	GenerateMain     bool
	GenerateMakefile bool
	GenerateConfigs  bool
}

GeneratorOptions 保存代码生成器的选项。

func (GeneratorOptions) HasBFFService

func (o GeneratorOptions) HasBFFService() bool

HasBFFService checks whether the BFF (Backend For Frontend) service is included in the generator options.

Jump to

Keyboard shortcuts

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