typrepo

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Stdout standard out
	Stdout = os.Stdout
)

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Name       string
	Table      string
	Dialect    string
	CtorDB     string
	Target     string
	Package    string
	Fields     []*Field
	Imports    map[string]string
	PrimaryKey *Field
}

Entity ...

func CreateEntity

func CreateEntity(a *typast.Annot2) (*Entity, error)

CreateEntity create entity

type EntityAnnotation

type EntityAnnotation struct {
	TagName string // By default is @entity
}

EntityAnnotation ...

func (*EntityAnnotation) Annotate

func (m *EntityAnnotation) Annotate(c *typast.Context) error

Annotate Envconfig to prepare dependency-injection and env-file

type Field

type Field struct {
	Name         string
	Type         string
	Column       string
	PrimaryKey   bool
	DefaultValue string
	SkipUpdate   bool
}

Field repo

Jump to

Keyboard shortcuts

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