regions

package
v0.4.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailableMPGRegionCodes

func GetAvailableMPGRegionCodes(ctx context.Context, orgSlug string) ([]string, error)

GetAvailableMPGRegionCodes returns just the region codes for error messages

func GetAvailableMPGRegions

func GetAvailableMPGRegions(ctx context.Context, orgSlug string) ([]fly.Region, error)

GetAvailableMPGRegions returns the list of regions available for Managed Postgres

func IsValidMPGRegion

func IsValidMPGRegion(ctx context.Context, orgSlug string, regionCode string) (bool, error)

IsValidMPGRegion checks if a region code is valid for Managed Postgres

Types

type DefaultRegionProvider

type DefaultRegionProvider struct{}

DefaultRegionProvider implements RegionProvider using the prompt package

func (*DefaultRegionProvider) GetPlatformRegions

func (p *DefaultRegionProvider) GetPlatformRegions(ctx context.Context) ([]fly.Region, error)

type MPGService

type MPGService struct {
	// contains filtered or unexported fields
}

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 mpgv2.ClientV2, 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

type RegionProvider

type RegionProvider interface {
	GetPlatformRegions(ctx context.Context) ([]fly.Region, error)
}

RegionProvider interface for getting platform regions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL