mock

package
v0.4.101 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AllocateEgressIPAddressFunc        func(ctx context.Context, appName string, machineId string) (net.IP, net.IP, error)
	AppNameAvailableFunc               func(ctx context.Context, appName string) (bool, error)
	AttachPostgresClusterFunc          func(ctx context.Context, input fly.AttachPostgresClusterInput) (*fly.AttachPostgresClusterPayload, error)
	AuthenticatedFunc                  func() bool
	CanPerformBluegreenDeploymentFunc  func(ctx context.Context, appName string) (bool, error)
	ClosestWireguardGatewayRegionFunc  func(ctx context.Context) (*fly.Region, error)
	CreateDoctorUrlFunc                func(ctx context.Context) (putUrl string, err error)
	CreateOrganizationFunc             func(ctx context.Context, organizationname string) (*fly.Organization, error)
	CreateOrganizationInviteFunc       func(ctx context.Context, id, email string) (*fly.Invitation, error)
	CreateWireGuardPeerFunc            func(ctx context.Context, orgID string, region, name, pubkey, network string) (*fly.CreatedWireGuardPeer, error)
	DeleteOrganizationFunc             func(ctx context.Context, id string) (deletedid string, err error)
	DeleteOrganizationMembershipFunc   func(ctx context.Context, orgId, userId string) (string, string, error)
	DetachPostgresClusterFunc          func(ctx context.Context, input fly.DetachPostgresClusterInput) error
	EnablePostgresConsulFunc           func(ctx context.Context, appName string) (*fly.PostgresEnableConsulPayload, error)
	FinishBuildFunc                    func(ctx context.Context, input fly.FinishBuildInput) (*fly.FinishBuildResponse, error)
	GetAppFunc                         func(ctx context.Context, appName string) (*fly.App, error)
	GetAppCompactFunc                  func(ctx context.Context, appName string) (*fly.AppCompact, error)
	GetAppHostIssuesFunc               func(ctx context.Context, appName string) ([]fly.HostIssue, error)
	GetAppLimitedAccessTokensFunc      func(ctx context.Context, appName string) ([]fly.LimitedAccessToken, error)
	GetAppLogsFunc                     func(ctx context.Context, appName, token, region, instanceID string) (entries []fly.LogEntry, nextToken string, err error)
	GetAppNameFromVolumeFunc           func(ctx context.Context, volID string) (*string, error)
	GetAppReleasesMachinesFunc         func(ctx context.Context, appName, status string, limit int) ([]fly.Release, error)
	GetAppSecretsFunc                  func(ctx context.Context, appName string) ([]fly.Secret, error)
	GetAppsFunc                        func(ctx context.Context, role *string) ([]fly.App, error)
	GetCurrentUserFunc                 func(ctx context.Context) (*fly.User, error)
	GetDetailedOrganizationBySlugFunc  func(ctx context.Context, slug string) (*fly.OrganizationDetails, error)
	GetEgressIPAddressesFunc           func(ctx context.Context, appName string) (map[string][]fly.EgressIPAddress, error)
	GetLatestImageDetailsFunc          func(ctx context.Context, image string, flyVersion string) (*fly.ImageVersion, error)
	GetLatestImageTagFunc              func(ctx context.Context, repository string, snapshotId *string) (string, error)
	GetLoggedCertificatesFunc          func(ctx context.Context, slug string) ([]fly.LoggedCertificate, error)
	GetMachineFunc                     func(ctx context.Context, machineId string) (*fly.GqlMachine, error)
	GetOrgLimitedAccessTokensFunc      func(ctx context.Context, orgSlug string) ([]fly.LimitedAccessToken, error)
	GetOrganizationsFunc               func(ctx context.Context, filters ...fly.OrganizationFilter) ([]fly.Organization, error)
	GetAllowedReplaySourceOrgSlugsFunc func(ctx context.Context, slug string) ([]string, error)
	AddAllowedReplaySourceOrgsFunc     func(ctx context.Context, orgSlug string, sourceOrgSlugs []string) (*fly.Organization, error)
	RemoveAllowedReplaySourceOrgsFunc  func(ctx context.Context, orgSlug string, orgSlugsToRemove []string) (*fly.Organization, error)
	GetAllowAllCrossNetworkReplaysFunc func(ctx context.Context, slug string) (bool, error)
	SetAllowAllCrossNetworkReplaysFunc func(ctx context.Context, orgSlug string, allow bool) (*fly.Organization, error)
	GetWireGuardPeersFunc              func(ctx context.Context, slug string) ([]*fly.WireGuardPeer, error)
	GenqClientFunc                     func() genq.Client
	IssueSSHCertificateFunc            func(ctx context.Context, orgID string, principals []string, appNames []string, valid_hours *int, publicKey ed25519.PublicKey) (*fly.IssuedCertificate, error)
	ListPostgresClusterAttachmentsFunc func(ctx context.Context, appName, postgresAppName string) ([]*fly.PostgresClusterAttachment, error)
	LoggerFunc                         func() fly.Logger
	MoveAppFunc                        func(ctx context.Context, appName string, orgID string) (*fly.App, error)
	NewRequestFunc                     func(q string) *graphql.Request
	PlatformRegionsFunc                func(ctx context.Context) ([]fly.Region, *fly.Region, error)
	ReleaseEgressIPAddressFunc         func(ctx context.Context, appName string, machineID string) (net.IP, net.IP, error)
	RemoveWireGuardPeerFunc            func(ctx context.Context, orgID string, name string) error
	ResolveImageForAppFunc             func(ctx context.Context, appName, imageRef string) (*fly.Image, error)
	RevokeLimitedAccessTokenFunc       func(ctx context.Context, id string) error
	RunFunc                            func(req *graphql.Request) (fly.Query, error)
	RunWithContextFunc                 func(ctx context.Context, req *graphql.Request) (fly.Query, error)
	SetGenqClientFunc                  func(client genq.Client)
	SetRemoteBuilderFunc               func(ctx context.Context, appName string) error
	SetSecretsFunc                     func(ctx context.Context, appName string, secrets map[string]string) (*fly.Release, error)
	UnsetSecretsFunc                   func(ctx context.Context, appName string, keys []string) (*fly.Release, error)
	ValidateWireGuardPeersFunc         func(ctx context.Context, peerIPs []string) (invalid []string, err error)
}

func (*Client) AddAllowedReplaySourceOrgs added in v0.3.234

func (m *Client) AddAllowedReplaySourceOrgs(ctx context.Context, orgSlug string, sourceOrgSlugs []string) (*fly.Organization, error)

func (*Client) AllocateEgressIPAddress added in v0.3.8

func (m *Client) AllocateEgressIPAddress(ctx context.Context, appName string, machineId string) (net.IP, net.IP, error)

func (*Client) AppNameAvailable

func (m *Client) AppNameAvailable(ctx context.Context, appName string) (bool, error)

func (*Client) AttachPostgresCluster

