Documentation
¶
Index ¶
- Variables
- func CloseGormDB() error
- func EnsureDir(path string) error
- func FileExists(path string) bool
- func GetDefaultConfig() *models.AppConfig
- func GetExeDir() string
- func GetGormDB() (*gorm.DB, error)
- func GetProjectRoot() (string, error)
- func InitAppDirs() error
- func InitDataDirs() error
- func MigratePathsIfNeeded()
- func OutputJSON(v any)
- func OutputJSONL(items any)
- type Config
- func (c *Config) ApplyConfig(appConfig *models.AppConfig)
- func (c *Config) GetAppDir() string
- func (c *Config) GetAppSeriesDir() string
- func (c *Config) GetConfigDir() string
- func (c *Config) GetConfigPath() string
- func (c *Config) GetDbDir() string
- func (c *Config) GetDbPath() string
- func (c *Config) GetHomeDir() string
- func (c *Config) GetLogDir() string
- func (c *Config) GetLogPath() string
- func (c *Config) GetReposDir() string
- func (c *Config) GetReposDirFromConfig(appConfig *models.AppConfig) string
- func (c *Config) GetWikiDir() string
- func (c *Config) LoadConfig() *models.AppConfig
- func (c *Config) SaveConfig(config *models.AppConfig) error
- type OutputFormat
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigInstance = Config{}
Functions ¶
func CloseGormDB ¶
func CloseGormDB() error
func FileExists ¶
func GetProjectRoot ¶
func InitAppDirs ¶
func InitAppDirs() error
func InitDataDirs ¶ added in v0.0.3
func InitDataDirs() error
func MigratePathsIfNeeded ¶ added in v0.0.3
func MigratePathsIfNeeded()
func OutputJSON ¶
func OutputJSON(v any)
func OutputJSONL ¶
func OutputJSONL(items any)
Types ¶
type Config ¶
type Config struct {
HomeDir string
AppSeriesDir string
AppDir string
ConfigDir string
ConfigPath string
DbDir string
DbPath string
LogDir string
LogPath string
ReposDir string
WikiDir string
}
func (*Config) ApplyConfig ¶
func (*Config) GetAppSeriesDir ¶
func (*Config) GetConfigDir ¶
func (*Config) GetConfigPath ¶
func (*Config) GetHomeDir ¶
func (*Config) GetLogPath ¶
func (*Config) GetReposDir ¶
func (*Config) GetReposDirFromConfig ¶
func (*Config) GetWikiDir ¶
func (*Config) LoadConfig ¶
type OutputFormat ¶
type OutputFormat string
const ( FormatTable OutputFormat = "table" FormatJSON OutputFormat = "json" FormatJSONL OutputFormat = "jsonl" )
func ParseFormat ¶
func ParseFormat(s string) OutputFormat
Click to show internal directories.
Click to hide internal directories.