package top.gtb520.java.pve_back_api.config;

import org.yaml.snakeyaml.Yaml;
import java.io.InputStream;
import java.util.Map;

/**
 * 全局配置类
 * 存储所有配置项的全局变量
 */
public class GlobalConfig {

    // 全局配置
    public static String HTTP_IP = "0.0.0.0";
    public static String HTTP_PORT = "8080";

    // 数据库配置
    public static String MYSQL_JDBC = "";
    public static String MYSQL_USERNAME = "";
    public static String MYSQL_PASSWORD = "";

    // PVE配置
    public static String PVE_URL = "";
    public static String PVE_API_TOKEN_NAME = "";
    public static String PVE_API_TOKEN_ID = "";
    public static String PVE_API_TOKEN_SECRET = "";

    // 私有构造函数，防止实例化
    private GlobalConfig() {}

    /**
     * 打印所有配置信息（用于调试）
     */
    public static void printConfig() {
        System.out.println("=== 当前配置信息 ===");
        System.out.println("HTTP IP: " + HTTP_IP);
        System.out.println("HTTP PORT: " + HTTP_PORT);
        System.out.println("MYSQL JDBC: " + MYSQL_JDBC);
        System.out.println("MYSQL USERNAME: " + MYSQL_USERNAME);
        System.out.println("PVE URL: " + PVE_URL);
        System.out.println("PVE API TOKEN NAME: " + PVE_API_TOKEN_NAME);
        System.out.println("PVE API TOKEN ID: " + PVE_API_TOKEN_ID);
        System.out.println("===================");
    }
}