func (m *Client) AttachPostgresCluster(ctx context.Context, input fly.AttachPostgresClusterInput) (*fly.AttachPostgresClusterPayload, error)

func (*Client) Authenticated

func (m *Client) Authenticated() bool

func (*Client) CanPerformBluegreenDeployment

func (m *Client) CanPerformBluegreenDeployment(ctx context.Context, appName string) (bool, error)

func (*Client) ClosestWireguardGatewayRegion

func (m *Client) ClosestWireguardGatewayRegion(ctx context.Context) (*fly.Region, error)

func (*Client) CreateDoctorUrl

func (m *Client) CreateDoctorUrl(ctx context.Context) (putUrl string, err error)

func (*Client) CreateOrganization

func (m *Client) CreateOrganization(ctx context.Context, organizationname string) (*fly.Organization, error)

func (*Client) CreateOrganizationInvite

func (m *Client) CreateOrganizationInvite(ctx context.Context, id, email string) (*fly.Invitation, error)

func (*Client) CreateWireGuardPeer

func (m *Client) CreateWireGuardPeer(ctx context.Context, orgID string, region, name, pubkey, network string) (*fly.CreatedWireGuardPeer, error)

func (*Client) DeleteOrganization

func (m *Client) DeleteOrganization(ctx context.Context, id string) (deletedid string, err error)

func (*Client) DeleteOrganizationMembership

func (m *Client) DeleteOrganizationMembership(ctx context.Context, orgId, userId string) (string, string, error)

func (*Client) DetachPostgresCluster

func (m *Client) DetachPostgresCluster(ctx context.Context, input fly.DetachPostgresClusterInput) error

func (*Client) EnablePostgresConsul

func (m *Client) EnablePostgresConsul(ctx context.Context, appName string) (*fly.PostgresEnableConsulPayload, error)

func (*Client) FinishBuild added in v0.2.62

func (m *Client) FinishBuild(ctx context.Context, input fly.FinishBuildInput) (*fly.FinishBuildResponse, error)

func (*Client) GenqClient

func (m *Client) GenqClient() genq.Client

func (*Client) GetAllowAllCrossNetworkReplays added in v0.4.45

func (m *Client) GetAllowAllCrossNetworkReplays(ctx context.Context, slug string) (bool, error)

func (*Client) GetAllowedReplaySourceOrgSlugs added in v0.3.234

func (m *Client) GetAllowedReplaySourceOrgSlugs(ctx context.Context, slug string) ([]string, error)

func (*Client) GetApp

func (m *Client) GetApp(ctx context.Context, appName string) (*fly.App, error)

func (*Client) GetAppCompact

func (m *Client) GetAppCompact(ctx context.Context, appName string) (*fly.AppCompact, error)

func (*Client) GetAppHostIssues added in v0.2.66

func (m *Client) GetAppHostIssues(ctx context.Context, appName string) ([]fly.HostIssue, error)

func (*Client) GetAppLimitedAccessTokens

func (m *Client) GetAppLimitedAccessTokens(ctx context.Context, appName string) ([]fly.LimitedAccessToken, error)

func (*Client) GetAppLogs

func (m *Client) GetAppLogs(ctx context.Context, appName, token, region, instanceID string) (entries []fly.LogEntry, nextToken string, err error)

func (*Client) GetAppNameFromVolume

func (m *Client) GetAppNameFromVolume(ctx context.Context, volID string) (*string, error)

func (*Client) GetAppReleasesMachines

func (m *Client) GetAppReleasesMachines(ctx context.Context, appName, status string, limit int) ([]fly.Release, error)

func (*Client) GetAppSecrets

func (m *Client) GetAppSecrets(ctx context.Context, appName string) ([]fly.Secret, error)

func (*Client) GetApps

func (m *Client) GetApps(ctx context.Context, role *string) ([]fly.App, error)

func (*Client) GetCurrentUser

func (m *Client) GetCurrentUser(ctx context.Context) (*fly.User, error)

func (*Client) GetDetailedOrganizationBySlug

func (m *Client) GetDetailedOrganizationBySlug(ctx context.Context, slug string) (*fly.OrganizationDetails, error)

func (*Client) GetEgressIPAddresses added in v0.3.8

func (m *Client) GetEgressIPAddresses(ctx context.Context, appName string) (map[string][]fly.EgressIPAddress, error)

func (*Client) GetLatestImageDetails

func (m *Client) GetLatestImageDetails(ctx context.Context, image string, flyVersion string) (*fly.ImageVersion, error)

func (*Client) GetLatestImageTag

func (m *Client) GetLatestImageTag(ctx context.Context, repository string, snapshotId *string) (string, error)

func (*Client) GetLoggedCertificates

func (m *Client) GetLoggedCertificates(ctx context.Context, slug string) ([]fly.LoggedCertificate, error)

func (*Client) GetMachine

func (m *Client) GetMachine(ctx context.Context, machineId string) (*fly.GqlMachine, error)

func (*Client) GetOrgLimitedAccessTokens added in v0.4.41

func (m *Client) GetOrgLimitedAccessTokens(ctx context.Context, orgSlug string) ([]fly.LimitedAccessToken, error)

func (*Client) GetOrganizations

func (m *Client) GetOrganizations(ctx context.Context, filters ...fly.OrganizationFilter) ([]fly.Organization, error)

func (*Client) GetWireGuardPeers

func (m *Client) GetWireGuardPeers(ctx context.Context, slug string) ([]*fly.WireGuardPeer, error)

func (*Client) IssueSSHCertificate

func (m *Client) IssueSSHCertificate(ctx context.Context, orgID string, principals []string, appNames []string, valid_hours *int, publicKey ed25519.PublicKey) (*fly.IssuedCertificate, error)

func (*Client) ListPostgresClusterAttachments

func (m *Client) ListPostgresClusterAttachments(ctx context.Context, appName, postgresAppName string) ([]*fly.PostgresClusterAttachment, error)

func (*Client) Logger

func (m *Client) Logger() fly.Logger

func (*Client) MoveApp

func (m *Client) MoveApp(ctx context.Context, appName string, orgID string) (*fly.App, error)

func (*Client) NewRequest

func (m *Client) NewRequest(q string) *graphql.Request

func (*Client) PlatformRegions

func (m *Client) PlatformRegions(ctx context.Context) ([]fly.Region, *fly.Region, error)

func (*Client) ReleaseEgressIPAddress added in v0.3.15

func (m *Client) ReleaseEgressIPAddress(ctx context.Context, appName string, machineID string) (net.IP, net.IP, error)

func (*Client) RemoveAllowedReplaySourceOrgs added in v0.3.234

func (m *Client) RemoveAllowedReplaySourceOrgs(ctx context.Context, orgSlug string, orgSlugsToRemove []string) (*fly.Organization, error)

func (*Client) RemoveWireGuardPeer

func (m *Client) RemoveWireGuardPeer(ctx context.Context, orgID string, name string) error

func (*Client) ResolveImageForApp

func (m *Client) ResolveImageForApp(ctx context.Context, appName, imageRef string) (*fly.Image, error)

