Documentation
¶
Index ¶
- func CreateDefault() error
- func Exists() bool
- func Path() string
- func SaveToFile(path string, cfg *Config) error
- type Config
- func (c *Config) AddInstance(instance Instance) error
- func (c *Config) GetDefault() (*Instance, error)
- func (c *Config) GetInstance(name string) (*Instance, error)
- func (c *Config) ListInstances() []Instance
- func (c *Config) RemoveInstance(name string) error
- func (c *Config) Save() error
- func (c *Config) SetDefault(name string) error
- func (c *Config) UpdateInstanceToken(name, token string) error
- func (c *Config) Validate() error
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDefault ¶
func CreateDefault() error
CreateDefault creates a default config file with cloud and localhost instances
func Path ¶
func Path() string
Path returns the default config file path Linux/macOS: ~/.config/coolify/config.json Windows: %APPDATA%\coolify\config.json (e.g., C:\Users\username\AppData\Roaming\coolify\config.json)
func SaveToFile ¶
SaveToFile saves config to a specific file path
Types ¶
type Config ¶
type Config struct {
Instances []Instance `json:"instances"`
LastUpdateCheckTime string `json:"lastUpdateCheckTime"`
// contains filtered or unexported fields
}
Config holds all CLI configuration
func LoadFromFile ¶
LoadFromFile loads config from a specific file path
func (*Config) AddInstance ¶
AddInstance adds a new instance to the configuration
func (*Config) GetDefault ¶
GetDefault returns the default instance
func (*Config) GetInstance ¶
GetInstance gets an instance by name
func (*Config) ListInstances ¶
ListInstances returns all instances
func (*Config) RemoveInstance ¶
RemoveInstance removes an instance by name
func (*Config) SetDefault ¶
SetDefault sets the default instance by name
func (*Config) UpdateInstanceToken ¶
UpdateInstanceToken updates the token for an instance