Class GlobalConfig
java.lang.Object
cloud.kitelang.cli.config.GlobalConfig
Manages the global Kite configuration stored in ~/.kite/config.yml.
Handles per-project, per-environment state backend configurations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPer-environment configuration.static classRoot configuration structure.static classPer-project configuration.static classState backend configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic GlobalConfig.StateConfigCreates a Kite Cloud state configuration.static GlobalConfig.StateConfigcreatePostgreSQLConfig(String url, String username, String password) Creates a PostgreSQL state configuration.static PathGets the default config path (~/.kite/config.yml).getEnvironments(String project) Gets all configured environments for a project.static PathGets the kite directory path (~/.kite).static StringgetPasswordEnvVarName(String project, String environment) Gets the environment variable name for a given project/environment's password.Gets all configured projects.getStateConfig(String project, String environment) Gets the state configuration for a specific project and environment.booleanhasEnvironment(String project, String environment) Checks if an environment is configured for a project.booleanhasProject(String project) Checks if a project is configured.static GlobalConfigload()Loads or creates the global configuration.voidremoveEnvironment(String project, String environment) Removes an environment configuration from a project.voidremoveProject(String project) Removes an entire project configuration.voidsave()Saves the configuration to disk.voidsetStateConfig(String project, String environment, GlobalConfig.StateConfig stateConfig) Sets the state configuration for a specific project and environment.
-
Method Details
-
getPasswordEnvVarName
-
load
Loads or creates the global configuration.- Throws:
IOException
-
getConfigPath
Gets the default config path (~/.kite/config.yml). -
getKiteDir
Gets the kite directory path (~/.kite). -
save
-
getStateConfig
Gets the state configuration for a specific project and environment. -
setStateConfig
public void setStateConfig(String project, String environment, GlobalConfig.StateConfig stateConfig) Sets the state configuration for a specific project and environment. -
getProjects
Gets all configured projects. -
getEnvironments
Gets all configured environments for a project. -
hasProject
Checks if a project is configured. -
hasEnvironment
-
removeEnvironment
-
removeProject
Removes an entire project configuration. -
createPostgreSQLConfig
public static GlobalConfig.StateConfig createPostgreSQLConfig(String url, String username, String password) Creates a PostgreSQL state configuration. -
createKiteCloudConfig
Creates a Kite Cloud state configuration.
-