func (*Client) RevokeLimitedAccessToken

func (m *Client) RevokeLimitedAccessToken(ctx context.Context, id string) error

func (*Client) Run

func (m *Client) Run(req *graphql.Request) (fly.Query, error)

func (*Client) RunWithContext

func (m *Client) RunWithContext(ctx context.Context, req *graphql.Request) (fly.Query, error)

func (*Client) SetAllowAllCrossNetworkReplays added in v0.4.45

func (m *Client) SetAllowAllCrossNetworkReplays(ctx context.Context, orgSlug string, allow bool) (*fly.Organization, error)

func (*Client) SetGenqClient

func (m *Client) SetGenqClient(client genq.Client)

func (*Client) SetRemoteBuilder added in v0.2.67

func (m *Client) SetRemoteBuilder(ctx context.Context, appName string) error

func (*Client) SetSecrets

func (m *Client) SetSecrets(ctx context.Context, appName string, secrets map[string]string) (*fly.Release, error)

func (*Client) UnsetSecrets

func (m *Client) UnsetSecrets(ctx context.Context, appName string, keys []string) (*fly.Release, error)

func (*Client) ValidateWireGuardPeers

func (m *Client) ValidateWireGuardPeers(ctx context.Context, peerIPs []string) (invalid []string, err error)

type FlapsClient

type FlapsClient struct {
	AcquireLeaseFunc                      func(ctx context.Context, appName, machineID string, ttl *int) (*fly.MachineLease, error)
	AppNameAvailableFunc                  func(ctx context.Context, name string) (bool, error)
	AssignIPFunc                          func(ctx context.Context, appName string, req flaps.AssignIPRequest) (res *flaps.AssignIPResponse, err error)
	CheckCertificateFunc                  func(ctx context.Context, appName, hostname string) (*fly.CertificateDetailResponse, error)
	CordonFunc                            func(ctx context.Context, appName, machineID string, nonce string) (err error)
	CreateAppFunc                         func(ctx context.Context, req flaps.CreateAppRequest) (*flaps.App, error)
	CreateACMECertificateFunc             func(ctx context.Context, appName string, req fly.CreateCertificateRequest) (*fly.CertificateDetailResponse, error)
	CreateManagedPostgresClusterFunc      func(ctx context.Context, req flaps.CreateManagedPostgresClusterRequest) (flaps.ManagedPostgresCluster, error)
	CreateManagedPostgresDatabaseFunc     func(ctx context.Context, id string, req flaps.CreateManagedPostgresDatabaseRequest) (flaps.ManagedPostgresDatabase, error)
	CreateManagedPostgresUserFunc         func(ctx context.Context, id string, req flaps.CreateManagedPostgresUserRequest) (flaps.ManagedPostgresUser, error)
	CreateManagedPostgresBackupFunc       func(ctx context.Context, id string, req flaps.CreateManagedPostgresBackupRequest) error
	CreateManagedPostgresAttachmentFunc   func(ctx context.Context, id string, req flaps.CreateManagedPostgresAttachmentRequest) (flaps.ManagedPostgresAttachment, error)
	EnableManagedPostgresExtensionFunc    func(ctx context.Context, id, database string, req flaps.EnableManagedPostgresExtensionRequest) error
	CreateVolumeFunc                      func(ctx context.Context, appName string, req fly.CreateVolumeRequest) (*fly.Volume, error)
	CreateVolumeSnapshotFunc              func(ctx context.Context, appName, volumeId string) error
	DeleteAppFunc                         func(ctx context.Context, name string) error
	DeleteACMECertificateFunc             func(ctx context.Context, appName, hostname string) error
	DeleteCertificateFunc                 func(ctx context.Context, appName, hostname string) error
	DeleteCustomCertificateFunc           func(ctx context.Context, appName, hostname string) error
	DeleteManagedPostgresAttachmentFunc   func(ctx context.Context, id, appName string) error
	DeleteManagedPostgresClusterFunc      func(ctx context.Context, id string) error
	DeleteManagedPostgresUserFunc         func(ctx context.Context, id, username string) error
	DisableManagedPostgresExtensionFunc   func(ctx context.Context, id, database, name string, force bool) error
	DeleteMetadataFunc                    func(ctx context.Context, appName, machineID, key string) error
	DeleteAppSecretFunc                   func(ctx context.Context, appName, name string) (*fly.DeleteAppSecretResp, error)
	DeleteIPAssignmentFunc                func(ctx context.Context, appName, ip string) (err error)
	DeleteSecretKeyFunc                   func(ctx context.Context, appName, name string) error
	DeleteVolumeFunc                      func(ctx context.Context, appName, volumeId string) (*fly.Volume, error)
	DestroyFunc                           func(ctx context.Context, appName string, input fly.RemoveMachineInput, nonce string) (err error)
	ExecFunc                              func(ctx context.Context, appName, machineID string, in *fly.MachineExecRequest) (*fly.MachineExecResponse, error)
	ExtendVolumeFunc                      func(ctx context.Context, appName, volumeId string, size_gb int) (*fly.Volume, bool, error)
	FindLeaseFunc                         func(ctx context.Context, appName, machineID string) (*fly.MachineLease, error)
	GenerateSecretKeyFunc                 func(ctx context.Context, appName, name string, typ string) (*fly.SetSecretKeyResp, error)
	GetFunc                               func(ctx context.Context, appName, machineID string) (*fly.Machine, error)
	GetAppFunc                            func(ctx context.Context, name string) (app *flaps.App, err error)
	GetAllVolumesFunc                     func(ctx context.Context, appName string) ([]fly.Volume, error)
	GetCertificateFunc                    func(ctx context.Context, appName, hostname string) (*fly.CertificateDetailResponse, error)
	GetIPAssignmentsFunc                  func(ctx context.Context, appName string) (res *flaps.ListIPAssignmentsResponse, err error)
	GetManagedPostgresClusterFunc         func(ctx context.Context, id string) (flaps.ManagedPostgresCluster, error)
	GetManagedPostgresUserCredentialsFunc func(ctx context.Context, id, username string) (flaps.ManagedPostgresUserCredentials, error)
	GetManyFunc                           func(ctx context.Context, appName string, machineIDs []string) ([]*fly.Machine, error)
	GetMetadataFunc                       func(ctx context.Context, appName, machineID string) (map[string]string, error)
	GetPlacementsFunc                     func(ctx context.Context, req *flaps.GetPlacementsRequest) ([]flaps.RegionPlacement, error)
	GetProcessesFunc                      func(ctx context.Context, appName, machineID string) (fly.MachinePsResponse, error)
	GetRegionsFunc                        func(ctx context.Context) (*flaps.RegionData, error)
	GetVolumeFunc                         func(ctx context.Context, appName, volumeId string) (*fly.Volume, error)
	GetVolumeSnapshotsFunc                func(ctx context.Context, appName, volumeId string) ([]fly.VolumeSnapshot, error)
	GetVolumesFunc                        func(ctx context.Context, appName string) ([]fly.Volume, error)
	CreateCustomCertificateFunc           func(ctx context.Context, appName string, req fly.ImportCertificateRequest) (*fly.CertificateDetailResponse, error)
	KillFunc                              func(ctx context.Context, appName, machineID string) (err error)
	LaunchFunc                            func(ctx context.Context, appName string, builder fly.LaunchMachineInput) (out *fly.Machine, err error)
	ListFunc                              func(ctx context.Context, appName, state string) ([]*fly.Machine, error)
	ListActiveFunc                        func(ctx context.Context, appName string) ([]*fly.Machine, error)
	ListAppsFunc                          func(ctx context.Context, req flaps.ListAppsRequest) ([]flaps.App, error)
	ListAppSecretsFunc                    func(ctx context.Context, appName string, version *uint64, showSecrets bool) ([]fly.AppSecret, error)
	ListCertificatesFunc                  func(ctx context.Context, appName string, opts *flaps.ListCertificatesOpts) (*fly.ListCertificatesResponse, error)
	ListFlyAppsMachinesFunc               func(ctx context.Context, appName string) ([]*fly.Machine, *fly.Machine, error)
	ListManagedPostgresClustersFunc       func(ctx context.Context, req flaps.ListManagedPostgresClustersRequest) ([]flaps.ManagedPostgresClusterSummary, error)
	ListManagedPostgresDatabasesFunc      func(ctx context.Context, id string) ([]flaps.ManagedPostgresDatabase, error)
	ListManagedPostgresUsersFunc          func(ctx context.Context, id string) ([]flaps.ManagedPostgresUser, error)
	ListManagedPostgresBackupsFunc        func(ctx context.Context, id string) ([]flaps.ManagedPostgresBackup, error)
	ListManagedPostgresExtensionsFunc     func(ctx context.Context, id, database string) ([]flaps.ManagedPostgresExtension, error)
	ListSecretKeysFunc                    func(ctx context.Context, appName string, version *uint64) ([]fly.SecretKey, error)
	NewRequestFunc                        func(ctx context.Context, method, path string, in any, headers map[string][]string) (*http.Request, error)
	RefreshLeaseFunc                      func(ctx context.Context, appName, machineID string, ttl *int, nonce string) (*fly.MachineLease, error)
	ReleaseLeaseFunc                      func(ctx context.Context, appName, machineID, nonce string) error
	RestoreManagedPostgresClusterFunc     func(ctx context.Context, id string, req flaps.RestoreManagedPostgresClusterRequest) (flaps.ManagedPostgresCluster, error)
	RestartFunc                           func(ctx context.Context, appName string, in fly.RestartMachineInput, nonce string) (err error)
	SetMetadataFunc                       func(ctx context.Context, appName, machineID, key, value string) error
	SetAppSecretFunc                      func(ctx context.Context, appName, name string, value string) (*fly.SetAppSecretResp, error)
	SetSecretKeyFunc                      func(ctx context.Context, appName, name string, typ string, value []byte) (*fly.SetSecretKeyResp, error)
	StartFunc                             func(ctx context.Context, appName, machineID string, nonce string) (out *fly.MachineStartResponse, err error)
	StopFunc                              func(ctx context.Context, appName string, in fly.StopMachineInput, nonce string) (err error)
	SuspendFunc                           func(ctx context.Context, appName, machineID, nonce string) error
	UncordonFunc                          func(ctx context.Context, appName, machineID string, nonce string) (err error)
	UpdateFunc                            func(ctx context.Context, appName string, builder fly.LaunchMachineInput, nonce string) (out *fly.Machine, err error)
	UpdateAppSecretsFunc                  func(ctx context.Context, appName string, values map[string]*string) (*fly.UpdateAppSecretsResp, error)
	UpdateManagedPostgresUserRoleFunc     func(ctx context.Context, id, username string, req flaps.UpdateManagedPostgresUserRoleRequest) error
	UpdateVolumeFunc                      func(ctx context.Context, appName, volumeId string, req fly.UpdateVolumeRequest) (*fly.Volume, error)
	WaitFunc                              func(ctx context.Context, appName string, machineID string, waitOpts ...flaps.WaitOption) (err error)
	WaitForAppFunc                        func(ctx context.Context, name string) error
}

