flyapi

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFullApp

func GetFullApp(
	ctx context.Context,
	client graphql.Client,
	name string,
) (*provider.GetFullAppResponse, error)

GetFullApp returns the specified the fly app resource

Types

type AddOnPlan

type AddOnPlan struct {
	DisplayName              string `json:"displayName"`
	Id                       string `json:"id"`
	MaxCommandsPerSec        int    `json:"maxCommandsPerSec"`
	MaxConcurrentConnections int    `json:"maxConcurrentConnections"`
	MaxDailyBandwidth        string `json:"maxDailyBandwidth"`
	MaxDailyCommands         int    `json:"maxDailyCommands"`
	MaxDataSize              string `json:"maxDataSize"`
	MaxRequestSize           string `json:"maxRequestSize"`
	Name                     string `json:"name"`
	PricePerMonth            int    `json:"pricePerMonth"`
}

type AppCertificate

type AppCertificate struct {
	AppId                     string `json:"-"`
	CertificateAuthority      string `json:"certificateAuthority"`
	ClientStatus              string `json:"clientStatus"`
	CreatedAt                 string `json:"createdAt"`
	DnsProvider               string `json:"dnsProvider"`
	DnsValidationHostname     string `json:"dnsValidationHostname"`
	DnsValidationInstructions string `json:"dnsValidationInstructions"`
	DnsValidationTarget       string `json:"dnsValidationTarget"`
	Domain                    string `json:"domain"`
	Hostname                  string `json:"hostname"`
	Id                        string `json:"id"`
	IsAcmeAlpnConfigured      bool   `json:"isAcmeAlpnConfigured"`
	IsAcmeDnsConfigured       bool   `json:"isAcmeDnsConfigured"`
	IsApex                    bool   `json:"isApex"`
	IsConfigured              bool   `json:"isConfigured"`
	IsWildcard                bool   `json:"isWildcard"`
	Source                    string `json:"source"`
	Verified                  bool   `json:"check"`
}

type Apps

type Apps struct {
	Nodes      []provider.GetFullAppApp `json:"nodes"`
	PageInfo   PageInfo                 `json:"pageInfo"`
	TotalCount int                      `json:"totalCount"`
}

type CertificateQueryApp

type CertificateQueryApp struct {
	Name         string       `json:"name"`
	Certificates Certificates `json:"certificates"`
}

type Certificates

type Certificates struct {
	Nodes      []AppCertificate `json:"nodes"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

type Client

type Client struct {
	Token   *string
	Graphql graphql.Client
}

Fly API Client

func CreateClient

func CreateClient(ctx context.Context, config ClientConfig) (*Client, error)

type ClientConfig

type ClientConfig struct {
	ApiToken *string
}

type Database

type Database struct {
	AddOnPlan     AddOnPlan    `json:"addOnPlan"`
	AddOnPlanName string       `json:"addOnPlanName"`
	Hostname      string       `json:"hostname"`
	Id            string       `json:"id"`
	Name          string       `json:"name"`
	Options       interface{}  `json:"options"`
	Organization  Organization `json:"organization"`
	Password      string       `json:"password"`
	PrimaryRegion string       `json:"primaryRegion"`
	PrivateIp     string       `json:"privateIp"`
	PublicUrl     string       `json:"publicUrl"`
	ReadRegions   []string     `json:"readRegions"`
}

type GetAppCertificateResponse

type GetAppCertificateResponse struct {
	Certificate AppCertificate `json:"certificate"`
}

func GetAppCertificate

func GetAppCertificate(
	ctx context.Context,
	client graphql.Client,
	Id string,
) (*GetAppCertificateResponse, error)

GetAppCertificate returns the specified certificate

type GetIPAddressResponse

type GetIPAddressResponse struct {
	IPAddress IPAddress `json:"ipAddress"`
}

func GetIPAddress

func GetIPAddress(
	ctx context.Context,
	client graphql.Client,
	Id string,
) (*GetIPAddressResponse, error)

GetIPAddress returns the specified volume

type GetMachineResponse

type GetMachineResponse struct {
	Machine Machine `json:"machine"`
}

func GetMachine

func GetMachine(
	ctx context.Context,
	client graphql.Client,
	machineID string,
) (*GetMachineResponse, error)

GetMachine returns the specified machine

type GetOrganizationResponse

type GetOrganizationResponse struct {
	Organization Organization `json:"organization"`
}

func GetOrganization

func GetOrganization(
	ctx context.Context,
	client graphql.Client,
	slug string,
) (*GetOrganizationResponse, error)

GetOrganization returns the specified organization

type GetRedisDatabaseResponse

type GetRedisDatabaseResponse struct {
	RedisDatabase Database `json:"addOn"`
}

func GetRedisDatabase

func GetRedisDatabase(
	ctx context.Context,
	client graphql.Client,
	id string,
) (*GetRedisDatabaseResponse, error)

GetRedisDatabase returns the specified organization

type GetVolumeResponse

type GetVolumeResponse struct {
	Volume Volume `json:"volume"`
}

func GetVolume

func GetVolume(
	ctx context.Context,
	client graphql.Client,
	Id string,
) (*GetVolumeResponse, error)

GetVolume returns the specified volume

type Host

type Host struct {
	ID string `json:"id"`
}

type IPAddress

type IPAddress struct {
	Address   string `json:"address"`
	CreatedAt string `json:"createdAt"`
	Id        string `json:"id"`
	Region    string `json:"region"`
	Type      string `json:"type"`
}

type IPAddressQueryApp

type IPAddressQueryApp struct {
	IPAddresses IPAddresses `json:"ipAddresses"`
}

type IPAddresses

type IPAddresses struct {
	Nodes      []IPAddress `json:"nodes"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

type ListAppCertificatesRequestConfiguration

type ListAppCertificatesRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string

	// The ID of the application.
	//
	// Required
	AppId string
}

