stcreator

package
v1.26.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoaderFactories = map[string]func() LoaderParams{
	new(MongoLoader).Name(): func() LoaderParams {
		return new(MongoLoader)
	},
	new(PostgresLoader).Name(): func() LoaderParams {
		return new(PostgresLoader)
	},
}

Functions

This section is empty.

Types

type Config added in v1.24.7

type Config struct {
	Commands []string `yaml:"commands"`
	Loaders  Loaders  `yaml:"loaders"`
}

type Data added in v1.24.5

type Data struct {
	Structure []Node `yaml:"structure"`
}

type Entity added in v1.24.5

type Entity struct {
	Name string
}

type FormatError added in v1.25.4

type FormatError struct {
	Err  error
	Data []byte
}

func (FormatError) Error added in v1.25.4

func (e FormatError) Error() string

type Import added in v1.24.5

type Import struct {
	Resource string `yaml:"resource"`
}

type Imports added in v1.24.5

type Imports []StructImport

func (Imports) At added in v1.24.5

func (i Imports) At(p StructParam) string

type LoaderParams added in v1.24.5

type LoaderParams interface {
	Name() string
	Process() ([]StructMetadata, error)
}

type Loaders added in v1.24.7

type Loaders []LoaderParams

func (*Loaders) MarshalYAML added in v1.24.7

func (l *Loaders) MarshalYAML() (interface{}, error)

func (*Loaders) UnmarshalYAML added in v1.24.7

func (l *Loaders) UnmarshalYAML(node *yaml.Node) error

type MapType added in v1.24.5

type MapType struct {
	Type, NullType string
	DBTypes        []string
}

type MapTypes added in v1.24.5

type MapTypes []MapType

func (MapTypes) At added in v1.24.5

func (m MapTypes) At(t string) (MapType, bool)

type MongoLoader added in v1.24.5

type MongoLoader struct {
	Host string `yaml:"host"`
}

func (*MongoLoader) Name added in v1.24.5

func (*MongoLoader) Name() string

func (*MongoLoader) Process added in v1.24.5

func (*MongoLoader) Process() (result []StructMetadata, err error)

type Node added in v1.24.5

type Node struct {
	Name     string                 `yaml:"name"`
	Template string                 `yaml:"template"`
	Data     map[string]interface{} `yaml:"data"`
	Children []Node                 `yaml:"children"`
}

type PostgresLoader added in v1.24.5

type PostgresLoader struct {
	URL    string   `yaml:"url"`
	Tables []string `yaml:"tables"`
}

func (*PostgresLoader) Name added in v1.24.5

func (*PostgresLoader) Name() string

func (*PostgresLoader) Process added in v1.24.5

func (l *PostgresLoader) Process() (result []StructMetadata, err error)

type Project added in v1.24.5

type Project struct {
	Structs []StructMetadata
}

type ProjectLoader added in v1.24.5

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

func NewProjectLoader added in v1.24.5

func NewProjectLoader(projectName, projectID, pkgName, wd string) *ProjectLoader

func (*ProjectLoader) Process added in v1.24.7

func (l *ProjectLoader) Process(dir, configFilepath string) (*Project, error)

type StructImport added in v1.24.5

type StructImport struct {
	Pkg   string
	Param StructParam
}

type StructMetadata added in v1.24.5

type StructMetadata struct {
	Name, LowerName string
	Primary         StructParam
	Params          []StructParam
	Imports         Imports
}

type StructParam added in v1.24.5

type StructParam struct {
	Name, LowerName, ColumnName string
	Type, RawType               string
	Primary                     bool
	NotNull                     bool
	Default                     string
}

Jump to

Keyboard shortcuts

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