configuration

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportData added in v0.6.0

func ExportData(exporter Exporter, scanners ...Scanner) error

ExportData 导出数据

func GenerateCode added in v0.6.0

func GenerateCode(generator Generator, scanners ...Scanner) error

GenerateCode 生成代码

Types

type Builder added in v0.6.0

type Builder struct {
	strings.Builder
	// contains filtered or unexported fields
}

func NewBuilder added in v0.6.0

func NewBuilder() *Builder

func (*Builder) Error added in v0.6.0

func (b *Builder) Error() error

func (*Builder) Fprintf added in v0.6.0

func (b *Builder) Fprintf(format string, a ...interface{}) *Builder

func (*Builder) Reset added in v0.6.0

func (b *Builder) Reset()

func (*Builder) String added in v0.6.0

func (b *Builder) String() string

func (*Builder) WriteBytes added in v0.6.0

func (b *Builder) WriteBytes(c ...byte) *Builder

func (*Builder) WriteRune added in v0.6.0

func (b *Builder) WriteRune(r rune) *Builder

func (*Builder) WriteString added in v0.6.0

func (b *Builder) WriteString(s string) *Builder

type Exporter added in v0.6.0

type Exporter interface {
	// Export 导出数据
	Export(config raw.Config, data any) error
}

Exporter 数据导出器

type Generator added in v0.6.0

type Generator interface {

	// Generate 生成代码
	Generate(table raw.Table) error
}

Generator 代码生成器

type Scanner added in v0.6.0

type Scanner interface {
	// StructScan 配置表结构扫描
	StructScan() (raw.Config, error)

	// DataScan 配置表数据扫描
	DataScan(fields []raw.Field) (any, error)
}

Scanner 用于扫描配置的扫描器接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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