func (*FlapsClient) AcquireLease

func (m *FlapsClient) AcquireLease(ctx context.Context, appName, machineID string, ttl *int) (*fly.MachineLease, error)

func (*FlapsClient) AppNameAvailable added in v0.3.214

func (m *FlapsClient) AppNameAvailable(ctx context.Context, name string) (bool, error)

func (*FlapsClient) AssignIP added in v0.3.214

func (m *FlapsClient) AssignIP(ctx context.Context, appName string, req flaps.AssignIPRequest) (res *flaps.AssignIPResponse, err error)

func (*FlapsClient) CheckCertificate added in v0.4.11

func (m *FlapsClient) CheckCertificate(ctx context.Context, appName, hostname string) (*fly.CertificateDetailResponse, error)

func (*FlapsClient) Cordon

func (m *FlapsClient) Cordon(ctx context.Context, appName, machineID string, nonce string) (err error)

func (*FlapsClient) CreateACMECertificate added in v0.4.11

func (m *FlapsClient) CreateACMECertificate(ctx context.Context, appName string, req fly.CreateCertificateRequest) (*fly.CertificateDetailResponse, error)

func (*FlapsClient) CreateApp

func (m *FlapsClient) CreateApp(ctx context.Context, req flaps.CreateAppRequest) (*flaps.App, error)

func (*FlapsClient) CreateCustomCertificate added in v0.4.11

func (m *FlapsClient) CreateCustomCertificate(ctx context.Context, appName string, req fly.ImportCertificateRequest) (*fly.CertificateDetailResponse, error)

func (*FlapsClient) CreateManagedPostgresAttachment added in v0.4.98

func (*FlapsClient) CreateManagedPostgresBackup added in v0.4.96

func (m *FlapsClient) CreateManagedPostgresBackup(ctx context.Context, id string, req flaps.CreateManagedPostgresBackupRequest) error

func (*FlapsClient) CreateManagedPostgresCluster added in v0.4.84

func (*FlapsClient) CreateManagedPostgresDatabase added in v0.4.95

func (*FlapsClient) CreateManagedPostgresUser added in v0.4.97

func (*FlapsClient) CreateVolume

func (m *FlapsClient) CreateVolume(ctx context.Context, appName string, req fly.CreateVolumeRequest) (*fly.Volume, error)

func (*FlapsClient) CreateVolumeSnapshot

func (m *FlapsClient) CreateVolumeSnapshot(ctx context.Context, appName, volumeId string) error

func (*FlapsClient) DeleteACMECertificate added in v0.4.11

func (m *FlapsClient) DeleteACMECertificate(ctx context.Context, appName, hostname string) error

func (*FlapsClient) DeleteApp added in v0.3.214

func (m *FlapsClient) DeleteApp(ctx context.Context, name string) error