type ListAppCertificatesResponse

type ListAppCertificatesResponse struct {
	App CertificateQueryApp `json:"app"`
}

func ListAppCertificates

ListAppCertificates returns all the app certificates

type ListAppsRequestConfiguration

type ListAppsRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string
}

type ListAppsResponse

type ListAppsResponse struct {
	Apps Apps `json:"apps"`
}

ListAppsResponse is returned by ListApps on success.

func ListApps

func ListApps(
	ctx context.Context,
	client graphql.Client,
	options *ListAppsRequestConfiguration,
) (*ListAppsResponse, error)

ListApps returns all the fly apps resource

type ListIPAddressesRequestConfiguration

type ListIPAddressesRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string

	// The ID of the application.
	//
	// Required
	AppId string
}

type ListIPAddressesResponse

type ListIPAddressesResponse struct {
	App IPAddressQueryApp `json:"app"`
}

func ListIPAddresses

ListIPAddresses returns all the volumes

type ListLocationsResponse

type ListLocationsResponse struct {
	Locations []Location `json:"checkLocations"`
}

ListLocationsResponse is returned by ListLocations on success.

func ListLocations

func ListLocations(
	ctx context.Context,
	client graphql.Client,
) (*ListLocationsResponse, error)

ListLocations returns all the available locations

type ListMachinesRequestConfiguration

type ListMachinesRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string

	// The ID of the application.
	AppID string

	// The state of the machine.
	State string
}

type ListMachinesResponse

type ListMachinesResponse struct {
	Machines Machines `json:"machines"`
}

func ListMachines

func ListMachines(
	ctx context.Context,
	client graphql.Client,
	options *ListMachinesRequestConfiguration,
) (*ListMachinesResponse, error)

ListMachines returns all the machines

type ListOrgMembersRequestConfiguration

type ListOrgMembersRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string

	// The ID of the organization.
	//
	// Required
	OrgId string
}

type ListOrgMembersResponse

type ListOrgMembersResponse struct {
	Organization MemberQueryOrganization `json:"organization"`
}

func ListOrganizationMembers

func ListOrganizationMembers(
	ctx context.Context,
	client graphql.Client,
	options *ListOrgMembersRequestConfiguration,
) (*ListOrgMembersResponse, error)

ListOrganizationMembers returns all the members of an organization

type ListOrganizationsRequestConfiguration

type ListOrganizationsRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string
}

type ListOrganizationsResponse

type ListOrganizationsResponse struct {
	Organizations Organizations `json:"organizations"`
}

ListOrganizationsResponse is returned by ListOrganizations on success.

func ListOrganizations

ListOrganizations returns all the organizations the user has access to

type ListRedisDatabasesRequestConfiguration

type ListRedisDatabasesRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string
}

type ListRedisDatabasesResponse

type ListRedisDatabasesResponse struct {
	RedisDatabases RedisDatabases `json:"addOns"`
}

ListRedisDatabasesResponse is returned by ListRedisDatabases on success.

func ListRedisDatabases

ListRedisDatabases returns all the organizations the user has access to

type ListVolumesRequestConfiguration

type ListVolumesRequestConfiguration struct {
	// The maximum number of results to return in a single call. To retrieve the
	// remaining results, make another call with the returned EndCursor value.
	Limit int

	// When paginating forwards, the cursor to continue.
	EndCursor string

	// The ID of the application.
	//
	// Required
	AppId string
}

type ListVolumesResponse

type ListVolumesResponse struct {
	App VolumeQueryApp `json:"app"`
}

func ListVolumes

func ListVolumes(
	ctx context.Context,
	client graphql.Client,
	options *ListVolumesRequestConfiguration,
) (*ListVolumesResponse, error)

ListVolumes returns all the volumes

type Location

type Location struct {
	Name        string
	Title       string
	State       string
	Locality    string
	Country     string
	Coordinates []float64
}

type Machine

