service

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	// LoadFromFile 从文件加载并执行配置
	LoadFromFile(ctx context.Context, filePath string) error

	// LoadFromConfig 从配置对象加载并执行
	LoadFromConfig(ctx context.Context, cfg *structure.Config) error
}

Loader 配置加载器,负责加载和执行配置文件

func NewLoader

func NewLoader(
	modelSvc modelSvc.Service,
	modelGroupSvc modelSvc.MGService,
	attributeSvc attributeSvc.Service,
	relationRTSvc relationSvc.RelationTypeService,
	relationRMSvc relationSvc.RelationModelService,
) Loader

NewLoader 创建加载器

type Parser

type Parser interface {
	// ParseFile 从文件解析配置
	ParseFile(filePath string) (*structure.Config, error)
	// Parse 从字节数据解析配置
	Parse(data []byte) (*structure.Config, error)
}

Parser YAML 配置解析器

func NewParser

func NewParser() Parser

NewParser 创建解析器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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