Help us shape the future of Go! Take the 2026 Go Developer Survey

uiex

package
v0.3.152 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 13 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) CreateFlyManagedBuilder added in v0.3.149

func (c *Client) CreateFlyManagedBuilder(ctx context.Context, orgSlug string, region string) (CreateFlyManagedBuilderResponse, error)

func (*Client) CreateUser added in v0.3.99

func (c *Client) CreateUser(ctx context.Context, id string, input CreateUserInput) (CreateUserResponse, 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) 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) ListManagedClusters

func (c *Client) ListManagedClusters(ctx context.Context, orgSlug string) (ListManagedClustersResponse, 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"`
	PGVectorEnabled bool   `json:"pgvector_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"`
		PGVectorEnabled bool                        `json:"pgvector_enabled"`
	} `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 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 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 ListMPGRegionsResponse added in v0.3.145

type ListMPGRegionsResponse struct {
	Data []MPGRegion `json:"data"`
}

type ListManagedClustersResponse

type ListManagedClustersResponse struct {
	Data []ManagedCluster `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 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
}

Jump to

Keyboard shortcuts

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