package config

import (
	"github.com/tidbcloud/aisupport/packages/sdk-go/infra/config"
	sdkconfig "github.com/tidbcloud/aisupport/packages/sdk-go/infra/config"
)

type RootConfig struct {
	Log sdkconfig.Loggers `yaml:"log"`

	Secret SecretConfig `yaml:"secret"`

	Database sdkconfig.Database `yaml:"database"`

	APIServer APIServerConfig `yaml:"apiServer"`

	Services ServicesConfig `yaml:"services"`

	Clients ClientsConfig `yaml:"clients"`
}

type SecretConfig struct {
	config.Secret `yaml:",inline"`

	RootConfigSecretName string `yaml:"rootConfigSecretName"`
}

type APIServerConfig struct {
	// Address is the bind address (host:port) the HTTP server listens on.
	Address string `yaml:"address" default:":8080"`
}
