Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (i Account) GetUpdateOptions() (o AccountUpdateOptions) {
o.TaxID = i.TaxID
o.Zip = i.Zip

return
return o
}

// UnmarshalJSON implements the json.Unmarshaler interface
Expand Down
2 changes: 1 addition & 1 deletion account_agreements.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (i AccountAgreements) GetUpdateOptions() (o AccountAgreementsUpdateOptions)
o.MasterServiceAgreement = i.MasterServiceAgreement
o.PrivacyPolicy = i.PrivacyPolicy

return
return o
}

// GetAccountAgreements gets all agreements and their acceptance status for the Account.
Expand Down
4 changes: 3 additions & 1 deletion account_betas.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"github.com/linode/linodego/internal/parseabletime"
)

// The details and enrollment information of a Beta program that an account is enrolled in.
// AccountBetaProgram represents an enrolled Account Beta Program object,
// which contains the details and enrollment information of a Beta program
// that an account is enrolled in.
type AccountBetaProgram struct {
Label string `json:"label"`
ID string `json:"id"`
Expand Down
2 changes: 1 addition & 1 deletion account_maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type AccountMaintenance struct {
When *time.Time `json:"when"`
}

// The entity being affected by maintenance
// Entity represents the entity being affected by maintenance
type Entity struct {
ID int `json:"id"`
Label string `json:"label"`
Expand Down
4 changes: 2 additions & 2 deletions account_oauth_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (i OAuthClient) GetCreateOptions() (o OAuthClientCreateOptions) {
o.Label = i.Label
o.Public = i.Public

return
return o
}

// GetUpdateOptions converts a OAuthClient to OAuthClientUpdateOptions for use in UpdateOAuthClient
Expand All @@ -77,7 +77,7 @@ func (i OAuthClient) GetUpdateOptions() (o OAuthClientUpdateOptions) {
o.Label = i.Label
o.Public = i.Public

return
return o
}

// ListOAuthClients lists OAuthClients
Expand Down
2 changes: 1 addition & 1 deletion account_payments.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (i *Payment) UnmarshalJSON(b []byte) error {
// GetCreateOptions converts a Payment to PaymentCreateOptions for use in CreatePayment
func (i Payment) GetCreateOptions() (o PaymentCreateOptions) {
o.USD = i.USD
return
return o
}

// ListPayments lists Payments
Expand Down
4 changes: 2 additions & 2 deletions account_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (i User) GetCreateOptions() (o UserCreateOptions) {
o.Email = i.Email
o.Restricted = i.Restricted

return
return o
}

// GetUpdateOptions converts a User to UserUpdateOptions for use in UpdateUser
Expand All @@ -107,7 +107,7 @@ func (i User) GetUpdateOptions() (o UserUpdateOptions) {
o.Restricted = copyBool(&i.Restricted)
o.Email = i.Email

return
return o
}

// ListUsers lists Users on the account
Expand Down
2 changes: 1 addition & 1 deletion betas.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/linode/linodego/internal/parseabletime"
)

// Beta Program is a new product or service that is not generally available to all Akamai customers.
// BetaProgram is a new product or service that is not generally available to all Akamai customers.
// Users must enroll into a beta in order to access the functionality.
type BetaProgram struct {
Label string `json:"label"`
Expand Down
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
APIEnvVar = "LINODE_TOKEN"
// APISecondsPerPoll how frequently to poll for new Events or Status in WaitFor functions
APISecondsPerPoll = 3
// Maximum wait time for retries
// APIRetryMaxWaitTime is the maximum wait time for retries
APIRetryMaxWaitTime = time.Duration(30) * time.Second
APIDefaultCacheExpiration = time.Minute * 15
)
Expand Down Expand Up @@ -171,7 +171,7 @@ func NewClient(hc *http.Client) (client Client) {
SetDebug(envDebug).
enableLogSanitization()

return
return client
}

// NewClientFromEnv creates a Client and initializes it with values
Expand Down
2 changes: 1 addition & 1 deletion client_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewMonitorClient(hc *http.Client) (mClient MonitorClient) {

mClient.SetDebug(envDebug)

return
return mClient
}

// SetUserAgent sets a custom user-agent for HTTP requests
Expand Down
2 changes: 1 addition & 1 deletion domain_records.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (d DomainRecord) GetUpdateOptions() (du DomainRecordUpdateOptions) {
du.TTLSec = d.TTLSec
du.Tag = copyString(d.Tag)

return
return du
}

// ListDomainRecords lists DomainRecords
Expand Down
2 changes: 1 addition & 1 deletion domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (d Domain) GetUpdateOptions() (du DomainUpdateOptions) {
du.RefreshSec = d.RefreshSec
du.TTLSec = d.TTLSec

return
return du
}

// ListDomains lists Domains
Expand Down
2 changes: 1 addition & 1 deletion firewall_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Client) GetFirewallDevice(ctx context.Context, firewallID, deviceID int
return doGETRequest[FirewallDevice](ctx, c, e)
}

// AddFirewallDevice associates a Device with a given Firewall
// CreateFirewallDevice associates a Device with a given Firewall
func (c *Client) CreateFirewallDevice(ctx context.Context, firewallID int, opts FirewallDeviceCreateOptions) (*FirewallDevice, error) {
e := formatAPIPath("networking/firewalls/%d/devices", firewallID)
return doPOSTRequest[FirewallDevice](ctx, c, e, opts)
Expand Down
4 changes: 2 additions & 2 deletions firewall_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ type FirewallTemplate struct {
Rules FirewallRuleSet `json:"rules"`
}

// NOTE: This feature may not currently be available to all users.
// GetFirewallTemplate gets a FirewallTemplate given a slug.
// NOTE: This feature may not currently be available to all users.
func (c *Client) GetFirewallTemplate(ctx context.Context, slug string) (*FirewallTemplate, error) {
e := formatAPIPath("networking/firewalls/templates/%s", slug)
return doGETRequest[FirewallTemplate](ctx, c, e)
}

// NOTE: This feature may not currently be available to all users.
// ListFirewallTemplates gets all available firewall templates for the account.
// NOTE: This feature may not currently be available to all users.
func (c *Client) ListFirewallTemplates(ctx context.Context, opts *ListOptions) ([]FirewallTemplate, error) {
return getPaginatedResults[FirewallTemplate](ctx, c, "networking/firewalls/templates", opts)
}
2 changes: 1 addition & 1 deletion images.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (i Image) GetUpdateOptions() (iu ImageUpdateOptions) {
iu.Label = i.Label
iu.Description = copyString(&i.Description)

return
return iu
}

// ListImages lists Images.
Expand Down
2 changes: 1 addition & 1 deletion instance_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (c *Client) DeleteInstanceIPAddress(ctx context.Context, linodeID int, ipAd
return doDELETERequest(ctx, c, e)
}

// Function to add additional reserved IPV4 addresses to an existing linode
// AssignInstanceReservedIP adds additional reserved IPV4 addresses to an existing linode
func (c *Client) AssignInstanceReservedIP(ctx context.Context, linodeID int, opts InstanceReserveIPOptions) (*InstanceIP, error) {
endpoint := formatAPIPath("linode/instances/%d/ips", linodeID)
return doPOSTRequest[InstanceIP](ctx, c, endpoint, opts)
Expand Down
4 changes: 2 additions & 2 deletions lke_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (i LKECluster) GetCreateOptions() (o LKEClusterCreateOptions) {
}

// @TODO copy NodePools?
return
return o
}

// GetUpdateOptions converts a LKECluster to LKEClusterUpdateOptions for use in UpdateLKECluster
Expand All @@ -174,7 +174,7 @@ func (i LKECluster) GetUpdateOptions() (o LKEClusterUpdateOptions) {
// ACL will not be populated in the control plane response
}

return
return o
}

// ListLKEVersions lists the Kubernetes versions available through LKE. This endpoint is cached by default.
Expand Down
4 changes: 2 additions & 2 deletions lke_node_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (l LKENodePool) GetCreateOptions() (o LKENodePoolCreateOptions) {
o.UpdateStrategy = l.UpdateStrategy
o.Label = l.Label

return
return o
}

// GetUpdateOptions converts a LKENodePool to LKENodePoolUpdateOptions for use in UpdateLKENodePoolUpdate
Expand All @@ -146,7 +146,7 @@ func (l LKENodePool) GetUpdateOptions() (o LKENodePoolUpdateOptions) {
o.UpdateStrategy = l.UpdateStrategy
o.Label = l.Label

return
return o
}

// ListLKENodePools lists LKENodePools
Expand Down
2 changes: 1 addition & 1 deletion longview.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type LongviewClientCreateOptions struct {
Label string `json:"label"`
}

// LongviewClientCreateOptions is an options struct used when Updating a Longview Client
// LongviewClientUpdateOptions is an options struct used when Updating a Longview Client
type LongviewClientUpdateOptions struct {
Label string `json:"label"`
}
Expand Down
8 changes: 4 additions & 4 deletions monitor_dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type MonitorDashboard struct {
Widgets []DashboardWidget `json:"widgets"`
}

// enum object for serviceType
// ServiceType is an enum object for serviceType
type ServiceType string

const (
Expand All @@ -33,7 +33,7 @@ const (
ServiceTypeFirewallService ServiceType = "firewall"
)

// enum object for DashboardType
// DashboardType is an enum object for DashboardType
type DashboardType string

const (
Expand All @@ -53,7 +53,7 @@ type DashboardWidget struct {
AggregateFunction AggregateFunction `json:"aggregate_function"`
}

// Enum object for AggregateFunction
// AggregateFunction is an enum object for AggregateFunction
type AggregateFunction string

const (
Expand All @@ -67,7 +67,7 @@ const (
AggregateFunctionLast AggregateFunction = "last"
)

// Enum object for Chart type
// ChartType is an enum object for Chart type
type ChartType string

const (
Expand Down
4 changes: 2 additions & 2 deletions monitor_metrics_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type MonitorMetricsDefinition struct {
Unit MetricUnit `json:"unit"`
}

// Enum object for MetricType
// MetricType is an enum object for MetricType
type MetricType string

const (
Expand All @@ -26,7 +26,7 @@ const (
MetricTypeSummary MetricType = "summary"
)

// Enum object for Unit
// MetricUnit is an enum object for Unit
type MetricUnit string

const (
Expand Down
2 changes: 1 addition & 1 deletion monitor_services_create_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type MonitorServiceToken struct {
Token string `json:"token"`
}

// Create token options.
// MonitorTokenCreateOptions contains create token options.
type MonitorTokenCreateOptions struct {
// EntityIDs are expected to be type "any" as different service_types have different variable type for their entity_ids. For example, Linode has "int" entity_ids whereas object storage has "string" as entity_ids.
EntityIDs []any `json:"entity_ids"`
Expand Down
2 changes: 1 addition & 1 deletion network_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (i InstanceIP) GetUpdateOptionsV2() IPAddressUpdateOptionsV2 {
// Deprecated: Please use GetUpdateOptionsV2 for all new implementations.
func (i InstanceIP) GetUpdateOptions() (o IPAddressUpdateOptions) {
o.RDNS = copyString(&i.RDNS)
return
return o
}

// ListIPAddresses lists IPAddresses.
Expand Down
2 changes: 1 addition & 1 deletion object_storage_bucket_certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (c *Client) GetObjectStorageBucketCert(ctx context.Context, clusterOrRegion
return doGETRequest[ObjectStorageBucketCert](ctx, c, e)
}

// UploadObjectStorageBucketCert uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
// UploadObjectStorageBucketCertV2 uploads a TLS/SSL Cert to be used with an Object Storage Bucket.
func (c *Client) UploadObjectStorageBucketCertV2(
ctx context.Context,
clusterOrRegionID, bucket string,
Expand Down
4 changes: 2 additions & 2 deletions object_storage_buckets.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (c *Client) UpdateObjectStorageBucketAccess(ctx context.Context, clusterOrR
return doPOSTRequestNoResponseBody(ctx, c, e, opts)
}

// GetObjectStorageBucketAccess gets the current access config for a bucket
// GetObjectStorageBucketAccessV2 gets the current access config for a bucket
func (c *Client) GetObjectStorageBucketAccessV2(ctx context.Context, clusterOrRegionID, label string) (*ObjectStorageBucketAccessV2, error) {
e := formatAPIPath("object-storage/buckets/%s/%s/access", clusterOrRegionID, label)
return doGETRequest[ObjectStorageBucketAccessV2](ctx, c, e)
Expand All @@ -171,7 +171,7 @@ func (c *Client) DeleteObjectStorageBucket(ctx context.Context, clusterOrRegionI
return doDELETERequest(ctx, c, e)
}

// Lists the contents of the specified ObjectStorageBucket
// ListObjectStorageBucketContents lists the contents of the specified ObjectStorageBucket
func (c *Client) ListObjectStorageBucketContents(
ctx context.Context,
clusterOrRegionID, label string,
Expand Down
2 changes: 1 addition & 1 deletion object_storage_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package linodego

import "context"

// NotificationType constants start with Notification and include all known Linode API Notification Types.
// ObjectStorageEndpointType constants start with Notification and include all known Linode API Notification Types.
type ObjectStorageEndpointType string

// NotificationType constants represent the actions that cause a Notification. New types may be added in the future.
Expand Down
2 changes: 1 addition & 1 deletion profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (i Profile) GetUpdateOptions() (o ProfileUpdateOptions) {
o.TwoFactorAuth = copyBool(&i.TwoFactorAuth)
o.Restricted = copyBool(&i.Restricted)

return
return o
}

// GetProfile returns the Profile of the authenticated user
Expand Down
2 changes: 1 addition & 1 deletion profile_logins.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/linode/linodego/internal/parseabletime"
)

// Profile represents a Profile object
// ProfileLogin represents a Profile object
type ProfileLogin struct {
Datetime *time.Time `json:"datetime"`
ID int `json:"id"`
Expand Down
4 changes: 2 additions & 2 deletions profile_sshkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ func (i SSHKey) GetCreateOptions() (o SSHKeyCreateOptions) {
o.Label = i.Label
o.SSHKey = i.SSHKey

return
return o
}

// GetUpdateOptions converts a SSHKey to SSHKeyCreateOptions for use in UpdateSSHKey
func (i SSHKey) GetUpdateOptions() (o SSHKeyUpdateOptions) {
o.Label = i.Label
return
return o
}

// ListSSHKeys lists SSHKeys
Expand Down
4 changes: 2 additions & 2 deletions profile_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ func (i Token) GetCreateOptions() (o TokenCreateOptions) {
o.Expiry = copyTime(i.Expiry)
o.Scopes = i.Scopes

return
return o
}

// GetUpdateOptions converts a Token to TokenUpdateOptions for use in UpdateToken
func (i Token) GetUpdateOptions() (o TokenUpdateOptions) {
o.Label = i.Label
return
return o
}

// ListTokens lists Tokens
Expand Down
2 changes: 1 addition & 1 deletion regions_availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
)

// Region represents a linode region object
// RegionAvailability represents a linode region object
type RegionAvailability struct {
Region string `json:"region"`
Plan string `json:"plan"`
Expand Down
Loading