config

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CLI_CONFIG_FILE_NAME = "cli"
View Source
const CLI_CONFIG_FILE_TYPE = "yaml"
View Source
const CLI_NAME = "firefly"
View Source
const REPO_OWNER = "lhdhtrc"
View Source
const REPO_TOKEN = ""

Variables

View Source
var CONFIG_PROBLEM = []string{
	"Please select display text language",
}
View Source
var CREATE_PROBLEM = map[string][]string{
	"zh": {
		"请输入项目名称.",
		"请选择开发语言.",
	},
	"en": {
		"Please input your project name.",
		"Please choose your development language.",
	},
}
View Source
var Color = &ColorConfig{
	Primary: lipgloss.NewStyle().Foreground(lipgloss.Color("#00FF7F")),
	Warning: lipgloss.NewStyle().Foreground(lipgloss.Color("#ffff00")),
	Danger:  lipgloss.NewStyle().Foreground(lipgloss.Color("#e20000")),
	Info:    lipgloss.NewStyle().Foreground(lipgloss.Color("#ffffff")),
	Focus:   lipgloss.NewStyle().Foreground(lipgloss.Color("#009185")),
}
View Source
var IgnoreDirs = map[string]map[string]bool{
	"go": {
		".git":    true,
		".github": true,
	},
}
View Source
var IgnoreFiles = map[string]map[string]bool{
	"go": {
		".gitignore":  true,
		"config.yaml": true,
		"go.sum":      true,
		"LICENSE":     true,
		"run.sh":      true,
		"README.md":   true,
	},
}
View Source
var LANGUAGE = []string{
	"Go",
}
View Source
var TEXT_LANGUAGE = []string{
	"en",
	"zh",
}
View Source
var TIPS_TEXT = map[string][]string{
	"zh": {
		"ctrl+c或q退出cli.",
		"回车确认或下一步.",
	},
	"en": {
		"ctrl+c or q to exit the cli.",
		"enter confirm or next step.",
	},
}

Functions

This section is empty.

Types

type ColorConfig

type ColorConfig struct {
	Primary lipgloss.Style
	Warning lipgloss.Style
	Danger  lipgloss.Style
	Info    lipgloss.Style
	Focus   lipgloss.Style
}

type CoreEntity

type CoreEntity struct {
	SetupDir string

	LocalDir        string
	LocalConfigPath string

	ConfigFileName string

	CacheDir         string
	CacheTemplateDir string

	GlobalConfigPath string

	Global *GlobalPersistenceStorageConfigEntity
	Local  *LocalPersistenceStorageConfigEntity
	// contains filtered or unexported fields
}

func New

func New() (*CoreEntity, error)

func (*CoreEntity) UpdateGlobalConfig

func (core *CoreEntity) UpdateGlobalConfig() error

func (*CoreEntity) UpdateLocalConfig

func (core *CoreEntity) UpdateLocalConfig() error

type GlobalPersistenceStorageConfigEntity

type GlobalPersistenceStorageConfigEntity struct {
	TextLanguage string            `json:"text_language" yaml:"text_language" mapstructure:"text_language"`
	Version      map[string]string `json:"version" yaml:"version" mapstructure:"version"`
}

type LocalPersistenceStorageConfigEntity

type LocalPersistenceStorageConfigEntity struct {
	Language string `json:"language" yaml:"language" mapstructure:"language"`
	Version  string `json:"version" yaml:"version" mapstructure:"version"`
}

Jump to

Keyboard shortcuts

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