Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
545528f
Support LKE-E: Bring Your Own VPC, Dual Stack Cluster, Audit Log Enab…
yec-akamai Sep 5, 2025
2fbd144
build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (…
dependabot[bot] Sep 5, 2025
66d50d1
build(deps): bump actions/github-script from 7 to 8 (#813)
dependabot[bot] Sep 9, 2025
009dae3
build(deps): bump actions/setup-go from 5 to 6 (#814)
dependabot[bot] Sep 10, 2025
ab943e3
build(deps): bump actions/setup-python from 5 to 6 (#815)
dependabot[bot] Sep 10, 2025
37c5e80
build(deps): bump actions/stale from 9 to 10 (#816)
dependabot[bot] Sep 10, 2025
f770279
Remove AddPlacementGroups user grant (#810)
zliang-akamai Sep 11, 2025
f16b8e9
build(deps): bump golang.org/x/text from 0.28.0 to 0.29.0 and go from…
dependabot[bot] Sep 11, 2025
6528087
build(deps): bump golang.org/x/net from 0.43.0 to 0.44.0 (#819)
dependabot[bot] Sep 15, 2025
43eff2d
DI-27070 initial commit with code change and integration test
srbhaakamai Sep 15, 2025
639b89b
DI-27070 Added more stingent integration tests
srbhaakamai Sep 15, 2025
b9157bb
DI-27070 Added more stingent integration tests
srbhaakamai Sep 15, 2025
05d9779
DI-27070 Fixed copilot suggestion for names
srbhaakamai Sep 15, 2025
d90a6c6
build(deps): bump golang.org/x/oauth2 from 0.30.0 to 0.31.0 (#812)
dependabot[bot] Sep 15, 2025
57b2014
DI-27070 made it consistent with pythonSDK naming conventions
srbhaakamai Sep 16, 2025
bc5bc7e
DI-27070 Fixed Datatype issues
srbhaakamai Sep 16, 2025
c3de9a1
DI-27070 renamed files and corrected format
srbhaakamai Sep 16, 2025
87495c1
change isPublic to be a pointer on new IPv6/linode interface config t…
eljohnson92 Sep 16, 2025
39b4246
Change types of interfaces create options slices to be pointers (#817)
zliang-akamai Sep 16, 2025
587e8d3
Add VPCInterfaceUpdateOptions (#825)
zliang-akamai Sep 19, 2025
d379928
Format everything with `golangci-lint` (#830)
zliang-akamai Sep 24, 2025
cf6fd9b
Fix firewall device for linode interfaces (#829)
zliang-akamai Sep 25, 2025
8e71881
Merge branch 'linode:main' into main
srbhaakamai Oct 4, 2025
f1a8f6c
Update test/integration/monitor_alert_definitions_test.go
srbhaakamai Oct 13, 2025
4086c74
DI-27070 Updated Go SDK to align with Python SDK for Monitor Alert De…
srbhaakamai Oct 13, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
go-version: stable

Expand Down Expand Up @@ -44,13 +44,13 @@ jobs:
submodules: 'recursive'

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: 'stable'
- run: go version

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration_tests_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' && inputs.sha != ''
steps:
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- run: go version
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/github-script@v7
- uses: actions/github-script@v8
id: update-check-run
if: ${{ inputs.pull_request_number != '' && fromJson(steps.commit-hash.outputs.data).repository.pullRequest.headRef.target.oid == inputs.sha }}
env:
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ref: ${{ github.event.inputs.sha || github.ref }}

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cross-repo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: 'recursive'

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: 'stable'
- run: go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
id: stale
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with
Expand Down
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
1 change: 0 additions & 1 deletion account_user_grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type GlobalUserGrants struct {
AddLinodes bool `json:"add_linodes"`
AddLongview bool `json:"add_longview"`
AddNodeBalancers bool `json:"add_nodebalancers"`
AddPlacementGroups bool `json:"add_placement_groups"`
AddStackScripts bool `json:"add_stackscripts"`
AddVolumes bool `json:"add_volumes"`
AddVPCs bool `json:"add_vpcs"`
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
72 changes: 72 additions & 0 deletions alert_channels.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package linodego

import (
"context"
)

// AlertChannelEnvelope represents a single alert channel entry returned inside alert definition
type AlertChannelEnvelope struct {
ID int `json:"id"`
Label string `json:"label"`
Type string `json:"type"`
URL string `json:"url"`
}

// AlertChannel represents a Monitor Channel object.
type AlertChannel struct {
ID int `json:"id"`
Label string `json:"label"`
ChannelType string `json:"channel_type"`
Content ChannelContent `json:"content"`
Created string `json:"created"`
CreatedBy string `json:"created_by"`
Updated string `json:"updated"`
UpdatedBy string `json:"updated_by"`
URL string `json:"url"`
}

// AlertChannelDetail represents the details of a Monitor Channel.
type AlertChannelDetail struct {
To string `json:"to,omitempty"`
From string `json:"from,omitempty"`
User string `json:"user,omitempty"`
Token string `json:"token,omitempty"`
URL string `json:"url,omitempty"`
}

// AlertChannelCreateOptions are the options used to create a new Monitor Channel.
type AlertChannelCreateOptions struct {
Label string `json:"label"`
Type string `json:"type"`
Details AlertChannelDetailOptions `json:"details"`
}

// AlertChannelDetailOptions are the options used to create the details of a new Monitor Channel.
type AlertChannelDetailOptions struct {
To string `json:"to,omitempty"`
}

// Backwards-compat alias for older name
type AlertingChannelCreateOptions = AlertChannelCreateOptions

type EmailChannelContent struct {
EmailAddresses []string `json:"email_addresses"`
}

// ChannelContent represents the content block for an AlertChannel, which varies by channel type.
type ChannelContent struct {
Email *EmailChannelContent `json:"email,omitempty"`
// Other channel types like 'webhook', 'slack' could be added here as optional fields.
}

// ListAlertChannels gets a paginated list of Alert Channels.
func (c *Client) ListAlertChannels(ctx context.Context, opts *ListOptions) ([]AlertChannel, error) {
endpoint := formatAPIV4BetaPath("monitor/alert-channels")
return getPaginatedResults[AlertChannel](ctx, c, endpoint, opts)
}

// GetAlertChannel gets an Alert Channel by ID.
func (c *Client) GetAlertChannel(ctx context.Context, channelID int) (*AlertChannel, error) {
e := formatAPIV4BetaPath("monitor/alert-channels/%d", channelID)
return doGETRequest[AlertChannel](ctx, c, e)
}
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
8 changes: 4 additions & 4 deletions firewall_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type FirewallDeviceType string

// FirewallDeviceType constants start with FirewallDevice
const (
FirewallDeviceLinode FirewallDeviceType = "linode"
FirewallDeviceNodeBalancer FirewallDeviceType = "nodebalancer"
FirewallDeviceInterface FirewallDeviceType = "interface"
FirewallDeviceLinode FirewallDeviceType = "linode"
FirewallDeviceNodeBalancer FirewallDeviceType = "nodebalancer"
FirewallDeviceLinodeInterface FirewallDeviceType = "linode_interface"
)

// FirewallDevice represents a device governed by a Firewall
Expand Down 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)
}
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ require (
github.com/google/go-cmp v0.7.0
github.com/google/go-querystring v1.1.0
github.com/jarcoal/httpmock v1.4.1
golang.org/x/net v0.43.0
golang.org/x/oauth2 v0.30.0
golang.org/x/text v0.28.0
golang.org/x/net v0.44.0
golang.org/x/oauth2 v0.31.0
golang.org/x/text v0.29.0
gopkg.in/ini.v1 v1.66.6
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.11.0
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.23.0
go 1.24.0

toolchain go1.24.1
toolchain go1.25.1

retract v1.0.0 // Accidental branch push
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ github.com/maxatome/go-testdeep v1.14.0 h1:rRlLv1+kI8eOI3OaBXZwb3O7xY3exRzdW5QyX
github.com/maxatome/go-testdeep v1.14.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
4 changes: 2 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go 1.23.0
go 1.24.0

toolchain go1.23.4
toolchain go1.25.1

use (
.
Expand Down
Loading