Documentation
¶
Index ¶
- type DefaultProfileManager
- func (m *DefaultProfileManager) GetProfile(atmosConfig *schema.AtmosConfiguration, profileName string) (*ProfileInfo, error)
- func (m *DefaultProfileManager) GetProfileLocations(atmosConfig *schema.AtmosConfiguration) ([]ProfileLocation, error)
- func (m *DefaultProfileManager) ListProfiles(atmosConfig *schema.AtmosConfiguration) ([]ProfileInfo, error)
- type ProfileInfo
- type ProfileLocation
- type ProfileManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultProfileManager ¶
type DefaultProfileManager struct{}
DefaultProfileManager is the concrete implementation of ProfileManager.
func (*DefaultProfileManager) GetProfile ¶
func (m *DefaultProfileManager) GetProfile(atmosConfig *schema.AtmosConfiguration, profileName string) (*ProfileInfo, error)
GetProfile returns detailed information about a specific profile.
func (*DefaultProfileManager) GetProfileLocations ¶
func (m *DefaultProfileManager) GetProfileLocations(atmosConfig *schema.AtmosConfiguration) ([]ProfileLocation, error)
GetProfileLocations returns all possible profile locations in precedence order.
func (*DefaultProfileManager) ListProfiles ¶
func (m *DefaultProfileManager) ListProfiles(atmosConfig *schema.AtmosConfiguration) ([]ProfileInfo, error)
ListProfiles returns all available profiles across all locations.
type ProfileInfo ¶
type ProfileInfo struct {
Name string // Profile name (directory name).
Path string // Absolute path to profile directory.
LocationType string // Location type: "configurable", "project-hidden", "xdg", "project".
Files []string // List of configuration files in the profile.
Metadata *schema.ConfigMetadata // Optional metadata from the profile.
}
ProfileInfo contains information about a discovered profile.
type ProfileLocation ¶
type ProfileLocation struct {
Path string // Absolute path to profile directory.
Type string // "configurable", "project-hidden", "xdg", "project".
Precedence int // Lower number = higher precedence.
Exists bool // Whether the directory exists.
}
ProfileLocation represents a location where profiles can be stored.
type ProfileManager ¶
type ProfileManager interface {
// ListProfiles returns all available profiles across all locations.
ListProfiles(atmosConfig *schema.AtmosConfiguration) ([]ProfileInfo, error)
// GetProfile returns detailed information about a specific profile.
GetProfile(atmosConfig *schema.AtmosConfiguration, profileName string) (*ProfileInfo, error)
// GetProfileLocations returns all possible profile locations in precedence order.
GetProfileLocations(atmosConfig *schema.AtmosConfiguration) ([]ProfileLocation, error)
}
ProfileManager defines the interface for profile operations. This interface allows for testing with mocks and provides a clean API for profile management.
func NewProfileManager ¶
func NewProfileManager() ProfileManager
NewProfileManager creates a new DefaultProfileManager.
Click to show internal directories.
Click to hide internal directories.