model

package
v0.0.0-...-110ff3f Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(req *GenerateRequest, getZip func(zipFile string) error) error

Types

type ConnectRequest

type ConnectRequest struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username,optional"`
	Password string `json:"password,optional"`
}

type ConnectResponse

type ConnectResponse struct {
	Schemas []string `json:"schemas"`
}

func Connect

func Connect(req *ConnectRequest) (*ConnectResponse, error)

type File

type File struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type GenerateRequest

type GenerateRequest struct {
	GetTablesRequest
	Tables        []string `json:"tables"`
	Style         string   `json:"style,optional,default=gozero"`
	Cache         bool     `json:"cache,optional"`
	Strict        bool     `json:"strict,optional"`
	IgnoreColumns string   `json:"ignoreColumns,,optional"`
}

type GenerateResponse

type GenerateResponse struct {
	Files []*File `json:"files"`
}

func Generate

func Generate(req *GenerateRequest) (*GenerateResponse, error)

type GetTablesRequest

type GetTablesRequest struct {
	ConnectRequest
	Schema string `json:"schema"`
}

type GetTablesResponse

type GetTablesResponse struct {
	Tables []string `json:"tables"`
}

func GetTables

func GetTables(req *GetTablesRequest) (*GetTablesResponse, error)

Jump to

Keyboard shortcuts

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