func (*FlapsClient) DeleteAppSecret added in v0.3.133

func (m *FlapsClient) DeleteAppSecret(ctx context.Context, appName, name string) (*fly.DeleteAppSecretResp, error)

func (*FlapsClient) DeleteCertificate added in v0.4.11

func (m *FlapsClient) DeleteCertificate(ctx context.Context, appName, hostname string) error

func (*FlapsClient) DeleteCustomCertificate added in v0.4.11

func (m *FlapsClient) DeleteCustomCertificate(ctx context.Context, appName, hostname string) error

func (*FlapsClient) DeleteIPAssignment added in v0.3.214

func (m *FlapsClient) DeleteIPAssignment(ctx context.Context, appName, ip string) (err error)

func (*FlapsClient) DeleteManagedPostgresAttachment added in v0.4.97

func (m *FlapsClient) DeleteManagedPostgresAttachment(ctx context.Context, id, appName string) error

func (*FlapsClient) DeleteManagedPostgresCluster added in v0.4.93

func (m *FlapsClient) DeleteManagedPostgresCluster(ctx context.Context, id string) error

func (*FlapsClient) DeleteManagedPostgresUser added in v0.4.97

func (m *FlapsClient) DeleteManagedPostgresUser(ctx context.Context, id, username string) error

func (*FlapsClient) DeleteMetadata

func (m *FlapsClient) DeleteMetadata(ctx context.Context, appName, machineID, key string) error

func (*FlapsClient) DeleteSecretKey added in v0.3.133

func (m *FlapsClient) DeleteSecretKey(ctx context.Context, appName, name string) error

func (*FlapsClient) DeleteVolume

func (m *FlapsClient) DeleteVolume(ctx context.Context, appName, volumeId string) (*fly.Volume, error)

func (*FlapsClient) Destroy

func (m *FlapsClient) Destroy(ctx context.Context, appName string, input fly.RemoveMachineInput, nonce string) (err error)

func (*FlapsClient) DisableManagedPostgresExtension added in v0.4.97

func (m *FlapsClient) DisableManagedPostgresExtension(ctx context.Context, id, database, name string, force bool) error

func (*FlapsClient) EnableManagedPostgresExtension added in v0.4.97

func (m *FlapsClient) EnableManagedPostgresExtension(ctx context.Context, id, database string, req flaps.EnableManagedPostgresExtensionRequest) error

func (*FlapsClient) Exec

func (m *FlapsClient) Exec(ctx context.Context, appName, machineID string, in *fly.MachineExecRequest) (*fly.MachineExecResponse, error)

func (*FlapsClient) ExtendVolume

func (m *FlapsClient) ExtendVolume(ctx context.Context, appName, volumeId string, size_gb int) (*fly.Volume, bool, error)

func (*FlapsClient) FindLease

func (m *FlapsClient) FindLease(ctx context.Context, appName, machineID string) (*fly.MachineLease, error)

func (*FlapsClient) GenerateSecretKey added in v0.3.133

func (m *FlapsClient) GenerateSecretKey(ctx context.Context, appName, name string, typ string) (*fly.SetSecretKeyResp, error)

func (*FlapsClient) Get

func (m *FlapsClient) Get(ctx context.Context, appName, machineID string) (*fly.Machine, error)

func (*FlapsClient) GetAllVolumes

func (m *FlapsClient) GetAllVolumes(ctx context.Context, appName string) ([]fly.Volume, error)

func (*FlapsClient) GetApp added in v0.3.214

func (m *FlapsClient) GetApp(ctx context.Context, name string) (app *flaps.App, err error)

func (*FlapsClient) GetCertificate added in v0.4.11

func (m *FlapsClient) GetCertificate(ctx context.Context, appName, hostname string) (*fly.CertificateDetailResponse, error)

func (*FlapsClient) GetIPAssignments added in v0.3.214

func (m *FlapsClient) GetIPAssignments(ctx context.Context, appName string) (res *flaps.ListIPAssignmentsResponse, err error)

func (*FlapsClient) GetManagedPostgresCluster added in v0.4.84

func (m *FlapsClient) GetManagedPostgresCluster(ctx context.Context, id string) (flaps.ManagedPostgresCluster, error)

func (*FlapsClient) GetManagedPostgresUserCredentials added in v0.4.84

func (m *FlapsClient) GetManagedPostgresUserCredentials(ctx context.Context, id, username string) (flaps.ManagedPostgresUserCredentials, error)

func (*FlapsClient) GetMany

func (m *FlapsClient) GetMany(ctx context.Context, appName string, machineIDs []string) ([]*fly.Machine, error)

func (*FlapsClient) GetMetadata

func (m *FlapsClient) GetMetadata(ctx context.Context, appName, machineID string) (map[string]string, error)

func (*FlapsClient) GetPlacements added in v0.3.224

func (*FlapsClient) GetProcesses

func (m *FlapsClient) GetProcesses(ctx context.Context, appName, machineID string) (fly.MachinePsResponse, error)

func (*FlapsClient) GetRegions added in v0.3.214

func (m *FlapsClient) GetRegions(ctx context.Context) (*flaps.RegionData, error)

func (*FlapsClient) GetVolume

func (m *FlapsClient) GetVolume(ctx context.Context, appName, volumeId string) (*fly.Volume, error)

func (*FlapsClient) GetVolumeSnapshots

func (m *FlapsClient) GetVolumeSnapshots(ctx context.Context, appName, volumeId string) ([]fly.VolumeSnapshot, error)

func (*FlapsClient) GetVolumes

func (m *FlapsClient) GetVolumes(ctx context.Context, appName string) ([]fly.Volume, error)

func (*FlapsClient) Kill

func (m *FlapsClient) Kill(ctx context.Context, appName, machineID string) (err error)

func (*FlapsClient) Launch

func (m *FlapsClient) Launch(ctx context.Context, appName string, builder fly.LaunchMachineInput) (out *fly.Machine, err error)

func (*FlapsClient) List

func (m *FlapsClient) List(ctx context.Context, appName, state string) ([]*fly.Machine, error)

func (*FlapsClient) ListActive

func (m *FlapsClient) ListActive(ctx context.Context, appName string) ([]*fly.Machine, error)

func (*FlapsClient) ListAppSecrets added in v0.3.133

func (m *FlapsClient) ListAppSecrets(ctx context.Context, appName string, version *uint64, showSecrets bool) ([]fly.AppSecret, error)

func (*FlapsClient) ListApps added in v0.3.214

func (m *FlapsClient) ListApps(ctx context.Context, req flaps.ListAppsRequest) ([]flaps.App, error)

func (*FlapsClient) ListCertificates added in v0.4.11

func (m *FlapsClient) ListCertificates(ctx context.Context, appName string, opts *flaps.ListCertificatesOpts) (*fly.ListCertificatesResponse, error)

func (*FlapsClient) ListFlyAppsMachines

func (m *FlapsClient) ListFlyAppsMachines(ctx context.Context, appName string) ([]*fly.Machine, *fly.Machine, error)

