README
¶
linodego
Go client for Linode REST v4 API
Installation
go get -u github.com/lgarber-akamai/linodego
Documentation
See godoc for a complete reference.
The API generally follows the naming patterns prescribed in the OpenAPIv3 document for Linode APIv4.
Deviations in naming have been made to avoid using "Linode" and "Instance" redundantly or inconsistently.
A brief summary of the features offered in this API client are shown here.
Examples
General Usage
package main
import (
"context"
"fmt"
"github.com/lgarber-akamai/linodego"
"golang.org/x/oauth2"
"log"
"net/http"
"os"
)
func main() {
apiKey, ok := os.LookupEnv("LINODE_TOKEN")
if !ok {
log.Fatal("Could not find LINODE_TOKEN, please assert it is set.")
}
tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: apiKey})
oauth2Client := &http.Client{
Transport: &oauth2.Transport{
Source: tokenSource,
},
}
linodeClient := linodego.NewClient(oauth2Client)
linodeClient.SetDebug(true)
res, err := linodeClient.GetInstance(context.Background(), 4090913)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%v", res)
}
Pagination
Auto-Pagination Requests
kernels, err := linodego.ListKernels(context.Background(), nil)
// len(kernels) == 218
Or, use a page value of "0":
opts := linodego.NewListOptions(0,"")
kernels, err := linodego.ListKernels(context.Background(), opts)
// len(kernels) == 218
Single Page
opts := linodego.NewListOptions(2,"")
// or opts := linodego.ListOptions{PageOptions: &linodego.PageOptions{Page: 2}, PageSize: 500}
kernels, err := linodego.ListKernels(context.Background(), opts)
// len(kernels) == 100
ListOptions are supplied as a pointer because the Pages and Results values are set in the supplied ListOptions.
// opts.Results == 218
Filtering
f := linodego.Filter{}
f.AddField(linodego.Eq, "mine", true)
fStr, err := f.MarshalJSON()
if err != nil {
log.Fatal(err)
}
opts := linodego.NewListOptions(0, string(fStr))
stackscripts, err := linodego.ListStackscripts(context.Background(), opts)
Error Handling
Getting Single Entities
linode, err := linodego.GetInstance(context.Background(), 555) // any Linode ID that does not exist or is not yours
// linode == nil: true
// err.Error() == "[404] Not Found"
// err.Code == "404"
// err.Message == "Not Found"
Lists
For lists, the list is still returned as []
, but err
works the same way as on the Get
request.
linodes, err := linodego.ListInstances(context.Background(), linodego.NewListOptions(0, "{\"foo\":bar}"))
// linodes == []
// err.Error() == "[400] [X-Filter] Cannot filter on foo"
Otherwise sane requests beyond the last page do not trigger an error, just an empty result:
linodes, err := linodego.ListInstances(context.Background(), linodego.NewListOptions(9999, ""))
// linodes == []
// err = nil
Response Caching
By default, certain endpoints with static responses will be cached into memory. Endpoints with cached responses are identified in their accompanying documentation.
The default cache entry expiry time is 15
minutes. Certain endpoints may override this value to allow for more frequent refreshes (e.g. client.GetRegion(...)
).
The global cache expiry time can be customized using the client.SetGlobalCacheExpiration(...)
method.
Response caching can be globally disabled or enabled for a client using the client.UseCache(...)
method.
The global cache can be cleared and refreshed using the client.InvalidateCache()
method.
Writes
When performing a POST
or PUT
request, multiple field related errors will be returned as a single error, currently like:
// err.Error() == "[400] [field1] foo problem; [field2] bar problem; [field3] baz problem"
Tests
Run make testunit
to run the unit tests.
Run make testint
to run the integration tests. The integration tests use fixtures.
To update the test fixtures, run make fixtures
. This will record the API responses into the fixtures/
directory.
Be careful about committing any sensitive account details. An attempt has been made to sanitize IP addresses and
dates, but no automated sanitization will be performed against fixtures/*Account*.yaml
, for example.
To prevent disrupting unaffected fixtures, target fixture generation like so: make ARGS="-run TestListVolumes" fixtures
.
Discussion / Help
Join us at #linodego on the gophers slack
License
Documentation
¶
Index ¶
- Constants
- Variables
- func FormatConfigPath(path string) (string, error)
- type APIError
- type APIErrorReason
- type Account
- type AccountSettings
- type AccountSettingsUpdateOptions
- type Client
- func (c *Client) AddInstanceIPAddress(ctx context.Context, linodeID int, public bool) (*InstanceIP, error)
- func (c *Client) AddRetryCondition(retryCondition RetryConditional) *Client
- func (c *Client) AttachVolume(ctx context.Context, volumeID int, opts *VolumeAttachOptions) (*Volume, error)
- func (c *Client) BootInstance(ctx context.Context, linodeID int, configID int) error
- func (c *Client) CancelInstanceBackups(ctx context.Context, linodeID int) error
- func (c *Client) CancelObjectStorage(ctx context.Context) error
- func (c *Client) CloneInstance(ctx context.Context, linodeID int, opts InstanceCloneOptions) (*Instance, error)
- func (c *Client) CloneVolume(ctx context.Context, volumeID int, label string) (*Volume, error)
- func (c *Client) ConfirmTwoFactor(ctx context.Context, opts ConfirmTwoFactorOptions) (*ConfirmTwoFactorResponse, error)
- func (c *Client) CreateDomain(ctx context.Context, opts DomainCreateOptions) (*Domain, error)
- func (c *Client) CreateDomainRecord(ctx context.Context, domainID int, opts DomainRecordCreateOptions) (*DomainRecord, error)
- func (c *Client) CreateFirewall(ctx context.Context, opts FirewallCreateOptions) (*Firewall, error)
- func (c *Client) CreateFirewallDevice(ctx context.Context, firewallID int, opts FirewallDeviceCreateOptions) (*FirewallDevice, error)
- func (c *Client) CreateIPv6Range(ctx context.Context, opts IPv6RangeCreateOptions) (*IPv6Range, error)
- func (c *Client) CreateImage(ctx context.Context, opts ImageCreateOptions) (*Image, error)
- func (c *Client) CreateImageUpload(ctx context.Context, opts ImageCreateUploadOptions) (*Image, string, error)
- func (c *Client) CreateInstance(ctx context.Context, opts InstanceCreateOptions) (*Instance, error)
- func (c *Client) CreateInstanceConfig(ctx context.Context, linodeID int, opts InstanceConfigCreateOptions) (*InstanceConfig, error)
- func (c *Client) CreateInstanceDisk(ctx context.Context, linodeID int, opts InstanceDiskCreateOptions) (*InstanceDisk, error)
- func (c *Client) CreateInstanceSnapshot(ctx context.Context, linodeID int, label string) (*InstanceSnapshot, error)
- func (c *Client) CreateLKECluster(ctx context.Context, opts LKEClusterCreateOptions) (*LKECluster, error)
- func (c *Client) CreateLKEClusterPool(ctx context.Context, clusterID int, createOpts LKEClusterPoolCreateOptions) (*LKEClusterPool, error)deprecated
- func (c *Client) CreateLKENodePool(ctx context.Context, clusterID int, opts LKENodePoolCreateOptions) (*LKENodePool, error)
- func (c *Client) CreateLongviewClient(ctx context.Context, opts LongviewClientCreateOptions) (*LongviewClient, error)
- func (c *Client) CreateMongoDatabase(ctx context.Context, opts MongoCreateOptions) (*MongoDatabase, error)
- func (c *Client) CreateMongoDatabaseBackup(ctx context.Context, databaseID int, opts MongoBackupCreateOptions) error
- func (c *Client) CreateMySQLDatabase(ctx context.Context, opts MySQLCreateOptions) (*MySQLDatabase, error)
- func (c *Client) CreateMySQLDatabaseBackup(ctx context.Context, databaseID int, opts MySQLBackupCreateOptions) error
- func (c *Client) CreateNodeBalancer(ctx context.Context, opts NodeBalancerCreateOptions) (*NodeBalancer, error)
- func (c *Client) CreateNodeBalancerConfig(ctx context.Context, nodebalancerID int, opts NodeBalancerConfigCreateOptions) (*NodeBalancerConfig, error)
- func (c *Client) CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, ...) (*NodeBalancerNode, error)
- func (c *Client) CreateOAuthClient(ctx context.Context, opts OAuthClientCreateOptions) (*OAuthClient, error)
- func (c *Client) CreateObjectStorageBucket(ctx context.Context, opts ObjectStorageBucketCreateOptions) (*ObjectStorageBucket, error)
- func (c *Client) CreateObjectStorageKey(ctx context.Context, opts ObjectStorageKeyCreateOptions) (*ObjectStorageKey, error)
- func (c *Client) CreateObjectStorageObjectURL(ctx context.Context, objectID, label string, ...) (*ObjectStorageObjectURL, error)
- func (c *Client) CreatePayment(ctx context.Context, opts PaymentCreateOptions) (*Payment, error)
- func (c *Client) CreatePostgresDatabase(ctx context.Context, opts PostgresCreateOptions) (*PostgresDatabase, error)
- func (c *Client) CreatePostgresDatabaseBackup(ctx context.Context, databaseID int, opts PostgresBackupCreateOptions) error
- func (c *Client) CreateSSHKey(ctx context.Context, opts SSHKeyCreateOptions) (*SSHKey, error)
- func (c *Client) CreateStackscript(ctx context.Context, opts StackscriptCreateOptions) (*Stackscript, error)
- func (c *Client) CreateTag(ctx context.Context, opts TagCreateOptions) (*Tag, error)
- func (c *Client) CreateToken(ctx context.Context, opts TokenCreateOptions) (*Token, error)
- func (c *Client) CreateTwoFactorSecret(ctx context.Context) (*TwoFactorSecret, error)
- func (c *Client) CreateUser(ctx context.Context, opts UserCreateOptions) (*User, error)
- func (c *Client) CreateVolume(ctx context.Context, opts VolumeCreateOptions) (*Volume, error)
- func (c *Client) DeleteDomain(ctx context.Context, domainID int) error
- func (c *Client) DeleteDomainRecord(ctx context.Context, domainID int, recordID int) error
- func (c *Client) DeleteFirewall(ctx context.Context, firewallID int) error
- func (c *Client) DeleteFirewallDevice(ctx context.Context, firewallID, deviceID int) error
- func (c *Client) DeleteIPv6Range(ctx context.Context, ipRange string) error
- func (c *Client) DeleteImage(ctx context.Context, imageID string) error
- func (c *Client) DeleteInstance(ctx context.Context, linodeID int) error
- func (c *Client) DeleteInstanceConfig(ctx context.Context, linodeID int, configID int) error
- func (c *Client) DeleteInstanceDisk(ctx context.Context, linodeID int, diskID int) error
- func (c *Client) DeleteInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string) error
- func (c *Client) DeleteLKECluster(ctx context.Context, clusterID int) error
- func (c *Client) DeleteLKEClusterPool(ctx context.Context, clusterID, id int) errordeprecated
- func (c *Client) DeleteLKEClusterPoolNode(ctx context.Context, clusterID int, id string) errordeprecated
- func (c *Client) DeleteLKENodePool(ctx context.Context, clusterID, poolID int) error
- func (c *Client) DeleteLKENodePoolNode(ctx context.Context, clusterID int, nodeID string) error
- func (c *Client) DeleteLongviewClient(ctx context.Context, clientID int) error
- func (c *Client) DeleteMongoDatabase(ctx context.Context, databaseID int) error
- func (c *Client) DeleteMySQLDatabase(ctx context.Context, databaseID int) error
- func (c *Client) DeleteNodeBalancer(ctx context.Context, nodebalancerID int) error
- func (c *Client) DeleteNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) error
- func (c *Client) DeleteNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) error
- func (c *Client) DeleteOAuthClient(ctx context.Context, clientID string) error
- func (c *Client) DeleteObjectStorageBucket(ctx context.Context, clusterID, label string) error
- func (c *Client) DeleteObjectStorageBucketCert(ctx context.Context, clusterID, bucket string) error
- func (c *Client) DeleteObjectStorageKey(ctx context.Context, keyID int) error
- func (c *Client) DeletePhoneNumber(ctx context.Context) error
- func (c *Client) DeletePostgresDatabase(ctx context.Context, databaseID int) error
- func (c *Client) DeleteSSHKey(ctx context.Context, keyID int) error
- func (c *Client) DeleteStackscript(ctx context.Context, scriptID int) error
- func (c *Client) DeleteTag(ctx context.Context, label string) error
- func (c *Client) DeleteToken(ctx context.Context, tokenID int) error
- func (c *Client) DeleteUser(ctx context.Context, userID string) error
- func (c *Client) DeleteVolume(ctx context.Context, volumeID int) error
- func (c *Client) DetachVolume(ctx context.Context, volumeID int) error
- func (c *Client) DisableTwoFactor(ctx context.Context) error
- func (c *Client) EnableInstanceBackups(ctx context.Context, linodeID int) error
- func (c *Client) GetAccount(ctx context.Context) (*Account, error)
- func (c *Client) GetAccountSettings(ctx context.Context) (*AccountSettings, error)
- func (c *Client) GetDatabaseEngine(ctx context.Context, opts *ListOptions, engineID string) (*DatabaseEngine, error)
- func (c *Client) GetDatabaseType(ctx context.Context, opts *ListOptions, typeID string) (*DatabaseType, error)
- func (c *Client) GetDomain(ctx context.Context, domainID int) (*Domain, error)
- func (c *Client) GetDomainRecord(ctx context.Context, domainID int, recordID int) (*DomainRecord, error)
- func (c *Client) GetDomainZoneFile(ctx context.Context, domainID int) (*DomainZoneFile, error)
- func (c *Client) GetEvent(ctx context.Context, eventID int) (*Event, error)
- func (c *Client) GetFirewall(ctx context.Context, firewallID int) (*Firewall, error)
- func (c *Client) GetFirewallDevice(ctx context.Context, firewallID, deviceID int) (*FirewallDevice, error)
- func (c *Client) GetFirewallRules(ctx context.Context, firewallID int) (*FirewallRuleSet, error)
- func (c *Client) GetIPAddress(ctx context.Context, id string) (*InstanceIP, error)
- func (c *Client) GetIPv6Pool(ctx context.Context, id string) (*IPv6Range, error)
- func (c *Client) GetIPv6Range(ctx context.Context, ipRange string) (*IPv6Range, error)
- func (c *Client) GetImage(ctx context.Context, imageID string) (*Image, error)
- func (c *Client) GetInstance(ctx context.Context, linodeID int) (*Instance, error)
- func (c *Client) GetInstanceBackups(ctx context.Context, linodeID int) (*InstanceBackupsResponse, error)
- func (c *Client) GetInstanceConfig(ctx context.Context, linodeID int, configID int) (*InstanceConfig, error)
- func (c *Client) GetInstanceDisk(ctx context.Context, linodeID int, diskID int) (*InstanceDisk, error)
- func (c *Client) GetInstanceIPAddress(ctx context.Context, linodeID int, ipaddress string) (*InstanceIP, error)
- func (c *Client) GetInstanceIPAddresses(ctx context.Context, linodeID int) (*InstanceIPAddressResponse, error)
- func (c *Client) GetInstanceSnapshot(ctx context.Context, linodeID int, snapshotID int) (*InstanceSnapshot, error)
- func (c *Client) GetInstanceStats(ctx context.Context, linodeID int) (*InstanceStats, error)
- func (c *Client) GetInstanceStatsByDate(ctx context.Context, linodeID int, year int, month int) (*InstanceStats, error)
- func (c *Client) GetInstanceTransfer(ctx context.Context, linodeID int) (*InstanceTransfer, error)
- func (c *Client) GetInvoice(ctx context.Context, invoiceID int) (*Invoice, error)
- func (c *Client) GetKernel(ctx context.Context, kernelID string) (*LinodeKernel, error)
- func (c *Client) GetLKECluster(ctx context.Context, clusterID int) (*LKECluster, error)
- func (c *Client) GetLKEClusterDashboard(ctx context.Context, clusterID int) (*LKEClusterDashboard, error)
- func (c *Client) GetLKEClusterKubeconfig(ctx context.Context, clusterID int) (*LKEClusterKubeconfig, error)
- func (c *Client) GetLKEClusterPool(ctx context.Context, clusterID, id int) (*LKEClusterPool, error)deprecated
- func (c *Client) GetLKENodePool(ctx context.Context, clusterID, poolID int) (*LKENodePool, error)
- func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion, error)
- func (c *Client) GetLogin(ctx context.Context, loginID int) (*Login, error)
- func (c *Client) GetLongviewClient(ctx context.Context, clientID int) (*LongviewClient, error)
- func (c *Client) GetLongviewPlan(ctx context.Context) (*LongviewPlan, error)
- func (c *Client) GetLongviewSubscription(ctx context.Context, templateID string) (*LongviewSubscription, error)
- func (c *Client) GetMongoDatabase(ctx context.Context, databaseID int) (*MongoDatabase, error)
- func (c *Client) GetMongoDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MongoDatabaseBackup, error)
- func (c *Client) GetMongoDatabaseCredentials(ctx context.Context, databaseID int) (*MongoDatabaseCredential, error)
- func (c *Client) GetMongoDatabaseSSL(ctx context.Context, databaseID int) (*MongoDatabaseSSL, error)
- func (c *Client) GetMySQLDatabase(ctx context.Context, databaseID int) (*MySQLDatabase, error)
- func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MySQLDatabaseBackup, error)
- func (c *Client) GetMySQLDatabaseCredentials(ctx context.Context, databaseID int) (*MySQLDatabaseCredential, error)
- func (c *Client) GetMySQLDatabaseSSL(ctx context.Context, databaseID int) (*MySQLDatabaseSSL, error)
- func (c *Client) GetNodeBalancer(ctx context.Context, nodebalancerID int) (*NodeBalancer, error)
- func (c *Client) GetNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) (*NodeBalancerConfig, error)
- func (c *Client) GetNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) (*NodeBalancerNode, error)
- func (c *Client) GetNodeBalancerStats(ctx context.Context, nodebalancerID int) (*NodeBalancerStats, error)
- func (c *Client) GetOAuthClient(ctx context.Context, clientID string) (*OAuthClient, error)
- func (c *Client) GetObjectStorageBucket(ctx context.Context, clusterID, label string) (*ObjectStorageBucket, error)
- func (c *Client) GetObjectStorageBucketAccess(ctx context.Context, clusterID, label string) (*ObjectStorageBucketAccess, error)
- func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterID, bucket string) (*ObjectStorageBucketCert, error)
- func (c *Client) GetObjectStorageCluster(ctx context.Context, clusterID string) (*ObjectStorageCluster, error)
- func (c *Client) GetObjectStorageKey(ctx context.Context, keyID int) (*ObjectStorageKey, error)
- func (c *Client) GetObjectStorageObjectACLConfig(ctx context.Context, objectID, label, object string) (*ObjectStorageObjectACLConfig, error)
- func (c *Client) GetObjectStorageTransfer(ctx context.Context) (*ObjectStorageTransfer, error)
- func (c *Client) GetPayment(ctx context.Context, paymentID int) (*Payment, error)
- func (c *Client) GetPollDelay() time.Duration
- func (c *Client) GetPostgresDatabase(ctx context.Context, databaseID int) (*PostgresDatabase, error)
- func (c *Client) GetPostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*PostgresDatabaseBackup, error)
- func (c *Client) GetPostgresDatabaseCredentials(ctx context.Context, databaseID int) (*PostgresDatabaseCredential, error)
- func (c *Client) GetPostgresDatabaseSSL(ctx context.Context, databaseID int) (*PostgresDatabaseSSL, error)
- func (c *Client) GetProfile(ctx context.Context) (*Profile, error)
- func (c *Client) GetRegion(ctx context.Context, regionID string) (*Region, error)
- func (c *Client) GetSSHKey(ctx context.Context, keyID int) (*SSHKey, error)
- func (c *Client) GetStackscript(ctx context.Context, scriptID int) (*Stackscript, error)
- func (c *Client) GetTicket(ctx context.Context, ticketID int) (*Ticket, error)
- func (c *Client) GetToken(ctx context.Context, tokenID int) (*Token, error)
- func (c *Client) GetType(ctx context.Context, typeID string) (*LinodeType, error)
- func (c *Client) GetUser(ctx context.Context, userID string) (*User, error)
- func (c *Client) GetUserGrants(ctx context.Context, username string) (*UserGrants, error)
- func (c *Client) GetVLANIPAMAddress(ctx context.Context, linodeID int, vlanLabel string) (string, error)
- func (c *Client) GetVolume(ctx context.Context, volumeID int) (*Volume, error)
- func (c *Client) GrantsList(ctx context.Context) (*GrantsListResponse, error)
- func (c *Client) InstancesAssignIPs(ctx context.Context, opts LinodesAssignIPsOptions) error
- func (c *Client) InvalidateCache()
- func (c *Client) InvalidateCacheEndpoint(endpoint string) error
- func (c *Client) ListDatabaseEngines(ctx context.Context, opts *ListOptions) ([]DatabaseEngine, error)
- func (c *Client) ListDatabaseTypes(ctx context.Context, opts *ListOptions) ([]DatabaseType, error)
- func (c *Client) ListDatabases(ctx context.Context, opts *ListOptions) ([]Database, error)
- func (c *Client) ListDomainRecords(ctx context.Context, domainID int, opts *ListOptions) ([]DomainRecord, error)
- func (c *Client) ListDomains(ctx context.Context, opts *ListOptions) ([]Domain, error)
- func (c *Client) ListEvents(ctx context.Context, opts *ListOptions) ([]Event, error)
- func (c *Client) ListFirewallDevices(ctx context.Context, firewallID int, opts *ListOptions) ([]FirewallDevice, error)
- func (c *Client) ListFirewalls(ctx context.Context, opts *ListOptions) ([]Firewall, error)
- func (c *Client) ListIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error)
- func (c *Client) ListIPv6Pools(ctx context.Context, opts *ListOptions) ([]IPv6Range, error)
- func (c *Client) ListIPv6Ranges(ctx context.Context, opts *ListOptions) ([]IPv6Range, error)
- func (c *Client) ListImages(ctx context.Context, opts *ListOptions) ([]Image, error)
- func (c *Client) ListInstanceConfigs(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceConfig, error)
- func (c *Client) ListInstanceDisks(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceDisk, error)
- func (c *Client) ListInstanceVolumes(ctx context.Context, linodeID int, opts *ListOptions) ([]Volume, error)
- func (c *Client) ListInstances(ctx context.Context, opts *ListOptions) ([]Instance, error)
- func (c *Client) ListInvoiceItems(ctx context.Context, invoiceID int, opts *ListOptions) ([]InvoiceItem, error)
- func (c *Client) ListInvoices(ctx context.Context, opts *ListOptions) ([]Invoice, error)
- func (c *Client) ListKernels(ctx context.Context, opts *ListOptions) ([]LinodeKernel, error)
- func (c *Client) ListLKEClusterAPIEndpoints(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterAPIEndpoint, error)
- func (c *Client) ListLKEClusterPools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterPool, error)deprecated
- func (c *Client) ListLKEClusters(ctx context.Context, opts *ListOptions) ([]LKECluster, error)
- func (c *Client) ListLKENodePools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKENodePool, error)
- func (c *Client) ListLKEVersions(ctx context.Context, opts *ListOptions) ([]LKEVersion, error)
- func (c *Client) ListLogins(ctx context.Context, opts *ListOptions) ([]Login, error)
- func (c *Client) ListLongviewClients(ctx context.Context, opts *ListOptions) ([]LongviewClient, error)
- func (c *Client) ListLongviewSubscriptions(ctx context.Context, opts *ListOptions) ([]LongviewSubscription, error)
- func (c *Client) ListMongoDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MongoDatabaseBackup, error)
- func (c *Client) ListMongoDatabases(ctx context.Context, opts *ListOptions) ([]MongoDatabase, error)
- func (c *Client) ListMySQLDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MySQLDatabaseBackup, error)
- func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]MySQLDatabase, error)
- func (c *Client) ListNodeBalancerConfigs(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]NodeBalancerConfig, error)
- func (c *Client) ListNodeBalancerNodes(ctx context.Context, nodebalancerID int, configID int, opts *ListOptions) ([]NodeBalancerNode, error)
- func (c *Client) ListNodeBalancers(ctx context.Context, opts *ListOptions) ([]NodeBalancer, error)
- func (c *Client) ListNotifications(ctx context.Context, opts *ListOptions) ([]Notification, error)
- func (c *Client) ListOAuthClients(ctx context.Context, opts *ListOptions) ([]OAuthClient, error)
- func (c *Client) ListObjectStorageBuckets(ctx context.Context, opts *ListOptions) ([]ObjectStorageBucket, error)
- func (c *Client) ListObjectStorageClusters(ctx context.Context, opts *ListOptions) ([]ObjectStorageCluster, error)
- func (c *Client) ListObjectStorageKeys(ctx context.Context, opts *ListOptions) ([]ObjectStorageKey, error)
- func (c *Client) ListPayments(ctx context.Context, opts *ListOptions) ([]Payment, error)
- func (c *Client) ListPostgresDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]PostgresDatabaseBackup, error)
- func (c *Client) ListPostgresDatabases(ctx context.Context, opts *ListOptions) ([]PostgresDatabase, error)
- func (c *Client) ListRegions(ctx context.Context, opts *ListOptions) ([]Region, error)
- func (c *Client) ListSSHKeys(ctx context.Context, opts *ListOptions) ([]SSHKey, error)
- func (c *Client) ListStackscripts(ctx context.Context, opts *ListOptions) ([]Stackscript, error)
- func (c *Client) ListTaggedObjects(ctx context.Context, label string, opts *ListOptions) (TaggedObjectList, error)
- func (c *Client) ListTags(ctx context.Context, opts *ListOptions) ([]Tag, error)
- func (c *Client) ListTickets(ctx context.Context, opts *ListOptions) ([]Ticket, error)
- func (c *Client) ListTokens(ctx context.Context, opts *ListOptions) ([]Token, error)
- func (c *Client) ListTypes(ctx context.Context, opts *ListOptions) ([]LinodeType, error)
- func (c *Client) ListUsers(ctx context.Context, opts *ListOptions) ([]User, error)
- func (c *Client) ListVLANs(ctx context.Context, opts *ListOptions) ([]VLAN, error)
- func (c *Client) ListVolumes(ctx context.Context, opts *ListOptions) ([]Volume, error)
- func (c *Client) LoadConfig(options *LoadConfigOptions) error
- func (c *Client) MarkEventRead(ctx context.Context, event *Event) error
- func (c *Client) MarkEventsSeen(ctx context.Context, event *Event) error
- func (c *Client) MigrateInstance(ctx context.Context, id int) error
- func (c *Client) MutateInstance(ctx context.Context, id int) error
- func (client Client) NewEventPoller(ctx context.Context, id any, entityType EntityType, action EventAction) (*EventPoller, error)
- func (client Client) NewEventPollerWithoutEntity(entityType EntityType, action EventAction) (*EventPoller, error)
- func (c *Client) OnBeforeRequest(m func(request *Request) error)
- func (c *Client) PasswordResetInstanceDisk(ctx context.Context, linodeID int, diskID int, password string) error
- func (c *Client) PatchMongoDatabase(ctx context.Context, databaseID int) error
- func (c *Client) PatchMySQLDatabase(ctx context.Context, databaseID int) error
- func (c *Client) PatchPostgresDatabase(ctx context.Context, databaseID int) error
- func (c *Client) R(ctx context.Context) *resty.Request
- func (c *Client) RebootInstance(ctx context.Context, linodeID int, configID int) error
- func (c *Client) RebuildInstance(ctx context.Context, linodeID int, opts InstanceRebuildOptions) (*Instance, error)
- func (c *Client) RebuildNodeBalancerConfig(ctx context.Context, nodeBalancerID int, configID int, ...) (*NodeBalancerConfig, error)
- func (c *Client) RecycleLKEClusterNodes(ctx context.Context, clusterID int) error
- func (c *Client) RenameInstance(ctx context.Context, linodeID int, label string) (*Instance, error)
- func (c *Client) RenameInstanceConfig(ctx context.Context, linodeID int, configID int, label string) (*InstanceConfig, error)
- func (c *Client) RenameInstanceDisk(ctx context.Context, linodeID int, diskID int, label string) (*InstanceDisk, error)
- func (c *Client) RescueInstance(ctx context.Context, linodeID int, opts InstanceRescueOptions) error
- func (c *Client) ResetMongoDatabaseCredentials(ctx context.Context, databaseID int) error
- func (c *Client) ResetMySQLDatabaseCredentials(ctx context.Context, databaseID int) error
- func (c *Client) ResetPostgresDatabaseCredentials(ctx context.Context, databaseID int) error
- func (c *Client) ResizeInstance(ctx context.Context, linodeID int, opts InstanceResizeOptions) error
- func (c *Client) ResizeInstanceDisk(ctx context.Context, linodeID int, diskID int, size int) error
- func (c *Client) ResizeVolume(ctx context.Context, volumeID int, size int) error
- func (c *Client) RestoreInstanceBackup(ctx context.Context, linodeID int, backupID int, opts RestoreInstanceOptions) error
- func (c *Client) RestoreMongoDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
- func (c *Client) RestoreMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
- func (c *Client) RestorePostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
- func (c *Client) SecurityQuestionsAnswer(ctx context.Context, opts SecurityQuestionsAnswerOptions) error
- func (c *Client) SecurityQuestionsList(ctx context.Context) (*SecurityQuestionsListResponse, error)
- func (c *Client) SendPhoneNumberVerificationCode(ctx context.Context, opts SendPhoneNumberVerificationCodeOptions) error
- func (c *Client) SetAPIVersion(apiVersion string) *Client
- func (c *Client) SetBaseURL(baseURL string) *Client
- func (c *Client) SetDebug(debug bool) *Client
- func (c *Client) SetGlobalCacheExpiration(expiryTime time.Duration)
- func (c *Client) SetPollDelay(delay time.Duration) *Client
- func (c *Client) SetRetries() *Client
- func (c *Client) SetRetryAfter(callback RetryAfter) *Client
- func (c *Client) SetRetryCount(count int) *Client
- func (c *Client) SetRetryMaxWaitTime(max time.Duration) *Client
- func (c *Client) SetRetryWaitTime(min time.Duration) *Client
- func (c *Client) SetRootCertificate(path string) *Client
- func (c *Client) SetToken(token string) *Client
- func (c *Client) SetUserAgent(ua string) *Client
- func (c *Client) ShareIPAddresses(ctx context.Context, opts IPAddressesShareOptions) error
- func (c *Client) ShutdownInstance(ctx context.Context, id int) error
- func (c *Client) UpdateAccountSettings(ctx context.Context, opts AccountSettingsUpdateOptions) (*AccountSettings, error)
- func (c *Client) UpdateDomain(ctx context.Context, domainID int, opts DomainUpdateOptions) (*Domain, error)
- func (c *Client) UpdateDomainRecord(ctx context.Context, domainID int, recordID int, ...) (*DomainRecord, error)
- func (c *Client) UpdateFirewall(ctx context.Context, firewallID int, opts FirewallUpdateOptions) (*Firewall, error)
- func (c *Client) UpdateFirewallRules(ctx context.Context, firewallID int, rules FirewallRuleSet) (*FirewallRuleSet, error)
- func (c *Client) UpdateIPAddress(ctx context.Context, id string, opts IPAddressUpdateOptions) (*InstanceIP, error)
- func (c *Client) UpdateImage(ctx context.Context, imageID string, opts ImageUpdateOptions) (*Image, error)
- func (c *Client) UpdateInstance(ctx context.Context, linodeID int, opts InstanceUpdateOptions) (*Instance, error)
- func (c *Client) UpdateInstanceConfig(ctx context.Context, linodeID int, configID int, ...) (*InstanceConfig, error)
- func (c *Client) UpdateInstanceDisk(ctx context.Context, linodeID int, diskID int, opts InstanceDiskUpdateOptions) (*InstanceDisk, error)
- func (c *Client) UpdateInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string, ...) (*InstanceIP, error)
- func (c *Client) UpdateLKECluster(ctx context.Context, clusterID int, opts LKEClusterUpdateOptions) (*LKECluster, error)
- func (c *Client) UpdateLKEClusterPool(ctx context.Context, clusterID, id int, updateOpts LKEClusterPoolUpdateOptions) (*LKEClusterPool, error)deprecated
- func (c *Client) UpdateLKENodePool(ctx context.Context, clusterID, poolID int, opts LKENodePoolUpdateOptions) (*LKENodePool, error)
- func (c *Client) UpdateLongviewClient(ctx context.Context, clientID int, opts LongviewClientUpdateOptions) (*LongviewClient, error)
- func (c *Client) UpdateLongviewPlan(ctx context.Context, opts LongviewPlanUpdateOptions) (*LongviewPlan, error)
- func (c *Client) UpdateMongoDatabase(ctx context.Context, databaseID int, opts MongoUpdateOptions) (*MongoDatabase, error)
- func (c *Client) UpdateMySQLDatabase(ctx context.Context, databaseID int, opts MySQLUpdateOptions) (*MySQLDatabase, error)
- func (c *Client) UpdateNodeBalancer(ctx context.Context, nodebalancerID int, opts NodeBalancerUpdateOptions) (*NodeBalancer, error)
- func (c *Client) UpdateNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int, ...) (*NodeBalancerConfig, error)
- func (c *Client) UpdateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int, ...) (*NodeBalancerNode, error)
- func (c *Client) UpdateOAuthClient(ctx context.Context, clientID string, opts OAuthClientUpdateOptions) (*OAuthClient, error)
- func (c *Client) UpdateObjectStorageBucketAccess(ctx context.Context, clusterID, label string, ...) error
- func (c *Client) UpdateObjectStorageKey(ctx context.Context, keyID int, opts ObjectStorageKeyUpdateOptions) (*ObjectStorageKey, error)
- func (c *Client) UpdateObjectStorageObjectACLConfig(ctx context.Context, objectID, label string, ...) (*ObjectStorageObjectACLConfig, error)
- func (c *Client) UpdatePostgresDatabase(ctx context.Context, databaseID int, opts PostgresUpdateOptions) (*PostgresDatabase, error)
- func (c *Client) UpdateProfile(ctx context.Context, opts ProfileUpdateOptions) (*Profile, error)
- func (c *Client) UpdateSSHKey(ctx context.Context, keyID int, opts SSHKeyUpdateOptions) (*SSHKey, error)
- func (c *Client) UpdateStackscript(ctx context.Context, scriptID int, opts StackscriptUpdateOptions) (*Stackscript, error)
- func (c *Client) UpdateToken(ctx context.Context, tokenID int, opts TokenUpdateOptions) (*Token, error)
- func (c *Client) UpdateUser(ctx context.Context, userID string, opts UserUpdateOptions) (*User, error)
- func (c *Client) UpdateUserGrants(ctx context.Context, username string, opts UserGrantsUpdateOptions) (*UserGrants, error)
- func (c *Client) UpdateVolume(ctx context.Context, volumeID int, opts VolumeUpdateOptions) (*Volume, error)
- func (c *Client) UploadImage(ctx context.Context, opts ImageUploadOptions) (*Image, error)
- func (c *Client) UploadImageToURL(ctx context.Context, uploadURL string, image io.Reader) error
- func (c *Client) UploadObjectStorageBucketCert(ctx context.Context, clusterID, bucket string, ...) (*ObjectStorageBucketCert, error)
- func (c *Client) UseCache(value bool)
- func (c *Client) UseProfile(name string) error
- func (c *Client) VerifyPhoneNumber(ctx context.Context, opts VerifyPhoneNumberOptions) error
- func (client Client) WaitForDatabaseStatus(ctx context.Context, dbID int, dbEngine DatabaseEngineType, ...) error
- func (client Client) WaitForEventFinished(ctx context.Context, id any, entityType EntityType, action EventAction, ...) (*Event, error)
- func (client Client) WaitForImageStatus(ctx context.Context, imageID string, status ImageStatus, timeoutSeconds int) (*Image, error)
- func (client Client) WaitForInstanceDiskStatus(ctx context.Context, instanceID int, diskID int, status DiskStatus, ...) (*InstanceDisk, error)
- func (client Client) WaitForInstanceStatus(ctx context.Context, instanceID int, status InstanceStatus, timeoutSeconds int) (*Instance, error)
- func (client Client) WaitForLKEClusterConditions(ctx context.Context, clusterID int, options LKEClusterPollOptions, ...) error
- func (client Client) WaitForLKEClusterStatus(ctx context.Context, clusterID int, status LKEClusterStatus, ...) (*LKECluster, error)
- func (client Client) WaitForMongoDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*MongoDatabaseBackup, error)
- func (client Client) WaitForMySQLDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*MySQLDatabaseBackup, error)
- func (client Client) WaitForPostgresDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*PostgresDatabaseBackup, error)
- func (client Client) WaitForSnapshotStatus(ctx context.Context, instanceID int, snapshotID int, ...) (*InstanceSnapshot, error)
- func (client Client) WaitForVolumeLinodeID(ctx context.Context, volumeID int, linodeID *int, timeoutSeconds int) (*Volume, error)
- func (client Client) WaitForVolumeStatus(ctx context.Context, volumeID int, status VolumeStatus, timeoutSeconds int) (*Volume, error)
- type ClusterConditionFunc
- type ClusterConditionOptions
- type ClusterPrice
- type Comp
- type ConfigAlgorithm
- type ConfigCheck
- type ConfigCipher
- type ConfigInterfacePurpose
- type ConfigProfile
- type ConfigProtocol
- type ConfigProxyProtocol
- type ConfigStickiness
- type ConfirmTwoFactorOptions
- type ConfirmTwoFactorResponse
- type CreditCard
- type Database
- type DatabaseDayOfWeek
- type DatabaseEngine
- type DatabaseEngineType
- type DatabaseEnginesPagedResponse
- type DatabaseHost
- type DatabaseMaintenanceFrequency
- type DatabaseMaintenanceWindow
- type DatabaseStatus
- type DatabaseType
- type DatabaseTypeEngine
- type DatabaseTypeEngineMap
- type DatabaseTypesPagedResponse
- type DatabasesPagedResponse
- type DevicesCreationOptions
- type DiskFilesystem
- type DiskStatus
- type Domain
- type DomainCreateOptions
- type DomainRecord
- type DomainRecordCreateOptions
- type DomainRecordType
- type DomainRecordUpdateOptions
- type DomainRecordsPagedResponse
- type DomainStatus
- type DomainType
- type DomainUpdateOptions
- type DomainZoneFile
- type DomainsPagedResponse
- type EntityType
- type EntityUserGrant
- type EnvDefaults
- type Error
- type Event
- type EventAction
- type EventEntity
- type EventPoller
- type EventStatus
- type EventsPagedResponse
- type Filter
- type FilterNode
- type FilterOperator
- type Firewall
- type FirewallCreateOptions
- type FirewallDevice
- type FirewallDeviceCreateOptions
- type FirewallDeviceEntity
- type FirewallDeviceType
- type FirewallDevicesPagedResponse
- type FirewallRule
- type FirewallRuleSet
- type FirewallStatus
- type FirewallUpdateOptions
- type FirewallsPagedResponse
- type GlobalUserGrants
- type GrantPermissionLevel
- type GrantedEntity
- type GrantsListResponse
- type IPAddressUpdateOptions
- type IPAddressesPagedResponse
- type IPAddressesShareOptions
- type IPv6PoolsPagedResponse
- type IPv6Range
- type IPv6RangeCreateOptions
- type IPv6RangesPagedResponse
- type Image
- type ImageCreateOptions
- type ImageCreateUploadOptions
- type ImageCreateUploadResponse
- type ImageStatus
- type ImageUpdateOptions
- type ImageUploadOptions
- type ImagesPagedResponse
- type Instance
- type InstanceAlert
- type InstanceBackup
- type InstanceBackupSnapshotResponse
- type InstanceBackupsResponse
- type InstanceCloneOptions
- type InstanceConfig
- type InstanceConfigCreateOptions
- type InstanceConfigDevice
- type InstanceConfigDeviceMap
- type InstanceConfigHelpers
- type InstanceConfigInterface
- type InstanceConfigUpdateOptions
- type InstanceConfigsPagedResponse
- type InstanceCreateOptions
- type InstanceDisk
- type InstanceDiskCreateOptions
- type InstanceDiskUpdateOptions
- type InstanceDisksPagedResponse
- type InstanceIP
- type InstanceIPAddressResponse
- type InstanceIPType
- type InstanceIPv4Response
- type InstanceIPv6Response
- type InstanceRebuildOptions
- type InstanceRescueOptions
- type InstanceResizeOptions
- type InstanceSnapshot
- type InstanceSnapshotDisk
- type InstanceSnapshotStatus
- type InstanceSpec
- type InstanceStats
- type InstanceStatsData
- type InstanceStatus
- type InstanceTransfer
- type InstanceUpdateOptions
- type InstanceVolumesPagedResponse
- type InstancesPagedResponse
- type Invoice
- type InvoiceItem
- type InvoiceItemsPagedResponse
- type InvoicesPagedResponse
- type LKECluster
- type LKEClusterAPIEndpoint
- type LKEClusterAPIEndpointsPagedResponse
- type LKEClusterControlPlane
- type LKEClusterCreateOptions
- type LKEClusterDashboard
- type LKEClusterKubeconfig
- type LKEClusterPollOptions
- type LKEClusterPooldeprecated
- type LKEClusterPoolAutoscalerdeprecated
- type LKEClusterPoolCreateOptionsdeprecated
- type LKEClusterPoolDiskdeprecated
- type LKEClusterPoolLinodedeprecated
- type LKEClusterPoolUpdateOptionsdeprecated
- type LKEClusterPoolsPagedResponsedeprecated
- type LKEClusterStatus
- type LKEClusterUpdateOptions
- type LKEClustersPagedResponse
- type LKELinodeStatus
- type LKENodePool
- type LKENodePoolAutoscaler
- type LKENodePoolCreateOptions
- type LKENodePoolDisk
- type LKENodePoolLinode
- type LKENodePoolUpdateOptions
- type LKENodePoolsPagedResponse
- type LKEVersion
- type LKEVersionsPagedResponse
- type LinodeAddons
- type LinodeBackupsAddon
- type LinodeIPAssignment
- type LinodeKernel
- type LinodeKernelsPagedResponse
- type LinodePrice
- type LinodeType
- type LinodeTypeClass
- type LinodeTypesPagedResponse
- type LinodesAssignIPsOptions
- type LishAuthMethod
- type ListOptions
- type LoadConfigOptions
- type Login
- type LoginsPagedResponse
- type LongviewClient
- type LongviewClientCreateOptions
- type LongviewClientUpdateOptions
- type LongviewClientsPagedResponse
- type LongviewPlan
- type LongviewPlanUpdateOptions
- type LongviewSubscription
- type LongviewSubscriptionsPagedResponse
- type MongoBackupCreateOptions
- type MongoCompressionType
- type MongoCreateOptions
- type MongoDatabase
- type MongoDatabaseBackup
- type MongoDatabaseBackupsPagedResponse
- type MongoDatabaseCredential
- type MongoDatabaseSSL
- type MongoDatabaseTarget
- type MongoDatabasesPagedResponse
- type MongoStorageEngine
- type MongoUpdateOptions
- type MySQLBackupCreateOptions
- type MySQLCreateOptions
- type MySQLDatabase
- type MySQLDatabaseBackup
- type MySQLDatabaseBackupsPagedResponse
- type MySQLDatabaseCredential
- type MySQLDatabaseMaintenanceWindow
- type MySQLDatabaseSSL
- type MySQLDatabaseTarget
- type MySQLDatabasesPagedResponse
- type MySQLUpdateOptions
- type NetworkAddresses
- type NetworkProtocol
- type NodeBalancer
- type NodeBalancerConfig
- type NodeBalancerConfigCreateOptions
- type NodeBalancerConfigRebuildOptions
- type NodeBalancerConfigUpdateOptions
- type NodeBalancerConfigsPagedResponse
- type NodeBalancerCreateOptions
- type NodeBalancerNode
- type NodeBalancerNodeCreateOptions
- type NodeBalancerNodeStatus
- type NodeBalancerNodeUpdateOptions
- type NodeBalancerNodesPagedResponse
- type NodeBalancerStats
- type NodeBalancerStatsData
- type NodeBalancerTransfer
- type NodeBalancerUpdateOptions
- type NodeBalancersPagedResponse
- type NodeMode
- type Notification
- type NotificationEntity
- type NotificationSeverity
- type NotificationType
- type NotificationsPagedResponse
- type OAuthClient
- type OAuthClientCreateOptions
- type OAuthClientStatus
- type OAuthClientUpdateOptions
- type OAuthClientsPagedResponse
- type ObjectStorageACL
- type ObjectStorageBucket
- type ObjectStorageBucketAccess
- type ObjectStorageBucketCert
- type ObjectStorageBucketCertUploadOptions
- type ObjectStorageBucketCreateOptions
- type ObjectStorageBucketUpdateAccessOptions
- type ObjectStorageBucketsPagedResponse
- type ObjectStorageCluster
- type ObjectStorageClustersPagedResponse
- type ObjectStorageKey
- type ObjectStorageKeyBucketAccess
- type ObjectStorageKeyCreateOptions
- type ObjectStorageKeyUpdateOptions
- type ObjectStorageKeysPagedResponse
- type ObjectStorageObjectACLConfig
- type ObjectStorageObjectACLConfigUpdateOptions
- type ObjectStorageObjectURL
- type ObjectStorageObjectURLCreateOptions
- type ObjectStorageTransfer
- type PageOptions
- type PagedResponse
- type Payment
- type PaymentCreateOptions
- type PaymentsPagedResponse
- type PostgresBackupCreateOptions
- type PostgresCommitType
- type PostgresCreateOptions
- type PostgresDatabase
- type PostgresDatabaseBackup
- type PostgresDatabaseBackupsPagedResponse
- type PostgresDatabaseCredential
- type PostgresDatabaseSSL
- type PostgresDatabaseTarget
- type PostgresDatabasesPagedResponse
- type PostgresReplicationType
- type PostgresUpdateOptions
- type Profile
- type ProfileReferrals
- type ProfileUpdateOptions
- type Region
- type RegionResolvers
- type RegionsPagedResponse
- type Request
- type RestoreInstanceOptions
- type RetryAfter
- type RetryConditional
- type SSHKey
- type SSHKeyCreateOptions
- type SSHKeyUpdateOptions
- type SSHKeysPagedResponse
- type SecurityQuestion
- type SecurityQuestionsAnswerOptions
- type SecurityQuestionsAnswerQuestion
- type SecurityQuestionsListResponse
- type SendPhoneNumberVerificationCodeOptions
- type SortedObjects
- type Stackscript
- type StackscriptCreateOptions
- type StackscriptUDF
- type StackscriptUpdateOptions
- type StackscriptsPagedResponse
- type StatsIO
- type StatsNet
- type StatsTraffic
- type Tag
- type TagCreateOptions
- type TaggedObject
- type TaggedObjectList
- type TaggedObjectsPagedResponse
- type TagsPagedResponse
- type Ticket
- type TicketEntity
- type TicketStatus
- type TicketsPagedResponse
- type Token
- type TokenCreateOptions
- type TokenUpdateOptions
- type TokensPagedResponse
- type TwoFactorSecret
- type User
- type UserCreateOptions
- type UserGrants
- type UserGrantsUpdateOptions
- type UserUpdateOptions
- type UsersPagedResponse
- type VLAN
- type VLANsPagedResponse
- type VerifyPhoneNumberOptions
- type Volume
- type VolumeAttachOptions
- type VolumeCreateOptions
- type VolumeStatus
- type VolumeUpdateOptions
- type VolumesPagedResponse
Constants ¶
const ( // APIConfigEnvVar environment var to get path to Linode config APIConfigEnvVar = "LINODE_CONFIG" // APIConfigProfileEnvVar specifies the profile to use when loading from a Linode config APIConfigProfileEnvVar = "LINODE_PROFILE" // APIHost Linode API hostname APIHost = "api.linode.com" // APIHostVar environment var to check for alternate API URL APIHostVar = "LINODE_URL" // APIHostCert environment var containing path to CA cert to validate against APIHostCert = "LINODE_CA" // APIVersion Linode API version APIVersion = "v4" // APIVersionVar environment var to check for alternate API Version APIVersionVar = "LINODE_API_VERSION" // APIProto connect to API with http(s) APIProto = "https" // APIEnvVar environment var to check for API token APIEnvVar = "LINODE_TOKEN" // APISecondsPerPoll how frequently to poll for new Events or Status in WaitFor functions APISecondsPerPoll = 3 // Maximum wait time for retries APIRetryMaxWaitTime = time.Duration(30) * time.Second )
const ( // ErrorFromString is the Code identifying Errors created by string types ErrorFromString = 1 // ErrorFromError is the Code identifying Errors created by error types ErrorFromError = 2 // ErrorFromStringer is the Code identifying Errors created by fmt.Stringer types ErrorFromStringer = 3 )
const (
DefaultConfigProfile = "default"
)
Variables ¶
var ( Version = "dev" // DefaultUserAgent is the default User-Agent sent in HTTP request headers DefaultUserAgent string )
var DefaultConfigPaths = []string{
"%s/.config/linode",
"%s/.config/linode-cli",
}
Functions ¶
func FormatConfigPath ¶ added in v1.16.0
Types ¶
type APIError ¶
type APIError struct {
Errors []APIErrorReason `json:"errors"`
}
APIError is the error-set returned by the Linode API when presented with an invalid request
type APIErrorReason ¶
APIErrorReason is an individual invalid request message returned by the Linode API
func (APIErrorReason) Error ¶
func (r APIErrorReason) Error() string
type Account ¶
type Account struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Company string `json:"company"` Address1 string `json:"address_1"` Address2 string `json:"address_2"` Balance float32 `json:"balance"` BalanceUninvoiced float32 `json:"balance_uninvoiced"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` TaxID string `json:"tax_id"` Phone string `json:"phone"` CreditCard *CreditCard `json:"credit_card"` }
Account associated with the token in use.
type AccountSettings ¶ added in v1.16.0
type AccountSettings struct { // The default backups enrollment status for all new Linodes for all users on the account. When enabled, backups are mandatory per instance. BackupsEnabled bool `json:"backups_enabled"` // Wether or not Linode Managed service is enabled for the account. Managed bool `json:"managed"` // Wether or not the Network Helper is enabled for all new Linode Instance Configs on the account. NetworkHelper bool `json:"network_helper"` // A plan name like "longview-3"..."longview-100", or a nil value for to cancel any existing subscription plan. LongviewSubscription *string `json:"longview_subscription"` // A string like "disabled", "suspended", or "active" describing the status of this account’s Object Storage service enrollment. ObjectStorage *string `json:"object_storage"` }
AccountSettings are the account wide flags or plans that effect new resources
type AccountSettingsUpdateOptions ¶ added in v1.16.0
type AccountSettingsUpdateOptions struct { // The default backups enrollment status for all new Linodes for all users on the account. When enabled, backups are mandatory per instance. BackupsEnabled *bool `json:"backups_enabled,omitempty"` // A plan name like "longview-3"..."longview-100", or a nil value for to cancel any existing subscription plan. LongviewSubscription *string `json:"longview_subscription,omitempty"` // The default network helper setting for all new Linodes and Linode Configs for all users on the account. NetworkHelper *bool `json:"network_helper,omitempty"` }
AccountSettingsUpdateOptions are the updateable account wide flags or plans that effect new resources.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the Resty client
func NewClientFromEnv ¶ added in v1.16.0
NewClientFromEnv creates a Client and initializes it with values from the LINODE_CONFIG file and the LINODE_TOKEN environment variable.
func (*Client) AddInstanceIPAddress ¶
func (c *Client) AddInstanceIPAddress(ctx context.Context, linodeID int, public bool) (*InstanceIP, error)
AddInstanceIPAddress adds a public or private IP to a Linode instance
func (*Client) AddRetryCondition ¶ added in v1.16.0
func (c *Client) AddRetryCondition(retryCondition RetryConditional) *Client
AddRetryCondition adds a RetryConditional function to the Client
func (*Client) AttachVolume ¶
func (c *Client) AttachVolume(ctx context.Context, volumeID int, opts *VolumeAttachOptions) (*Volume, error)
AttachVolume attaches a volume to a Linode instance
func (*Client) BootInstance ¶
BootInstance will boot a Linode instance A configID of 0 will cause Linode to choose the last/best config
func (*Client) CancelInstanceBackups ¶ added in v0.2.0
CancelInstanceBackups Cancels backups for the specified Linode.
func (*Client) CancelObjectStorage ¶ added in v1.16.0
CancelObjectStorage cancels and removes all object storage from the Account
func (*Client) CloneInstance ¶
func (c *Client) CloneInstance(ctx context.Context, linodeID int, opts InstanceCloneOptions) (*Instance, error)
CloneInstance clone an existing Instances Disks and Configuration profiles to another Linode Instance
func (*Client) CloneVolume ¶
CloneVolume clones a Linode volume
func (*Client) ConfirmTwoFactor ¶ added in v1.16.0
func (c *Client) ConfirmTwoFactor(ctx context.Context, opts ConfirmTwoFactorOptions) (*ConfirmTwoFactorResponse, error)
ConfirmTwoFactor confirms that you can successfully generate Two Factor codes and enables TFA on your Account.
func (*Client) CreateDomain ¶
CreateDomain creates a Domain
func (*Client) CreateDomainRecord ¶ added in v0.1.1
func (c *Client) CreateDomainRecord(ctx context.Context, domainID int, opts DomainRecordCreateOptions) (*DomainRecord, error)
CreateDomainRecord creates a DomainRecord
func (*Client) CreateFirewall ¶ added in v1.16.0
CreateFirewall creates a single Firewall with at least one set of inbound or outbound rules
func (*Client) CreateFirewallDevice ¶ added in v1.16.0
func (c *Client) CreateFirewallDevice(ctx context.Context, firewallID int, opts FirewallDeviceCreateOptions) (*FirewallDevice, error)
AddFirewallDevice associates a Device with a given Firewall
func (*Client) CreateIPv6Range ¶ added in v1.16.0
func (c *Client) CreateIPv6Range(ctx context.Context, opts IPv6RangeCreateOptions) (*IPv6Range, error)
CreateIPv6Range creates an IPv6 Range and assigns it based on the provided Linode or route target IPv6 SLAAC address.
func (*Client) CreateImage ¶ added in v0.2.0
CreateImage creates a Image
func (*Client) CreateImageUpload ¶ added in v1.16.0
func (c *Client) CreateImageUpload(ctx context.Context, opts ImageCreateUploadOptions) (*Image, string, error)
CreateImageUpload creates an Image and an upload URL
func (*Client) CreateInstance ¶
CreateInstance creates a Linode instance
func (*Client) CreateInstanceConfig ¶
func (c *Client) CreateInstanceConfig(ctx context.Context, linodeID int, opts InstanceConfigCreateOptions) (*InstanceConfig, error)
CreateInstanceConfig creates a new InstanceConfig for the given Instance
func (*Client) CreateInstanceDisk ¶
func (c *Client) CreateInstanceDisk(ctx context.Context, linodeID int, opts InstanceDiskCreateOptions) (*InstanceDisk, error)
CreateInstanceDisk creates a new InstanceDisk for the given Instance
func (*Client) CreateInstanceSnapshot ¶ added in v0.2.0
func (c *Client) CreateInstanceSnapshot(ctx context.Context, linodeID int, label string) (*InstanceSnapshot, error)
CreateInstanceSnapshot Creates or Replaces the snapshot Backup of a Linode. If a previous snapshot exists for this Linode, it will be deleted.
func (*Client) CreateLKECluster ¶ added in v1.16.0
func (c *Client) CreateLKECluster(ctx context.Context, opts LKEClusterCreateOptions) (*LKECluster, error)
CreateLKECluster creates a LKECluster
func (*Client) CreateLKEClusterPool
deprecated
added in
v1.16.0
func (c *Client) CreateLKEClusterPool(ctx context.Context, clusterID int, createOpts LKEClusterPoolCreateOptions) (*LKEClusterPool, error)
Deprecated: CreateLKEClusterPool creates a LKEClusterPool
func (*Client) CreateLKENodePool ¶ added in v1.16.0
func (c *Client) CreateLKENodePool(ctx context.Context, clusterID int, opts LKENodePoolCreateOptions) (*LKENodePool, error)
CreateLKENodePool creates a LKENodePool
func (*Client) CreateLongviewClient ¶ added in v1.16.0
func (c *Client) CreateLongviewClient(ctx context.Context, opts LongviewClientCreateOptions) (*LongviewClient, error)
CreateLongviewClient creates a Longview Client
func (*Client) CreateMongoDatabase ¶ added in v1.16.0
func (c *Client) CreateMongoDatabase(ctx context.Context, opts MongoCreateOptions) (*MongoDatabase, error)
CreateMongoDatabase creates a new Mongo Database using the createOpts as configuration, returns the new Mongo Database
func (*Client) CreateMongoDatabaseBackup ¶ added in v1.16.0
func (c *Client) CreateMongoDatabaseBackup(ctx context.Context, databaseID int, opts MongoBackupCreateOptions) error
CreateMongoDatabaseBackup creates a snapshot for the given Mongo database
func (*Client) CreateMySQLDatabase ¶ added in v1.16.0
func (c *Client) CreateMySQLDatabase(ctx context.Context, opts MySQLCreateOptions) (*MySQLDatabase, error)
CreateMySQLDatabase creates a new MySQL Database using the createOpts as configuration, returns the new MySQL Database
func (*Client) CreateMySQLDatabaseBackup ¶ added in v1.16.0
func (c *Client) CreateMySQLDatabaseBackup(ctx context.Context, databaseID int, opts MySQLBackupCreateOptions) error
CreateMySQLDatabaseBackup creates a snapshot for the given MySQL database
func (*Client) CreateNodeBalancer ¶
func (c *Client) CreateNodeBalancer(ctx context.Context, opts NodeBalancerCreateOptions) (*NodeBalancer, error)
CreateNodeBalancer creates a NodeBalancer
func (*Client) CreateNodeBalancerConfig ¶
func (c *Client) CreateNodeBalancerConfig(ctx context.Context, nodebalancerID int, opts NodeBalancerConfigCreateOptions) (*NodeBalancerConfig, error)
CreateNodeBalancerConfig creates a NodeBalancerConfig
func (*Client) CreateNodeBalancerNode ¶
func (c *Client) CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, opts NodeBalancerNodeCreateOptions) (*NodeBalancerNode, error)
CreateNodeBalancerNode creates a NodeBalancerNode
func (*Client) CreateOAuthClient ¶ added in v1.16.0
func (c *Client) CreateOAuthClient(ctx context.Context, opts OAuthClientCreateOptions) (*OAuthClient, error)
CreateOAuthClient creates an OAuthClient
func (*Client) CreateObjectStorageBucket ¶ added in v1.16.0
func (c *Client) CreateObjectStorageBucket(ctx context.Context, opts ObjectStorageBucketCreateOptions) (*ObjectStorageBucket, error)
CreateObjectStorageBucket creates an ObjectStorageBucket
func (*Client) CreateObjectStorageKey ¶ added in v1.16.0
func (c *Client) CreateObjectStorageKey(ctx context.Context, opts ObjectStorageKeyCreateOptions) (*ObjectStorageKey, error)
CreateObjectStorageKey creates a ObjectStorageKey
func (*Client) CreateObjectStorageObjectURL ¶ added in v1.16.0
func (c *Client) CreateObjectStorageObjectURL(ctx context.Context, objectID, label string, opts ObjectStorageObjectURLCreateOptions) (*ObjectStorageObjectURL, error)
func (*Client) CreatePayment ¶ added in v1.16.0
CreatePayment creates a Payment
func (*Client) CreatePostgresDatabase ¶ added in v1.16.0
func (c *Client) CreatePostgresDatabase(ctx context.Context, opts PostgresCreateOptions) (*PostgresDatabase, error)
CreatePostgresDatabase creates a new Postgres Database using the createOpts as configuration, returns the new Postgres Database
func (*Client) CreatePostgresDatabaseBackup ¶ added in v1.16.0
func (c *Client) CreatePostgresDatabaseBackup(ctx context.Context, databaseID int, opts PostgresBackupCreateOptions) error
CreatePostgresDatabaseBackup creates a snapshot for the given Postgres database
func (*Client) CreateSSHKey ¶ added in v0.5.0
CreateSSHKey creates a SSHKey
func (*Client) CreateStackscript ¶
func (c *Client) CreateStackscript(ctx context.Context, opts StackscriptCreateOptions) (*Stackscript, error)
CreateStackscript creates a StackScript
func (*Client) CreateToken ¶ added in v0.6.0
CreateToken creates a Token
func (*Client) CreateTwoFactorSecret ¶ added in v1.16.0
func (c *Client) CreateTwoFactorSecret(ctx context.Context) (*TwoFactorSecret, error)
CreateTwoFactorSecret generates a Two Factor secret for your User.
func (*Client) CreateUser ¶ added in v0.6.0
CreateUser creates a User. The email address must be confirmed before the User account can be accessed.
func (*Client) CreateVolume ¶
CreateVolume creates a Linode Volume
func (*Client) DeleteDomain ¶
DeleteDomain deletes the Domain with the specified id
func (*Client) DeleteDomainRecord ¶ added in v0.1.1
DeleteDomainRecord deletes the DomainRecord with the specified id
func (*Client) DeleteFirewall ¶ added in v1.16.0
DeleteFirewall deletes a single Firewall with the provided ID
func (*Client) DeleteFirewallDevice ¶ added in v1.16.0
DeleteFirewallDevice disassociates a Device with a given Firewall
func (*Client) DeleteIPv6Range ¶ added in v1.16.0
DeleteIPv6Range deletes an IPv6 Range.
func (*Client) DeleteImage ¶ added in v0.2.0
DeleteImage deletes the Image with the specified id
func (*Client) DeleteInstance ¶
DeleteInstance deletes a Linode instance
func (*Client) DeleteInstanceConfig ¶
DeleteInstanceConfig deletes a Linode InstanceConfig
func (*Client) DeleteInstanceDisk ¶
DeleteInstanceDisk deletes a Linode Instance Disk
func (*Client) DeleteInstanceIPAddress ¶ added in v1.16.0
func (*Client) DeleteLKECluster ¶ added in v1.16.0
DeleteLKECluster deletes the LKECluster with the specified id
func (*Client) DeleteLKENodePool ¶ added in v1.16.0
DeleteLKENodePool deletes the LKENodePool with the specified id
func (*Client) DeleteLKENodePoolNode ¶ added in v1.16.0
DeleteLKENodePoolNode deletes a given node from a node pool
func (*Client) DeleteLongviewClient ¶ added in v1.16.0
DeleteLongviewClient deletes a Longview Client
func (*Client) DeleteMongoDatabase ¶ added in v1.16.0
DeleteMongoDatabase deletes an existing Mongo Database with the given id
func (*Client) DeleteMySQLDatabase ¶ added in v1.16.0
DeleteMySQLDatabase deletes an existing MySQL Database with the given id
func (*Client) DeleteNodeBalancer ¶
DeleteNodeBalancer deletes the NodeBalancer with the specified id
func (*Client) DeleteNodeBalancerConfig ¶
func (c *Client) DeleteNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) error
DeleteNodeBalancerConfig deletes the NodeBalancerConfig with the specified id
func (*Client) DeleteNodeBalancerNode ¶
func (c *Client) DeleteNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) error
DeleteNodeBalancerNode deletes the NodeBalancerNode with the specified id
func (*Client) DeleteOAuthClient ¶ added in v1.16.0
DeleteOAuthClient deletes the OAuthClient with the specified id
func (*Client) DeleteObjectStorageBucket ¶ added in v1.16.0
DeleteObjectStorageBucket deletes the ObjectStorageBucket with the specified label
func (*Client) DeleteObjectStorageBucketCert ¶ added in v1.16.0
DeleteObjectStorageBucketCert deletes an ObjectStorageBucketCert
func (*Client) DeleteObjectStorageKey ¶ added in v1.16.0
DeleteObjectStorageKey deletes the ObjectStorageKey with the specified id
func (*Client) DeletePhoneNumber ¶ added in v1.16.0
DeletePhoneNumber deletes the verified phone number for the User making this request.
func (*Client) DeletePostgresDatabase ¶ added in v1.16.0
DeletePostgresDatabase deletes an existing Postgres Database with the given id
func (*Client) DeleteSSHKey ¶ added in v0.5.0
DeleteSSHKey deletes the SSHKey with the specified id
func (*Client) DeleteStackscript ¶
DeleteStackscript deletes the StackScript with the specified id
func (*Client) DeleteToken ¶ added in v0.6.0
DeleteToken deletes the Token with the specified id
func (*Client) DeleteUser ¶ added in v0.6.0
DeleteUser deletes the User with the specified id
func (*Client) DeleteVolume ¶
DeleteVolume deletes the Volume with the specified id
func (*Client) DetachVolume ¶
DetachVolume detaches a Linode volume
func (*Client) DisableTwoFactor ¶ added in v1.16.0
DisableTwoFactor disables Two Factor Authentication for your User.
func (*Client) EnableInstanceBackups ¶ added in v0.2.0
EnableInstanceBackups Enables backups for the specified Linode.
func (*Client) GetAccount ¶
GetAccount gets the contact and billing information related to the Account.
func (*Client) GetAccountSettings ¶ added in v1.16.0
func (c *Client) GetAccountSettings(ctx context.Context) (*AccountSettings, error)
GetAccountSettings gets the account wide flags or plans that effect new resources
func (*Client) GetDatabaseEngine ¶ added in v1.16.0
func (c *Client) GetDatabaseEngine(ctx context.Context, opts *ListOptions, engineID string) (*DatabaseEngine, error)
GetDatabaseEngine returns a specific Database Engine. This endpoint is cached by default.
func (*Client) GetDatabaseType ¶ added in v1.16.0
func (c *Client) GetDatabaseType(ctx context.Context, opts *ListOptions, typeID string) (*DatabaseType, error)
GetDatabaseType returns a specific Database Type. This endpoint is cached by default.
func (*Client) GetDomainRecord ¶
func (c *Client) GetDomainRecord(ctx context.Context, domainID int, recordID int) (*DomainRecord, error)
GetDomainRecord gets the domainrecord with the provided ID
func (*Client) GetDomainZoneFile ¶ added in v1.16.0
GetDomainZoneFile gets the zone file for the last rendered zone for the specified domain.
func (*Client) GetFirewall ¶ added in v1.16.0
GetFirewall gets a single Firewall with the provided ID
func (*Client) GetFirewallDevice ¶ added in v1.16.0
func (c *Client) GetFirewallDevice(ctx context.Context, firewallID, deviceID int) (*FirewallDevice, error)
GetFirewallDevice gets a FirewallDevice given an ID
func (*Client) GetFirewallRules ¶ added in v1.16.0
GetFirewallRules gets the FirewallRuleSet for the given Firewall.
func (*Client) GetIPAddress ¶
GetIPAddress gets the template with the provided ID
func (*Client) GetIPv6Pool ¶
GetIPv6Pool gets the template with the provided ID
func (*Client) GetIPv6Range ¶
GetIPv6Range gets details about an IPv6 range
func (*Client) GetInstance ¶
GetInstance gets the instance with the provided ID
func (*Client) GetInstanceBackups ¶
func (c *Client) GetInstanceBackups(ctx context.Context, linodeID int) (*InstanceBackupsResponse, error)
GetInstanceBackups gets the Instance's available Backups. This is not called ListInstanceBackups because a single object is returned, matching the API response.
func (*Client) GetInstanceConfig ¶
func (c *Client) GetInstanceConfig(ctx context.Context, linodeID int, configID int) (*InstanceConfig, error)
GetInstanceConfig gets the template with the provided ID
func (*Client) GetInstanceDisk ¶
func (c *Client) GetInstanceDisk(ctx context.Context, linodeID int, diskID int) (*InstanceDisk, error)
GetInstanceDisk gets the template with the provided ID
func (*Client) GetInstanceIPAddress ¶
func (c *Client) GetInstanceIPAddress(ctx context.Context, linodeID int, ipaddress string) (*InstanceIP, error)
GetInstanceIPAddress gets the IPAddress for a Linode instance matching a supplied IP address
func (*Client) GetInstanceIPAddresses ¶
func (c *Client) GetInstanceIPAddresses(ctx context.Context, linodeID int) (*InstanceIPAddressResponse, error)
GetInstanceIPAddresses gets the IPAddresses for a Linode instance
func (*Client) GetInstanceSnapshot ¶
func (c *Client) GetInstanceSnapshot(ctx context.Context, linodeID int, snapshotID int) (*InstanceSnapshot, error)
GetInstanceSnapshot gets the snapshot with the provided ID
func (*Client) GetInstanceStats ¶ added in v1.16.0
GetInstanceStats gets the template with the provided ID
func (*Client) GetInstanceStatsByDate ¶ added in v1.16.0
func (c *Client) GetInstanceStatsByDate(ctx context.Context, linodeID int, year int, month int) (*InstanceStats, error)
GetInstanceStatsByDate gets the template with the provided ID, year, and month
func (*Client) GetInstanceTransfer ¶ added in v1.16.0
GetInstanceTransfer gets the instance with the provided ID
func (*Client) GetInvoice ¶
GetInvoice gets the a single Invoice matching the provided ID
func (*Client) GetKernel ¶
GetKernel gets the kernel with the provided ID. This endpoint is cached by default.
func (*Client) GetLKECluster ¶ added in v1.16.0
GetLKECluster gets the lkeCluster with the provided ID
func (*Client) GetLKEClusterDashboard ¶ added in v1.16.0
func (c *Client) GetLKEClusterDashboard(ctx context.Context, clusterID int) (*LKEClusterDashboard, error)
GetLKEClusterDashboard gets information about the dashboard for an LKE cluster
func (*Client) GetLKEClusterKubeconfig ¶ added in v1.16.0
func (c *Client) GetLKEClusterKubeconfig(ctx context.Context, clusterID int) (*LKEClusterKubeconfig, error)
GetLKEClusterKubeconfig gets the Kubeconfig for the LKE Cluster specified
func (*Client) GetLKEClusterPool
deprecated
added in
v1.16.0
func (*Client) GetLKENodePool ¶ added in v1.16.0
GetLKENodePool gets the LKENodePool with the provided ID
func (*Client) GetLKEVersion ¶ added in v1.16.0
GetLKEVersion gets details about a specific LKE Version. This endpoint is cached by default.
func (*Client) GetLongviewClient ¶
GetLongviewClient gets the template with the provided ID
func (*Client) GetLongviewPlan ¶ added in v1.16.0
func (c *Client) GetLongviewPlan(ctx context.Context) (*LongviewPlan, error)
GetLongviewPlan gets the template with the provided ID
func (*Client) GetLongviewSubscription ¶
func (c *Client) GetLongviewSubscription(ctx context.Context, templateID string) (*LongviewSubscription, error)
GetLongviewSubscription gets the template with the provided ID
func (*Client) GetMongoDatabase ¶ added in v1.16.0
GetMongoDatabase returns a single Mongo Database matching the id
func (*Client) GetMongoDatabaseBackup ¶ added in v1.16.0
func (c *Client) GetMongoDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MongoDatabaseBackup, error)
GetMongoDatabaseBackup returns a specific Mongo Database Backup with the given ids
func (*Client) GetMongoDatabaseCredentials ¶ added in v1.16.0
func (c *Client) GetMongoDatabaseCredentials(ctx context.Context, databaseID int) (*MongoDatabaseCredential, error)
GetMongoDatabaseCredentials returns the Root Credentials for the given Mongo Database
func (*Client) GetMongoDatabaseSSL ¶ added in v1.16.0
func (c *Client) GetMongoDatabaseSSL(ctx context.Context, databaseID int) (*MongoDatabaseSSL, error)
GetMongoDatabaseSSL returns the SSL Certificate for the given Mongo Database
func (*Client) GetMySQLDatabase ¶ added in v1.16.0
GetMySQLDatabase returns a single MySQL Database matching the id
func (*Client) GetMySQLDatabaseBackup ¶ added in v1.16.0
func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*MySQLDatabaseBackup, error)
GetMySQLDatabaseBackup returns a specific MySQL Database Backup with the given ids
func (*Client) GetMySQLDatabaseCredentials ¶ added in v1.16.0
func (c *Client) GetMySQLDatabaseCredentials(ctx context.Context, databaseID int) (*MySQLDatabaseCredential, error)
GetMySQLDatabaseCredentials returns the Root Credentials for the given MySQL Database
func (*Client) GetMySQLDatabaseSSL ¶ added in v1.16.0
func (c *Client) GetMySQLDatabaseSSL(ctx context.Context, databaseID int) (*MySQLDatabaseSSL, error)
GetMySQLDatabaseSSL returns the SSL Certificate for the given MySQL Database
func (*Client) GetNodeBalancer ¶
GetNodeBalancer gets the NodeBalancer with the provided ID
func (*Client) GetNodeBalancerConfig ¶
func (c *Client) GetNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int) (*NodeBalancerConfig, error)
GetNodeBalancerConfig gets the template with the provided ID
func (*Client) GetNodeBalancerNode ¶
func (c *Client) GetNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) (*NodeBalancerNode, error)
GetNodeBalancerNode gets the template with the provided ID
func (*Client) GetNodeBalancerStats ¶ added in v1.16.0
func (c *Client) GetNodeBalancerStats(ctx context.Context, nodebalancerID int) (*NodeBalancerStats, error)
GetNodeBalancerStats gets the template with the provided ID
func (*Client) GetOAuthClient ¶ added in v1.16.0
GetOAuthClient gets the OAuthClient with the provided ID
func (*Client) GetObjectStorageBucket ¶ added in v1.16.0
func (c *Client) GetObjectStorageBucket(ctx context.Context, clusterID, label string) (*ObjectStorageBucket, error)
GetObjectStorageBucket gets the ObjectStorageBucket with the provided label
func (*Client) GetObjectStorageBucketAccess ¶ added in v1.16.0
func (c *Client) GetObjectStorageBucketAccess(ctx context.Context, clusterID, label string) (*ObjectStorageBucketAccess, error)
GetObjectStorageBucketAccess gets the current access config for a bucket
func (*Client) GetObjectStorageBucketCert ¶ added in v1.16.0
func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterID, bucket string) (*ObjectStorageBucketCert, error)
GetObjectStorageBucketCert gets an ObjectStorageBucketCert
func (*Client) GetObjectStorageCluster ¶ added in v1.16.0
func (c *Client) GetObjectStorageCluster(ctx context.Context, clusterID string) (*ObjectStorageCluster, error)
GetObjectStorageCluster gets the template with the provided ID
func (*Client) GetObjectStorageKey ¶ added in v1.16.0
GetObjectStorageKey gets the object storage key with the provided ID
func (*Client) GetObjectStorageObjectACLConfig ¶ added in v1.16.0
func (*Client) GetObjectStorageTransfer ¶ added in v1.16.0
func (c *Client) GetObjectStorageTransfer(ctx context.Context) (*ObjectStorageTransfer, error)
GetObjectStorageTransfer returns the amount of outbound data transferred used by the Account
func (*Client) GetPayment ¶ added in v1.16.0
GetPayment gets the payment with the provided ID
func (*Client) GetPollDelay ¶ added in v1.16.0
GetPollDelay gets the number of milliseconds to wait between events or status polls. Affects all WaitFor* functions and retries.
func (*Client) GetPostgresDatabase ¶ added in v1.16.0
func (c *Client) GetPostgresDatabase(ctx context.Context, databaseID int) (*PostgresDatabase, error)
GetPostgresDatabase returns a single Postgres Database matching the id
func (*Client) GetPostgresDatabaseBackup ¶ added in v1.16.0
func (c *Client) GetPostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) (*PostgresDatabaseBackup, error)
GetPostgresDatabaseBackup returns a specific Postgres Database Backup with the given ids
func (*Client) GetPostgresDatabaseCredentials ¶ added in v1.16.0
func (c *Client) GetPostgresDatabaseCredentials(ctx context.Context, databaseID int) (*PostgresDatabaseCredential, error)
GetPostgresDatabaseCredentials returns the Root Credentials for the given Postgres Database
func (*Client) GetPostgresDatabaseSSL ¶ added in v1.16.0
func (c *Client) GetPostgresDatabaseSSL(ctx context.Context, databaseID int) (*PostgresDatabaseSSL, error)
GetPostgresDatabaseSSL returns the SSL Certificate for the given Postgres Database
func (*Client) GetProfile ¶ added in v0.6.1
GetProfile returns the Profile of the authenticated user
func (*Client) GetRegion ¶
GetRegion gets the template with the provided ID. This endpoint is cached by default.
func (*Client) GetStackscript ¶
GetStackscript gets the Stackscript with the provided ID
func (*Client) GetType ¶
GetType gets the type with the provided ID. This endpoint is cached by default.
func (*Client) GetUserGrants ¶ added in v1.16.0
func (*Client) GetVLANIPAMAddress ¶ added in v1.16.0
func (c *Client) GetVLANIPAMAddress(ctx context.Context, linodeID int, vlanLabel string) (string, error)
GetVLANIPAMAddress returns the IPAM Address for a given VLAN Label as a string (10.0.0.1/24)
func (*Client) GrantsList ¶ added in v1.16.0
func (c *Client) GrantsList(ctx context.Context) (*GrantsListResponse, error)
func (*Client) InstancesAssignIPs ¶ added in v1.16.0
func (c *Client) InstancesAssignIPs(ctx context.Context, opts LinodesAssignIPsOptions) error
InstancesAssignIPs assigns multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes.
func (*Client) InvalidateCache ¶ added in v1.16.0
func (c *Client) InvalidateCache()
InvalidateCache clears all cached responses for all endpoints.
func (*Client) InvalidateCacheEndpoint ¶ added in v1.16.0
InvalidateCacheEndpoint invalidates a single cached endpoint.
func (*Client) ListDatabaseEngines ¶ added in v1.16.0
func (c *Client) ListDatabaseEngines(ctx context.Context, opts *ListOptions) ([]DatabaseEngine, error)
ListDatabaseEngines lists all Database Engines. This endpoint is cached by default.
func (*Client) ListDatabaseTypes ¶ added in v1.16.0
func (c *Client) ListDatabaseTypes(ctx context.Context, opts *ListOptions) ([]DatabaseType, error)
ListDatabaseTypes lists all Types of Database provided in Linode Managed Databases. This endpoint is cached by default.
func (*Client) ListDatabases ¶ added in v1.16.0
ListDatabases lists all Database instances in Linode Managed Databases for the account
func (*Client) ListDomainRecords ¶
func (c *Client) ListDomainRecords(ctx context.Context, domainID int, opts *ListOptions) ([]DomainRecord, error)
ListDomainRecords lists DomainRecords
func (*Client) ListDomains ¶
ListDomains lists Domains
func (*Client) ListEvents ¶
ListEvents gets a collection of Event objects representing actions taken on the Account. The Events returned depend on the token grants and the grants of the associated user.
func (*Client) ListFirewallDevices ¶ added in v1.16.0
func (c *Client) ListFirewallDevices(ctx context.Context, firewallID int, opts *ListOptions) ([]FirewallDevice, error)
ListFirewallDevices get devices associated with a given Firewall
func (*Client) ListFirewalls ¶ added in v1.16.0
ListFirewalls returns a paginated list of Cloud Firewalls
func (*Client) ListIPAddresses ¶
func (c *Client) ListIPAddresses(ctx context.Context, opts *ListOptions) ([]InstanceIP, error)
ListIPAddresses lists IPAddresses
func (*Client) ListIPv6Pools ¶
ListIPv6Pools lists IPv6Pools
func (*Client) ListIPv6Ranges ¶
ListIPv6Ranges lists IPv6Ranges
func (*Client) ListImages ¶
ListImages lists Images
func (*Client) ListInstanceConfigs ¶
func (c *Client) ListInstanceConfigs(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceConfig, error)
ListInstanceConfigs lists InstanceConfigs
func (*Client) ListInstanceDisks ¶
func (c *Client) ListInstanceDisks(ctx context.Context, linodeID int, opts *ListOptions) ([]InstanceDisk, error)
ListInstanceDisks lists InstanceDisks
func (*Client) ListInstanceVolumes ¶
func (c *Client) ListInstanceVolumes(ctx context.Context, linodeID int, opts *ListOptions) ([]Volume, error)
ListInstanceVolumes lists InstanceVolumes
func (*Client) ListInstances ¶
ListInstances lists linode instances
func (*Client) ListInvoiceItems ¶
func (c *Client) ListInvoiceItems(ctx context.Context, invoiceID int, opts *ListOptions) ([]InvoiceItem, error)
ListInvoiceItems gets the invoice items associated with a specific Invoice
func (*Client) ListInvoices ¶
ListInvoices gets a paginated list of Invoices against the Account
func (*Client) ListKernels ¶
func (c *Client) ListKernels(ctx context.Context, opts *ListOptions) ([]LinodeKernel, error)
ListKernels lists linode kernels. This endpoint is cached by default.
func (*Client) ListLKEClusterAPIEndpoints ¶ added in v1.16.0
func (c *Client) ListLKEClusterAPIEndpoints(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterAPIEndpoint, error)
ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified
func (*Client) ListLKEClusterPools
deprecated
added in
v1.16.0
func (c *Client) ListLKEClusterPools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterPool, error)
Deprecated: ListLKEClusterPools lists LKEClusterPools
func (*Client) ListLKEClusters ¶ added in v1.16.0
func (c *Client) ListLKEClusters(ctx context.Context, opts *ListOptions) ([]LKECluster, error)
ListLKEClusters lists LKEClusters
func (*Client) ListLKENodePools ¶ added in v1.16.0
func (c *Client) ListLKENodePools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKENodePool, error)
ListLKENodePools lists LKENodePools
func (*Client) ListLKEVersions ¶ added in v1.16.0
func (c *Client) ListLKEVersions(ctx context.Context, opts *ListOptions) ([]LKEVersion, error)
ListLKEVersions lists the Kubernetes versions available through LKE. This endpoint is cached by default.
func (*Client) ListLogins ¶ added in v1.16.0
func (*Client) ListLongviewClients ¶
func (c *Client) ListLongviewClients(ctx context.Context, opts *ListOptions) ([]LongviewClient, error)
ListLongviewClients lists LongviewClients
func (*Client) ListLongviewSubscriptions ¶
func (c *Client) ListLongviewSubscriptions(ctx context.Context, opts *ListOptions) ([]LongviewSubscription, error)
ListLongviewSubscriptions lists LongviewSubscriptions
func (*Client) ListMongoDatabaseBackups ¶ added in v1.16.0
func (c *Client) ListMongoDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MongoDatabaseBackup, error)
ListMongoDatabaseBackups lists all Mongo Database Backups associated with the given Mongo Database
func (*Client) ListMongoDatabases ¶ added in v1.16.0
func (c *Client) ListMongoDatabases(ctx context.Context, opts *ListOptions) ([]MongoDatabase, error)
ListMongoDatabases lists all Mongo Databases associated with the account
func (*Client) ListMySQLDatabaseBackups ¶ added in v1.16.0
func (c *Client) ListMySQLDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]MySQLDatabaseBackup, error)
ListMySQLDatabaseBackups lists all MySQL Database Backups associated with the given MySQL Database
func (*Client) ListMySQLDatabases ¶ added in v1.16.0
func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]MySQLDatabase, error)
ListMySQLDatabases lists all MySQL Databases associated with the account
func (*Client) ListNodeBalancerConfigs ¶
func (c *Client) ListNodeBalancerConfigs(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]NodeBalancerConfig, error)
ListNodeBalancerConfigs lists NodeBalancerConfigs
func (*Client) ListNodeBalancerNodes ¶
func (c *Client) ListNodeBalancerNodes(ctx context.Context, nodebalancerID int, configID int, opts *ListOptions) ([]NodeBalancerNode, error)
ListNodeBalancerNodes lists NodeBalancerNodes
func (*Client) ListNodeBalancers ¶
func (c *Client) ListNodeBalancers(ctx context.Context, opts *ListOptions) ([]NodeBalancer, error)
ListNodeBalancers lists NodeBalancers
func (*Client) ListNotifications ¶
func (c *Client) ListNotifications(ctx context.Context, opts *ListOptions) ([]Notification, error)
ListNotifications gets a collection of Notification objects representing important, often time-sensitive items related to the Account. An account cannot interact directly with Notifications, and a Notification will disappear when the circumstances causing it have been resolved. For example, if the account has an important Ticket open, a response to the Ticket will dismiss the Notification.
func (*Client) ListOAuthClients ¶ added in v1.16.0
func (c *Client) ListOAuthClients(ctx context.Context, opts *ListOptions) ([]OAuthClient, error)
ListOAuthClients lists OAuthClients
func (*Client) ListObjectStorageBuckets ¶ added in v1.16.0
func (c *Client) ListObjectStorageBuckets(ctx context.Context, opts *ListOptions) ([]ObjectStorageBucket, error)
ListObjectStorageBuckets lists ObjectStorageBuckets
func (*Client) ListObjectStorageClusters ¶ added in v1.16.0
func (c *Client) ListObjectStorageClusters(ctx context.Context, opts *ListOptions) ([]ObjectStorageCluster, error)
ListObjectStorageClusters lists ObjectStorageClusters
func (*Client) ListObjectStorageKeys ¶ added in v1.16.0
func (c *Client) ListObjectStorageKeys(ctx context.Context, opts *ListOptions) ([]ObjectStorageKey, error)
ListObjectStorageKeys lists ObjectStorageKeys
func (*Client) ListPayments ¶ added in v1.16.0
ListPayments lists Payments
func (*Client) ListPostgresDatabaseBackups ¶ added in v1.16.0
func (c *Client) ListPostgresDatabaseBackups(ctx context.Context, databaseID int, opts *ListOptions) ([]PostgresDatabaseBackup, error)
ListPostgresDatabaseBackups lists all Postgres Database Backups associated with the given Postgres Database
func (*Client) ListPostgresDatabases ¶ added in v1.16.0
func (c *Client) ListPostgresDatabases(ctx context.Context, opts *ListOptions) ([]PostgresDatabase, error)
ListPostgresDatabases lists all Postgres Databases associated with the account
func (*Client) ListRegions ¶
ListRegions lists Regions. This endpoint is cached by default.
func (*Client) ListSSHKeys ¶ added in v0.5.0
ListSSHKeys lists SSHKeys
func (*Client) ListStackscripts ¶
func (c *Client) ListStackscripts(ctx context.Context, opts *ListOptions) ([]Stackscript, error)
ListStackscripts lists Stackscripts
func (*Client) ListTaggedObjects ¶ added in v0.6.0
func (c *Client) ListTaggedObjects(ctx context.Context, label string, opts *ListOptions) (TaggedObjectList, error)
ListTaggedObjects lists Tagged Objects
func (*Client) ListTickets ¶
ListTickets returns a collection of Support Tickets on the Account. Support Tickets can be both tickets opened with Linode for support, as well as tickets generated by Linode regarding the Account. This collection includes all Support Tickets generated on the Account, with open tickets returned first.
func (*Client) ListTokens ¶ added in v0.6.0
ListTokens lists Tokens
func (*Client) ListTypes ¶
func (c *Client) ListTypes(ctx context.Context, opts *ListOptions) ([]LinodeType, error)
ListTypes lists linode types. This endpoint is cached by default.
func (*Client) ListVolumes ¶
ListVolumes lists Volumes
func (*Client) LoadConfig ¶ added in v1.16.0
func (c *Client) LoadConfig(options *LoadConfigOptions) error
LoadConfig loads a Linode config according to the options argument. If no options are specified, the following defaults will be used: Path: ~/.config/linode Profile: default
func (*Client) MarkEventRead ¶
MarkEventRead marks a single Event as read.
func (*Client) MarkEventsSeen ¶
MarkEventsSeen marks all Events up to and including this Event by ID as seen.
func (*Client) MigrateInstance ¶ added in v0.4.0
MigrateInstance - Migrate an instance
func (*Client) MutateInstance ¶
MutateInstance Upgrades a Linode to its next generation.
func (Client) NewEventPoller ¶ added in v1.16.0
func (client Client) NewEventPoller( ctx context.Context, id any, entityType EntityType, action EventAction, ) (*EventPoller, error)
NewEventPoller initializes a new Linode event poller. This should be run before the event is triggered as it stores the previous state of the entity's events.
func (Client) NewEventPollerWithoutEntity ¶ added in v1.16.0
func (client Client) NewEventPollerWithoutEntity(entityType EntityType, action EventAction) (*EventPoller, error)
NewEventPollerWithoutEntity initializes a new Linode event poller without a target entity ID. This is useful for create events where the ID of the entity is not yet known. For example: p, _ := client.NewEventPollerWithoutEntity(...) inst, _ := client.CreateInstance(...) p.EntityID = inst.ID ...
func (*Client) OnBeforeRequest ¶ added in v1.16.0
OnBeforeRequest adds a handler to the request body to run before the request is sent
func (*Client) PasswordResetInstanceDisk ¶ added in v0.6.0
func (c *Client) PasswordResetInstanceDisk(ctx context.Context, linodeID int, diskID int, password string) error
PasswordResetInstanceDisk resets the "root" account password on the Instance disk
func (*Client) PatchMongoDatabase ¶ added in v1.16.0
PatchMongoDatabase applies security patches and updates to the underlying operating system of the Managed Mongo Database
func (*Client) PatchMySQLDatabase ¶ added in v1.16.0
PatchMySQLDatabase applies security patches and updates to the underlying operating system of the Managed MySQL Database
func (*Client) PatchPostgresDatabase ¶ added in v1.16.0
PatchPostgresDatabase applies security patches and updates to the underlying operating system of the Managed Postgres Database
func (*Client) RebootInstance ¶
RebootInstance reboots a Linode instance A configID of 0 will cause Linode to choose the last/best config
func (*Client) RebuildInstance ¶
func (c *Client) RebuildInstance(ctx context.Context, linodeID int, opts InstanceRebuildOptions) (*Instance, error)
RebuildInstance Deletes all Disks and Configs on this Linode, then deploys a new Image to this Linode with the given attributes.
func (*Client) RebuildNodeBalancerConfig ¶ added in v0.5.0
func (c *Client) RebuildNodeBalancerConfig(ctx context.Context, nodeBalancerID int, configID int, opts NodeBalancerConfigRebuildOptions) (*NodeBalancerConfig, error)
RebuildNodeBalancerConfig updates the NodeBalancer with the specified id
func (*Client) RecycleLKEClusterNodes ¶ added in v1.16.0
RecycleLKEClusterNodes recycles all nodes in all pools of the specified LKE Cluster.
func (*Client) RenameInstance ¶
RenameInstance renames an Instance
func (*Client) RenameInstanceConfig ¶
func (c *Client) RenameInstanceConfig(ctx context.Context, linodeID int, configID int, label string) (*InstanceConfig, error)
RenameInstanceConfig renames an InstanceConfig
func (*Client) RenameInstanceDisk ¶
func (c *Client) RenameInstanceDisk(ctx context.Context, linodeID int, diskID int, label string) (*InstanceDisk, error)
RenameInstanceDisk renames an InstanceDisk
func (*Client) RescueInstance ¶ added in v0.2.0
func (c *Client) RescueInstance(ctx context.Context, linodeID int, opts InstanceRescueOptions) error
RescueInstance reboots an instance into a safe environment for performing many system recovery and disk management tasks. Rescue Mode is based on the Finnix recovery distribution, a self-contained and bootable Linux distribution. You can also use Rescue Mode for tasks other than disaster recovery, such as formatting disks to use different filesystems, copying data between disks, and downloading files from a disk via SSH and SFTP.
func (*Client) ResetMongoDatabaseCredentials ¶ added in v1.16.0
ResetMongoDatabaseCredentials returns the Root Credentials for the given Mongo Database (may take a few seconds to work)
func (*Client) ResetMySQLDatabaseCredentials ¶ added in v1.16.0
ResetMySQLDatabaseCredentials returns the Root Credentials for the given MySQL Database (may take a few seconds to work)
func (*Client) ResetPostgresDatabaseCredentials ¶ added in v1.16.0
ResetPostgresDatabaseCredentials returns the Root Credentials for the given Postgres Database (may take a few seconds to work)
func (*Client) ResizeInstance ¶
func (c *Client) ResizeInstance(ctx context.Context, linodeID int, opts InstanceResizeOptions) error
ResizeInstance resizes an instance to new Linode type
func (*Client) ResizeInstanceDisk ¶
ResizeInstanceDisk resizes the size of the Instance disk
func (*Client) ResizeVolume ¶
ResizeVolume resizes an instance to new Linode type
func (*Client) RestoreInstanceBackup ¶ added in v0.2.0
func (c *Client) RestoreInstanceBackup(ctx context.Context, linodeID int, backupID int, opts RestoreInstanceOptions) error
RestoreInstanceBackup Restores a Linode's Backup to the specified Linode.
func (*Client) RestoreMongoDatabaseBackup ¶ added in v1.16.0
func (c *Client) RestoreMongoDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
RestoreMongoDatabaseBackup returns the given Mongo Database with the given Backup
func (*Client) RestoreMySQLDatabaseBackup ¶ added in v1.16.0
func (c *Client) RestoreMySQLDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
RestoreMySQLDatabaseBackup returns the given MySQL Database with the given Backup
func (*Client) RestorePostgresDatabaseBackup ¶ added in v1.16.0
func (c *Client) RestorePostgresDatabaseBackup(ctx context.Context, databaseID int, backupID int) error
RestorePostgresDatabaseBackup returns the given Postgres Database with the given Backup
func (*Client) SecurityQuestionsAnswer ¶ added in v1.16.0
func (c *Client) SecurityQuestionsAnswer(ctx context.Context, opts SecurityQuestionsAnswerOptions) error
SecurityQuestionsAnswer adds security question responses for your User.
func (*Client) SecurityQuestionsList ¶ added in v1.16.0
func (c *Client) SecurityQuestionsList(ctx context.Context) (*SecurityQuestionsListResponse, error)
SecurityQuestionsList returns a collection of security questions and their responses, if any, for your User Profile.
func (*Client) SendPhoneNumberVerificationCode ¶ added in v1.16.0
func (c *Client) SendPhoneNumberVerificationCode(ctx context.Context, opts SendPhoneNumberVerificationCodeOptions) error
SendPhoneNumberVerificationCode sends a one-time verification code via SMS message to the submitted phone number.
func (*Client) SetAPIVersion ¶ added in v1.16.0
SetAPIVersion sets the version of the API to interface with
func (*Client) SetBaseURL ¶ added in v0.1.0
SetBaseURL sets the base URL of the Linode v4 API (https://api.linode.com/v4)
func (*Client) SetGlobalCacheExpiration ¶ added in v1.16.0
SetGlobalCacheExpiration sets the desired time for any cached response to be valid for.
func (*Client) SetPollDelay ¶ added in v0.6.0
SetPollDelay sets the number of milliseconds to wait between events or status polls. Affects all WaitFor* functions and retries.
func (*Client) SetRetries ¶ added in v1.16.0
SetRetries adds retry conditions for "Linode Busy." errors and 429s.
func (*Client) SetRetryAfter ¶ added in v1.16.0
func (c *Client) SetRetryAfter(callback RetryAfter) *Client
SetRetryAfter sets the callback function to be invoked with a failed request to determine wben it should be retried.
func (*Client) SetRetryCount ¶ added in v1.16.0
SetRetryCount sets the maximum retry attempts before aborting.
func (*Client) SetRetryMaxWaitTime ¶ added in v1.16.0
SetRetryMaxWaitTime sets the maximum delay before retrying a request.
func (*Client) SetRetryWaitTime ¶ added in v1.16.0
SetRetryWaitTime sets the default (minimum) delay before retrying a request.
func (*Client) SetRootCertificate ¶ added in v1.16.0
SetRootCertificate adds a root certificate to the underlying TLS client config
func (*Client) SetToken ¶ added in v1.16.0
SetToken sets the API token for all requests from this client Only necessary if you haven't already provided an http client to NewClient() configured with the token.
func (*Client) SetUserAgent ¶
SetUserAgent sets a custom user-agent for HTTP requests
func (*Client) ShareIPAddresses ¶ added in v1.16.0
func (c *Client) ShareIPAddresses(ctx context.Context, opts IPAddressesShareOptions) error
ShareIPAddresses allows IP address reassignment (also referred to as IP failover) from one Linode to another if the primary Linode becomes unresponsive.
func (*Client) ShutdownInstance ¶
ShutdownInstance - Shutdown an instance
func (*Client) UpdateAccountSettings ¶ added in v1.16.0
func (c *Client) UpdateAccountSettings(ctx context.Context, opts AccountSettingsUpdateOptions) (*AccountSettings, error)
UpdateAccountSettings updates the settings associated with the account
func (*Client) UpdateDomain ¶
func (c *Client) UpdateDomain(ctx context.Context, domainID int, opts DomainUpdateOptions) (*Domain, error)
UpdateDomain updates the Domain with the specified id
func (*Client) UpdateDomainRecord ¶ added in v0.1.1
func (c *Client) UpdateDomainRecord(ctx context.Context, domainID int, recordID int, opts DomainRecordUpdateOptions) (*DomainRecord, error)
UpdateDomainRecord updates the DomainRecord with the specified id
func (*Client) UpdateFirewall ¶ added in v1.16.0
func (c *Client) UpdateFirewall(ctx context.Context, firewallID int, opts FirewallUpdateOptions) (*Firewall, error)
UpdateFirewall updates a Firewall with the given ID
func (*Client) UpdateFirewallRules ¶ added in v1.16.0
func (c *Client) UpdateFirewallRules(ctx context.Context, firewallID int, rules FirewallRuleSet) (*FirewallRuleSet, error)
UpdateFirewallRules updates the FirewallRuleSet for the given Firewall
func (*Client) UpdateIPAddress ¶ added in v0.7.0
func (c *Client) UpdateIPAddress(ctx context.Context, id string, opts IPAddressUpdateOptions) (*InstanceIP, error)
UpdateIPAddress updates the IPAddress with the specified id
func (*Client) UpdateImage ¶ added in v0.2.0
func (c *Client) UpdateImage(ctx context.Context, imageID string, opts ImageUpdateOptions) (*Image, error)
UpdateImage updates the Image with the specified id
func (*Client) UpdateInstance ¶
func (c *Client) UpdateInstance(ctx context.Context, linodeID int, opts InstanceUpdateOptions) (*Instance, error)
UpdateInstance creates a Linode instance
func (*Client) UpdateInstanceConfig ¶
func (c *Client) UpdateInstanceConfig(ctx context.Context, linodeID int, configID int, opts InstanceConfigUpdateOptions) (*InstanceConfig, error)
UpdateInstanceConfig update an InstanceConfig for the given Instance
func (*Client) UpdateInstanceDisk ¶
func (c *Client) UpdateInstanceDisk(ctx context.Context, linodeID int, diskID int, opts InstanceDiskUpdateOptions) (*InstanceDisk, error)
UpdateInstanceDisk creates a new InstanceDisk for the given Instance
func (*Client) UpdateInstanceIPAddress ¶ added in v1.16.0
func (c *Client) UpdateInstanceIPAddress(ctx context.Context, linodeID int, ipAddress string, opts IPAddressUpdateOptions) (*InstanceIP, error)
UpdateInstanceIPAddress updates the IPAddress with the specified instance id and IP address
func (*Client) UpdateLKECluster ¶ added in v1.16.0
func (c *Client) UpdateLKECluster(ctx context.Context, clusterID int, opts LKEClusterUpdateOptions) (*LKECluster, error)
UpdateLKECluster updates the LKECluster with the specified id
func (*Client) UpdateLKEClusterPool
deprecated
added in
v1.16.0
func (c *Client) UpdateLKEClusterPool(ctx context.Context, clusterID, id int, updateOpts LKEClusterPoolUpdateOptions) (*LKEClusterPool, error)
Deprecated: UpdateLKEClusterPool updates the LKEClusterPool with the specified id
func (*Client) UpdateLKENodePool ¶ added in v1.16.0
func (c *Client) UpdateLKENodePool(ctx context.Context, clusterID, poolID int, opts LKENodePoolUpdateOptions) (*LKENodePool, error)
UpdateLKENodePool updates the LKENodePool with the specified id
func (*Client) UpdateLongviewClient ¶ added in v1.16.0
func (c *Client) UpdateLongviewClient(ctx context.Context, clientID int, opts LongviewClientUpdateOptions) (*LongviewClient, error)
UpdateLongviewClient updates a Longview Client
func (*Client) UpdateLongviewPlan ¶ added in v1.16.0
func (c *Client) UpdateLongviewPlan(ctx context.Context, opts LongviewPlanUpdateOptions) (*LongviewPlan, error)
UpdateLongviewPlan updates a Longview Plan
func (*Client) UpdateMongoDatabase ¶ added in v1.16.0
func (c *Client) UpdateMongoDatabase(ctx context.Context, databaseID int, opts MongoUpdateOptions) (*MongoDatabase, error)
UpdateMongoDatabase updates the given Mongo Database with the provided opts, returns the MongoDatabase with the new settings
func (*Client) UpdateMySQLDatabase ¶ added in v1.16.0
func (c *Client) UpdateMySQLDatabase(ctx context.Context, databaseID int, opts MySQLUpdateOptions) (*MySQLDatabase, error)
UpdateMySQLDatabase updates the given MySQL Database with the provided opts, returns the MySQLDatabase with the new settings
func (*Client) UpdateNodeBalancer ¶
func (c *Client) UpdateNodeBalancer(ctx context.Context, nodebalancerID int, opts NodeBalancerUpdateOptions) (*NodeBalancer, error)
UpdateNodeBalancer updates the NodeBalancer with the specified id
func (*Client) UpdateNodeBalancerConfig ¶
func (c *Client) UpdateNodeBalancerConfig(ctx context.Context, nodebalancerID int, configID int, opts NodeBalancerConfigUpdateOptions) (*NodeBalancerConfig, error)
UpdateNodeBalancerConfig updates the NodeBalancerConfig with the specified id
func (*Client) UpdateNodeBalancerNode ¶
func (c *Client) UpdateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int, opts NodeBalancerNodeUpdateOptions) (*NodeBalancerNode, error)
UpdateNodeBalancerNode updates the NodeBalancerNode with the specified id
func (*Client) UpdateOAuthClient ¶ added in v1.16.0
func (c *Client) UpdateOAuthClient(ctx context.Context, clientID string, opts OAuthClientUpdateOptions) (*OAuthClient, error)
UpdateOAuthClient updates the OAuthClient with the specified id
func (*Client) UpdateObjectStorageBucketAccess ¶ added in v1.16.0
func (c *Client) UpdateObjectStorageBucketAccess(ctx context.Context, clusterID, label string, opts ObjectStorageBucketUpdateAccessOptions) error
UpdateObjectStorageBucketAccess updates the access configuration for an ObjectStorageBucket
func (*Client) UpdateObjectStorageKey ¶ added in v1.16.0
func (c *Client) UpdateObjectStorageKey(ctx context.Context, keyID int, opts ObjectStorageKeyUpdateOptions) (*ObjectStorageKey, error)
UpdateObjectStorageKey updates the object storage key with the specified id
func (*Client) UpdateObjectStorageObjectACLConfig ¶ added in v1.16.0
func (c *Client) UpdateObjectStorageObjectACLConfig(ctx context.Context, objectID, label string, opts ObjectStorageObjectACLConfigUpdateOptions) (*ObjectStorageObjectACLConfig, error)
func (*Client) UpdatePostgresDatabase ¶ added in v1.16.0
func (c *Client) UpdatePostgresDatabase(ctx context.Context, databaseID int, opts PostgresUpdateOptions) (*PostgresDatabase, error)
UpdatePostgresDatabase updates the given Postgres Database with the provided opts, returns the PostgresDatabase with the new settings
func (*Client) UpdateProfile ¶ added in v0.6.1
UpdateProfile updates the Profile with the specified id
func (*Client) UpdateSSHKey ¶ added in v0.5.0
func (c *Client) UpdateSSHKey(ctx context.Context, keyID int, opts SSHKeyUpdateOptions) (*SSHKey, error)
UpdateSSHKey updates the SSHKey with the specified id
func (*Client) UpdateStackscript ¶
func (c *Client) UpdateStackscript(ctx context.Context, scriptID int, opts StackscriptUpdateOptions) (*Stackscript, error)
UpdateStackscript updates the StackScript with the specified id
func (*Client) UpdateToken ¶ added in v0.6.0
func (c *Client) UpdateToken(ctx context.Context, tokenID int, opts TokenUpdateOptions) (*Token, error)
UpdateToken updates the Token with the specified id
func (*Client) UpdateUser ¶ added in v0.6.0
func (c *Client) UpdateUser(ctx context.Context, userID string, opts UserUpdateOptions) (*User, error)
UpdateUser updates the User with the specified id
func (*Client) UpdateUserGrants ¶ added in v1.16.0
func (c *Client) UpdateUserGrants(ctx context.Context, username string, opts UserGrantsUpdateOptions) (*UserGrants, error)
func (*Client) UpdateVolume ¶ added in v0.7.0
func (c *Client) UpdateVolume(ctx context.Context, volumeID int, opts VolumeUpdateOptions) (*Volume, error)
UpdateVolume updates the Volume with the specified id
func (*Client) UploadImage ¶ added in v1.16.0
UploadImage creates and uploads an image
func (*Client) UploadImageToURL ¶ added in v1.16.0
UploadImageToURL uploads the given image to the given upload URL
func (*Client) UploadObjectStorageBucketCert ¶ added in v1.16.0
func (c *Client) UploadObjectStorageBucketCert(ctx context.Context, clusterID, bucket string, opts ObjectStorageBucketCertUploadOptions) (*ObjectStorageBucketCert, error)
UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
func (*Client) UseProfile ¶ added in v1.16.0
UseProfile switches client to use the specified profile. The specified profile must be already be loaded using client.LoadConfig(...)
func (*Client) VerifyPhoneNumber ¶ added in v1.16.0
func (c *Client) VerifyPhoneNumber(ctx context.Context, opts VerifyPhoneNumberOptions) error
VerifyPhoneNumber verifies a phone number by confirming the one-time code received via SMS message after accessing the Phone Verification Code Send command.
func (Client) WaitForDatabaseStatus ¶ added in v1.16.0
func (client Client) WaitForDatabaseStatus( ctx context.Context, dbID int, dbEngine DatabaseEngineType, status DatabaseStatus, timeoutSeconds int, ) error
WaitForDatabaseStatus waits for the provided database to have the given status.
func (Client) WaitForEventFinished ¶
func (client Client) WaitForEventFinished(ctx context.Context, id any, entityType EntityType, action EventAction, minStart time.Time, timeoutSeconds int) (*Event, error)
WaitForEventFinished waits for an entity action to reach the 'finished' state before returning. It will timeout with an error after timeoutSeconds. If the event indicates a failure both the failed event and the error will be returned. nolint
func (Client) WaitForImageStatus ¶ added in v1.16.0
func (client Client) WaitForImageStatus(ctx context.Context, imageID string, status ImageStatus, timeoutSeconds int) (*Image, error)
WaitForImageStatus waits for the Image to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
func (Client) WaitForInstanceDiskStatus ¶ added in v0.6.0
func (client Client) WaitForInstanceDiskStatus(ctx context.Context, instanceID int, diskID int, status DiskStatus, timeoutSeconds int) (*InstanceDisk, error)
WaitForInstanceDiskStatus waits for the Linode instance disk to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
func (Client) WaitForInstanceStatus ¶ added in v0.2.0
func (client Client) WaitForInstanceStatus(ctx context.Context, instanceID int, status InstanceStatus, timeoutSeconds int) (*Instance, error)
WaitForInstanceStatus waits for the Linode instance to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
func (Client) WaitForLKEClusterConditions ¶ added in v1.16.0
func (client Client) WaitForLKEClusterConditions( ctx context.Context, clusterID int, options LKEClusterPollOptions, conditions ...ClusterConditionFunc, ) error
WaitForLKEClusterConditions waits for the given LKE conditions to be true
func (Client) WaitForLKEClusterStatus ¶ added in v1.16.0
func (client Client) WaitForLKEClusterStatus(ctx context.Context, clusterID int, status LKEClusterStatus, timeoutSeconds int) (*LKECluster, error)
WaitForLKEClusterStatus waits for the LKECluster to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
func (Client) WaitForMongoDatabaseBackup ¶ added in v1.16.0
func (client Client) WaitForMongoDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*MongoDatabaseBackup, error)
WaitForMongoDatabaseBackup waits for the backup with the given label to be available.
func (Client) WaitForMySQLDatabaseBackup ¶ added in v1.16.0
func (client Client) WaitForMySQLDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*MySQLDatabaseBackup, error)
WaitForMySQLDatabaseBackup waits for the backup with the given label to be available.
func (Client) WaitForPostgresDatabaseBackup ¶ added in v1.16.0
func (client Client) WaitForPostgresDatabaseBackup(ctx context.Context, dbID int, label string, timeoutSeconds int) (*PostgresDatabaseBackup, error)
WaitForPostgresDatabaseBackup waits for the backup with the given label to be available.
func (Client) WaitForSnapshotStatus ¶ added in v0.2.0
func (client Client) WaitForSnapshotStatus(ctx context.Context, instanceID int, snapshotID int, status InstanceSnapshotStatus, timeoutSeconds int) (*InstanceSnapshot, error)
WaitForSnapshotStatus waits for the Snapshot to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
func (Client) WaitForVolumeLinodeID ¶ added in v0.2.0
func (client Client) WaitForVolumeLinodeID(ctx context.Context, volumeID int, linodeID *int, timeoutSeconds int) (*Volume, error)
WaitForVolumeLinodeID waits for the Volume to match the desired LinodeID before returning. An active Instance will not immediately attach or detach a volume, so the LinodeID must be polled to determine volume readiness from the API. WaitForVolumeLinodeID will timeout with an error after timeoutSeconds.
func (Client) WaitForVolumeStatus ¶ added in v0.2.0
func (client Client) WaitForVolumeStatus(ctx context.Context, volumeID int, status VolumeStatus, timeoutSeconds int) (*Volume, error)
WaitForVolumeStatus waits for the Volume to reach the desired state before returning. It will timeout with an error after timeoutSeconds.
type ClusterConditionFunc ¶ added in v1.16.0
type ClusterConditionFunc func(context.Context, ClusterConditionOptions) (bool, error)
ClusterConditionFunc represents a function that tests a condition against an LKE cluster, returns true if the condition has been reached, false if it has not yet been reached.
type ClusterConditionOptions ¶ added in v1.16.0
type ClusterConditionOptions struct { LKEClusterKubeconfig *LKEClusterKubeconfig TransportWrapper func(http.RoundTripper) http.RoundTripper }
type ClusterPrice ¶ added in v1.16.0
ClusterPrice for Hourly and Monthly price models
type Comp ¶ added in v1.16.0
type Comp struct { Column string Operator FilterOperator Value any }
func (*Comp) JSONValueSegment ¶ added in v1.16.0
type ConfigAlgorithm ¶
type ConfigAlgorithm string
ConfigAlgorithm constants start with Algorithm and include Linode API NodeBalancer Config Algorithms
const ( AlgorithmRoundRobin ConfigAlgorithm = "roundrobin" AlgorithmLeastConn ConfigAlgorithm = "leastconn" AlgorithmSource ConfigAlgorithm = "source" )
ConfigAlgorithm constants reflect the NodeBalancer Config Algorithm
type ConfigCheck ¶
type ConfigCheck string
ConfigCheck constants start with Check and include Linode API NodeBalancer Config Check methods
const ( CheckNone ConfigCheck = "none" CheckConnection ConfigCheck = "connection" CheckHTTP ConfigCheck = "http" CheckHTTPBody ConfigCheck = "http_body" )
ConfigCheck constants reflect the node health status checking method for a NodeBalancer Config
type ConfigCipher ¶
type ConfigCipher string
ConfigCipher constants start with Cipher and include Linode API NodeBalancer Config Cipher values
const ( CipherRecommended ConfigCipher = "recommended" CipherLegacy ConfigCipher = "legacy" )
ConfigCipher constants reflect the preferred cipher set for a NodeBalancer Config
type ConfigInterfacePurpose ¶ added in v1.16.0
type ConfigInterfacePurpose string
ConfigInterfacePurpose options start with InterfacePurpose and include all known interface purpose types
const ( InterfacePurposePublic ConfigInterfacePurpose = "public" InterfacePurposeVLAN ConfigInterfacePurpose = "vlan" )
type ConfigProfile ¶ added in v1.16.0
type ConfigProtocol ¶
type ConfigProtocol string
ConfigProtocol constants start with Protocol and include Linode API Nodebalancer Config protocols
const ( ProtocolHTTP ConfigProtocol = "http" ProtocolHTTPS ConfigProtocol = "https" ProtocolTCP ConfigProtocol = "tcp" )
ConfigProtocol constants reflect the protocol used by a NodeBalancer Config
type ConfigProxyProtocol ¶ added in v1.16.0
type ConfigProxyProtocol string
ConfigProxyProtocol constants start with ProxyProtocol and include Linode API NodeBalancer Config proxy protocol versions
const ( ProxyProtocolNone ConfigProxyProtocol = "none" ProxyProtocolV1 ConfigProxyProtocol = "v1" ProxyProtocolV2 ConfigProxyProtocol = "v2" )
ConfigProxyProtocol constatns reflect the proxy protocol version used by a NodeBalancer Config
type ConfigStickiness ¶
type ConfigStickiness string
ConfigStickiness constants start with Stickiness and include Linode API NodeBalancer Config Stickiness
const ( StickinessNone ConfigStickiness = "none" StickinessTable ConfigStickiness = "table" StickinessHTTPCookie ConfigStickiness = "http_cookie" )
ConfigStickiness constants reflect the node stickiness method for a NodeBalancer Config
type ConfirmTwoFactorOptions ¶ added in v1.16.0
type ConfirmTwoFactorOptions struct {
TFACode string `json:"tfa_code"`
}
ConfirmTwoFactorOptions contains fields used by ConfirmTwoFactor
type ConfirmTwoFactorResponse ¶ added in v1.16.0
type ConfirmTwoFactorResponse struct {
Scratch string `json:"scratch"`
}
ConfirmTwoFactorResponse contains fields returned by ConfirmTwoFactor
type CreditCard ¶
CreditCard information associated with the Account.
type Database ¶ added in v1.16.0
type Database struct { ID int `json:"id"` Status DatabaseStatus `json:"status"` Label string `json:"label"` Hosts DatabaseHost `json:"hosts"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` Version string `json:"version"` ClusterSize int `json:"cluster_size"` ReplicationType string `json:"replication_type"` SSLConnection bool `json:"ssl_connection"` Encrypted bool `json:"encrypted"` AllowList []string `json:"allow_list"` InstanceURI string `json:"instance_uri"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
A Database is a instance of Linode Managed Databases
func (*Database) UnmarshalJSON ¶ added in v1.16.0
type DatabaseDayOfWeek ¶ added in v1.16.0
type DatabaseDayOfWeek int
const ( DatabaseMaintenanceDaySunday DatabaseDayOfWeek = iota + 1 DatabaseMaintenanceDayMonday DatabaseMaintenanceDayTuesday DatabaseMaintenanceDayWednesday DatabaseMaintenanceDayThursday DatabaseMaintenanceDayFriday DatabaseMaintenanceDaySaturday )
type DatabaseEngine ¶ added in v1.16.0
type DatabaseEngine struct { ID string `json:"id"` Engine string `json:"engine"` Version string `json:"version"` }
DatabaseEngine is information about Engines supported by Linode Managed Databases
type DatabaseEngineType ¶ added in v1.16.0
type DatabaseEngineType string
const ( DatabaseEngineTypeMySQL DatabaseEngineType = "mysql" DatabaseEngineTypeMongo DatabaseEngineType = "mongodb" DatabaseEngineTypePostgres DatabaseEngineType = "postgresql" )
type DatabaseEnginesPagedResponse ¶ added in v1.16.0
type DatabaseEnginesPagedResponse struct { *PageOptions Data []DatabaseEngine `json:"data"` }
type DatabaseHost ¶ added in v1.16.0
type DatabaseHost struct { Primary string `json:"primary"` Secondary string `json:"secondary,omitempty"` }
DatabaseHost for Primary/Secondary of Database
type DatabaseMaintenanceFrequency ¶ added in v1.16.0
type DatabaseMaintenanceFrequency string
const ( DatabaseMaintenanceFrequencyWeekly DatabaseMaintenanceFrequency = "weekly" DatabaseMaintenanceFrequencyMonthly DatabaseMaintenanceFrequency = "monthly" )
type DatabaseMaintenanceWindow ¶ added in v1.16.0
type DatabaseMaintenanceWindow struct { DayOfWeek DatabaseDayOfWeek `json:"day_of_week"` Duration int `json:"duration"` Frequency DatabaseMaintenanceFrequency `json:"frequency"` HourOfDay int `json:"hour_of_day"` WeekOfMonth *int `json:"week_of_month"` }
DatabaseMaintenanceWindow stores information about a MySQL cluster's maintenance window
type DatabaseStatus ¶ added in v1.16.0
type DatabaseStatus string
const ( DatabaseStatusProvisioning DatabaseStatus = "provisioning" DatabaseStatusActive DatabaseStatus = "active" DatabaseStatusDeleting DatabaseStatus = "deleting" DatabaseStatusDeleted DatabaseStatus = "deleted" DatabaseStatusSuspending DatabaseStatus = "suspending" DatabaseStatusSuspended DatabaseStatus = "suspended" DatabaseStatusResuming DatabaseStatus = "resuming" DatabaseStatusRestoring DatabaseStatus = "restoring" DatabaseStatusFailed DatabaseStatus = "failed" DatabaseStatusDegraded DatabaseStatus = "degraded" DatabaseStatusUpdating DatabaseStatus = "updating" DatabaseStatusBackingUp DatabaseStatus = "backing_up" )
type DatabaseType ¶ added in v1.16.0
type DatabaseType struct { ID string `json:"id"` Label string `json:"label"` Class string `json:"class"` VirtualCPUs int `json:"vcpus"` Disk int `json:"disk"` Memory int `json:"memory"` Engines DatabaseTypeEngineMap `json:"engines"` }
DatabaseType is information about the supported Database Types by Linode Managed Databases
type DatabaseTypeEngine ¶ added in v1.16.0
type DatabaseTypeEngine struct { Quantity int `json:"quantity"` Price ClusterPrice `json:"price"` }
DatabaseTypeEngine Sizes and Prices
type DatabaseTypeEngineMap ¶ added in v1.16.0
type DatabaseTypeEngineMap struct {
MySQL []DatabaseTypeEngine `json:"mysql"`
}
DatabaseTypeEngineMap stores a list of Database Engine types by engine
type DatabaseTypesPagedResponse ¶ added in v1.16.0
type DatabaseTypesPagedResponse struct { *PageOptions Data []DatabaseType `json:"data"` }
type DatabasesPagedResponse ¶ added in v1.16.0
type DatabasesPagedResponse struct { *PageOptions Data []Database `json:"data"` }
type DevicesCreationOptions ¶ added in v1.16.0
type DevicesCreationOptions struct { Linodes []int `json:"linodes,omitempty"` NodeBalancers []int `json:"nodebalancers,omitempty"` }
DevicesCreationOptions fields are used when adding devices during the Firewall creation process.
type DiskFilesystem ¶ added in v0.2.0
type DiskFilesystem string
DiskFilesystem constants start with Filesystem and include Linode API Filesystems
const ( FilesystemRaw DiskFilesystem = "raw" FilesystemSwap DiskFilesystem = "swap" FilesystemExt3 DiskFilesystem = "ext3" FilesystemExt4 DiskFilesystem = "ext4" FilesystemInitrd DiskFilesystem = "initrd" )
DiskFilesystem constants represent the filesystems types an Instance Disk may use
type DiskStatus ¶ added in v0.6.0
type DiskStatus string
DiskStatus constants have the prefix "Disk" and include Linode API Instance Disk Status
const ( DiskReady DiskStatus = "ready" DiskNotReady DiskStatus = "not ready" DiskDeleting DiskStatus = "deleting" )
DiskStatus constants represent the status values an Instance Disk may have
type Domain ¶
type Domain struct { // This Domain's unique ID ID int `json:"id"` // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. Domain string `json:"domain"` // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). Type DomainType `json:"type"` // Enum:"master" "slave" // Deprecated: The group this Domain belongs to. This is for display purposes only. Group string `json:"group"` // Used to control whether this Domain is currently being rendered. Status DomainStatus `json:"status"` // Enum:"disabled" "active" "edit_mode" "has_errors" // A description for this Domain. This is for display purposes only. Description string `json:"description"` // Start of Authority email address. This is required for master Domains. SOAEmail string `json:"soa_email"` // The interval, in seconds, at which a failed refresh should be retried. // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RetrySec int `json:"retry_sec"` // The IP addresses representing the master DNS for this Domain. MasterIPs []string `json:"master_ips"` // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. AXfrIPs []string `json:"axfr_ips"` // An array of tags applied to this object. Tags are for organizational purposes only. Tags []string `json:"tags"` // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. ExpireSec int `json:"expire_sec"` // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RefreshSec int `json:"refresh_sec"` // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. TTLSec int `json:"ttl_sec"` }
Domain represents a Domain object
func (Domain) GetUpdateOptions ¶
func (d Domain) GetUpdateOptions() (du DomainUpdateOptions)
GetUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain
type DomainCreateOptions ¶
type DomainCreateOptions struct { // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. Domain string `json:"domain"` // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). // Enum:"master" "slave" Type DomainType `json:"type"` // Deprecated: The group this Domain belongs to. This is for display purposes only. Group string `json:"group,omitempty"` // Used to control whether this Domain is currently being rendered. // Enum:"disabled" "active" "edit_mode" "has_errors" Status DomainStatus `json:"status,omitempty"` // A description for this Domain. This is for display purposes only. Description string `json:"description,omitempty"` // Start of Authority email address. This is required for master Domains. SOAEmail string `json:"soa_email,omitempty"` // The interval, in seconds, at which a failed refresh should be retried. // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RetrySec int `json:"retry_sec,omitempty"` // The IP addresses representing the master DNS for this Domain. MasterIPs []string `json:"master_ips"` // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. AXfrIPs []string `json:"axfr_ips"` // An array of tags applied to this object. Tags are for organizational purposes only. Tags []string `json:"tags"` // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. ExpireSec int `json:"expire_sec,omitempty"` // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RefreshSec int `json:"refresh_sec,omitempty"` // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. TTLSec int `json:"ttl_sec,omitempty"` }
DomainCreateOptions fields are those accepted by CreateDomain
type DomainRecord ¶
type DomainRecord struct { ID int `json:"id"` Type DomainRecordType `json:"type"` Name string `json:"name"` Target string `json:"target"` Priority int `json:"priority"` Weight int `json:"weight"` Port int `json:"port"` Service *string `json:"service"` Protocol *string `json:"protocol"` TTLSec int `json:"ttl_sec"` Tag *string `json:"tag"` }
DomainRecord represents a DomainRecord object
func (DomainRecord) GetUpdateOptions ¶ added in v0.1.1
func (d DomainRecord) GetUpdateOptions() (du DomainRecordUpdateOptions)
GetUpdateOptions converts a DomainRecord to DomainRecordUpdateOptions for use in UpdateDomainRecord
type DomainRecordCreateOptions ¶ added in v0.1.1
type DomainRecordCreateOptions struct { Type DomainRecordType `json:"type"` Name string `json:"name"` Target string `json:"target"` Priority *int `json:"priority,omitempty"` Weight *int `json:"weight,omitempty"` Port *int `json:"port,omitempty"` Service *string `json:"service,omitempty"` Protocol *string `json:"protocol,omitempty"` TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted Tag *string `json:"tag,omitempty"` }
DomainRecordCreateOptions fields are those accepted by CreateDomainRecord
type DomainRecordType ¶ added in v0.1.1
type DomainRecordType string
DomainRecordType constants start with RecordType and include Linode API Domain Record Types
const ( RecordTypeA DomainRecordType = "A" RecordTypeAAAA DomainRecordType = "AAAA" RecordTypeNS DomainRecordType = "NS" RecordTypeMX DomainRecordType = "MX" RecordTypeCNAME DomainRecordType = "CNAME" RecordTypeTXT DomainRecordType = "TXT" RecordTypeSRV DomainRecordType = "SRV" RecordTypePTR DomainRecordType = "PTR" RecordTypeCAA DomainRecordType = "CAA" )
DomainRecordType contants are the DNS record types a DomainRecord can assign
type DomainRecordUpdateOptions ¶ added in v0.1.1
type DomainRecordUpdateOptions struct { Type DomainRecordType `json:"type,omitempty"` Name string `json:"name,omitempty"` Target string `json:"target,omitempty"` Priority *int `json:"priority,omitempty"` // 0 is valid, so omit only nil values Weight *int `json:"weight,omitempty"` // 0 is valid, so omit only nil values Port *int `json:"port,omitempty"` // 0 is valid to spec, so omit only nil values Service *string `json:"service,omitempty"` Protocol *string `json:"protocol,omitempty"` TTLSec int `json:"ttl_sec,omitempty"` // 0 is not accepted by Linode, so can be omitted Tag *string `json:"tag,omitempty"` }
DomainRecordUpdateOptions fields are those accepted by UpdateDomainRecord
type DomainRecordsPagedResponse ¶
type DomainRecordsPagedResponse struct { *PageOptions Data []DomainRecord `json:"data"` }
DomainRecordsPagedResponse represents a paginated DomainRecord API response
type DomainStatus ¶ added in v0.1.1
type DomainStatus string
DomainStatus constants start with DomainStatus and include Linode API Domain Status values
const ( DomainStatusDisabled DomainStatus = "disabled" DomainStatusActive DomainStatus = "active" DomainStatusEditMode DomainStatus = "edit_mode" DomainStatusHasErrors DomainStatus = "has_errors" )
DomainStatus constants reflect the current status of a Domain
type DomainType ¶ added in v0.1.1
type DomainType string
DomainType constants start with DomainType and include Linode API Domain Type values
const ( DomainTypeMaster DomainType = "master" DomainTypeSlave DomainType = "slave" )
DomainType constants reflect the DNS zone type of a Domain
type DomainUpdateOptions ¶
type DomainUpdateOptions struct { // The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain. Domain string `json:"domain,omitempty"` // If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave). // Enum:"master" "slave" Type DomainType `json:"type,omitempty"` // Deprecated: The group this Domain belongs to. This is for display purposes only. Group string `json:"group,omitempty"` // Used to control whether this Domain is currently being rendered. // Enum:"disabled" "active" "edit_mode" "has_errors" Status DomainStatus `json:"status,omitempty"` // A description for this Domain. This is for display purposes only. Description string `json:"description,omitempty"` // Start of Authority email address. This is required for master Domains. SOAEmail string `json:"soa_email,omitempty"` // The interval, in seconds, at which a failed refresh should be retried. // Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RetrySec int `json:"retry_sec,omitempty"` // The IP addresses representing the master DNS for this Domain. MasterIPs []string `json:"master_ips"` // The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it. AXfrIPs []string `json:"axfr_ips"` // An array of tags applied to this object. Tags are for organizational purposes only. Tags []string `json:"tags"` // The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. ExpireSec int `json:"expire_sec,omitempty"` // The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. RefreshSec int `json:"refresh_sec,omitempty"` // "Time to Live" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value. TTLSec int `json:"ttl_sec,omitempty"` }
DomainUpdateOptions converts a Domain to DomainUpdateOptions for use in UpdateDomain
type DomainZoneFile ¶ added in v1.16.0
type DomainZoneFile struct {
ZoneFile []string `json:"zone_file"`
}
DomainZoneFile represents the Zone File of a Domain
type DomainsPagedResponse ¶
type DomainsPagedResponse struct { *PageOptions Data []Domain `json:"data"` }
DomainsPagedResponse represents a paginated Domain API response
type EntityType ¶
type EntityType string
EntityType constants start with Entity and include Linode API Event Entity Types
const ( EntityLinode EntityType = "linode" EntityDisk EntityType = "disk" EntityDatabase EntityType = "database" EntityDomain EntityType = "domain" EntityFirewall EntityType = "firewall" EntityNodebalancer EntityType = "nodebalancer" )
EntityType contants are the entities an Event can be related to.
type EntityUserGrant ¶ added in v1.16.0
type EntityUserGrant struct { ID int `json:"id"` Permissions *GrantPermissionLevel `json:"permissions"` }
type EnvDefaults ¶ added in v1.16.0
type Error ¶
Error wraps the LinodeGo error with the relevant http.Response
type Event ¶
type Event struct { // The unique ID of this Event. ID int `json:"id"` // Current status of the Event, Enum: "failed" "finished" "notification" "scheduled" "started" Status EventStatus `json:"status"` // The action that caused this Event. New actions may be added in the future. Action EventAction `json:"action"` // A percentage estimating the amount of time remaining for an Event. Returns null for notification events. PercentComplete int `json:"percent_complete"` // The rate of completion of the Event. Only some Events will return rate; for example, migration and resize Events. Rate *string `json:"rate"` // If this Event has been read. Read bool `json:"read"` // If this Event has been seen. Seen bool `json:"seen"` // The estimated time remaining until the completion of this Event. This value is only returned for in-progress events. TimeRemaining *int `json:"-"` // The username of the User who caused the Event. Username string `json:"username"` // Detailed information about the Event's entity, including ID, type, label, and URL used to access it. Entity *EventEntity `json:"entity"` // Detailed information about the Event's secondary or related entity, including ID, type, label, and URL used to access it. SecondaryEntity *EventEntity `json:"secondary_entity"` // When this Event was created. Created *time.Time `json:"-"` }
Event represents an action taken on the Account.
func (*Event) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type EventAction ¶
type EventAction string
EventAction constants start with Action and include all known Linode API Event Actions.
const ( ActionAccountUpdate EventAction = "account_update" ActionAccountSettingsUpdate EventAction = "account_settings_update" ActionBackupsEnable EventAction = "backups_enable" ActionBackupsCancel EventAction = "backups_cancel" ActionBackupsRestore EventAction = "backups_restore" ActionCommunityQuestionReply EventAction = "community_question_reply" ActionCommunityLike EventAction = "community_like" ActionCreateCardUpdated EventAction = "credit_card_updated" ActionDatabaseCreate EventAction = "database_create" ActionDatabaseDegraded EventAction = "database_degraded" ActionDatabaseDelete EventAction = "database_delete" ActionDatabaseFailed EventAction = "database_failed" ActionDatabaseUpdate EventAction = "database_update" ActionDatabaseCreateFailed EventAction = "database_create_failed" ActionDatabaseUpdateFailed EventAction = "database_update_failed" ActionDatabaseBackupCreate EventAction = "database_backup_create" ActionDatabaseBackupRestore EventAction = "database_backup_restore" ActionDatabaseCredentialsReset EventAction = "database_credentials_reset" ActionDiskCreate EventAction = "disk_create" ActionDiskDelete EventAction = "disk_delete" ActionDiskUpdate EventAction = "disk_update" ActionDiskDuplicate EventAction = "disk_duplicate" ActionDiskImagize EventAction = "disk_imagize" ActionDiskResize EventAction = "disk_resize" ActionDNSRecordCreate EventAction = "dns_record_create" ActionDNSRecordDelete EventAction = "dns_record_delete" ActionDNSRecordUpdate EventAction = "dns_record_update" ActionDNSZoneCreate EventAction = "dns_zone_create" ActionDNSZoneDelete EventAction = "dns_zone_delete" ActionDNSZoneUpdate EventAction = "dns_zone_update" ActionFirewallCreate EventAction = "firewall_create" ActionFirewallDelete EventAction = "firewall_delete" ActionFirewallDisable EventAction = "firewall_disable" ActionFirewallEnable EventAction = "firewall_enable" ActionFirewallUpdate EventAction = "firewall_update" ActionFirewallDeviceAdd EventAction = "firewall_device_add" ActionFirewallDeviceRemove EventAction = "firewall_device_remove" ActionHostReboot EventAction = "host_reboot" ActionImageDelete EventAction = "image_delete" ActionImageUpdate EventAction = "image_update" ActionLassieReboot EventAction = "lassie_reboot" ActionLinodeAddIP EventAction = "linode_addip" ActionLinodeBoot EventAction = "linode_boot" ActionLinodeClone EventAction = "linode_clone" ActionLinodeCreate EventAction = "linode_create" ActionLinodeDelete EventAction = "linode_delete" ActionLinodeUpdate EventAction = "linode_update" ActionLinodeDeleteIP EventAction = "linode_deleteip" ActionLinodeMigrate EventAction = "linode_migrate" ActionLinodeMutate EventAction = "linode_mutate" ActionLinodeMutateCreate EventAction = "linode_mutate_create" ActionLinodeReboot EventAction = "linode_reboot" ActionLinodeRebuild EventAction = "linode_rebuild" ActionLinodeResize EventAction = "linode_resize" ActionLinodeResizeCreate EventAction = "linode_resize_create" ActionLinodeShutdown EventAction = "linode_shutdown" ActionLinodeSnapshot EventAction = "linode_snapshot" ActionLinodeConfigCreate EventAction = "linode_config_create" ActionLinodeConfigDelete EventAction = "linode_config_delete" ActionLinodeConfigUpdate EventAction = "linode_config_update" ActionLishBoot EventAction = "lish_boot" ActionLKENodeCreate EventAction = "lke_node_create" ActionLongviewClientCreate EventAction = "longviewclient_create" ActionLongviewClientDelete EventAction = "longviewclient_delete" ActionLongviewClientUpdate EventAction = "longviewclient_update" ActionManagedDisabled EventAction = "managed_disabled" ActionManagedEnabled EventAction = "managed_enabled" ActionManagedServiceCreate EventAction = "managed_service_create" ActionManagedServiceDelete EventAction = "managed_service_delete" ActionNodebalancerCreate EventAction = "nodebalancer_create" ActionNodebalancerDelete EventAction = "nodebalancer_delete" ActionNodebalancerUpdate EventAction = "nodebalancer_update" ActionNodebalancerConfigCreate EventAction = "nodebalancer_config_create" ActionNodebalancerConfigDelete EventAction = "nodebalancer_config_delete" ActionNodebalancerConfigUpdate EventAction = "nodebalancer_config_update" ActionPasswordReset EventAction = "password_reset" ActionPaymentSubmitted EventAction = "payment_submitted" ActionStackScriptCreate EventAction = "stackscript_create" ActionStackScriptDelete EventAction = "stackscript_delete" ActionStackScriptUpdate EventAction = "stackscript_update" ActionStackScriptPublicize EventAction = "stackscript_publicize" ActionStackScriptRevise EventAction = "stackscript_revise" ActionTFADisabled EventAction = "tfa_disabled" ActionTFAEnabled EventAction = "tfa_enabled" ActionTicketAttachmentUpload EventAction = "ticket_attachment_upload" ActionTicketCreate EventAction = "ticket_create" ActionTicketUpdate EventAction = "ticket_update" ActionVolumeAttach EventAction = "volume_attach" ActionVolumeClone EventAction = "volume_clone" ActionVolumeCreate EventAction = "volume_create" ActionVolumeDelte EventAction = "volume_delete" ActionVolumeUpdate EventAction = "volume_update" ActionVolumeDetach EventAction = "volume_detach" ActionVolumeResize EventAction = "volume_resize" )
EventAction constants represent the actions that cause an Event. New actions may be added in the future.
type EventEntity ¶
type EventEntity struct { // ID may be a string or int, it depends on the EntityType ID any `json:"id"` Label string `json:"label"` Type EntityType `json:"type"` Status string `json:"status"` URL string `json:"url"` }
EventEntity provides detailed information about the Event's associated entity, including ID, Type, Label, and a URL that can be used to access it.
type EventPoller ¶ added in v1.16.0
type EventPoller struct { EntityID any EntityType EntityType Action EventAction // contains filtered or unexported fields }
func (*EventPoller) PreTask ¶ added in v1.16.0
func (p *EventPoller) PreTask(ctx context.Context) error
PreTask stores all current events for the given entity to prevent them from being processed on subsequent runs.
func (*EventPoller) WaitForFinished ¶ added in v1.16.0
WaitForFinished waits for a new event to be finished.
func (*EventPoller) WaitForLatestUnknownEvent ¶ added in v1.16.0
func (p *EventPoller) WaitForLatestUnknownEvent(ctx context.Context) (*Event, error)
type EventStatus ¶
type EventStatus string
EventStatus constants start with Event and include Linode API Event Status values
const ( EventFailed EventStatus = "failed" EventFinished EventStatus = "finished" EventNotification EventStatus = "notification" EventScheduled EventStatus = "scheduled" EventStarted EventStatus = "started" )
EventStatus constants reflect the current status of an Event
type EventsPagedResponse ¶
type EventsPagedResponse struct { *PageOptions Data []Event `json:"data"` }
EventsPagedResponse represents a paginated Events API response
type Filter ¶ added in v1.16.0
type Filter struct { // Operator is the logic for all Children nodes ("+and"/"+or") Operator string Children []FilterNode // OrderBy is the field you want to order your results by (ex: "+order_by": "class") OrderBy string // Order is the direction in which to order the results ("+order": "asc"/"desc") Order string }
func (*Filter) AddField ¶ added in v1.16.0
func (f *Filter) AddField(op FilterOperator, key string, value any)
func (*Filter) MarshalJSON ¶ added in v1.16.0
type FilterNode ¶ added in v1.16.0
type FilterOperator ¶ added in v1.16.0
type FilterOperator string
const ( Eq FilterOperator = "+eq" Neq FilterOperator = "+neq" Gt FilterOperator = "+gt" Gte FilterOperator = "+gte" Lt FilterOperator = "+lt" Lte FilterOperator = "+lte" Contains FilterOperator = "+contains" Ascending = "asc" Descending = "desc" )
type Firewall ¶ added in v1.16.0
type Firewall struct { ID int `json:"id"` Label string `json:"label"` Status FirewallStatus `json:"status"` Tags []string `json:"tags,omitempty"` Rules FirewallRuleSet `json:"rules"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
A Firewall is a set of networking rules (iptables) applied to Devices with which it is associated
func (*Firewall) GetUpdateOptions ¶ added in v1.16.0
func (f *Firewall) GetUpdateOptions() FirewallUpdateOptions
GetUpdateOptions converts a Firewall to FirewallUpdateOptions for use in Client.UpdateFirewall.
func (*Firewall) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON for Firewall responses
type FirewallCreateOptions ¶ added in v1.16.0
type FirewallCreateOptions struct { Label string `json:"label,omitempty"` Rules FirewallRuleSet `json:"rules"` Tags []string `json:"tags,omitempty"` Devices DevicesCreationOptions `json:"devices,omitempty"` }
FirewallCreateOptions fields are those accepted by CreateFirewall
type FirewallDevice ¶ added in v1.16.0
type FirewallDevice struct { ID int `json:"id"` Entity FirewallDeviceEntity `json:"entity"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
FirewallDevice represents a device governed by a Firewall
func (*FirewallDevice) UnmarshalJSON ¶ added in v1.16.0
func (device *FirewallDevice) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type FirewallDeviceCreateOptions ¶ added in v1.16.0
type FirewallDeviceCreateOptions struct { ID int `json:"id"` Type FirewallDeviceType `json:"type"` }
FirewallDeviceCreateOptions fields are those accepted by CreateFirewallDevice
type FirewallDeviceEntity ¶ added in v1.16.0
type FirewallDeviceEntity struct { ID int `json:"id"` Type FirewallDeviceType `json:"type"` Label string `json:"label"` URL string `json:"url"` }
FirewallDeviceEntity contains information about a device associated with a Firewall
type FirewallDeviceType ¶ added in v1.16.0
type FirewallDeviceType string
FirewallDeviceType represents the different kinds of devices governable by a Firewall
const ( FirewallDeviceLinode FirewallDeviceType = "linode" FirewallDeviceNodeBalancer FirewallDeviceType = "nodebalancer" )
FirewallDeviceType constants start with FirewallDevice
type FirewallDevicesPagedResponse ¶ added in v1.16.0
type FirewallDevicesPagedResponse struct { *PageOptions Data []FirewallDevice `json:"data"` }
FirewallDevicesPagedResponse represents a Linode API response for FirewallDevices
type FirewallRule ¶ added in v1.16.0
type FirewallRule struct { Action string `json:"action"` Label string `json:"label"` Description string `json:"description,omitempty"` Ports string `json:"ports,omitempty"` Protocol NetworkProtocol `json:"protocol"` Addresses NetworkAddresses `json:"addresses"` }
A FirewallRule is a whitelist of ports, protocols, and addresses for which traffic should be allowed.
type FirewallRuleSet ¶ added in v1.16.0
type FirewallRuleSet struct { Inbound []FirewallRule `json:"inbound"` InboundPolicy string `json:"inbound_policy"` Outbound []FirewallRule `json:"outbound"` OutboundPolicy string `json:"outbound_policy"` }
FirewallRuleSet is a pair of inbound and outbound rules that specify what network traffic should be allowed.
type FirewallStatus ¶ added in v1.16.0
type FirewallStatus string
FirewallStatus enum type
const ( FirewallEnabled FirewallStatus = "enabled" FirewallDisabled FirewallStatus = "disabled" FirewallDeleted FirewallStatus = "deleted" )
FirewallStatus enums start with Firewall
type FirewallUpdateOptions ¶ added in v1.16.0
type FirewallUpdateOptions struct { Label string `json:"label,omitempty"` Status FirewallStatus `json:"status,omitempty"` Tags *[]string `json:"tags,omitempty"` }
FirewallUpdateOptions is an options struct used when Updating a Firewall
type FirewallsPagedResponse ¶ added in v1.16.0
type FirewallsPagedResponse struct { *PageOptions Data []Firewall `json:"data"` }
FirewallsPagedResponse represents a Linode API response for listing of Cloud Firewalls
type GlobalUserGrants ¶ added in v1.16.0
type GlobalUserGrants struct { AccountAccess *GrantPermissionLevel `json:"account_access"` AddDatabases bool `json:"add_databases"` AddDomains bool `json:"add_domains"` AddFirewalls bool `json:"add_firewalls"` AddImages bool `json:"add_images"` AddLinodes bool `json:"add_linodes"` AddLongview bool `json:"add_longview"` AddNodeBalancers bool `json:"add_nodebalancers"` AddStackScripts bool `json:"add_stackscripts"` AddVolumes bool `json:"add_volumes"` CancelAccount bool `json:"cancel_account"` LongviewSubscription bool `json:"longview_subscription"` }
type GrantPermissionLevel ¶ added in v1.16.0
type GrantPermissionLevel string
const ( AccessLevelReadOnly GrantPermissionLevel = "read_only" AccessLevelReadWrite GrantPermissionLevel = "read_write" )
type GrantedEntity ¶ added in v1.16.0
type GrantedEntity struct { ID int `json:"id"` Label string `json:"label"` Permissions GrantPermissionLevel `json:"permissions"` }
type GrantsListResponse ¶ added in v1.16.0
type GrantsListResponse = UserGrants
type IPAddressUpdateOptions ¶ added in v0.7.0
type IPAddressUpdateOptions struct { // The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if set to nil. RDNS *string `json:"rdns"` }
IPAddressUpdateOptions fields are those accepted by UpdateToken
type IPAddressesPagedResponse ¶
type IPAddressesPagedResponse struct { *PageOptions Data []InstanceIP `json:"data"` }
IPAddressesPagedResponse represents a paginated IPAddress API response
type IPAddressesShareOptions ¶ added in v1.16.0
type IPAddressesShareOptions struct {}
IPAddressesShareOptions fields are those accepted by ShareIPAddresses.
type IPv6PoolsPagedResponse ¶
type IPv6PoolsPagedResponse struct { *PageOptions Data []IPv6Range `json:"data"` }
IPv6PoolsPagedResponse represents a paginated IPv6Pool API response
type IPv6Range ¶
type IPv6Range struct { Range string `json:"range"` Region string `json:"region"` Prefix int `json:"prefix"` RouteTarget string `json:"route_target"` // These fields are only returned by GetIPv6Range(...) IsBGP bool `json:"is_bgp"` Linodes []int `json:"linodes"` }
IPv6Range represents a range of IPv6 addresses routed to a single Linode in a given Region
type IPv6RangeCreateOptions ¶ added in v1.16.0
type IPv6RangeCreateOptions struct { LinodeID int `json:"linode_id,omitempty"` PrefixLength int `json:"prefix_length"` RouteTarget string `json:"route_target,omitempty"` }
IPv6RangeCreateOptions fields are those accepted by CreateIPv6Range
type IPv6RangesPagedResponse ¶
type IPv6RangesPagedResponse struct { *PageOptions Data []IPv6Range `json:"data"` }
IPv6RangesPagedResponse represents a paginated IPv6Range API response
type Image ¶
type Image struct { ID string `json:"id"` CreatedBy string `json:"created_by"` Label string `json:"label"` Description string `json:"description"` Type string `json:"type"` Vendor string `json:"vendor"` Status ImageStatus `json:"status"` Size int `json:"size"` IsPublic bool `json:"is_public"` Deprecated bool `json:"deprecated"` Created *time.Time `json:"-"` Expiry *time.Time `json:"-"` }
Image represents a deployable Image object for use with Linode Instances
func (Image) GetUpdateOptions ¶ added in v0.2.0
func (i Image) GetUpdateOptions() (iu ImageUpdateOptions)
GetUpdateOptions converts an Image to ImageUpdateOptions for use in UpdateImage
func (*Image) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type ImageCreateOptions ¶ added in v0.2.0
type ImageCreateOptions struct { DiskID int `json:"disk_id"` Label string `json:"label"` Description string `json:"description,omitempty"` }
ImageCreateOptions fields are those accepted by CreateImage
type ImageCreateUploadOptions ¶ added in v1.16.0
type ImageCreateUploadOptions struct { Region string `json:"region"` Label string `json:"label"` Description string `json:"description,omitempty"` }
ImageCreateUploadOptions fields are those accepted by CreateImageUpload
type ImageCreateUploadResponse ¶ added in v1.16.0
type ImageCreateUploadResponse struct { Image *Image `json:"image"` UploadTo string `json:"upload_to"` }
ImageCreateUploadResponse fields are those returned by CreateImageUpload
type ImageStatus ¶ added in v1.16.0
type ImageStatus string
ImageStatus represents the status of an Image.
const ( ImageStatusCreating ImageStatus = "creating" ImageStatusPendingUpload ImageStatus = "pending_upload" ImageStatusAvailable ImageStatus = "available" )
ImageStatus options start with ImageStatus and include all Image statuses
type ImageUpdateOptions ¶ added in v0.2.0
type ImageUpdateOptions struct { Label string `json:"label,omitempty"` Description *string `json:"description,omitempty"` }
ImageUpdateOptions fields are those accepted by UpdateImage
type ImageUploadOptions ¶ added in v1.16.0
type ImageUploadOptions struct { Region string `json:"region"` Label string `json:"label"` Description string `json:"description,omitempty"` Image io.Reader }
ImageUploadOptions fields are those accepted by UploadImage
type ImagesPagedResponse ¶
type ImagesPagedResponse struct { *PageOptions Data []Image `json:"data"` }
ImagesPagedResponse represents a linode API response for listing of images
type Instance ¶
type Instance struct { ID int `json:"id"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` Region string `json:"region"` Alerts *InstanceAlert `json:"alerts"` Backups *InstanceBackup `json:"backups"` Image string `json:"image"` Group string `json:"group"` IPv4 []*net.IP `json:"ipv4"` IPv6 string `json:"ipv6"` Label string `json:"label"` Type string `json:"type"` Status InstanceStatus `json:"status"` Hypervisor string `json:"hypervisor"` HostUUID string `json:"host_uuid"` Specs *InstanceSpec `json:"specs"` WatchdogEnabled bool `json:"watchdog_enabled"` Tags []string `json:"tags"` }
Instance represents a linode object
func (*Instance) GetUpdateOptions ¶ added in v0.6.0
func (i *Instance) GetUpdateOptions() InstanceUpdateOptions
GetUpdateOptions converts an Instance to InstanceUpdateOptions for use in UpdateInstance
func (*Instance) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type InstanceAlert ¶
type InstanceAlert struct { CPU int `json:"cpu"` IO int `json:"io"` NetworkIn int `json:"network_in"` NetworkOut int `json:"network_out"` TransferQuota int `json:"transfer_quota"` }
InstanceAlert represents a metric alert
type InstanceBackup ¶
type InstanceBackup struct { Available bool `json:"available,omitempty"` // read-only Enabled bool `json:"enabled,omitempty"` // read-only Schedule struct { Day string `json:"day,omitempty"` Window string `json:"window,omitempty"` } `json:"schedule,omitempty"` }
InstanceBackup represents backup settings for an instance
type InstanceBackupSnapshotResponse ¶
type InstanceBackupSnapshotResponse struct { Current *InstanceSnapshot `json:"current"` InProgress *InstanceSnapshot `json:"in_progress"` }
InstanceBackupSnapshotResponse fields are those representing Instance Backup Snapshots
type InstanceBackupsResponse ¶
type InstanceBackupsResponse struct { Automatic []*InstanceSnapshot `json:"automatic"` Snapshot *InstanceBackupSnapshotResponse `json:"snapshot"` }
InstanceBackupsResponse response struct for backup snapshot
type InstanceCloneOptions ¶
type InstanceCloneOptions struct { Region string `json:"region,omitempty"` Type string `json:"type,omitempty"` // LinodeID is an optional existing instance to use as the target of the clone LinodeID int `json:"linode_id,omitempty"` Label string `json:"label,omitempty"` Group string `json:"group,omitempty"` BackupsEnabled bool `json:"backups_enabled"` Disks []int `json:"disks,omitempty"` Configs []int `json:"configs,omitempty"` PrivateIP bool `json:"private_ip,omitempty"` }
InstanceCloneOptions is an options struct sent when Cloning an Instance
type InstanceConfig ¶
type InstanceConfig struct { ID int `json:"id"` Label string `json:"label"` Comments string `json:"comments"` Devices *InstanceConfigDeviceMap `json:"devices"` Helpers *InstanceConfigHelpers `json:"helpers"` Interfaces []InstanceConfigInterface `json:"interfaces"` MemoryLimit int `json:"memory_limit"` Kernel string `json:"kernel"` InitRD *int `json:"init_rd"` RootDevice string `json:"root_device"` RunLevel string `json:"run_level"` VirtMode string `json:"virt_mode"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
InstanceConfig represents all of the settings that control the boot and run configuration of a Linode Instance
func (InstanceConfig) GetCreateOptions ¶
func (i InstanceConfig) GetCreateOptions() InstanceConfigCreateOptions
GetCreateOptions converts a InstanceConfig to InstanceConfigCreateOptions for use in CreateInstanceConfig
func (InstanceConfig) GetUpdateOptions ¶
func (i InstanceConfig) GetUpdateOptions() InstanceConfigUpdateOptions
GetUpdateOptions converts a InstanceConfig to InstanceConfigUpdateOptions for use in UpdateInstanceConfig
func (*InstanceConfig) UnmarshalJSON ¶ added in v1.16.0
func (i *InstanceConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type InstanceConfigCreateOptions ¶
type InstanceConfigCreateOptions struct { Label string `json:"label,omitempty"` Comments string `json:"comments,omitempty"` Devices InstanceConfigDeviceMap `json:"devices"` Helpers *InstanceConfigHelpers `json:"helpers,omitempty"` Interfaces []InstanceConfigInterface `json:"interfaces"` MemoryLimit int `json:"memory_limit,omitempty"` Kernel string `json:"kernel,omitempty"` InitRD int `json:"init_rd,omitempty"` RootDevice *string `json:"root_device,omitempty"` RunLevel string `json:"run_level,omitempty"` VirtMode string `json:"virt_mode,omitempty"` }
InstanceConfigCreateOptions are InstanceConfig settings that can be used at creation
type InstanceConfigDevice ¶
type InstanceConfigDevice struct { DiskID int `json:"disk_id,omitempty"` VolumeID int `json:"volume_id,omitempty"` }
InstanceConfigDevice contains either the DiskID or VolumeID assigned to a Config Device
type InstanceConfigDeviceMap ¶
type InstanceConfigDeviceMap struct { SDA *InstanceConfigDevice `json:"sda,omitempty"` SDB *InstanceConfigDevice `json:"sdb,omitempty"` SDC *InstanceConfigDevice `json:"sdc,omitempty"` SDD *InstanceConfigDevice `json:"sdd,omitempty"` SDE *InstanceConfigDevice `json:"sde,omitempty"` SDF *InstanceConfigDevice `json:"sdf,omitempty"` SDG *InstanceConfigDevice `json:"sdg,omitempty"` SDH *InstanceConfigDevice `json:"sdh,omitempty"` }
InstanceConfigDeviceMap contains SDA-SDH InstanceConfigDevice settings
type InstanceConfigHelpers ¶
type InstanceConfigHelpers struct { UpdateDBDisabled bool `json:"updatedb_disabled"` Distro bool `json:"distro"` ModulesDep bool `json:"modules_dep"` Network bool `json:"network"` DevTmpFsAutomount bool `json:"devtmpfs_automount"` }
InstanceConfigHelpers are Instance Config options that control Linux distribution specific tweaks
type InstanceConfigInterface ¶ added in v1.16.0
type InstanceConfigInterface struct { IPAMAddress string `json:"ipam_address"` Label string `json:"label"` Purpose ConfigInterfacePurpose `json:"purpose"` }
InstanceConfigInterface contains information about a configuration's network interface
type InstanceConfigUpdateOptions ¶
type InstanceConfigUpdateOptions struct { Label string `json:"label,omitempty"` Comments string `json:"comments"` Devices *InstanceConfigDeviceMap `json:"devices,omitempty"` Helpers *InstanceConfigHelpers `json:"helpers,omitempty"` Interfaces []InstanceConfigInterface `json:"interfaces"` // MemoryLimit 0 means unlimitted, this is not omitted MemoryLimit int `json:"memory_limit"` Kernel string `json:"kernel,omitempty"` // InitRD is nullable, permit the sending of null InitRD *int `json:"init_rd"` RootDevice string `json:"root_device,omitempty"` RunLevel string `json:"run_level,omitempty"` VirtMode string `json:"virt_mode,omitempty"` }
InstanceConfigUpdateOptions are InstanceConfig settings that can be used in updates
type InstanceConfigsPagedResponse ¶
type InstanceConfigsPagedResponse struct { *PageOptions Data []InstanceConfig `json:"data"` }
InstanceConfigsPagedResponse represents a paginated InstanceConfig API response
type InstanceCreateOptions ¶
type InstanceCreateOptions struct { Region string `json:"region"` Type string `json:"type"` Label string `json:"label,omitempty"` Group string `json:"group,omitempty"` RootPass string `json:"root_pass,omitempty"` AuthorizedKeys []string `json:"authorized_keys,omitempty"` AuthorizedUsers []string `json:"authorized_users,omitempty"` StackScriptID int `json:"stackscript_id,omitempty"` StackScriptData map[string]string `json:"stackscript_data,omitempty"` BackupID int `json:"backup_id,omitempty"` Image string `json:"image,omitempty"` Interfaces []InstanceConfigInterface `json:"interfaces,omitempty"` BackupsEnabled bool `json:"backups_enabled,omitempty"` PrivateIP bool `json:"private_ip,omitempty"` Tags []string `json:"tags,omitempty"` // Creation fields that need to be set explicitly false, "", or 0 use pointers SwapSize *int `json:"swap_size,omitempty"` Booted *bool `json:"booted,omitempty"` }
InstanceCreateOptions require only Region and Type
type InstanceDisk ¶
type InstanceDisk struct { ID int `json:"id"` Label string `json:"label"` Status DiskStatus `json:"status"` Size int `json:"size"` Filesystem DiskFilesystem `json:"filesystem"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
InstanceDisk represents an Instance Disk object
func (*InstanceDisk) UnmarshalJSON ¶ added in v1.16.0
func (i *InstanceDisk) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type InstanceDiskCreateOptions ¶
type InstanceDiskCreateOptions struct { Label string `json:"label"` Size int `json:"size"` // Image is optional, but requires RootPass if provided Image string `json:"image,omitempty"` RootPass string `json:"root_pass,omitempty"` Filesystem string `json:"filesystem,omitempty"` AuthorizedKeys []string `json:"authorized_keys,omitempty"` AuthorizedUsers []string `json:"authorized_users,omitempty"` ReadOnly bool `json:"read_only,omitempty"` StackscriptID int `json:"stackscript_id,omitempty"` StackscriptData map[string]string `json:"stackscript_data,omitempty"` }
InstanceDiskCreateOptions are InstanceDisk settings that can be used at creation
type InstanceDiskUpdateOptions ¶
type InstanceDiskUpdateOptions struct { Label string `json:"label"` ReadOnly bool `json:"read_only"` }
InstanceDiskUpdateOptions are InstanceDisk settings that can be used in updates
type InstanceDisksPagedResponse ¶
type InstanceDisksPagedResponse struct { *PageOptions Data []InstanceDisk `json:"data"` }
InstanceDisksPagedResponse represents a paginated InstanceDisk API response
type InstanceIP ¶
type InstanceIP struct { Address string `json:"address"` Gateway string `json:"gateway"` SubnetMask string `json:"subnet_mask"` Prefix int `json:"prefix"` Type InstanceIPType `json:"type"` Public bool `json:"public"` RDNS string `json:"rdns"` LinodeID int `json:"linode_id"` Region string `json:"region"` }
InstanceIP represents an Instance IP with additional DNS and networking details
func (InstanceIP) GetUpdateOptions ¶ added in v0.7.0
func (i InstanceIP) GetUpdateOptions() (o IPAddressUpdateOptions)
GetUpdateOptions converts a IPAddress to IPAddressUpdateOptions for use in UpdateIPAddress
type InstanceIPAddressResponse ¶
type InstanceIPAddressResponse struct { IPv4 *InstanceIPv4Response `json:"ipv4"` IPv6 *InstanceIPv6Response `json:"ipv6"` }
InstanceIPAddressResponse contains the IPv4 and IPv6 details for an Instance
type InstanceIPType ¶ added in v1.16.0
type InstanceIPType string
InstanceIPType constants start with IPType and include Linode Instance IP Types
const ( IPTypeIPv4 InstanceIPType = "ipv4" IPTypeIPv6 InstanceIPType = "ipv6" IPTypeIPv6Pool InstanceIPType = "ipv6/pool" IPTypeIPv6Range InstanceIPType = "ipv6/range" )
InstanceIPType constants represent the IP types an Instance IP may be
type InstanceIPv4Response ¶
type InstanceIPv4Response struct { Public []*InstanceIP `json:"public"` Private []*InstanceIP `json:"private"` Reserved []*InstanceIP `json:"reserved"` }
InstanceIPv4Response contains the details of all IPv4 addresses associated with an Instance
type InstanceIPv6Response ¶
type InstanceIPv6Response struct { LinkLocal *InstanceIP `json:"link_local"` SLAAC *InstanceIP `json:"slaac"` Global []IPv6Range `json:"global"` }
InstanceIPv6Response contains the IPv6 addresses and ranges for an Instance
type InstanceRebuildOptions ¶ added in v1.16.0
type InstanceRebuildOptions struct { Image string `json:"image,omitempty"` RootPass string `json:"root_pass,omitempty"` AuthorizedKeys []string `json:"authorized_keys,omitempty"` AuthorizedUsers []string `json:"authorized_users,omitempty"` StackScriptID int `json:"stackscript_id,omitempty"` StackScriptData map[string]string `json:"stackscript_data,omitempty"` Booted *bool `json:"booted,omitempty"` }
InstanceRebuildOptions is a struct representing the options to send to the rebuild linode endpoint
type InstanceRescueOptions ¶ added in v1.16.0
type InstanceRescueOptions struct {
Devices InstanceConfigDeviceMap `json:"devices"`
}
InstanceRescueOptions fields are those accepted by RescueInstance
type InstanceResizeOptions ¶ added in v1.16.0
type InstanceResizeOptions struct { Type string `json:"type"` // When enabled, an instance resize will also resize a data disk if the instance has no more than one data disk and one swap disk AllowAutoDiskResize *bool `json:"allow_auto_disk_resize,omitempty"` }
InstanceResizeOptions is an options struct used when resizing an instance
type InstanceSnapshot ¶
type InstanceSnapshot struct { ID int `json:"id"` Label string `json:"label"` Status InstanceSnapshotStatus `json:"status"` Type string `json:"type"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` Finished *time.Time `json:"-"` Configs []string `json:"configs"` Disks []*InstanceSnapshotDisk `json:"disks"` Available bool `json:"available"` }
InstanceSnapshot represents a linode backup snapshot
func (*InstanceSnapshot) UnmarshalJSON ¶ added in v1.16.0
func (i *InstanceSnapshot) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type InstanceSnapshotDisk ¶
type InstanceSnapshotDisk struct { Label string `json:"label"` Size int `json:"size"` Filesystem string `json:"filesystem"` }
InstanceSnapshotDisk fields represent the source disk of a Snapshot
type InstanceSnapshotStatus ¶ added in v0.2.0
type InstanceSnapshotStatus string
InstanceSnapshotStatus constants start with Snapshot and include Linode API Instance Backup Snapshot status values
var ( SnapshotPaused InstanceSnapshotStatus = "paused" SnapshotPending InstanceSnapshotStatus = "pending" SnapshotRunning InstanceSnapshotStatus = "running" SnapshotNeedsPostProcessing InstanceSnapshotStatus = "needsPostProcessing" SnapshotSuccessful InstanceSnapshotStatus = "successful" SnapshotFailed InstanceSnapshotStatus = "failed" SnapshotUserAborted InstanceSnapshotStatus = "userAborted" )
InstanceSnapshotStatus constants reflect the current status of an Instance Snapshot
type InstanceSpec ¶
type InstanceSpec struct { Disk int `json:"disk"` Memory int `json:"memory"` VCPUs int `json:"vcpus"` Transfer int `json:"transfer"` }
InstanceSpec represents a linode spec
type InstanceStats ¶ added in v1.16.0
type InstanceStats struct { Title string `json:"title"` Data InstanceStatsData `json:"data"` }
InstanceStats represents an instance stats object
type InstanceStatsData ¶ added in v1.16.0
type InstanceStatsData struct { CPU [][]float64 `json:"cpu"` IO StatsIO `json:"io"` NetV4 StatsNet `json:"netv4"` NetV6 StatsNet `json:"netv6"` }
InstanceStatsData represents an instance stats data object
type InstanceStatus ¶
type InstanceStatus string
InstanceStatus constants start with Instance and include Linode API Instance Status values
const ( InstanceBooting InstanceStatus = "booting" InstanceRunning InstanceStatus = "running" InstanceOffline InstanceStatus = "offline" InstanceShuttingDown InstanceStatus = "shutting_down" InstanceRebooting InstanceStatus = "rebooting" InstanceProvisioning InstanceStatus = "provisioning" InstanceDeleting InstanceStatus = "deleting" InstanceMigrating InstanceStatus = "migrating" InstanceRebuilding InstanceStatus = "rebuilding" InstanceCloning InstanceStatus = "cloning" InstanceRestoring InstanceStatus = "restoring" InstanceResizing InstanceStatus = "resizing" )
InstanceStatus constants reflect the current status of an Instance
type InstanceTransfer ¶ added in v1.16.0
type InstanceTransfer struct { // Bytes of transfer this instance has consumed Used int `json:"used"` // GB of billable transfer this instance has consumed Billable int `json:"billable"` // GB of transfer this instance adds to the Transfer pool Quota int `json:"quota"` }
InstanceTransfer pool stats for a Linode Instance during the current billing month
type InstanceUpdateOptions ¶
type InstanceUpdateOptions struct { Label string `json:"label,omitempty"` Group string `json:"group,omitempty"` Backups *InstanceBackup `json:"backups,omitempty"` Alerts *InstanceAlert `json:"alerts,omitempty"` WatchdogEnabled *bool `json:"watchdog_enabled,omitempty"` Tags *[]string `json:"tags,omitempty"` }
InstanceUpdateOptions is an options struct used when Updating an Instance
type InstanceVolumesPagedResponse ¶
type InstanceVolumesPagedResponse struct { *PageOptions Data []Volume `json:"data"` }
InstanceVolumesPagedResponse represents a paginated InstanceVolume API response
type InstancesPagedResponse ¶
type InstancesPagedResponse struct { *PageOptions Data []Instance `json:"data"` }
InstancesPagedResponse represents a linode API response for listing
type Invoice ¶
type Invoice struct { ID int `json:"id"` Label string `json:"label"` Total float32 `json:"total"` Date *time.Time `json:"-"` }
Invoice structs reflect an invoice for billable activity on the account.
func (*Invoice) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type InvoiceItem ¶
type InvoiceItem struct { Label string `json:"label"` Type string `json:"type"` UnitPrice int `json:"unitprice"` Quantity int `json:"quantity"` Amount float32 `json:"amount"` From *time.Time `json:"-"` To *time.Time `json:"-"` }
InvoiceItem structs reflect an single billable activity associate with an Invoice
func (*InvoiceItem) UnmarshalJSON ¶ added in v1.16.0
func (i *InvoiceItem) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type InvoiceItemsPagedResponse ¶
type InvoiceItemsPagedResponse struct { *PageOptions Data []InvoiceItem `json:"data"` }
InvoiceItemsPagedResponse represents a paginated Invoice Item API response
type InvoicesPagedResponse ¶
type InvoicesPagedResponse struct { *PageOptions Data []Invoice `json:"data"` }
InvoicesPagedResponse represents a paginated Invoice API response
type LKECluster ¶ added in v1.16.0
type LKECluster struct { ID int `json:"id"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` Label string `json:"label"` Region string `json:"region"` Status LKEClusterStatus `json:"status"` K8sVersion string `json:"k8s_version"` Tags []string `json:"tags"` ControlPlane LKEClusterControlPlane `json:"control_plane"` }
LKECluster represents a LKECluster object
func (LKECluster) GetCreateOptions ¶ added in v1.16.0
func (i LKECluster) GetCreateOptions() (o LKEClusterCreateOptions)
GetCreateOptions converts a LKECluster to LKEClusterCreateOptions for use in CreateLKECluster
func (LKECluster) GetUpdateOptions ¶ added in v1.16.0
func (i LKECluster) GetUpdateOptions() (o LKEClusterUpdateOptions)
GetUpdateOptions converts a LKECluster to LKEClusterUpdateOptions for use in UpdateLKECluster
func (*LKECluster) UnmarshalJSON ¶ added in v1.16.0
func (i *LKECluster) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type LKEClusterAPIEndpoint ¶ added in v1.16.0
type LKEClusterAPIEndpoint struct {
Endpoint string `json:"endpoint"`
}
LKEClusterAPIEndpoint fields are those returned by ListLKEClusterAPIEndpoints
type LKEClusterAPIEndpointsPagedResponse ¶ added in v1.16.0
type LKEClusterAPIEndpointsPagedResponse struct { *PageOptions Data []LKEClusterAPIEndpoint `json:"data"` }
LKEClusterAPIEndpointsPagedResponse represents a paginated LKEClusterAPIEndpoints API response
type LKEClusterControlPlane ¶ added in v1.16.0
type LKEClusterControlPlane struct {
HighAvailability bool `json:"high_availability"`
}
LKEClusterControlPlane fields contained within the `control_plane` attribute of an LKE cluster.
type LKEClusterCreateOptions ¶ added in v1.16.0
type LKEClusterCreateOptions struct { NodePools []LKENodePoolCreateOptions `json:"node_pools"` Label string `json:"label"` Region string `json:"region"` K8sVersion string `json:"k8s_version"` Tags []string `json:"tags,omitempty"` ControlPlane *LKEClusterControlPlane `json:"control_plane,omitempty"` }
LKEClusterCreateOptions fields are those accepted by CreateLKECluster
type LKEClusterDashboard ¶ added in v1.16.0
type LKEClusterDashboard struct {
URL string `json:"url"`
}
LKEClusterDashboard fields are those returned by GetLKEClusterDashboard
type LKEClusterKubeconfig ¶ added in v1.16.0
type LKEClusterKubeconfig struct {
KubeConfig string `json:"kubeconfig"`
}
LKEClusterKubeconfig fields are those returned by GetLKEClusterKubeconfig
type LKEClusterPollOptions ¶ added in v1.16.0
type LKEClusterPollOptions struct { // Retry will cause the Poll to ignore interimittent errors Retry bool // TimeoutSeconds is the number of Seconds to wait for the poll to succeed // before exiting. TimeoutSeconds int // TansportWrapper allows adding a transport middleware function that will // wrap the LKE Cluster client's underlying http.RoundTripper. TransportWrapper func(http.RoundTripper) http.RoundTripper }
LKEClusterPollOptions configures polls against LKE Clusters.
type LKEClusterPool
deprecated
added in
v1.16.0
type LKEClusterPool = LKENodePool
Deprecated: LKEClusterPool represents a LKEClusterPool object
type LKEClusterPoolAutoscaler
deprecated
added in
v1.16.0
type LKEClusterPoolAutoscaler = LKENodePoolAutoscaler
Deprecated: LKEClusterPoolAutoscaler represents an AutoScaler configuration
type LKEClusterPoolCreateOptions
deprecated
added in
v1.16.0
type LKEClusterPoolCreateOptions = LKENodePoolCreateOptions
Deprecated: LKEClusterPoolCreateOptions fields are those accepted by CreateLKEClusterPool
type LKEClusterPoolDisk
deprecated
added in
v1.16.0
type LKEClusterPoolDisk = LKENodePoolDisk
Deprecated: LKEClusterPoolDisk represents a Node disk in an LKEClusterPool object
type LKEClusterPoolLinode
deprecated
added in
v1.16.0
type LKEClusterPoolLinode = LKENodePoolLinode
Deprecated: LKEClusterPoolLinode represents a LKEClusterPoolLinode object
type LKEClusterPoolUpdateOptions
deprecated
added in
v1.16.0
type LKEClusterPoolUpdateOptions = LKENodePoolUpdateOptions
Deprecated: LKEClusterPoolUpdateOptions fields are those accepted by UpdateLKEClusterPool
type LKEClusterPoolsPagedResponse
deprecated
added in
v1.16.0
type LKEClusterPoolsPagedResponse = LKENodePoolsPagedResponse
Deprecated: LKEClusterPoolsPagedResponse represents a paginated LKEClusterPool API response
type LKEClusterStatus ¶ added in v1.16.0
type LKEClusterStatus string
LKEClusterStatus represents the status of an LKECluster
const ( LKEClusterReady LKEClusterStatus = "ready" LKEClusterNotReady LKEClusterStatus = "not_ready" )
LKEClusterStatus enums start with LKECluster
type LKEClusterUpdateOptions ¶ added in v1.16.0
type LKEClusterUpdateOptions struct { K8sVersion string `json:"k8s_version,omitempty"` Label string `json:"label,omitempty"` Tags *[]string `json:"tags,omitempty"` ControlPlane *LKEClusterControlPlane `json:"control_plane,omitempty"` }
LKEClusterUpdateOptions fields are those accepted by UpdateLKECluster
type LKEClustersPagedResponse ¶ added in v1.16.0
type LKEClustersPagedResponse struct { *PageOptions Data []LKECluster `json:"data"` }
LKEClustersPagedResponse represents a paginated LKECluster API response
type LKELinodeStatus ¶ added in v1.16.0
type LKELinodeStatus string
LKELinodeStatus constants start with LKELinode and include Linode API LKENodePool Linode Status values
const ( LKELinodeReady LKELinodeStatus = "ready" LKELinodeNotReady LKELinodeStatus = "not_ready" )
LKENodePoolStatus constants reflect the current status of an LKENodePool
type LKENodePool ¶ added in v1.16.0
type LKENodePool struct { ID int `json:"id"` Count int `json:"count"` Type string `json:"type"` Disks []LKENodePoolDisk `json:"disks"` Linodes []LKENodePoolLinode `json:"nodes"` Tags []string `json:"tags"` Autoscaler LKENodePoolAutoscaler `json:"autoscaler"` }
LKENodePool represents a LKENodePool object
func (LKENodePool) GetCreateOptions ¶ added in v1.16.0
func (l LKENodePool) GetCreateOptions() (o LKENodePoolCreateOptions)
GetCreateOptions converts a LKENodePool to LKENodePoolCreateOptions for use in CreateLKENodePool
func (LKENodePool) GetUpdateOptions ¶ added in v1.16.0
func (l LKENodePool) GetUpdateOptions() (o LKENodePoolUpdateOptions)
GetUpdateOptions converts a LKENodePool to LKENodePoolUpdateOptions for use in UpdateLKENodePoolUpdate
type LKENodePoolAutoscaler ¶ added in v1.16.0
type LKENodePoolCreateOptions ¶ added in v1.16.0
type LKENodePoolCreateOptions struct { Count int `json:"count"` Type string `json:"type"` Disks []LKENodePoolDisk `json:"disks"` Tags []string `json:"tags"` Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"` }
LKENodePoolCreateOptions fields are those accepted by CreateLKENodePool
type LKENodePoolDisk ¶ added in v1.16.0
LKENodePoolDisk represents a Node disk in an LKENodePool object
type LKENodePoolLinode ¶ added in v1.16.0
type LKENodePoolLinode struct { ID string `json:"id"` InstanceID int `json:"instance_id"` Status LKELinodeStatus `json:"status"` }
LKENodePoolLinode represents a LKENodePoolLinode object
type LKENodePoolUpdateOptions ¶ added in v1.16.0
type LKENodePoolUpdateOptions struct { Count int `json:"count,omitempty"` Tags *[]string `json:"tags,omitempty"` Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"` }
LKENodePoolUpdateOptions fields are those accepted by UpdateLKENodePoolUpdate
type LKENodePoolsPagedResponse ¶ added in v1.16.0
type LKENodePoolsPagedResponse struct { *PageOptions Data []LKENodePool `json:"data"` }
LKENodePoolsPagedResponse represents a paginated LKENodePool API response
type LKEVersion ¶ added in v1.16.0
type LKEVersion struct {
ID string `json:"id"`
}
LKEVersion fields are those returned by GetLKEVersion
type LKEVersionsPagedResponse ¶ added in v1.16.0
type LKEVersionsPagedResponse struct { *PageOptions Data []LKEVersion `json:"data"` }
LKEVersionsPagedResponse represents a paginated LKEVersion API response
type LinodeAddons ¶
type LinodeAddons struct {
Backups *LinodeBackupsAddon `json:"backups"`
}
LinodeAddons represent the linode addons object
type LinodeBackupsAddon ¶
type LinodeBackupsAddon struct {
Price *LinodePrice `json:"price"`
}
LinodeBackupsAddon represents a linode backups addon object
type LinodeIPAssignment ¶ added in v1.16.0
LinodeIPAssignment stores an assignment between an IP address and a Linode instance.
type LinodeKernel ¶
type LinodeKernel struct { ID string `json:"id"` Label string `json:"label"` Version string `json:"version"` Architecture string `json:"architecture"` Deprecated bool `json:"deprecated"` KVM bool `json:"kvm"` XEN bool `json:"xen"` PVOPS bool `json:"pvops"` }
LinodeKernel represents a Linode Instance kernel object
type LinodeKernelsPagedResponse ¶
type LinodeKernelsPagedResponse struct { *PageOptions Data []LinodeKernel `json:"data"` }
LinodeKernelsPagedResponse represents a Linode kernels API response for listing
type LinodePrice ¶
LinodePrice represents a linode type price object
type LinodeType ¶
type LinodeType struct { ID string `json:"id"` Disk int `json:"disk"` Class LinodeTypeClass `json:"class"` // enum: nanode, standard, highmem, dedicated Price *LinodePrice `json:"price"` Label string `json:"label"` Addons *LinodeAddons `json:"addons"` NetworkOut int `json:"network_out"` Memory int `json:"memory"` Transfer int `json:"transfer"` VCPUs int `json:"vcpus"` }
LinodeType represents a linode type object
type LinodeTypeClass ¶ added in v0.4.0
type LinodeTypeClass string
LinodeTypeClass constants start with Class and include Linode API Instance Type Classes
const ( ClassNanode LinodeTypeClass = "nanode" ClassStandard LinodeTypeClass = "standard" ClassHighmem LinodeTypeClass = "highmem" ClassDedicated LinodeTypeClass = "dedicated" )
LinodeTypeClass contants are the Instance Type Classes that an Instance Type can be assigned
type LinodeTypesPagedResponse ¶
type LinodeTypesPagedResponse struct { *PageOptions Data []LinodeType `json:"data"` }
LinodeTypesPagedResponse represents a linode types API response for listing
type LinodesAssignIPsOptions ¶ added in v1.16.0
type LinodesAssignIPsOptions struct { Region string `json:"region"` Assignments []LinodeIPAssignment `json:"assignments"` }
LinodesAssignIPsOptions fields are those accepted by InstancesAssignIPs.
type LishAuthMethod ¶ added in v0.6.1
type LishAuthMethod string
LishAuthMethod constants start with AuthMethod and include Linode API Lish Authentication Methods
const ( AuthMethodPasswordKeys LishAuthMethod = "password_keys" AuthMethodKeysOnly LishAuthMethod = "keys_only" AuthMethodDisabled LishAuthMethod = "disabled" )
LishAuthMethod constants are the methods of authentication allowed when connecting via Lish
type ListOptions ¶
type ListOptions struct { *PageOptions PageSize int Filter string }
ListOptions are the pagination and filtering (TODO) parameters for endpoints
func NewListOptions ¶
func NewListOptions(page int, filter string) *ListOptions
NewListOptions simplified construction of ListOptions using only the two writable properties, Page and Filter
func (ListOptions) Hash ¶ added in v1.16.0
func (l ListOptions) Hash() (string, error)
Hash returns the sha256 hash of the provided ListOptions. This is necessary for caching purposes.
type LoadConfigOptions ¶ added in v1.16.0
type Login ¶ added in v1.16.0
type Login struct { ID int `json:"id"` Datetime *time.Time `json:"datetime"` IP string `json:"ip"` Restricted bool `json:"restricted"` Username string `json:"username"` }
func (*Login) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type LoginsPagedResponse ¶ added in v1.16.0
type LoginsPagedResponse struct { *PageOptions Data []Login `json:"data"` }
type LongviewClient ¶
type LongviewClient struct { ID int `json:"id"` APIKey string `json:"api_key"` Created string `json:"created"` InstallCode string `json:"install_code"` Label string `json:"label"` Updated string `json:"updated"` Apps struct { Apache any `json:"apache"` MySQL any `json:"mysql"` NginX any `json:"nginx"` } `json:"apps"` }
LongviewClient represents a LongviewClient object
type LongviewClientCreateOptions ¶ added in v1.16.0
type LongviewClientCreateOptions struct {
Label string `json:"label"`
}
LongviewClientCreateOptions is an options struct used when Creating a Longview Client
type LongviewClientUpdateOptions ¶ added in v1.16.0
type LongviewClientUpdateOptions struct {
Label string `json:"label"`
}
LongviewClientCreateOptions is an options struct used when Updating a Longview Client
type LongviewClientsPagedResponse ¶
type LongviewClientsPagedResponse struct { *PageOptions Data []LongviewClient `json:"data"` }
LongviewClientsPagedResponse represents a paginated LongviewClient API response
type LongviewPlan ¶ added in v1.16.0
type LongviewPlan struct { ID string `json:"id"` Label string `json:"label"` ClientsIncluded int `json:"clients_included"` Price struct { Hourly float64 `json:"hourly"` Monthly float64 `json:"monthly"` } `json:"price"` }
LongviewPlan represents a Longview Plan object
type LongviewPlanUpdateOptions ¶ added in v1.16.0
type LongviewPlanUpdateOptions struct {
LongviewSubscription string `json:"longview_subscription"`
}
LongviewPlanUpdateOptions is an options struct used when Updating a Longview Plan
type LongviewSubscription ¶
type LongviewSubscription struct { ID string `json:"id"` Label string `json:"label"` ClientsIncluded int `json:"clients_included"` Price *LinodePrice `json:"price"` }
LongviewSubscription represents a LongviewSubscription object
type LongviewSubscriptionsPagedResponse ¶
type LongviewSubscriptionsPagedResponse struct { *PageOptions Data []LongviewSubscription `json:"data"` }
LongviewSubscriptionsPagedResponse represents a paginated LongviewSubscription API response
type MongoBackupCreateOptions ¶ added in v1.16.0
type MongoBackupCreateOptions struct { Label string `json:"label"` Target MongoDatabaseTarget `json:"target"` }
MongoBackupCreateOptions are options used for CreateMongoDatabaseBackup(...)
type MongoCompressionType ¶ added in v1.16.0
type MongoCompressionType string
const ( MongoCompressionNone MongoCompressionType = "none" MongoCompressionSnappy MongoCompressionType = "snappy" MongoCompressionZlib MongoCompressionType = "zlib" )
type MongoCreateOptions ¶ added in v1.16.0
type MongoCreateOptions struct { Label string `json:"label"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` AllowList []string `json:"allow_list,omitempty"` ClusterSize int `json:"cluster_size,omitempty"` Encrypted bool `json:"encrypted,omitempty"` SSLConnection bool `json:"ssl_connection,omitempty"` CompressionType MongoCompressionType `json:"compression_type,omitempty"` StorageEngine MongoStorageEngine `json:"storage_engine,omitempty"` }
MongoCreateOptions fields are used when creating a new Mongo Database
type MongoDatabase ¶ added in v1.16.0
type MongoDatabase struct { ID int `json:"id"` Status DatabaseStatus `json:"status"` Label string `json:"label"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` Version string `json:"version"` Encrypted bool `json:"encrypted"` AllowList []string `json:"allow_list"` Peers []string `json:"peers"` Port int `json:"port"` ReplicaSet string `json:"replica_set"` SSLConnection bool `json:"ssl_connection"` ClusterSize int `json:"cluster_size"` Hosts DatabaseHost `json:"hosts"` CompressionType MongoCompressionType `json:"compression_type"` StorageEngine MongoStorageEngine `json:"storage_engine"` Updates DatabaseMaintenanceWindow `json:"updates"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
A MongoDatabase is a instance of Linode Mongo Managed Databases
func (*MongoDatabase) UnmarshalJSON ¶ added in v1.16.0
func (d *MongoDatabase) UnmarshalJSON(b []byte) error
type MongoDatabaseBackup ¶ added in v1.16.0
type MongoDatabaseBackup struct { ID int `json:"id"` Label string `json:"label"` Type string `json:"type"` Created *time.Time `json:"-"` }
MongoDatabaseBackup is information for interacting with a backup for the existing Mongo Database
func (*MongoDatabaseBackup) UnmarshalJSON ¶ added in v1.16.0
func (d *MongoDatabaseBackup) UnmarshalJSON(b []byte) error
type MongoDatabaseBackupsPagedResponse ¶ added in v1.16.0
type MongoDatabaseBackupsPagedResponse struct { *PageOptions Data []MongoDatabaseBackup `json:"data"` }
type MongoDatabaseCredential ¶ added in v1.16.0
type MongoDatabaseCredential struct { Username string `json:"username"` Password string `json:"password"` }
MongoDatabaseCredential is the Root Credentials to access the Linode Managed Database
type MongoDatabaseSSL ¶ added in v1.16.0
type MongoDatabaseSSL struct {
CACertificate []byte `json:"ca_certificate"`
}
MongoDatabaseSSL is the SSL Certificate to access the Linode Managed Mongo Database
type MongoDatabaseTarget ¶ added in v1.16.0
type MongoDatabaseTarget string
const ( MongoDatabaseTargetPrimary MongoDatabaseTarget = "primary" MongoDatabaseTargetSecondary MongoDatabaseTarget = "secondary" )
type MongoDatabasesPagedResponse ¶ added in v1.16.0
type MongoDatabasesPagedResponse struct { *PageOptions Data []MongoDatabase `json:"data"` }
type MongoStorageEngine ¶ added in v1.16.0
type MongoStorageEngine string
const ( MongoStorageWiredTiger MongoStorageEngine = "wiredtiger" MongoStorageMmapv1 MongoStorageEngine = "mmapv1" )
type MongoUpdateOptions ¶ added in v1.16.0
type MongoUpdateOptions struct { Label string `json:"label,omitempty"` AllowList *[]string `json:"allow_list,omitempty"` Updates *DatabaseMaintenanceWindow `json:"updates,omitempty"` }
MongoUpdateOptions fields are used when altering the existing Mongo Database
type MySQLBackupCreateOptions ¶ added in v1.16.0
type MySQLBackupCreateOptions struct { Label string `json:"label"` Target MySQLDatabaseTarget `json:"target"` }
MySQLBackupCreateOptions are options used for CreateMySQLDatabaseBackup(...)
type MySQLCreateOptions ¶ added in v1.16.0
type MySQLCreateOptions struct { Label string `json:"label"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` AllowList []string `json:"allow_list,omitempty"` ReplicationType string `json:"replication_type,omitempty"` ClusterSize int `json:"cluster_size,omitempty"` Encrypted bool `json:"encrypted,omitempty"` SSLConnection bool `json:"ssl_connection,omitempty"` }
MySQLCreateOptions fields are used when creating a new MySQL Database
type MySQLDatabase ¶ added in v1.16.0
type MySQLDatabase struct { ID int `json:"id"` Status DatabaseStatus `json:"status"` Label string `json:"label"` Hosts DatabaseHost `json:"hosts"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` Version string `json:"version"` ClusterSize int `json:"cluster_size"` ReplicationType string `json:"replication_type"` SSLConnection bool `json:"ssl_connection"` Encrypted bool `json:"encrypted"` AllowList []string `json:"allow_list"` InstanceURI string `json:"instance_uri"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` Updates DatabaseMaintenanceWindow `json:"updates"` }
A MySQLDatabase is a instance of Linode MySQL Managed Databases
func (*MySQLDatabase) UnmarshalJSON ¶ added in v1.16.0
func (d *MySQLDatabase) UnmarshalJSON(b []byte) error
type MySQLDatabaseBackup ¶ added in v1.16.0
type MySQLDatabaseBackup struct { ID int `json:"id"` Label string `json:"label"` Type string `json:"type"` Created *time.Time `json:"-"` }
MySQLDatabaseBackup is information for interacting with a backup for the existing MySQL Database
func (*MySQLDatabaseBackup) UnmarshalJSON ¶ added in v1.16.0
func (d *MySQLDatabaseBackup) UnmarshalJSON(b []byte) error
type MySQLDatabaseBackupsPagedResponse ¶ added in v1.16.0
type MySQLDatabaseBackupsPagedResponse struct { *PageOptions Data []MySQLDatabaseBackup `json:"data"` }
type MySQLDatabaseCredential ¶ added in v1.16.0
type MySQLDatabaseCredential struct { Username string `json:"username"` Password string `json:"password"` }
MySQLDatabaseCredential is the Root Credentials to access the Linode Managed Database
type MySQLDatabaseMaintenanceWindow ¶ added in v1.16.0
type MySQLDatabaseMaintenanceWindow = DatabaseMaintenanceWindow
type MySQLDatabaseSSL ¶ added in v1.16.0
type MySQLDatabaseSSL struct {
CACertificate []byte `json:"ca_certificate"`
}
MySQLDatabaseSSL is the SSL Certificate to access the Linode Managed MySQL Database
type MySQLDatabaseTarget ¶ added in v1.16.0
type MySQLDatabaseTarget string
const ( MySQLDatabaseTargetPrimary MySQLDatabaseTarget = "primary" MySQLDatabaseTargetSecondary MySQLDatabaseTarget = "secondary" )
type MySQLDatabasesPagedResponse ¶ added in v1.16.0
type MySQLDatabasesPagedResponse struct { *PageOptions Data []MySQLDatabase `json:"data"` }
type MySQLUpdateOptions ¶ added in v1.16.0
type MySQLUpdateOptions struct { Label string `json:"label,omitempty"` AllowList *[]string `json:"allow_list,omitempty"` Updates *DatabaseMaintenanceWindow `json:"updates,omitempty"` }
MySQLUpdateOptions fields are used when altering the existing MySQL Database
type NetworkAddresses ¶ added in v1.16.0
type NetworkAddresses struct { IPv4 *[]string `json:"ipv4,omitempty"` IPv6 *[]string `json:"ipv6,omitempty"` }
NetworkAddresses are arrays of ipv4 and v6 addresses
type NetworkProtocol ¶ added in v1.16.0
type NetworkProtocol string
NetworkProtocol enum type
const ( TCP NetworkProtocol = "TCP" UDP NetworkProtocol = "UDP" ICMP NetworkProtocol = "ICMP" IPENCAP NetworkProtocol = "IPENCAP" )
NetworkProtocol enum values
type NodeBalancer ¶
type NodeBalancer struct { // This NodeBalancer's unique ID. ID int `json:"id"` // This NodeBalancer's label. These must be unique on your Account. Label *string `json:"label"` // The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. Region string `json:"region"` // This NodeBalancer's hostname, ending with .nodebalancer.linode.com Hostname *string `json:"hostname"` // This NodeBalancer's public IPv4 address. IPv4 *string `json:"ipv4"` // This NodeBalancer's public IPv6 address. IPv6 *string `json:"ipv6"` // Throttle connections per second (0-20). Set to 0 (zero) to disable throttling. ClientConnThrottle int `json:"client_conn_throttle"` // Information about the amount of transfer this NodeBalancer has had so far this month. Transfer NodeBalancerTransfer `json:"transfer"` // An array of tags applied to this object. Tags are for organizational purposes only. Tags []string `json:"tags"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
NodeBalancer represents a NodeBalancer object
func (NodeBalancer) GetCreateOptions ¶
func (i NodeBalancer) GetCreateOptions() NodeBalancerCreateOptions
GetCreateOptions converts a NodeBalancer to NodeBalancerCreateOptions for use in CreateNodeBalancer
func (NodeBalancer) GetUpdateOptions ¶
func (i NodeBalancer) GetUpdateOptions() NodeBalancerUpdateOptions
GetUpdateOptions converts a NodeBalancer to NodeBalancerUpdateOptions for use in UpdateNodeBalancer
func (*NodeBalancer) UnmarshalJSON ¶ added in v1.16.0
func (i *NodeBalancer) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type NodeBalancerConfig ¶
type NodeBalancerConfig struct { ID int `json:"id"` Port int `json:"port"` Protocol ConfigProtocol `json:"protocol"` ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol"` Algorithm ConfigAlgorithm `json:"algorithm"` Stickiness ConfigStickiness `json:"stickiness"` Check ConfigCheck `json:"check"` CheckInterval int `json:"check_interval"` CheckAttempts int `json:"check_attempts"` CheckPath string `json:"check_path"` CheckBody string `json:"check_body"` CheckPassive bool `json:"check_passive"` CheckTimeout int `json:"check_timeout"` CipherSuite ConfigCipher `json:"cipher_suite"` NodeBalancerID int `json:"nodebalancer_id"` SSLCommonName string `json:"ssl_commonname"` SSLFingerprint string `json:"ssl_fingerprint"` SSLCert string `json:"ssl_cert"` SSLKey string `json:"ssl_key"` NodesStatus *NodeBalancerNodeStatus `json:"nodes_status"` }
NodeBalancerConfig objects allow a NodeBalancer to accept traffic on a new port
func (NodeBalancerConfig) GetCreateOptions ¶
func (i NodeBalancerConfig) GetCreateOptions() NodeBalancerConfigCreateOptions
GetCreateOptions converts a NodeBalancerConfig to NodeBalancerConfigCreateOptions for use in CreateNodeBalancerConfig
func (NodeBalancerConfig) GetRebuildOptions ¶ added in v0.5.0
func (i NodeBalancerConfig) GetRebuildOptions() NodeBalancerConfigRebuildOptions
GetRebuildOptions converts a NodeBalancerConfig to NodeBalancerConfigRebuildOptions for use in RebuildNodeBalancerConfig
func (NodeBalancerConfig) GetUpdateOptions ¶
func (i NodeBalancerConfig) GetUpdateOptions() NodeBalancerConfigUpdateOptions
GetUpdateOptions converts a NodeBalancerConfig to NodeBalancerConfigUpdateOptions for use in UpdateNodeBalancerConfig
type NodeBalancerConfigCreateOptions ¶
type NodeBalancerConfigCreateOptions struct { Port int `json:"port"` Protocol ConfigProtocol `json:"protocol,omitempty"` ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol,omitempty"` Algorithm ConfigAlgorithm `json:"algorithm,omitempty"` Stickiness ConfigStickiness `json:"stickiness,omitempty"` Check ConfigCheck `json:"check,omitempty"` CheckInterval int `json:"check_interval,omitempty"` CheckAttempts int `json:"check_attempts,omitempty"` CheckPath string `json:"check_path,omitempty"` CheckBody string `json:"check_body,omitempty"` CheckPassive *bool `json:"check_passive,omitempty"` CheckTimeout int `json:"check_timeout,omitempty"` CipherSuite ConfigCipher `json:"cipher_suite,omitempty"` SSLCert string `json:"ssl_cert,omitempty"` SSLKey string `json:"ssl_key,omitempty"` Nodes []NodeBalancerNodeCreateOptions `json:"nodes,omitempty"` }
NodeBalancerConfigCreateOptions are permitted by CreateNodeBalancerConfig
type NodeBalancerConfigRebuildOptions ¶ added in v0.5.0
type NodeBalancerConfigRebuildOptions struct { Port int `json:"port"` Protocol ConfigProtocol `json:"protocol,omitempty"` ProxyProtocol ConfigProxyProtocol `json:"proxy_protocol,omitempty"` Algorithm ConfigAlgorithm `json:"algorithm,omitempty"` Stickiness ConfigStickiness `json:"stickiness,omitempty"` Check ConfigCheck `json:"check,omitempty"` CheckInterval int `json:"check_interval,omitempty"` CheckAttempts int `json:"check_attempts,omitempty"` CheckPath string `json:"check_path,omitempty"` CheckBody string `json:"check_body,omitempty"` CheckPassive *bool `json:"check_passive,omitempty"` CheckTimeout int `json:"check_timeout,omitempty"` CipherSuite ConfigCipher `json:"cipher_suite,omitempty"` SSLCert string `json:"ssl_cert,omitempty"` SSLKey string `json:"ssl_key,omitempty"` Nodes []NodeBalancerNodeCreateOptions `json:"nodes"` }
NodeBalancerConfigRebuildOptions used by RebuildNodeBalancerConfig
type NodeBalancerConfigUpdateOptions ¶
type NodeBalancerConfigUpdateOptions NodeBalancerConfigCreateOptions
NodeBalancerConfigUpdateOptions are permitted by UpdateNodeBalancerConfig
type NodeBalancerConfigsPagedResponse ¶
type NodeBalancerConfigsPagedResponse struct { *PageOptions Data []NodeBalancerConfig `json:"data"` }
NodeBalancerConfigsPagedResponse represents a paginated NodeBalancerConfig API response
type NodeBalancerCreateOptions ¶
type NodeBalancerCreateOptions struct { Label *string `json:"label,omitempty"` Region string `json:"region,omitempty"` ClientConnThrottle *int `json:"client_conn_throttle,omitempty"` Configs []*NodeBalancerConfigCreateOptions `json:"configs,omitempty"` Tags []string `json:"tags"` }
NodeBalancerCreateOptions are the options permitted for CreateNodeBalancer
type NodeBalancerNode ¶
type NodeBalancerNode struct { ID int `json:"id"` Address string `json:"address"` Label string `json:"label"` Status string `json:"status"` Weight int `json:"weight"` Mode NodeMode `json:"mode"` ConfigID int `json:"config_id"` NodeBalancerID int `json:"nodebalancer_id"` }
NodeBalancerNode objects represent a backend that can accept traffic for a NodeBalancer Config
func (NodeBalancerNode) GetCreateOptions ¶
func (i NodeBalancerNode) GetCreateOptions() NodeBalancerNodeCreateOptions
GetCreateOptions converts a NodeBalancerNode to NodeBalancerNodeCreateOptions for use in CreateNodeBalancerNode
func (NodeBalancerNode) GetUpdateOptions ¶
func (i NodeBalancerNode) GetUpdateOptions() NodeBalancerNodeUpdateOptions
GetUpdateOptions converts a NodeBalancerNode to NodeBalancerNodeUpdateOptions for use in UpdateNodeBalancerNode
type NodeBalancerNodeCreateOptions ¶
type NodeBalancerNodeCreateOptions struct { Address string `json:"address"` Label string `json:"label"` Weight int `json:"weight,omitempty"` Mode NodeMode `json:"mode,omitempty"` }
NodeBalancerNodeCreateOptions fields are those accepted by CreateNodeBalancerNode
type NodeBalancerNodeStatus ¶
NodeBalancerNodeStatus represents the total number of nodes whose status is Up or Down
type NodeBalancerNodeUpdateOptions ¶
type NodeBalancerNodeUpdateOptions struct { Address string `json:"address,omitempty"` Label string `json:"label,omitempty"` Weight int `json:"weight,omitempty"` Mode NodeMode `json:"mode,omitempty"` }
NodeBalancerNodeUpdateOptions fields are those accepted by UpdateNodeBalancerNode
type NodeBalancerNodesPagedResponse ¶
type NodeBalancerNodesPagedResponse struct { *PageOptions Data []NodeBalancerNode `json:"data"` }
NodeBalancerNodesPagedResponse represents a paginated NodeBalancerNode API response
type NodeBalancerStats ¶ added in v1.16.0
type NodeBalancerStats struct { Title string `json:"title"` Data NodeBalancerStatsData `json:"data"` }
NodeBalancerStats represents a nodebalancer stats object
type NodeBalancerStatsData ¶ added in v1.16.0
type NodeBalancerStatsData struct { Connections [][]float64 `json:"connections"` Traffic StatsTraffic `json:"traffic"` }
NodeBalancerStatsData represents a nodebalancer stats data object
type NodeBalancerTransfer ¶
type NodeBalancerTransfer struct { // The total transfer, in MB, used by this NodeBalancer this month. Total *float64 `json:"total"` // The total inbound transfer, in MB, used for this NodeBalancer this month. Out *float64 `json:"out"` // The total outbound transfer, in MB, used for this NodeBalancer this month. In *float64 `json:"in"` }
NodeBalancerTransfer contains information about the amount of transfer a NodeBalancer has had in the current month
type NodeBalancerUpdateOptions ¶
type NodeBalancerUpdateOptions struct { Label *string `json:"label,omitempty"` ClientConnThrottle *int `json:"client_conn_throttle,omitempty"` Tags *[]string `json:"tags,omitempty"` }
NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer
type NodeBalancersPagedResponse ¶
type NodeBalancersPagedResponse struct { *PageOptions Data []NodeBalancer `json:"data"` }
NodeBalancersPagedResponse represents a paginated NodeBalancer API response
type NodeMode ¶ added in v0.2.0
type NodeMode string
NodeMode is the mode a NodeBalancer should use when sending traffic to a NodeBalancer Node
var ( // ModeAccept is the NodeMode indicating a NodeBalancer Node is accepting traffic ModeAccept NodeMode = "accept" // ModeReject is the NodeMode indicating a NodeBalancer Node is not receiving traffic ModeReject NodeMode = "reject" // ModeDrain is the NodeMode indicating a NodeBalancer Node is not receiving new traffic, but may continue receiving traffic from pinned connections ModeDrain NodeMode = "drain" // ModeBackup is the NodeMode indicating a NodeBalancer Node will only receive traffic if all "accept" Nodes are down ModeBackup NodeMode = "backup" )
type Notification ¶
type Notification struct { Label string `json:"label"` Body *string `json:"body"` Message string `json:"message"` Type NotificationType `json:"type"` Severity NotificationSeverity `json:"severity"` Entity *NotificationEntity `json:"entity"` Until *time.Time `json:"-"` When *time.Time `json:"-"` }
Notification represents a notification on an Account
func (*Notification) UnmarshalJSON ¶ added in v1.16.0
func (i *Notification) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type NotificationEntity ¶
type NotificationEntity struct { ID int `json:"id"` Label string `json:"label"` Type string `json:"type"` URL string `json:"url"` }
NotificationEntity adds detailed information about the Notification. This could refer to the ticket that triggered the notification, for example.
type NotificationSeverity ¶ added in v0.7.1
type NotificationSeverity string
NotificationSeverity constants start with Notification and include all known Linode API Notification Severities.
const ( NotificationMinor NotificationSeverity = "minor" NotificationMajor NotificationSeverity = "major" NotificationCritical NotificationSeverity = "critical" )
NotificationSeverity constants represent the actions that cause a Notification. New severities may be added in the future.
type NotificationType ¶ added in v0.7.1
type NotificationType string
NotificationType constants start with Notification and include all known Linode API Notification Types.
const ( NotificationMigrationScheduled NotificationType = "migration_scheduled" NotificationMigrationImminent NotificationType = "migration_imminent" NotificationMigrationPending NotificationType = "migration_pending" NotificationRebootScheduled NotificationType = "reboot_scheduled" NotificationOutage NotificationType = "outage" NotificationPaymentDue NotificationType = "payment_due" NotificationTicketImportant NotificationType = "ticket_important" NotificationTicketAbuse NotificationType = "ticket_abuse" NotificationNotice NotificationType = "notice" NotificationMaintenance NotificationType = "maintenance" )
NotificationType constants represent the actions that cause a Notification. New types may be added in the future.
type NotificationsPagedResponse ¶
type NotificationsPagedResponse struct { *PageOptions Data []Notification `json:"data"` }
NotificationsPagedResponse represents a paginated Notifications API response
type OAuthClient ¶ added in v1.16.0
type OAuthClient struct { // The unique ID of this OAuth Client. ID string `json:"id"` // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange. RedirectURI string `json:"redirect_uri"` // The name of this application. This will be presented to users when they are asked to grant it access to their Account. Label string `json:"label"` // Current status of the OAuth Client, Enum: "active" "disabled" "suspended" Status OAuthClientStatus `json:"status"` // The OAuth Client secret, used in the OAuth exchange. This is returned as <REDACTED> except when an OAuth Client is created or its secret is reset. This is a secret, and should not be shared or disclosed publicly. Secret string `json:"secret"` // If this OAuth Client is public or private. Public bool `json:"public"` // The URL where this client's thumbnail may be viewed, or nil if this client does not have a thumbnail set. ThumbnailURL *string `json:"thumbnail_url"` }
OAuthClient represents a OAuthClient object
func (OAuthClient) GetCreateOptions ¶ added in v1.16.0
func (i OAuthClient) GetCreateOptions() (o OAuthClientCreateOptions)
GetCreateOptions converts a OAuthClient to OAuthClientCreateOptions for use in CreateOAuthClient
func (OAuthClient) GetUpdateOptions ¶ added in v1.16.0
func (i OAuthClient) GetUpdateOptions() (o OAuthClientUpdateOptions)
GetUpdateOptions converts a OAuthClient to OAuthClientUpdateOptions for use in UpdateOAuthClient
type OAuthClientCreateOptions ¶ added in v1.16.0
type OAuthClientCreateOptions struct { // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange. RedirectURI string `json:"redirect_uri"` // The name of this application. This will be presented to users when they are asked to grant it access to their Account. Label string `json:"label"` // If this OAuth Client is public or private. Public bool `json:"public"` }
OAuthClientCreateOptions fields are those accepted by CreateOAuthClient
type OAuthClientStatus ¶ added in v1.16.0
type OAuthClientStatus string
OAuthClientStatus constants start with OAuthClient and include Linode API Instance Status values
const ( OAuthClientActive OAuthClientStatus = "active" OAuthClientDisabled OAuthClientStatus = "disabled" OAuthClientSuspended OAuthClientStatus = "suspended" )
OAuthClientStatus constants reflect the current status of an OAuth Client
type OAuthClientUpdateOptions ¶ added in v1.16.0
type OAuthClientUpdateOptions struct { // The location a successful log in from https://login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange. RedirectURI string `json:"redirect_uri"` // The name of this application. This will be presented to users when they are asked to grant it access to their Account. Label string `json:"label"` // If this OAuth Client is public or private. Public bool `json:"public"` }
OAuthClientUpdateOptions fields are those accepted by UpdateOAuthClient
type OAuthClientsPagedResponse ¶ added in v1.16.0
type OAuthClientsPagedResponse struct { *PageOptions Data []OAuthClient `json:"data"` }
OAuthClientsPagedResponse represents a paginated OAuthClient API response
type ObjectStorageACL ¶ added in v1.16.0
type ObjectStorageACL string
ObjectStorageACL options start with ACL and include all known ACL types
const ( ACLPrivate ObjectStorageACL = "private" ACLPublicRead ObjectStorageACL = "public-read" ACLAuthenticatedRead ObjectStorageACL = "authenticated-read" ACLPublicReadWrite ObjectStorageACL = "public-read-write" )
ObjectStorageACL options represent the access control level of a bucket.
type ObjectStorageBucket ¶ added in v1.16.0
type ObjectStorageBucket struct { Label string `json:"label"` Cluster string `json:"cluster"` Created *time.Time `json:"-"` Hostname string `json:"hostname"` }
ObjectStorageBucket represents a ObjectStorage object
func (*ObjectStorageBucket) UnmarshalJSON ¶ added in v1.16.0
func (i *ObjectStorageBucket) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type ObjectStorageBucketAccess ¶ added in v1.16.0
type ObjectStorageBucketAccess struct { ACL ObjectStorageACL `json:"acl"` CorsEnabled bool `json:"cors_enabled"` }
ObjectStorageBucketAccess holds Object Storage access info
type ObjectStorageBucketCert ¶ added in v1.16.0
type ObjectStorageBucketCert struct {
SSL bool `json:"ssl"`
}
type ObjectStorageBucketCertUploadOptions ¶ added in v1.16.0
type ObjectStorageBucketCreateOptions ¶ added in v1.16.0
type ObjectStorageBucketCreateOptions struct { Cluster string `json:"cluster"` Label string `json:"label"` ACL ObjectStorageACL `json:"acl,omitempty"` CorsEnabled *bool `json:"cors_enabled,omitempty"` }
ObjectStorageBucketCreateOptions fields are those accepted by CreateObjectStorageBucket
type ObjectStorageBucketUpdateAccessOptions ¶ added in v1.16.0
type ObjectStorageBucketUpdateAccessOptions struct { ACL ObjectStorageACL `json:"acl,omitempty"` CorsEnabled *bool `json:"cors_enabled,omitempty"` }
ObjectStorageBucketUpdateAccessOptions fields are those accepted by UpdateObjectStorageBucketAccess
type ObjectStorageBucketsPagedResponse ¶ added in v1.16.0
type ObjectStorageBucketsPagedResponse struct { *PageOptions Data []ObjectStorageBucket `json:"data"` }
ObjectStorageBucketsPagedResponse represents a paginated ObjectStorageBucket API response
type ObjectStorageCluster ¶ added in v1.16.0
type ObjectStorageCluster struct { ID string `json:"id"` Domain string `json:"domain"` Status string `json:"status"` Region string `json:"region"` StaticSiteDomain string `json:"static_site_domain"` }
ObjectStorageCluster represents a linode object storage cluster object
type ObjectStorageClustersPagedResponse ¶ added in v1.16.0
type ObjectStorageClustersPagedResponse struct { *PageOptions Data []ObjectStorageCluster `json:"data"` }
ObjectStorageClustersPagedResponse represents a linode API response for listing
type ObjectStorageKey ¶ added in v1.16.0
type ObjectStorageKey struct { ID int `json:"id"` Label string `json:"label"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` Limited bool `json:"limited"` BucketAccess *[]ObjectStorageKeyBucketAccess `json:"bucket_access"` }
ObjectStorageKey represents a linode object storage key object
type ObjectStorageKeyBucketAccess ¶ added in v1.16.0
type ObjectStorageKeyBucketAccess struct { Cluster string `json:"cluster"` BucketName string `json:"bucket_name"` Permissions string `json:"permissions"` }
ObjectStorageKeyBucketAccess represents a linode limited object storage key's bucket access
type ObjectStorageKeyCreateOptions ¶ added in v1.16.0
type ObjectStorageKeyCreateOptions struct { Label string `json:"label"` BucketAccess *[]ObjectStorageKeyBucketAccess `json:"bucket_access"` }
ObjectStorageKeyCreateOptions fields are those accepted by CreateObjectStorageKey
type ObjectStorageKeyUpdateOptions ¶ added in v1.16.0
type ObjectStorageKeyUpdateOptions struct {
Label string `json:"label"`
}
ObjectStorageKeyUpdateOptions fields are those accepted by UpdateObjectStorageKey
type ObjectStorageKeysPagedResponse ¶ added in v1.16.0
type ObjectStorageKeysPagedResponse struct { *PageOptions Data []ObjectStorageKey `json:"data"` }
ObjectStorageKeysPagedResponse represents a linode API response for listing
type ObjectStorageObjectACLConfig ¶ added in v1.16.0
type ObjectStorageObjectACLConfigUpdateOptions ¶ added in v1.16.0
type ObjectStorageObjectURL ¶ added in v1.16.0
type ObjectStorageObjectURLCreateOptions ¶ added in v1.16.0
type ObjectStorageTransfer ¶ added in v1.16.0
type ObjectStorageTransfer struct {
AmmountUsed int `json:"used"`
}
ObjectStorageTransfer is an object matching the response of object-storage/transfer
type PageOptions ¶
type PageOptions struct { Page int `url:"page,omitempty" json:"page"` Pages int `url:"pages,omitempty" json:"pages"` Results int `url:"results,omitempty" json:"results"` }
PageOptions are the pagination parameters for List endpoints
type PagedResponse ¶ added in v1.16.0
type PagedResponse interface {
// contains filtered or unexported methods
}
type Payment ¶ added in v1.16.0
type Payment struct { // The unique ID of the Payment ID int `json:"id"` // The amount, in US dollars, of the Payment. USD json.Number `json:"usd,Number"` // When the Payment was made. Date *time.Time `json:"-"` }
Payment represents a Payment object
func (Payment) GetCreateOptions ¶ added in v1.16.0
func (i Payment) GetCreateOptions() (o PaymentCreateOptions)
GetCreateOptions converts a Payment to PaymentCreateOptions for use in CreatePayment
func (*Payment) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type PaymentCreateOptions ¶ added in v1.16.0
type PaymentCreateOptions struct { // CVV (Card Verification Value) of the credit card to be used for the Payment CVV string `json:"cvv,omitempty"` // The amount, in US dollars, of the Payment USD json.Number `json:"usd,Number"` }
PaymentCreateOptions fields are those accepted by CreatePayment
type PaymentsPagedResponse ¶ added in v1.16.0
type PaymentsPagedResponse struct { *PageOptions Data []Payment `json:"data"` }
PaymentsPagedResponse represents a paginated Payment API response
type PostgresBackupCreateOptions ¶ added in v1.16.0
type PostgresBackupCreateOptions struct { Label string `json:"label"` Target PostgresDatabaseTarget `json:"target"` }
PostgresBackupCreateOptions are options used for CreatePostgresDatabaseBackup(...)
type PostgresCommitType ¶ added in v1.16.0
type PostgresCommitType string
const ( PostgresCommitTrue PostgresCommitType = "true" PostgresCommitFalse PostgresCommitType = "false" PostgresCommitLocal PostgresCommitType = "local" PostgresCommitRemoteWrite PostgresCommitType = "remote_write" PostgresCommitRemoteApply PostgresCommitType = "remote_apply" )
type PostgresCreateOptions ¶ added in v1.16.0
type PostgresCreateOptions struct { Label string `json:"label"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` AllowList []string `json:"allow_list,omitempty"` ClusterSize int `json:"cluster_size,omitempty"` Encrypted bool `json:"encrypted,omitempty"` SSLConnection bool `json:"ssl_connection,omitempty"` ReplicationType PostgresReplicationType `json:"replication_type,omitempty"` ReplicationCommitType PostgresCommitType `json:"replication_commit_type,omitempty"` }
PostgresCreateOptions fields are used when creating a new Postgres Database
type PostgresDatabase ¶ added in v1.16.0
type PostgresDatabase struct { ID int `json:"id"` Status DatabaseStatus `json:"status"` Label string `json:"label"` Region string `json:"region"` Type string `json:"type"` Engine string `json:"engine"` Version string `json:"version"` Encrypted bool `json:"encrypted"` AllowList []string `json:"allow_list"` Port int `json:"port"` SSLConnection bool `json:"ssl_connection"` ClusterSize int `json:"cluster_size"` ReplicationCommitType PostgresCommitType `json:"replication_commit_type"` ReplicationType PostgresReplicationType `json:"replication_type"` Hosts DatabaseHost `json:"hosts"` Updates DatabaseMaintenanceWindow `json:"updates"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
A PostgresDatabase is a instance of Linode Postgres Managed Databases
func (*PostgresDatabase) UnmarshalJSON ¶ added in v1.16.0
func (d *PostgresDatabase) UnmarshalJSON(b []byte) error
type PostgresDatabaseBackup ¶ added in v1.16.0
type PostgresDatabaseBackup struct { ID int `json:"id"` Label string `json:"label"` Type string `json:"type"` Created *time.Time `json:"-"` }
PostgresDatabaseBackup is information for interacting with a backup for the existing Postgres Database
func (*PostgresDatabaseBackup) UnmarshalJSON ¶ added in v1.16.0
func (d *PostgresDatabaseBackup) UnmarshalJSON(b []byte) error
type PostgresDatabaseBackupsPagedResponse ¶ added in v1.16.0
type PostgresDatabaseBackupsPagedResponse struct { *PageOptions Data []PostgresDatabaseBackup `json:"data"` }
type PostgresDatabaseCredential ¶ added in v1.16.0
type PostgresDatabaseCredential struct { Username string `json:"username"` Password string `json:"password"` }
PostgresDatabaseCredential is the Root Credentials to access the Linode Managed Database
type PostgresDatabaseSSL ¶ added in v1.16.0
type PostgresDatabaseSSL struct {
CACertificate []byte `json:"ca_certificate"`
}
PostgresDatabaseSSL is the SSL Certificate to access the Linode Managed Postgres Database
type PostgresDatabaseTarget ¶ added in v1.16.0
type PostgresDatabaseTarget string
const ( PostgresDatabaseTargetPrimary PostgresDatabaseTarget = "primary" PostgresDatabaseTargetSecondary PostgresDatabaseTarget = "secondary" )
type PostgresDatabasesPagedResponse ¶ added in v1.16.0
type PostgresDatabasesPagedResponse struct { *PageOptions Data []PostgresDatabase `json:"data"` }
type PostgresReplicationType ¶ added in v1.16.0
type PostgresReplicationType string
const ( PostgresReplicationNone PostgresReplicationType = "none" PostgresReplicationAsynch PostgresReplicationType = "asynch" PostgresReplicationSemiSynch PostgresReplicationType = "semi_synch" )
type PostgresUpdateOptions ¶ added in v1.16.0
type PostgresUpdateOptions struct { Label string `json:"label,omitempty"` AllowList *[]string `json:"allow_list,omitempty"` Updates *DatabaseMaintenanceWindow `json:"updates,omitempty"` }
PostgresUpdateOptions fields are used when altering the existing Postgres Database
type Profile ¶ added in v0.6.1
type Profile struct { UID int `json:"uid"` Username string `json:"username"` Email string `json:"email"` Timezone string `json:"timezone"` EmailNotifications bool `json:"email_notifications"` IPWhitelistEnabled bool `json:"ip_whitelist_enabled"` TwoFactorAuth bool `json:"two_factor_auth"` Restricted bool `json:"restricted"` LishAuthMethod LishAuthMethod `json:"lish_auth_method"` Referrals ProfileReferrals `json:"referrals"` AuthorizedKeys []string `json:"authorized_keys"` }
Profile represents a Profile object
func (Profile) GetUpdateOptions ¶ added in v0.6.1
func (i Profile) GetUpdateOptions() (o ProfileUpdateOptions)
GetUpdateOptions converts a Profile to ProfileUpdateOptions for use in UpdateProfile
type ProfileReferrals ¶ added in v0.6.1
type ProfileReferrals struct { Total int `json:"total"` Completed int `json:"completed"` Pending int `json:"pending"` Credit float64 `json:"credit"` Code string `json:"code"` URL string `json:"url"` }
ProfileReferrals represent a User's status in the Referral Program
type ProfileUpdateOptions ¶ added in v0.6.1
type ProfileUpdateOptions struct { Email string `json:"email,omitempty"` Timezone string `json:"timezone,omitempty"` EmailNotifications *bool `json:"email_notifications,omitempty"` IPWhitelistEnabled *bool `json:"ip_whitelist_enabled,omitempty"` LishAuthMethod LishAuthMethod `json:"lish_auth_method,omitempty"` AuthorizedKeys *[]string `json:"authorized_keys,omitempty"` TwoFactorAuth *bool `json:"two_factor_auth,omitempty"` Restricted *bool `json:"restricted,omitempty"` }
ProfileUpdateOptions fields are those accepted by UpdateProfile
type Region ¶
type Region struct { ID string `json:"id"` Country string `json:"country"` Capabilities []string `json:"capabilities"` Status string `json:"status"` Resolvers RegionResolvers `json:"resolvers"` }
Region represents a linode region object
type RegionResolvers ¶ added in v1.16.0
RegionResolvers contains the DNS resolvers of a region
type RegionsPagedResponse ¶
type RegionsPagedResponse struct { *PageOptions Data []Region `json:"data"` }
RegionsPagedResponse represents a linode API response for listing
type RestoreInstanceOptions ¶ added in v0.2.0
type RestoreInstanceOptions struct { LinodeID int `json:"linode_id"` Overwrite bool `json:"overwrite"` }
RestoreInstanceOptions fields are those accepted by InstanceRestore
type RetryAfter ¶ added in v1.16.0
type RetryAfter resty.RetryAfterFunc
type RetryAfter func(c *resty.Client, r *resty.Response) (time.Duration, error)
type RetryConditional ¶ added in v1.16.0
type RetryConditional resty.RetryConditionFunc
type RetryConditional func(r *resty.Response) (shouldRetry bool)
type SSHKey ¶ added in v0.5.0
type SSHKey struct { ID int `json:"id"` Label string `json:"label"` SSHKey string `json:"ssh_key"` Created *time.Time `json:"-"` }
SSHKey represents a SSHKey object
func (SSHKey) GetCreateOptions ¶ added in v0.5.0
func (i SSHKey) GetCreateOptions() (o SSHKeyCreateOptions)
GetCreateOptions converts a SSHKey to SSHKeyCreateOptions for use in CreateSSHKey
func (SSHKey) GetUpdateOptions ¶ added in v0.5.0
func (i SSHKey) GetUpdateOptions() (o SSHKeyUpdateOptions)
GetUpdateOptions converts a SSHKey to SSHKeyCreateOptions for use in UpdateSSHKey
func (*SSHKey) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type SSHKeyCreateOptions ¶ added in v0.5.0
SSHKeyCreateOptions fields are those accepted by CreateSSHKey
type SSHKeyUpdateOptions ¶ added in v0.5.0
type SSHKeyUpdateOptions struct {
Label string `json:"label"`
}
SSHKeyUpdateOptions fields are those accepted by UpdateSSHKey
type SSHKeysPagedResponse ¶ added in v0.5.0
type SSHKeysPagedResponse struct { *PageOptions Data []SSHKey `json:"data"` }
SSHKeysPagedResponse represents a paginated SSHKey API response
type SecurityQuestion ¶ added in v1.16.0
type SecurityQuestionsAnswerOptions ¶ added in v1.16.0
type SecurityQuestionsAnswerOptions struct {
SecurityQuestions []SecurityQuestionsAnswerQuestion `json:"security_questions"`
}
type SecurityQuestionsAnswerQuestion ¶ added in v1.16.0
type SecurityQuestionsListResponse ¶ added in v1.16.0
type SecurityQuestionsListResponse struct {
SecurityQuestions []SecurityQuestion `json:"security_questions"`
}
type SendPhoneNumberVerificationCodeOptions ¶ added in v1.16.0
type SendPhoneNumberVerificationCodeOptions struct { ISOCode string `json:"iso_code"` PhoneNumber string `json:"phone_number"` }
SendPhoneNumberVerificationCodeOptions fields are those accepted by SendPhoneNumberVerificationCode
type SortedObjects ¶ added in v0.6.0
type SortedObjects struct { Instances []Instance LKEClusters []LKECluster Domains []Domain Volumes []Volume NodeBalancers []NodeBalancer }
SortedObjects currently only includes Instances
type Stackscript ¶
type Stackscript struct { ID int `json:"id"` Username string `json:"username"` Label string `json:"label"` Description string `json:"description"` Ordinal int `json:"ordinal"` LogoURL string `json:"logo_url"` Images []string `json:"images"` DeploymentsTotal int `json:"deployments_total"` DeploymentsActive int `json:"deployments_active"` IsPublic bool `json:"is_public"` Mine bool `json:"mine"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` RevNote string `json:"rev_note"` Script string `json:"script"` UserDefinedFields *[]StackscriptUDF `json:"user_defined_fields"` UserGravatarID string `json:"user_gravatar_id"` }
Stackscript represents a Linode StackScript
func (Stackscript) GetCreateOptions ¶
func (i Stackscript) GetCreateOptions() StackscriptCreateOptions
GetCreateOptions converts a Stackscript to StackscriptCreateOptions for use in CreateStackscript
func (Stackscript) GetUpdateOptions ¶
func (i Stackscript) GetUpdateOptions() StackscriptUpdateOptions
GetUpdateOptions converts a Stackscript to StackscriptUpdateOptions for use in UpdateStackscript
func (*Stackscript) UnmarshalJSON ¶ added in v1.16.0
func (i *Stackscript) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type StackscriptCreateOptions ¶
type StackscriptCreateOptions struct { Label string `json:"label"` Description string `json:"description"` Images []string `json:"images"` IsPublic bool `json:"is_public"` RevNote string `json:"rev_note"` Script string `json:"script"` }
StackscriptCreateOptions fields are those accepted by CreateStackscript
type StackscriptUDF ¶ added in v0.4.0
type StackscriptUDF struct { // A human-readable label for the field that will serve as the input prompt for entering the value during deployment. Label string `json:"label"` // The name of the field. Name string `json:"name"` // An example value for the field. Example string `json:"example"` // A list of acceptable single values for the field. OneOf string `json:"oneOf,omitempty"` // A list of acceptable values for the field in any quantity, combination or order. ManyOf string `json:"manyOf,omitempty"` // The default value. If not specified, this value will be used. Default string `json:"default,omitempty"` }
StackscriptUDF define a single variable that is accepted by a Stackscript
type StackscriptUpdateOptions ¶
type StackscriptUpdateOptions StackscriptCreateOptions
StackscriptUpdateOptions fields are those accepted by UpdateStackscript
type StackscriptsPagedResponse ¶
type StackscriptsPagedResponse struct { *PageOptions Data []Stackscript `json:"data"` }
StackscriptsPagedResponse represents a paginated Stackscript API response
type StatsNet ¶ added in v1.16.0
type StatsNet struct { In [][]float64 `json:"in"` Out [][]float64 `json:"out"` PrivateIn [][]float64 `json:"private_in"` PrivateOut [][]float64 `json:"private_out"` }
StatsNet represents a network stats object
type StatsTraffic ¶ added in v1.16.0
StatsTraffic represents a Traffic stats object
type Tag ¶ added in v0.6.0
type Tag struct {
Label string `json:"label"`
}
Tag represents a Tag object
func (Tag) GetCreateOptions ¶ added in v0.6.0
func (i Tag) GetCreateOptions() (o TagCreateOptions)
GetCreateOptions converts a Tag to TagCreateOptions for use in CreateTag
type TagCreateOptions ¶ added in v0.6.0
type TagCreateOptions struct { Label string `json:"label"` Linodes []int `json:"linodes,omitempty"` // @TODO is this implemented? LKEClusters []int `json:"lke_clusters,omitempty"` Domains []int `json:"domains,omitempty"` Volumes []int `json:"volumes,omitempty"` NodeBalancers []int `json:"nodebalancers,omitempty"` }
TagCreateOptions fields are those accepted by CreateTag
type TaggedObject ¶ added in v0.6.0
type TaggedObject struct { Type string `json:"type"` RawData json.RawMessage `json:"data"` Data any `json:"-"` }
TaggedObject represents a Tagged Object object
type TaggedObjectList ¶ added in v0.6.0
type TaggedObjectList []TaggedObject
TaggedObjectList are a list of TaggedObjects, as returning by ListTaggedObjects
func (TaggedObjectList) SortedObjects ¶ added in v0.6.0
func (t TaggedObjectList) SortedObjects() (SortedObjects, error)
SortedObjects converts a list of TaggedObjects into a Sorted Objects struct, for easier access
type TaggedObjectsPagedResponse ¶ added in v0.6.0
type TaggedObjectsPagedResponse struct { *PageOptions Data []TaggedObject `json:"data"` }
TaggedObjectsPagedResponse represents a paginated Tag API response
type TagsPagedResponse ¶ added in v0.6.0
type TagsPagedResponse struct { *PageOptions Data []Tag `json:"data"` }
TagsPagedResponse represents a paginated Tag API response
type Ticket ¶
type Ticket struct { ID int `json:"id"` Attachments []string `json:"attachments"` Closed *time.Time `json:"-"` Description string `json:"description"` Entity *TicketEntity `json:"entity"` GravatarID string `json:"gravatar_id"` Opened *time.Time `json:"-"` OpenedBy string `json:"opened_by"` Status TicketStatus `json:"status"` Summary string `json:"summary"` Updated *time.Time `json:"-"` UpdatedBy string `json:"updated_by"` }
Ticket represents a support ticket object
type TicketEntity ¶
type TicketEntity struct { ID int `json:"id"` Label string `json:"label"` Type string `json:"type"` URL string `json:"url"` }
TicketEntity refers a ticket to a specific entity
type TicketStatus ¶ added in v0.4.0
type TicketStatus string
TicketStatus constants start with Ticket and include Linode API Ticket Status values
const ( TicketNew TicketStatus = "new" TicketClosed TicketStatus = "closed" TicketOpen TicketStatus = "open" )
TicketStatus constants reflect the current status of a Ticket
type TicketsPagedResponse ¶
type TicketsPagedResponse struct { *PageOptions Data []Ticket `json:"data"` }
TicketsPagedResponse represents a paginated ticket API response
type Token ¶ added in v0.6.0
type Token struct { // This token's unique ID, which can be used to revoke it. ID int `json:"id"` // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure. // Valid values are "*" or a comma separated list of scopes https://developers.linode.com/api/v4/#o-auth Scopes string `json:"scopes"` // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) Label string `json:"label"` // The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned. Token string `json:"token"` // The date and time this token was created. Created *time.Time `json:"-"` // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked. Expiry *time.Time `json:"-"` }
Token represents a Token object
func (Token) GetCreateOptions ¶ added in v0.6.0
func (i Token) GetCreateOptions() (o TokenCreateOptions)
GetCreateOptions converts a Token to TokenCreateOptions for use in CreateToken
func (Token) GetUpdateOptions ¶ added in v0.6.0
func (i Token) GetUpdateOptions() (o TokenUpdateOptions)
GetUpdateOptions converts a Token to TokenUpdateOptions for use in UpdateToken
func (*Token) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type TokenCreateOptions ¶ added in v0.6.0
type TokenCreateOptions struct { // The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to *. Tokens with more restrictive scopes are generally more secure. Scopes string `json:"scopes"` // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) Label string `json:"label"` // When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked. Expiry *time.Time `json:"expiry"` }
TokenCreateOptions fields are those accepted by CreateToken
type TokenUpdateOptions ¶ added in v0.6.0
type TokenUpdateOptions struct { // This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for. (1-100 Characters) Label string `json:"label"` }
TokenUpdateOptions fields are those accepted by UpdateToken
type TokensPagedResponse ¶ added in v0.6.0
type TokensPagedResponse struct { *PageOptions Data []Token `json:"data"` }
TokensPagedResponse represents a paginated Token API response
type TwoFactorSecret ¶ added in v1.16.0
TwoFactorSecret contains fields returned by CreateTwoFactorSecret
func (*TwoFactorSecret) UnmarshalJSON ¶ added in v1.16.0
func (s *TwoFactorSecret) UnmarshalJSON(b []byte) error
type User ¶ added in v0.6.0
type User struct { Username string `json:"username"` Email string `json:"email"` Restricted bool `json:"restricted"` TFAEnabled bool `json:"tfa_enabled"` SSHKeys []string `json:"ssh_keys"` }
User represents a User object
func (User) GetCreateOptions ¶ added in v0.6.0
func (i User) GetCreateOptions() (o UserCreateOptions)
GetCreateOptions converts a User to UserCreateOptions for use in CreateUser
func (User) GetUpdateOptions ¶ added in v0.6.0
func (i User) GetUpdateOptions() (o UserUpdateOptions)
GetUpdateOptions converts a User to UserUpdateOptions for use in UpdateUser
type UserCreateOptions ¶ added in v0.6.0
type UserCreateOptions struct { Username string `json:"username"` Email string `json:"email"` Restricted bool `json:"restricted"` }
UserCreateOptions fields are those accepted by CreateUser
type UserGrants ¶ added in v1.16.0
type UserGrants struct { Database []GrantedEntity `json:"database"` Domain []GrantedEntity `json:"domain"` Firewall []GrantedEntity `json:"firewall"` Image []GrantedEntity `json:"image"` Linode []GrantedEntity `json:"linode"` Longview []GrantedEntity `json:"longview"` NodeBalancer []GrantedEntity `json:"nodebalancer"` StackScript []GrantedEntity `json:"stackscript"` Volume []GrantedEntity `json:"volume"` Global GlobalUserGrants `json:"global"` }
type UserGrantsUpdateOptions ¶ added in v1.16.0
type UserGrantsUpdateOptions struct { Database []GrantedEntity `json:"database,omitempty"` Domain []EntityUserGrant `json:"domain,omitempty"` Firewall []EntityUserGrant `json:"firewall,omitempty"` Image []EntityUserGrant `json:"image,omitempty"` Linode []EntityUserGrant `json:"linode,omitempty"` Longview []EntityUserGrant `json:"longview,omitempty"` NodeBalancer []EntityUserGrant `json:"nodebalancer,omitempty"` StackScript []EntityUserGrant `json:"stackscript,omitempty"` Volume []EntityUserGrant `json:"volume,omitempty"` Global GlobalUserGrants `json:"global"` }
type UserUpdateOptions ¶ added in v0.6.0
type UserUpdateOptions struct { Username string `json:"username,omitempty"` Restricted *bool `json:"restricted,omitempty"` }
UserUpdateOptions fields are those accepted by UpdateUser
type UsersPagedResponse ¶ added in v0.6.0
type UsersPagedResponse struct { *PageOptions Data []User `json:"data"` }
UsersPagedResponse represents a paginated User API response
type VLAN ¶ added in v1.16.0
type VLAN struct { Label string `json:"label"` Linodes []int `json:"linodes"` Region string `json:"region"` Created *time.Time `json:"-"` }
func (*VLAN) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON for VLAN responses
type VLANsPagedResponse ¶ added in v1.16.0
type VLANsPagedResponse struct { *PageOptions Data []VLAN `json:"data"` }
VLANsPagedResponse represents a Linode API response for listing of VLANs
type VerifyPhoneNumberOptions ¶ added in v1.16.0
type VerifyPhoneNumberOptions struct {
OTPCode string `json:"otp_code"`
}
VerifyPhoneNumberOptions fields are those accepted by VerifyPhoneNumber
type Volume ¶
type Volume struct { ID int `json:"id"` Label string `json:"label"` Status VolumeStatus `json:"status"` Region string `json:"region"` Size int `json:"size"` LinodeID *int `json:"linode_id"` FilesystemPath string `json:"filesystem_path"` Tags []string `json:"tags"` Created *time.Time `json:"-"` Updated *time.Time `json:"-"` }
Volume represents a linode volume object
func (Volume) GetCreateOptions ¶ added in v0.7.0
func (v Volume) GetCreateOptions() (createOpts VolumeCreateOptions)
GetCreateOptions converts a Volume to VolumeCreateOptions for use in CreateVolume
func (Volume) GetUpdateOptions ¶ added in v0.7.0
func (v Volume) GetUpdateOptions() (updateOpts VolumeUpdateOptions)
GetUpdateOptions converts a Volume to VolumeUpdateOptions for use in UpdateVolume
func (*Volume) UnmarshalJSON ¶ added in v1.16.0
UnmarshalJSON implements the json.Unmarshaler interface
type VolumeAttachOptions ¶
type VolumeAttachOptions struct { LinodeID int `json:"linode_id"` ConfigID int `json:"config_id,omitempty"` PersistAcrossBoots *bool `json:"persist_across_boots,omitempty"` }
VolumeAttachOptions fields are those accepted by AttachVolume
type VolumeCreateOptions ¶
type VolumeCreateOptions struct { Label string `json:"label,omitempty"` Region string `json:"region,omitempty"` LinodeID int `json:"linode_id,omitempty"` ConfigID int `json:"config_id,omitempty"` // The Volume's size, in GiB. Minimum size is 10GiB, maximum size is 10240GiB. A "0" value will result in the default size. Size int `json:"size,omitempty"` // An array of tags applied to this object. Tags are for organizational purposes only. Tags []string `json:"tags"` PersistAcrossBoots *bool `json:"persist_across_boots,omitempty"` }
VolumeCreateOptions fields are those accepted by CreateVolume
type VolumeStatus ¶
type VolumeStatus string
VolumeStatus indicates the status of the Volume
const ( // VolumeCreating indicates the Volume is being created and is not yet available for use VolumeCreating VolumeStatus = "creating" // VolumeActive indicates the Volume is online and available for use VolumeActive VolumeStatus = "active" // VolumeResizing indicates the Volume is in the process of upgrading its current capacity VolumeResizing VolumeStatus = "resizing" // VolumeContactSupport indicates there is a problem with the Volume. A support ticket must be opened to resolve the issue VolumeContactSupport VolumeStatus = "contact_support" )
type VolumeUpdateOptions ¶ added in v0.7.0
type VolumeUpdateOptions struct { Label string `json:"label,omitempty"` Tags *[]string `json:"tags,omitempty"` }
VolumeUpdateOptions fields are those accepted by UpdateVolume
type VolumesPagedResponse ¶
type VolumesPagedResponse struct { *PageOptions Data []Volume `json:"data"` }
VolumesPagedResponse represents a linode API response for listing of volumes
Source Files
¶
- account.go
- account_events.go
- account_invoices.go
- account_logins.go
- account_notifications.go
- account_oauth_client.go
- account_payments.go
- account_settings.go
- account_user_grants.go
- account_users.go
- client.go
- config.go
- databases.go
- domain_records.go
- domains.go
- errors.go
- filter.go
- firewall_devices.go
- firewall_rules.go
- firewalls.go
- images.go
- instance_configs.go
- instance_disks.go
- instance_ips.go
- instance_snapshots.go
- instance_stats.go
- instance_volumes.go
- instances.go
- kernels.go
- lke_cluster_pools.go
- lke_clusters.go
- lke_node_pools.go
- longview.go
- longview_subscriptions.go
- mongo.go
- mysql.go
- network_ips.go
- network_pools.go
- network_ranges.go
- nodebalancer.go
- nodebalancer_config_nodes.go
- nodebalancer_configs.go
- nodebalancer_stats.go
- object_storage.go
- object_storage_bucket_certs.go
- object_storage_buckets.go
- object_storage_clusters.go
- object_storage_keys.go
- object_storage_object.go
- pagination.go
- postgres.go
- profile.go
- profile_grants_list.go
- profile_phone_number.go
- profile_security_questions.go
- profile_sshkeys.go
- profile_tfa.go
- profile_tokens.go
- regions.go
- retries.go
- stackscripts.go
- support.go
- tags.go
- types.go
- version.go
- vlans.go
- volumes.go
- waitfor.go