Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeInt = newType([]string{"int"}, "int") TypeString = newType([]string{"string", "text"}, "string") TypeTimestamp = newType([]string{"timestamp", "datetime"}, "time.Time", &GoImport{Type: ImportTypeInternal, Value: "time"}) TypeUUID = newType([]string{"uuid"}, "uuid.UUID", &GoImport{Type: ImportTypeExternal, Value: "github.com/google/uuid"}) )
View Source
var (
AllTypes = []*Type{TypeInt, TypeString, TypeTimestamp, TypeUUID}
)
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Columns ¶
type Columns []*Column
func (Columns) WhereClause ¶
func (c Columns) WhereClause() interface{}
type GoFile ¶
type GoFile struct {
Package string `json:"package,omitempty"`
Path []string `json:"path,omitempty"`
Name string `json:"name"`
Imports GoImports `json:"imports"`
Blocks Blocks `json:"blocks"`
}
func (*GoFile) AddImport ¶
func (f *GoFile) AddImport(t GoImportType, v string)
type GoImport ¶
type GoImport struct {
Type GoImportType
Value string
}
type GoImportType ¶
type GoImportType string
const ( ImportTypeInternal GoImportType = "internal" ImportTypeExternal GoImportType = "external" ImportTypeApp GoImportType = "app" )
type GoImports ¶
type GoImports []*GoImport
func (GoImports) ByType ¶
func (i GoImports) ByType(t GoImportType) []string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(logger *zap.SugaredLogger) *Service
Click to show internal directories.
Click to hide internal directories.