Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateCluster(ctx context.Context, input CreateClusterInput) (CreateClusterResponse, error)
- func (c *Client) CreateDatabase(ctx context.Context, id string, input CreateDatabaseInput) (CreateDatabaseResponse, error)
- func (c *Client) CreateFlyManagedBuilder(ctx context.Context, orgSlug string, region string) (CreateFlyManagedBuilderResponse, error)
- func (c *Client) CreateManagedClusterBackup(ctx context.Context, clusterID string, input CreateManagedClusterBackupInput) (CreateManagedClusterBackupResponse, error)
- func (c *Client) CreateUser(ctx context.Context, id string, input CreateUserInput) (CreateUserResponse, error)
- func (c *Client) CreateUserWithRole(ctx context.Context, id string, input CreateUserWithRoleInput) (CreateUserWithRoleResponse, error)
- func (c *Client) DeleteUser(ctx context.Context, id string, username string) error
- func (c *Client) DestroyCluster(ctx context.Context, orgSlug string, id string) error
- func (c *Client) GetManagedCluster(ctx context.Context, orgSlug string, id string) (GetManagedClusterResponse, error)
- func (c *Client) GetManagedClusterById(ctx context.Context, id string) (GetManagedClusterResponse, error)
- func (c *Client) GetUserCredentials(ctx context.Context, id string, username string) (GetUserCredentialsResponse, error)
- func (c *Client) ListDatabases(ctx context.Context, id string) (ListDatabasesResponse, error)
- func (c *Client) ListMPGRegions(ctx context.Context, orgSlug string) (ListMPGRegionsResponse, error)
- func (c *Client) ListManagedClusterBackups(ctx context.Context, clusterID string) (ListManagedClusterBackupsResponse, error)
- func (c *Client) ListManagedClusters(ctx context.Context, orgSlug string, deleted bool) (ListManagedClustersResponse, error)
- func (c *Client) ListUsers(ctx context.Context, id string) (ListUsersResponse, error)
- func (c *Client) RestoreManagedClusterBackup(ctx context.Context, clusterID string, input RestoreManagedClusterBackupInput) (RestoreManagedClusterBackupResponse, error)
- func (c *Client) UpdateUserRole(ctx context.Context, id string, username string, input UpdateUserRoleInput) (UpdateUserRoleResponse, error)
- type CreateClusterInput
- type CreateClusterResponse
- type CreateDatabaseInput
- type CreateDatabaseResponse
- type CreateFlyManagedBuilderInput
- type CreateFlyManagedBuilderParams
- type CreateFlyManagedBuilderResponse
- type CreateManagedClusterBackupInput
- type CreateManagedClusterBackupResponse
- type CreateUserInput
- type CreateUserResponse
- type CreateUserWithRoleInput
- type CreateUserWithRoleResponse
- type Database
- type DetailedErrors
- type FlyManagedBuilder
- type GetManagedClusterCredentialsResponse
- type GetManagedClusterResponse
- type GetUserCredentialsResponse
- type ListDatabasesResponse
- type ListMPGRegionsResponse
- type ListManagedClusterBackupsResponse
- type ListManagedClustersResponse
- type ListUsersResponse
- type MPGRegion
- type ManagedCluster
- type ManagedClusterBackup
- type ManagedClusterIpAssignments
- type NewClientOpts
- type RestoreManagedClusterBackupInput
- type RestoreManagedClusterBackupResponse
- type UpdateUserRoleInput
- type UpdateUserRoleResponse
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithOptions ¶
func NewWithOptions(ctx context.Context, opts NewClientOpts) (*Client, error)
func (*Client) CreateCluster ¶ added in v0.3.111
func (c *Client) CreateCluster(ctx context.Context, input CreateClusterInput) (CreateClusterResponse, error)
func (*Client) CreateDatabase ¶ added in v0.3.210
func (c *Client) CreateDatabase(ctx context.Context, id string, input CreateDatabaseInput) (CreateDatabaseResponse, error)
func (*Client) CreateFlyManagedBuilder ¶ added in v0.3.149
func (*Client) CreateManagedClusterBackup ¶ added in v0.3.198
func (c *Client) CreateManagedClusterBackup(ctx context.Context, clusterID string, input CreateManagedClusterBackupInput) (CreateManagedClusterBackupResponse, error)
CreateManagedClusterBackup creates a new backup for a managed Postgres cluster
func (*Client) CreateUser ¶ added in v0.3.99
func (c *Client) CreateUser(ctx context.Context, id string, input CreateUserInput) (CreateUserResponse, error)
func (*Client) CreateUserWithRole ¶ added in v0.3.211
func (c *Client) CreateUserWithRole(ctx context.Context, id string, input CreateUserWithRoleInput) (CreateUserWithRoleResponse, error)
func (*Client) DeleteUser ¶ added in v0.3.211
func (*Client) DestroyCluster ¶ added in v0.3.145
DestroyCluster permanently destroys a managed Postgres cluster
func (*Client) GetManagedCluster ¶
func (*Client) GetManagedClusterById ¶ added in v0.3.99
func (*Client) GetUserCredentials ¶ added in v0.3.211
func (*Client) ListDatabases ¶ added in v0.3.210
func (*Client) ListMPGRegions ¶ added in v0.3.145
func (c *Client) ListMPGRegions(ctx context.Context, orgSlug string) (ListMPGRegionsResponse, error)
ListMPGRegions returns the list of regions available for Managed Postgres TODO: Implement the actual API endpoint on the backend
func (*Client) ListManagedClusterBackups ¶ added in v0.3.198
func (c *Client) ListManagedClusterBackups(ctx context.Context, clusterID string) (ListManagedClusterBackupsResponse, error)
ListManagedClusterBackups returns the list of backups for a managed Postgres cluster
func (*Client) ListManagedClusters ¶
func (*Client) RestoreManagedClusterBackup ¶ added in v0.3.198
func (c *Client) RestoreManagedClusterBackup(ctx context.Context, clusterID string, input RestoreManagedClusterBackupInput) (RestoreManagedClusterBackupResponse, error)
RestoreManagedClusterBackup restores a managed Postgres cluster from a backup
func (*Client) UpdateUserRole ¶ added in v0.3.211
func (c *Client) UpdateUserRole(ctx context.Context, id string, username string, input UpdateUserRoleInput) (UpdateUserRoleResponse, error)
type CreateClusterInput ¶ added in v0.3.111
type CreateClusterResponse ¶ added in v0.3.111
type CreateClusterResponse struct {
Ok bool `json:"ok"`
Errors DetailedErrors `json:"errors"`
Data struct {
Id string `json:"id"`
Name string `json:"name"`
Status *string `json:"status"`
Plan string `json:"plan"`
Environment *string `json:"environment"`
Region string `json:"region"`
Organization fly.Organization `json:"organization"`
Replicas int `json:"replicas"`
Disk int `json:"disk"`
IpAssignments ManagedClusterIpAssignments `json:"ip_assignments"`
PostGISEnabled bool `json:"postgis_enabled"`
} `json:"data"`
}
type CreateDatabaseInput ¶ added in v0.3.210
type CreateDatabaseInput struct {
Name string `json:"name"`
}
type CreateDatabaseResponse ¶ added in v0.3.210
type CreateDatabaseResponse struct {
Data Database `json:"data"`
}
type CreateFlyManagedBuilderInput ¶ added in v0.3.149
type CreateFlyManagedBuilderInput struct {
Builder CreateFlyManagedBuilderParams `json:"builder"`
}
type CreateFlyManagedBuilderParams ¶ added in v0.3.149
type CreateFlyManagedBuilderParams struct {
Region string `json:"region"`
}
type CreateFlyManagedBuilderResponse ¶ added in v0.3.149
type CreateFlyManagedBuilderResponse struct {
Data FlyManagedBuilder `json:"data"`
Errors DetailedErrors `json:"errors"`
}
type CreateManagedClusterBackupInput ¶ added in v0.3.198
type CreateManagedClusterBackupInput struct {
Type string `json:"type"`
}
type CreateManagedClusterBackupResponse ¶ added in v0.3.198
type CreateManagedClusterBackupResponse struct {
Data ManagedClusterBackup `json:"data"`
}
type CreateUserInput ¶ added in v0.3.99
type CreateUserResponse ¶ added in v0.3.99
type CreateUserResponse struct {
ConnectionUri string `json:"connection_uri"`
Ok bool `json:"ok"`
Errors DetailedErrors `json:"errors"`
}
type CreateUserWithRoleInput ¶ added in v0.3.211
type CreateUserWithRoleResponse ¶ added in v0.3.211
type CreateUserWithRoleResponse struct {
Data User `json:"data"`
}
type DetailedErrors ¶ added in v0.3.99
type DetailedErrors struct {
Detail string `json:"detail"`
}
type FlyManagedBuilder ¶ added in v0.3.149
type GetManagedClusterCredentialsResponse ¶ added in v0.3.112
type GetManagedClusterResponse ¶
type GetManagedClusterResponse struct {
Data ManagedCluster `json:"data"`
Credentials GetManagedClusterCredentialsResponse `json:"credentials"`
}
type GetUserCredentialsResponse ¶ added in v0.3.211
type ListDatabasesResponse ¶ added in v0.3.210
type ListDatabasesResponse struct {
Data []Database `json:"data"`
}
type ListMPGRegionsResponse ¶ added in v0.3.145
type ListMPGRegionsResponse struct {
Data []MPGRegion `json:"data"`
}
type ListManagedClusterBackupsResponse ¶ added in v0.3.198
type ListManagedClusterBackupsResponse struct {
Data []ManagedClusterBackup `json:"data"`
}
type ListManagedClustersResponse ¶
type ListManagedClustersResponse struct {
Data []ManagedCluster `json:"data"`
}
type ListUsersResponse ¶ added in v0.3.211
type ListUsersResponse struct {
Data []User `json:"data"`
}
type ManagedCluster ¶
type ManagedCluster struct {
Id string `json:"id"`
Name string `json:"name"`
Region string `json:"region"`
Status string `json:"status"`
Plan string `json:"plan"`
Disk int `json:"disk"`
Replicas int `json:"replicas"`
Organization fly.Organization `json:"organization"`
IpAssignments ManagedClusterIpAssignments `json:"ip_assignments"`
}
type ManagedClusterBackup ¶ added in v0.3.198
type ManagedClusterIpAssignments ¶
type ManagedClusterIpAssignments struct {
Direct string `json:"direct"`
}
type NewClientOpts ¶
type RestoreManagedClusterBackupInput ¶ added in v0.3.198
type RestoreManagedClusterBackupInput struct {
BackupId string `json:"backup_id"`
}
type RestoreManagedClusterBackupResponse ¶ added in v0.3.198
type RestoreManagedClusterBackupResponse struct {
Data ManagedCluster `json:"data"`
}
type UpdateUserRoleInput ¶ added in v0.3.211
type UpdateUserRoleInput struct {
Role string `json:"role"` // 'schema_admin' | 'writer' | 'reader'
}
type UpdateUserRoleResponse ¶ added in v0.3.211
type UpdateUserRoleResponse struct {
Data User `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.