internal

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CliName = "firefly"

Variables

View Source
var ASK = []string{
	"Please input your project name.",
	"Please choose your development language.",
	"Please select the database you want.",
}
View Source
var Database = map[string][]*DatabaseEntity{}
View Source
var DatabaseList []*DatabaseEntity
View Source
var LANGUAGE = []string{
	"Go",
	"Rust",
	"NodeJS",
}
View Source
var REGISTER = []string{
	"Etcd",
}

Functions

func CopyDir

func CopyDir(src, dst string) error

CopyDir 复制一个目录到另一个位置 src 是源目录的路径,dst 是目标目录的路径

func CopyFile

func CopyFile(src, dst string) error

CopyFile 复制一个文件到另一个位置 src 是源文件的路径,dst 是目标文件的路径

func GetRepo

func GetRepo(cli, project, language, version string) error

GetRepo 获取仓库

func GetRepoToLocal

func GetRepoToLocal(language string, version string, dir string) error

GetRepoToLocal 获取仓库到本地

func GetRepoUrl

func GetRepoUrl(language string) string

GetRepoUrl 获取仓库地址

func GetRepoVersion

func GetRepoVersion(language string, version string) (string, error)

GetRepoVersion 获取仓库版本

func GetTemplateRepo

func GetTemplateRepo(language string) string

GetTemplateRepo 获取模版仓库

Types

type ConfigEntity

type ConfigEntity struct {
	Project  string            `json:"project" yaml:"project" mapstructure:"project"`
	Language string            `json:"language" yaml:"language" mapstructure:"language"`
	Database []*DatabaseEntity `json:"database" yaml:"database" mapstructure:"database"`
}

func NewCreate

func NewCreate() (*ConfigEntity, error)

type DatabaseEntity

type DatabaseEntity struct {
	Type   string `json:"type" yaml:"type" mapstructure:"type"`
	Name   string `json:"name" yaml:"name" mapstructure:"name"`
	Url    string `json:"url" yaml:"url" mapstructure:"url"`
	Select bool   `json:"select" yaml:"select" mapstructure:"select"`
}

type FormModelEntity

type FormModelEntity struct {
	// contains filtered or unexported fields
}

func (FormModelEntity) Init

func (model FormModelEntity) Init() tea.Cmd

func (FormModelEntity) Update

func (model FormModelEntity) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (FormModelEntity) View

func (model FormModelEntity) View() string

type GithubRepoVersion

type GithubRepoVersion struct {
	TagName string `json:"tag_name"`
}

Jump to

Keyboard shortcuts

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