uiex

package
v0.3.217 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 14 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 {
	// 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 (c *Client) CreateFlyManagedBuilder(ctx context.Context, orgSlug string, region string) (CreateFlyManagedBuilderResponse, error)

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 (c *Client) DeleteUser(ctx context.Context, id string, username string) error

func (*Client) DestroyCluster added in v0.3.145

func (c *Client) DestroyCluster(ctx context.Context, orgSlug string, id string) error

DestroyCluster permanently destroys a managed Postgres cluster

func (*Client) GetManagedCluster

func (c *Client) GetManagedCluster(ctx context.Context, orgSlug string, id string) (GetManagedClusterResponse, error)

func (*Client) GetManagedClusterById added in v0.3.99

func (c *Client) GetManagedClusterById(ctx context.Context, id string) (GetManagedClusterResponse, error)

func (*Client) GetUserCredentials added in v0.3.211

func (c *Client) GetUserCredentials(ctx context.Context, id string, username string) (GetUserCredentialsResponse, error)

func (*Client) ListDatabases added in v0.3.210

func (c *Client) ListDatabases(ctx context.Context, id string) (ListDatabasesResponse, error)

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 (c *Client) ListManagedClusters(ctx context.Context, orgSlug string, deleted bool) (ListManagedClustersResponse, error)

func (*Client) ListUsers added in v0.3.211

func (c *Client) ListUsers(ctx context.Context, id string) (ListUsersResponse, error)

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 CreateClusterInput struct {
	Name           string `json:"name"`
	Region         string `json:"region"`
	Plan           string `json:"plan"`
	OrgSlug        string `json:"org_slug"`
	Disk           int    `json:"disk"`
	PostGISEnabled bool   `json:"postgis_enabled"`
}

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 CreateUserInput struct {
	DbName   string `json:"db_name"`
	UserName string `json:"user_name"`
}

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 CreateUserWithRoleInput struct {
	UserName string `json:"user_name"`
	Role     string `json:"role"` // 'schema_admin' | 'writer' | 'reader'
}

type CreateUserWithRoleResponse added in v0.3.211

type CreateUserWithRoleResponse struct {
	Data User `json:"data"`
}

type Database added in v0.3.210

type Database struct {
	Name string `json:"name"`
}

type DetailedErrors added in v0.3.99

type DetailedErrors struct {
	Detail string `json:"detail"`
}

type FlyManagedBuilder added in v0.3.149

type FlyManagedBuilder struct {
	AppName   string `json:"app_name"`
	MachineID string `json:"machine_id"`
}

type GetManagedClusterCredentialsResponse added in v0.3.112

type GetManagedClusterCredentialsResponse struct {
	Status        string `json:"status"`
	User          string `json:"user"`
	Password      string `json:"password"`
	DBName        string `json:"dbname"`
	ConnectionUri string `json:"pgbouncer_uri"`
}

type GetManagedClusterResponse

type GetManagedClusterResponse struct {
	Data        ManagedCluster                       `json:"data"`
	Credentials GetManagedClusterCredentialsResponse `json:"credentials"`
}

type GetUserCredentialsResponse added in v0.3.211

type GetUserCredentialsResponse struct {
	Data struct {
		User     string `json:"user"`
		Password string `json:"password"`
	} `json:"data"`
}

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 MPGRegion added in v0.3.145

type MPGRegion struct {
	Code      string `json:"code"`      // e.g., "fra"
	Available bool   `json:"available"` // Whether this region supports MPG
}

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 ManagedClusterBackup struct {
	Id     string `json:"id"`
	Status string `json:"status"`
	Type   string `json:"type"`
	Start  string `json:"start"`
	Stop   string `json:"stop"`
}

type ManagedClusterIpAssignments

type ManagedClusterIpAssignments struct {
	Direct string `json:"direct"`
}

type NewClientOpts

type NewClientOpts struct {
	// optional, sent with requests
	UserAgent string

	// URL used when connecting via usermode wireguard.
	BaseURL *url.URL

	Tokens *tokens.Tokens

	// optional:
	Logger fly.Logger

	// optional, used to construct the underlying HTTP client
	Transport http.RoundTripper
}

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"`
}

type User added in v0.3.211

type User struct {
	Name string `json:"name"`
	Role string `json:"role"`
}

Jump to

Keyboard shortcuts

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