logic

package
v0.0.0-...-f797c1f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rules []*Rule `json:"rules" toml:"rules"`
}

Config 结构体用于解析JSON和TOML配置

func ParseTOML

func ParseTOML(filename string) (*Config, error)

ParseTOML 从TOML文件解析配置

type Field

type Field struct {
	Name string `json:"name" toml:"name"`
	Type string `json:"type" toml:"type"`
	Tags string `json:"tags" toml:"tags"`
}

Field 结构体表示字段信息

type Import

type Import struct {
	Path  string `json:"path" toml:"path"`
	Alias string `json:"alias" toml:"alias"`
}

Import 结构体表示导入信息

type Rule

type Rule struct {
	File    string   `json:"file" toml:"file"`
	Imports []Import `json:"imports" toml:"imports"`
	Structs []Struct `json:"structs" toml:"structs"`
}

Rule 结构体表示一条规则

type Struct

type Struct struct {
	Name   string  `json:"name" toml:"name"`
	Fields []Field `json:"fields" toml:"fields"`
}

Struct 结构体表示结构体信息

Jump to

Keyboard shortcuts

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