generator

package
v0.0.0-...-7953320 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateConfig

type GenerateConfig struct {
	GenerateTraces        bool     `yaml:"generate_tracer"`
	VendorPath            string   `yaml:"vendor_path"`
	Imports               []string `yaml:"imports"`
	PluginsConfigsImports []ImportedPluginsConfigs
	PluginsConfigs        `yaml:",inline"`
}

func (*GenerateConfig) ParseImports

func (gc *GenerateConfig) ParseImports() error

type Generator

type Generator struct {
	Config  *GenerateConfig
	Plugins []Plugin
}

func (*Generator) Generate

func (g *Generator) Generate() error

func (*Generator) GetPluginsInfosKeys

func (g *Generator) GetPluginsInfosKeys() map[string]map[string]string

func (*Generator) Init

func (g *Generator) Init() error

func (*Generator) Prepare

func (g *Generator) Prepare() error

func (*Generator) PrintInfos

func (g *Generator) PrintInfos(i []string)

func (*Generator) RegisterPlugin

func (g *Generator) RegisterPlugin(p Plugin) error

type ImportedPluginsConfigs

type ImportedPluginsConfigs struct {
	Path           string
	PluginsConfigs PluginsConfigs
}

type Infos

type Infos []string

func (Infos) Contains

func (i Infos) Contains(v string) bool

type Plugin

type Plugin interface {
	Init(*GenerateConfig, []Plugin) error
	Prepare() error
	Name() string
	PrintInfo(info Infos)
	Infos() map[string]string
	Generate() error
}

type PluginContext

type PluginContext struct {
	Plugins []Plugin
}

type PluginFabric

type PluginFabric = func() Plugin

type PluginsConfigs

type PluginsConfigs map[string]interface{}

Jump to

Keyboard shortcuts

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