func (*FlapsClient) ListManagedPostgresBackups added in v0.4.96

func (m *FlapsClient) ListManagedPostgresBackups(ctx context.Context, id string) ([]flaps.ManagedPostgresBackup, error)

func (*FlapsClient) ListManagedPostgresClusters added in v0.4.93

func (*FlapsClient) ListManagedPostgresDatabases added in v0.4.95

func (m *FlapsClient) ListManagedPostgresDatabases(ctx context.Context, id string) ([]flaps.ManagedPostgresDatabase, error)

func (*FlapsClient) ListManagedPostgresExtensions added in v0.4.97

func (m *FlapsClient) ListManagedPostgresExtensions(ctx context.Context, id, database string) ([]flaps.ManagedPostgresExtension, error)

func (*FlapsClient) ListManagedPostgresUsers added in v0.4.97

func (m *FlapsClient) ListManagedPostgresUsers(ctx context.Context, id string) ([]flaps.ManagedPostgresUser, error)

func (*FlapsClient) ListSecretKeys added in v0.3.133

func (m *FlapsClient) ListSecretKeys(ctx context.Context, appName string, version *uint64) ([]fly.SecretKey, error)

func (*FlapsClient) NewRequest

func (m *FlapsClient) NewRequest(ctx context.Context, method, path string, in any, headers map[string][]string) (*http.Request, error)

func (*FlapsClient) RefreshLease

func (m *FlapsClient) RefreshLease(ctx context.Context, appName, machineID string, ttl *int, nonce string) (*fly.MachineLease, error)

func (*FlapsClient) ReleaseLease

func (m *FlapsClient) ReleaseLease(ctx context.Context, appName, machineID, nonce string) error

func (*FlapsClient) Restart

func (m *FlapsClient) Restart(ctx context.Context, appName string, in fly.RestartMachineInput, nonce string) (err error)

func (*FlapsClient) RestoreManagedPostgresCluster added in v0.4.96

func (*FlapsClient) SetAppSecret added in v0.3.133

func (m *FlapsClient) SetAppSecret(ctx context.Context, appName, name string, value string) (*fly.SetAppSecretResp, error)

func (*FlapsClient) SetMetadata

func (m *FlapsClient) SetMetadata(ctx context.Context, appName, machineID, key, value string) error

func (*FlapsClient) SetSecretKey added in v0.3.133

func (m *FlapsClient) SetSecretKey(ctx context.Context, appName, name string, typ string, value []byte) (*fly.SetSecretKeyResp, error)

func (*FlapsClient) Start

func (m *FlapsClient) Start(ctx context.Context, appName, machineID string, nonce string) (out *fly.MachineStartResponse, err error)

func (*FlapsClient) Stop

func (m *FlapsClient) Stop(ctx context.Context, appName string, in fly.StopMachineInput, nonce string) (err error)

func (*FlapsClient) Suspend added in v0.2.71

func (m *FlapsClient) Suspend(ctx context.Context, appName, machineID, nonce string) error

func (*FlapsClient) Uncordon

func (m *FlapsClient) Uncordon(ctx context.Context, appName, machineID string, nonce string) (err error)

func (*FlapsClient) Update

func (m *FlapsClient) Update(ctx context.Context, appName string, builder fly.LaunchMachineInput, nonce string) (out *fly.Machine, err error)

func (*FlapsClient) UpdateAppSecrets added in v0.3.178

func (m *FlapsClient) UpdateAppSecrets(ctx context.Context, appName string, values map[string]*string) (*fly.UpdateAppSecretsResp, error)

func (*FlapsClient) UpdateManagedPostgresUserRole added in v0.4.97

func (m *FlapsClient) UpdateManagedPostgresUserRole(ctx context.Context, id, username string, req flaps.UpdateManagedPostgresUserRoleRequest) error

func (*FlapsClient) UpdateVolume

func (m *FlapsClient) UpdateVolume(ctx context.Context, appName, volumeId string, req fly.UpdateVolumeRequest) (*fly.Volume, error)

func (*FlapsClient) Wait

func (m *FlapsClient) Wait(ctx context.Context, appName string, machineID string, waitOpts ...flaps.WaitOption) (err error)

func (*FlapsClient) WaitForApp

func (m *FlapsClient) WaitForApp(ctx context.Context, name string) error

type MpgV1Client added in v0.4.41

type MpgV1Client struct {
	ListManagedClustersFunc         func(ctx context.Context, orgSlug string, deleted bool) (mpgv1.ListManagedClustersResponse, error)
	GetManagedClusterFunc           func(ctx context.Context, orgSlug string, id string) (mpgv1.GetManagedClusterResponse, error)
	GetManagedClusterByIdFunc       func(ctx context.Context, id string) (mpgv1.GetManagedClusterResponse, error)
	CreateUserFunc                  func(ctx context.Context, id string, input mpgv1.CreateUserInput) (mpgv1.CreateUserResponse, error)
	CreateUserWithRoleFunc          func(ctx context.Context, id string, input mpgv1.CreateUserWithRoleInput) (mpgv1.CreateUserWithRoleResponse, error)
	UpdateUserRoleFunc              func(ctx context.Context, id string, username string, input mpgv1.UpdateUserRoleInput) (mpgv1.UpdateUserRoleResponse, error)
	DeleteUserFunc                  func(ctx context.Context, id string, username string) error
	GetUserCredentialsFunc          func(ctx context.Context, id string, username string) (mpgv1.GetUserCredentialsResponse, error)
	ListUsersFunc                   func(ctx context.Context, id string) (mpgv1.ListUsersResponse, error)
	ListDatabasesFunc               func(ctx context.Context, id string) (mpgv1.ListDatabasesResponse, error)
	CreateDatabaseFunc              func(ctx context.Context, id string, input mpgv1.CreateDatabaseInput) (mpgv1.CreateDatabaseResponse, error)
	DestroyClusterFunc              func(ctx context.Context, orgSlug string, id string) error
	ListManagedClusterBackupsFunc   func(ctx context.Context, clusterID string) (mpgv1.ListManagedClusterBackupsResponse, error)
	CreateManagedClusterBackupFunc  func(ctx context.Context, clusterID string, input mpgv1.CreateManagedClusterBackupInput) (mpgv1.CreateManagedClusterBackupResponse, error)
	RestoreManagedClusterBackupFunc func(ctx context.Context, clusterID string, input mpgv1.RestoreManagedClusterBackupInput) (mpgv1.RestoreManagedClusterBackupResponse, error)
	CreateAttachmentFunc            func(ctx context.Context, clusterId string, input mpgv1.CreateAttachmentInput) (mpgv1.CreateAttachmentResponse, error)
	DeleteAttachmentFunc            func(ctx context.Context, clusterId string, appName string) (mpgv1.DeleteAttachmentResponse, error)
	ListExtensionsFunc              func(ctx context.Context, id, database string) (mpgv1.ListExtensionsResponse, error)
	EnableExtensionFunc             func(ctx context.Context, id, database string, input mpgv1.EnableExtensionInput) error
	DisableExtensionFunc            func(ctx context.Context, id, database, name string, force bool) error
}

