core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInstance

type FileInstance struct {
	FileName       string `json:"file_name"`
	FilePath       string `json:"file_path"`
	FileContent    string `json:"file_content"`
	FileOldContent string `json:"file_old_content"`
	IsDiff         bool   `json:"is_diff"`
	IsNew          bool   `json:"is_new"`
}

type GenerateParams

type GenerateParams struct {
	TableName string   `json:"table_name"`
	Files     []string `json:"files"`
}

type Generator

type Generator struct {
	Columns         []string
	ColumnDataTypes map[string]string
	Struc           string
	PackageName     string
	StructName      string
	TableName       string
	// Files need to generate
	FileList []*FileInstance

	// Generate files list
	GFileList []*FileInstance
	// contains filtered or unexported fields
}

func (*Generator) Generate

func (g *Generator) Generate(s *Sword, table string, files []string)

func (Generator) Init

func (g Generator) Init() *Generator

func (*Generator) Preview

func (g *Generator) Preview(table string)

type List

type List struct {
	List interface{} `json:"list"`
}

type Ret

type Ret struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type Sword

type Sword struct {
}

func Init added in v1.0.0

func Init() *Sword

func (*Sword) Generate

func (s *Sword) Generate(w http.ResponseWriter, r *http.Request)

func (*Sword) Preview

func (s *Sword) Preview(w http.ResponseWriter, r *http.Request)

func (*Sword) Render

func (s *Sword) Render(writer http.ResponseWriter, request *http.Request)

func (*Sword) Run

func (s *Sword) Run()

func (*Sword) Welcome

func (s *Sword) Welcome()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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