type Machine struct {
	Config     MachineConfiguration `json:"config"`
	CreatedAt  string               `json:"createdAt"`
	Host       Host                 `json:"host"`
	ID         string               `json:"id"`
	InstanceID string               `json:"instanceId"`
	Name       string               `json:"name"`
	Region     string               `json:"region"`
	State      string               `json:"state"`
	UpdatedAt  string               `json:"updatedAt"`
}

type MachineConfiguration

type MachineConfiguration struct {
	Size     string          `json:"size"`
	Image    string          `json:"image"`
	Mounts   []Mount         `json:"mounts"`
	Env      interface{}     `json:"env"`
	ImageRef MachineImageRef `json:"image_ref"`
}

type MachineImageRef

type MachineImageRef struct {
	Registry   string      `json:"registry"`
	Repository string      `json:"repository"`
	Tag        string      `json:"tag"`
	Digest     string      `json:"digest"`
	Labels     interface{} `json:"labels"`
}

type Machines

type Machines struct {
	Nodes      []Machine `json:"nodes"`
	PageInfo   PageInfo  `json:"pageInfo"`
	TotalCount int       `json:"totalCount"`
}

type Member

type Member struct {
	AvatarUrl           string   `json:"avatarUrl"`
	CreatedAt           string   `json:"createdAt"`
	Email               string   `json:"email"`
	FeatureFlags        []string `json:"featureFlags"`
	HasNodeProxyApps    bool     `json:"hasNodeproxyApps"`
	Id                  string   `json:"id"`
	LastRegion          string   `json:"lastRegion"`
	Name                string   `json:"name"`
	OrganizationId      string   `json:"-"`
	Trust               string   `json:"trust"`
	TwoFactorProtection bool     `json:"twoFactorProtection"`
	Username            string   `json:"username"`
}

type MemberQueryOrganization

type MemberQueryOrganization struct {
	Members Members `json:"members"`
}

type Members

type Members struct {
	Edges      []OrganizationMembershipsEdge `json:"edges"`
	PageInfo   PageInfo                      `json:"pageInfo"`
	TotalCount int                           `json:"totalCount"`
}

type Mount

type Mount struct {
	Path      string `json:"path"`
	Volume    string `json:"volume"`
	SizeGb    int    `json:"size_gb"`
	Encrypted bool   `json:"encrypted"`
}

type Organization

type Organization struct {
	ActiveDiscountName     string `json:"activeDiscountName"`
	AddOnSSOLink           string `json:"addOnSsoLink"`
	BillingStatus          string `json:"billingStatus"`
	CreditBalance          int    `json:"creditBalance"`
	CreditBalanceFormatted string `json:"creditBalanceFormatted"`
	ID                     string `json:"id"`
	InternalNumericID      string `json:"internalNumericId"`
	IsCreditCardSaved      bool   `json:"isCreditCardSaved"`
	Name                   string `json:"name"`
	RemoteBuilderImage     string `json:"remoteBuilderImage"`
	SSHCertificate         string `json:"sshCertificate"`
	Slug                   string `json:"slug"`
	Trust                  string `json:"trust"`
	Type                   string `json:"type"`
	ViewerRole             string `json:"viewerRole"`
}

type OrganizationMembershipsEdge

type OrganizationMembershipsEdge struct {
	Member Member `json:"node"`
	Role   string `json:"role"`
}

type Organizations

type Organizations struct {
	Nodes      []Organization `json:"nodes"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

type PageInfo

type PageInfo struct {
	// When paginating forwards, are there more items?
	HasNextPage bool `json:"hasNextPage"`

	// When paginating forwards, the cursor to continue.
	EndCursor string `json:"endCursor"`
}

type RedisDatabases

type RedisDatabases struct {
	Nodes      []Database `json:"nodes"`
	PageInfo   PageInfo   `json:"pageInfo"`
	TotalCount int        `json:"totalCount"`
}

type Volume

type Volume struct {
	App             provider.GetFullAppApp `json:"app"`
	AttachedMachine Machine                `json:"attachedMachine"`
	CreatedAt       string                 `json:"createdAt"`
	Encrypted       bool                   `json:"encrypted"`
	Host            Host                   `json:"host"`
	ID              string                 `json:"id"`
	InternalId      string                 `json:"internalId"`
	Name            string                 `json:"name"`
	Region          string                 `json:"region"`
	SizeGb          int                    `json:"sizeGb"`
	State           string                 `json:"state"`
	Status          string                 `json:"status"`
	UsedBytes       string                 `json:"usedBytes"`
}

type VolumeQueryApp

type VolumeQueryApp struct {
	Volumes Volumes `json:"volumes"`
}

type Volumes

type Volumes struct {
	Nodes      []Volume `json:"nodes"`
	PageInfo   PageInfo `json:"pageInfo"`
	TotalCount int      `json:"totalCount"`
}

Jump to

Keyboard shortcuts

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