MpgV1Client implements the mpgv1.ClientV1 interface for testing

func (*MpgV1Client) CreateAttachment added in v0.4.41

func (m *MpgV1Client) CreateAttachment(ctx context.Context, clusterId string, input mpgv1.CreateAttachmentInput) (mpgv1.CreateAttachmentResponse, error)

func (*MpgV1Client) CreateDatabase added in v0.4.41

func (*MpgV1Client) CreateManagedClusterBackup added in v0.4.41

func (*MpgV1Client) CreateUser added in v0.4.41

func (*MpgV1Client) CreateUserWithRole added in v0.4.41

func (*MpgV1Client) DeleteAttachment added in v0.4.41

func (m *MpgV1Client) DeleteAttachment(ctx context.Context, clusterId string, appName string) (mpgv1.DeleteAttachmentResponse, error)

func (*MpgV1Client) DeleteUser added in v0.4.41

func (m *MpgV1Client) DeleteUser(ctx context.Context, id string, username string) error

func (*MpgV1Client) DestroyCluster added in v0.4.41

func (m *MpgV1Client) DestroyCluster(ctx context.Context, orgSlug string, id string) error

func (*MpgV1Client) DisableExtension added in v0.4.68

func (m *MpgV1Client) DisableExtension(ctx context.Context, id, database, name string, force bool) error

func (*MpgV1Client) EnableExtension added in v0.4.68

func (m *MpgV1Client) EnableExtension(ctx context.Context, id, database string, input mpgv1.EnableExtensionInput) error

func (*MpgV1Client) GetManagedCluster added in v0.4.41

func (m *MpgV1Client) GetManagedCluster(ctx context.Context, orgSlug string, id string) (mpgv1.GetManagedClusterResponse, error)

func (*MpgV1Client) GetManagedClusterById added in v0.4.41

func (m *MpgV1Client) GetManagedClusterById(ctx context.Context, id string) (mpgv1.GetManagedClusterResponse, error)

func (*MpgV1Client) GetUserCredentials added in v0.4.41

func (m *MpgV1Client) GetUserCredentials(ctx context.Context, id string, username string) (mpgv1.GetUserCredentialsResponse, error)

func (*MpgV1Client) ListDatabases added in v0.4.41

func (m *MpgV1Client) ListDatabases(ctx context.Context, id string) (mpgv1.ListDatabasesResponse, error)

func (*MpgV1Client) ListExtensions added in v0.4.68

func (m *MpgV1Client) ListExtensions(ctx context.Context, id, database string) (mpgv1.ListExtensionsResponse, error)

func (*MpgV1Client) ListManagedClusterBackups added in v0.4.41

func (m *MpgV1Client) ListManagedClusterBackups(ctx context.Context, clusterID string) (mpgv1.ListManagedClusterBackupsResponse, error)

func (*MpgV1Client) ListManagedClusters added in v0.4.41

func (m *MpgV1Client) ListManagedClusters(ctx context.Context, orgSlug string, deleted bool) (mpgv1.ListManagedClustersResponse, error)

func (*MpgV1Client) ListUsers added in v0.4.41

func (m *MpgV1Client) ListUsers(ctx context.Context, id string) (mpgv1.ListUsersResponse, error)

func (*MpgV1Client) RestoreManagedClusterBackup added in v0.4.41

func (*MpgV1Client) UpdateUserRole added in v0.4.41

func (m *MpgV1Client) UpdateUserRole(ctx context.Context, id string, username string, input mpgv1.UpdateUserRoleInput) (mpgv1.UpdateUserRoleResponse, error)

type MpgV2Client added in v0.4.49

type MpgV2Client struct {
	ListRegionsFunc          func(ctx context.Context, orgSlug string) (mpgv2.ListRegionsResponse, error)
	GetClusterFunc           func(ctx context.Context, orgSlug string, id string) (mpgv2.GetClusterResponse, error)
	GetClusterByIdFunc       func(ctx context.Context, id string) (mpgv2.GetClusterResponse, error)
	CreateUserWithRoleFunc   func(ctx context.Context, id string, input mpgv2.CreateUserWithRoleInput) (mpgv2.CreateUserWithRoleResponse, error)
	UpdateUserRoleFunc       func(ctx context.Context, id string, username string, input mpgv2.UpdateUserRoleInput) error
	DeleteUserFunc           func(ctx context.Context, id string, username string) error
	GetUserCredentialsFunc   func(ctx context.Context, id string, username string) (mpgv2.GetUserCredentialsResponse, error)
	ListUsersFunc            func(ctx context.Context, id string) (mpgv2.ListUsersResponse, error)
	ListDatabasesFunc        func(ctx context.Context, id string) (mpgv2.ListDatabasesResponse, error)
	CreateDatabaseFunc       func(ctx context.Context, id string, input mpgv2.CreateDatabaseInput) error
	CreateClusterFunc        func(ctx context.Context, input mpgv2.CreateClusterInput) (mpgv2.CreateClusterResponse, error)
	DestroyClusterFunc       func(ctx context.Context, orgSlug string, id string) error
	ListClusterBackupsFunc   func(ctx context.Context, clusterID string) (mpgv2.ListClusterBackupsResponse, error)
	CreateClusterBackupFunc  func(ctx context.Context, clusterID string, input mpgv2.CreateClusterBackupInput) error
	RestoreClusterBackupFunc func(ctx context.Context, clusterID string, input mpgv2.RestoreClusterBackupInput) (mpgv2.RestoreClusterBackupResponse, error)
	CreateAttachmentFunc     func(ctx context.Context, clusterId string, input mpgv2.CreateAttachmentInput) (mpgv2.CreateAttachmentResponse, error)
	DeleteAttachmentFunc     func(ctx context.Context, clusterId string, appName string) (mpgv2.DeleteAttachmentResponse, error)
	ListExtensionsFunc       func(ctx context.Context, id, database string) (mpgv2.ListExtensionsResponse, error)
	EnableExtensionFunc      func(ctx context.Context, id, database string, input mpgv2.EnableExtensionInput) error
	DisableExtensionFunc     func(ctx context.Context, id, database, name string, force bool) error
}

MpgV2Client implements the mpgv2.ClientV1 interface for testing

func (*MpgV2Client) CreateAttachment added in v0.4.49

func (m *MpgV2Client) CreateAttachment(ctx context.Context, clusterId string, input mpgv2.CreateAttachmentInput) (mpgv2.CreateAttachmentResponse, error)

func (*MpgV2Client) CreateCluster added in v0.4.49

func (*MpgV2Client) CreateClusterBackup added in v0.4.49

func (m *MpgV2Client) CreateClusterBackup(ctx context.Context, clusterID string, input mpgv2.CreateClusterBackupInput) error

func (*MpgV2Client) CreateDatabase added in v0.4.49

