Documentation
¶
Index ¶
- func FilterMPGRegions(platformRegions []fly.Region, mpgRegions []mpgv1.MPGRegion) []fly.Region
- func GetAvailableMPGRegionCodes(ctx context.Context, orgSlug string) ([]string, error)
- func GetAvailableMPGRegions(ctx context.Context, orgSlug string) ([]fly.Region, error)
- func IsValidMPGRegion(ctx context.Context, orgSlug string, regionCode string) (bool, error)
- type DefaultRegionProvider
- type MPGService
- func (s *MPGService) GetAvailableMPGRegionCodes(ctx context.Context, orgSlug string) ([]string, error)
- func (s *MPGService) GetAvailableMPGRegions(ctx context.Context, orgSlug string) ([]fly.Region, error)
- func (s *MPGService) IsValidMPGRegion(ctx context.Context, orgSlug string, regionCode string) (bool, error)
- type RegionProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterMPGRegions ¶
filterMPGRegions filters platform regions based on MPG availability
func GetAvailableMPGRegionCodes ¶
GetAvailableMPGRegionCodes returns just the region codes for error messages
func GetAvailableMPGRegions ¶
GetAvailableMPGRegions returns the list of regions available for Managed Postgres
Types ¶
type DefaultRegionProvider ¶
type DefaultRegionProvider struct{}
DefaultRegionProvider implements RegionProvider using the prompt package
func (*DefaultRegionProvider) GetPlatformRegions ¶
type MPGService ¶
type MPGService struct {
MpgClient mpgv1.ClientV1
RegionProvider RegionProvider
}
MPGService provides MPG-related functionality with injectable dependencies
func NewMPGService ¶
func NewMPGService(ctx context.Context) (*MPGService, error)
NewMPGService creates a new MPGService with default dependencies
func NewMPGServiceWithDependencies ¶
func NewMPGServiceWithDependencies(mpgClient mpgv1.ClientV1, regionProvider RegionProvider) *MPGService
NewMPGServiceWithDependencies creates a new MPGService with custom dependencies
func (*MPGService) GetAvailableMPGRegionCodes ¶
func (s *MPGService) GetAvailableMPGRegionCodes(ctx context.Context, orgSlug string) ([]string, error)
GetAvailableMPGRegionCodes returns just the region codes for error messages
func (*MPGService) GetAvailableMPGRegions ¶
func (s *MPGService) GetAvailableMPGRegions(ctx context.Context, orgSlug string) ([]fly.Region, error)
GetAvailableMPGRegions returns the list of regions available for Managed Postgres
func (*MPGService) IsValidMPGRegion ¶
func (s *MPGService) IsValidMPGRegion(ctx context.Context, orgSlug string, regionCode string) (bool, error)
IsValidMPGRegion checks if a region code is valid for Managed Postgres