Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
avirtopeanu-ionos committed Jan 9, 2025
1 parent 43f085b commit 86f486e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion commands/cloudapi-v6/completer/ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func DatacenterIdsFilterLocation(loc string) []string {
return dcIds
}

func DataCentersIds() []string {
func DataCentersIds(filters ...func(datacenter ionoscloud.Datacenter) bool) []string {
datacenterSvc := resources.NewDataCenterService(client.Must(), context.Background())
datacenters, _, err := datacenterSvc.List(resources.ListQueryParams{})
if err != nil {
Expand Down
11 changes: 0 additions & 11 deletions commands/vpn/ipsec/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import (
"context"

"github.com/ionos-cloud/ionosctl/v6/internal/client"
"github.com/ionos-cloud/ionosctl/v6/internal/config"
"github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/ionosctl/v6/pkg/functional"
vpn "github.com/ionos-cloud/sdk-go-vpn"
"github.com/spf13/viper"
)

// -- GATEWAYS
Expand All @@ -24,10 +21,6 @@ func GatewaysProperty[V any](f func(gateway vpn.IPSecGatewayRead) V, fs ...Gatew

// Gateways returns all distributions matching the given filters
func Gateways(fs ...GatewayFilter) (vpn.IPSecGatewayReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.IPSecGatewaysApi.IpsecgatewaysGet(context.Background())
for _, f := range fs {
var err error
Expand Down Expand Up @@ -57,10 +50,6 @@ func TunnelsProperty[V any](gatewayID string, f func(tunnel vpn.IPSecTunnelRead)

// Tunnels returns all distributions matching the given filters
func Tunnels(gatewayID string, fs ...TunnelFilter) (vpn.IPSecTunnelReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.IPSecTunnelsApi.IpsecgatewaysTunnelsGet(context.Background(), gatewayID)
for _, f := range fs {
var err error
Expand Down
11 changes: 0 additions & 11 deletions commands/vpn/wireguard/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import (
"context"

"github.com/ionos-cloud/ionosctl/v6/internal/client"
"github.com/ionos-cloud/ionosctl/v6/internal/config"
"github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/ionosctl/v6/pkg/functional"
vpn "github.com/ionos-cloud/sdk-go-vpn"
"github.com/spf13/viper"
)

// -- GATEWAYS
Expand All @@ -24,10 +21,6 @@ func GatewaysProperty[V any](f func(gateway vpn.WireguardGatewayRead) V, fs ...G

// Gateways returns all distributions matching the given filters
func Gateways(fs ...GatewayFilter) (vpn.WireguardGatewayReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.WireguardGatewaysApi.WireguardgatewaysGet(context.Background())
for _, f := range fs {
var err error
Expand Down Expand Up @@ -59,10 +52,6 @@ func PeersProperty[V any](gatewayID string, f func(peer vpn.WireguardPeerRead) V

// Peers returns all distributions matching the given filters
func Peers(gatewayID string, fs ...PeerFilter) (vpn.WireguardPeerReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.WireguardPeersApi.WireguardgatewaysPeersGet(context.Background(), gatewayID)
for _, f := range fs {
var err error
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ require (
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
github.com/ionos-cloud/sdk-go-cdn v1.1.0
github.com/ionos-cloud/sdk-go-dbaas-mariadb v1.1.1
github.com/ionos-cloud/sdk-go-kafka v1.1.0
github.com/ionos-cloud/sdk-go-vpn v1.0.1
)

Expand Down
1 change: 0 additions & 1 deletion internal/core/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package core
import (
"fmt"
"net"
"os"
"strings"
"time"

Expand Down

0 comments on commit 86f486e

Please sign in to comment.