func (m *MpgV2Client) CreateDatabase(ctx context.Context, id string, input mpgv2.CreateDatabaseInput) error

func (*MpgV2Client) CreateUserWithRole added in v0.4.49

func (*MpgV2Client) DeleteAttachment added in v0.4.49

func (m *MpgV2Client) DeleteAttachment(ctx context.Context, clusterId string, appName string) (mpgv2.DeleteAttachmentResponse, error)

func (*MpgV2Client) DeleteUser added in v0.4.49

func (m *MpgV2Client) DeleteUser(ctx context.Context, id string, username string) error

func (*MpgV2Client) DestroyCluster added in v0.4.49

func (m *MpgV2Client) DestroyCluster(ctx context.Context, orgSlug string, id string) error

func (*MpgV2Client) DisableExtension added in v0.4.68

func (m *MpgV2Client) DisableExtension(ctx context.Context, id, database, name string, force bool) error

func (*MpgV2Client) EnableExtension added in v0.4.68

func (m *MpgV2Client) EnableExtension(ctx context.Context, id, database string, input mpgv2.EnableExtensionInput) error

func (*MpgV2Client) GetCluster added in v0.4.49

func (m *MpgV2Client) GetCluster(ctx context.Context, orgSlug string, id string) (mpgv2.GetClusterResponse, error)

func (*MpgV2Client) GetClusterById added in v0.4.49

func (m *MpgV2Client) GetClusterById(ctx context.Context, id string) (mpgv2.GetClusterResponse, error)

func (*MpgV2Client) GetUserCredentials added in v0.4.49

func (m *MpgV2Client) GetUserCredentials(ctx context.Context, id string, username string) (mpgv2.GetUserCredentialsResponse, error)

func (*MpgV2Client) ListClusterBackups added in v0.4.49

func (m *MpgV2Client) ListClusterBackups(ctx context.Context, clusterID string) (mpgv2.ListClusterBackupsResponse, error)

func (*MpgV2Client) ListDatabases added in v0.4.49

func (m *MpgV2Client) ListDatabases(ctx context.Context, id string) (mpgv2.ListDatabasesResponse, error)

func (*MpgV2Client) ListExtensions added in v0.4.68

func (m *MpgV2Client) ListExtensions(ctx context.Context, id, database string) (mpgv2.ListExtensionsResponse, error)

func (*MpgV2Client) ListRegions added in v0.4.49

func (m *MpgV2Client) ListRegions(ctx context.Context, orgSlug string) (mpgv2.ListRegionsResponse, error)

func (*MpgV2Client) ListUsers added in v0.4.49

func (m *MpgV2Client) ListUsers(ctx context.Context, id string) (mpgv2.ListUsersResponse, error)

func (*MpgV2Client) RestoreClusterBackup added in v0.4.49

func (m *MpgV2Client) RestoreClusterBackup(ctx context.Context, clusterID string, input mpgv2.RestoreClusterBackupInput) (mpgv2.RestoreClusterBackupResponse, error)

func (*MpgV2Client) UpdateUserRole added in v0.4.49

func (m *MpgV2Client) UpdateUserRole(ctx context.Context, id string, username string, input mpgv2.UpdateUserRoleInput) error

type UiexClient added in v0.3.224

type UiexClient struct {
	ListOrganizationsFunc      func(ctx context.Context, admin bool) ([]uiex.Organization, error)
	GetOrganizationFunc        func(ctx context.Context, orgSlug string) (*uiex.Organization, error)
	PromoteMachineEgressIPFunc func(ctx context.Context, appName string, egressIP string) error

	CreateBuildFunc                        func(ctx context.Context, in uiex.CreateBuildRequest) (*uiex.BuildResponse, error)
	FinishBuildFunc                        func(ctx context.Context, in uiex.FinishBuildRequest) (*uiex.BuildResponse, error)
	EnsureDepotBuilderFunc                 func(ctx context.Context, in uiex.EnsureDepotBuilderRequest) (*uiex.EnsureDepotBuilderResponse, error)
	CreateFlyManagedBuilderFunc            func(ctx context.Context, orgSlug string, region string) (uiex.CreateFlyManagedBuilderResponse, error)
	GetAllAppsCurrentReleaseTimestampsFunc func(ctx context.Context) (*map[string]time.Time, error)
	ListReleasesFunc                       func(ctx context.Context, appName string, count int) ([]uiex.Release, error)
	GetCurrentReleaseFunc                  func(ctx context.Context, appName string) (*uiex.Release, error)
	CreateReleaseFunc                      func(ctx context.Context, req uiex.CreateReleaseRequest) (*uiex.Release, error)
	UpdateReleaseFunc                      func(ctx context.Context, releaseID, status string, metadata any) (*uiex.Release, error)
}

UiexClient implements the uiexutil.Client interface for testing

func (*UiexClient) BaseURL added in v0.4.41

func (m *UiexClient) BaseURL() *url.URL

func (*UiexClient) CreateBuild added in v0.3.224

func (*UiexClient) CreateFlyManagedBuilder added in v0.3.224

func (m *UiexClient) CreateFlyManagedBuilder(ctx context.Context, orgSlug string, region string) (uiex.CreateFlyManagedBuilderResponse, error)

func (*UiexClient) CreateRelease added in v0.3.224

func (m *UiexClient) CreateRelease(ctx context.Context, req uiex.CreateReleaseRequest) (*uiex.Release, error)

func (*UiexClient) EnsureDepotBuilder added in v0.3.224

func (*UiexClient) FinishBuild added in v0.3.224

func (*UiexClient) GetAllAppsCurrentReleaseTimestamps added in v0.3.224

func (m *UiexClient) GetAllAppsCurrentReleaseTimestamps(ctx context.Context) (*map[string]time.Time, error)

func (*UiexClient) GetCurrentRelease added in v0.3.224

func (m *UiexClient) GetCurrentRelease(ctx context.Context, appName string) (*uiex.Release, error)

func (*UiexClient) GetOrganization added in v0.3.224

func (m *UiexClient) GetOrganization(ctx context.Context, orgSlug string) (*uiex.Organization, error)

func (*UiexClient) HTTPClient added in v0.4.41

func (m *UiexClient) HTTPClient() *http.Client

func (*UiexClient) ListOrganizations added in v0.3.224

func (m *UiexClient) ListOrganizations(ctx context.Context, admin bool) ([]uiex.Organization, error)

func (*UiexClient) ListReleases added in v0.3.224

func (m *UiexClient) ListReleases(ctx context.Context, appName string, count int) ([]uiex.Release, error)

func (*UiexClient) PromoteMachineEgressIP added in v0.4.37

func (m *UiexClient) PromoteMachineEgressIP(ctx context.Context, appName string, egressIP string) error

func (*UiexClient) UpdateRelease added in v0.3.224

func (m *UiexClient) UpdateRelease(ctx context.Context, releaseID, status string, metadata any) (*uiex.Release, error)

Jump to

Keyboard shortcuts

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