build

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPluginSvr

func BuildPluginSvr(pluginJsonFile string) (err error)

func CheckFileIsExist

func CheckFileIsExist(filename string) bool

func CompressPathToZip

func CompressPathToZip(path, excludeDir string, excludeFile string, targetFile string) error

CompressPathToZip 压缩文件夹

func RunGoBuild

func RunGoBuild(env map[string]string, args ...string) (err error)

Types

type BackendRoute

type BackendRoute struct {
	Path     string `json:"path"`
	Remark   string `json:"remark"`
	NeedAuth bool   `json:"needAuth"`
}

type Build

type Build struct {
	EvVersion   string
	MainGoFile  string
	PluginAlias string
}

func (*Build) DarwinAmd64

func (this *Build) DarwinAmd64() error

func (*Build) LinuxAmd64

func (this *Build) LinuxAmd64() error

func (*Build) LinuxArm64

func (this *Build) LinuxArm64() error

func (*Build) WindowsAmd64

func (this *Build) WindowsAmd64() error

type BuildConfig

type BuildConfig struct {
	OS          string // GOOS
	GOARCH      string
	Env         map[string]string
	OutputPath  string
	EvVersion   string
	MainGoFile  string
	PluginAlias string
}

type ExecSql

type ExecSql struct {
	Sql  string        `json:"sql"`
	Args []interface{} `json:"args"`
}

type Gormigrate

type Gormigrate struct {
	Migrations []*Migration `json:"migrations"`
}

type Migration

type Migration struct {
	// 版本ID
	ID string `json:"id"`
	// 迁移到当前版本需要的执行Sql
	MigrateSqls []*ExecSql `json:"migrate_sqls"`
	// 回退到当前版本需要的执行Sql
	Rollback []*ExecSql `json:"rollback"`
}

type PluginInitRespData

type PluginInitRespData struct {
	PluginJsonData *PluginJsonData `json:"plugin_json_data"`
	Gormigrate     *Gormigrate     `json:"gormigrate"`
}

type PluginJsonData

type PluginJsonData struct {
	Version         string   `json:"version"`
	MainGoFile      string   `json:"main_go_file"`
	PluginName      string   `json:"plugin_name"`
	BackendDebug    bool     `json:"backend_debug"`
	FrontendDebug   bool     `json:"frontend_debug"`
	PluginAlias     string   `json:"plugin_alias"`
	FrontendRoutes  []*Route `json:"frontend_routes"`
	FrontendDevPort int      `json:"frontend_dev_port"`

	BackendRoutes []*BackendRoute `json:"backend_routes"`
}

func (*PluginJsonData) String

func (this *PluginJsonData) String() string

type Route

type Route struct {
	Path     string     `json:"path"`
	Name     string     `json:"name"`
	Meta     *RouteMeta `json:"meta"`
	Children []*Route   `json:"children"`
}

type RouteMeta

type RouteMeta struct {
	Title string `json:"title"`
	Icon  string `json:"icon"`
}

Jump to

Keyboard shortcuts

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