Documentation
¶
Index ¶
- type Service
- func (s *Service) Bind(appID, key string, target interface{}) error
- func (s *Service) Get(appID, key string) interface{}
- func (s *Service) GetAppConfig(appID string) map[string]interface{}
- func (s *Service) GetBool(appID, key string) bool
- func (s *Service) GetInt(appID, key string) int
- func (s *Service) GetString(appID, key string) string
- func (s *Service) IsSet(appID, key string) bool
- func (s *Service) LoadAppConfig(appID string, config map[string]interface{}) error
- func (s *Service) MergeConfig(appID string, target interface{}) error
- func (s *Service) RemoveAppConfig(appID string)
- func (s *Service) Set(appID, key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides app-scoped configuration management It wraps Forge's ConfigManager to provide multi-tenant configuration support
func NewService ¶
func NewService(forgeConfig forge.ConfigManager) *Service
NewService creates a new configuration service
func (*Service) Bind ¶
Bind binds configuration for a specific app If appID is empty, uses global configuration from Forge ConfigManager If appID is provided, merges app-specific overrides with global config
func (*Service) GetAppConfig ¶
GetAppConfig gets all configuration for a specific app
func (*Service) LoadAppConfig ¶
LoadAppConfig loads configuration for a specific app
func (*Service) MergeConfig ¶
MergeConfig merges app-specific config with global config This is similar to Bind but unmarshals the entire config instead of a specific key
func (*Service) RemoveAppConfig ¶
RemoveAppConfig removes all configuration for a specific app