Skip to content

Commit

Permalink
chore: extract errors, marshaler and parameter pkgs from internal (#2205
Browse files Browse the repository at this point in the history
)
  • Loading branch information
remyleone committed Sep 10, 2024
1 parent cf9914f commit bec257c
Show file tree
Hide file tree
Showing 89 changed files with 239 additions and 231 deletions.
6 changes: 3 additions & 3 deletions api/account/v2/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
6 changes: 3 additions & 3 deletions api/account/v2alpha1/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
6 changes: 3 additions & 3 deletions api/account/v3/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
2 changes: 1 addition & 1 deletion api/applesilicon/v1alpha1/apple_silicon_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package applesilicon
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
7 changes: 4 additions & 3 deletions api/applesilicon/v1alpha1/applesilicon_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -525,6 +525,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Zones() []scw.Zone {
return []scw.Zone{scw.ZoneFrPar3}
}
Expand Down
8 changes: 5 additions & 3 deletions api/baremetal/v1/baremetal_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -1765,6 +1765,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Zones() []scw.Zone {
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2}
}
Expand Down Expand Up @@ -2679,6 +2680,7 @@ func NewPrivateNetworkAPI(client *scw.Client) *PrivateNetworkAPI {
client: client,
}
}

func (s *PrivateNetworkAPI) Zones() []scw.Zone {
return []scw.Zone{scw.ZoneFrPar2}
}
Expand Down
2 changes: 1 addition & 1 deletion api/baremetal/v1/server_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package baremetal
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
6 changes: 3 additions & 3 deletions api/billing/v2alpha1/billing_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
6 changes: 3 additions & 3 deletions api/billing/v2beta1/billing_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
7 changes: 4 additions & 3 deletions api/block/v1alpha1/block_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -906,6 +906,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Zones() []scw.Zone {
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw3}
}
Expand Down
2 changes: 1 addition & 1 deletion api/block/v1alpha1/snapshot_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package block
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
2 changes: 1 addition & 1 deletion api/block/v1alpha1/volume_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package block
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
7 changes: 4 additions & 3 deletions api/cockpit/v1/cockpit_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -1652,6 +1652,7 @@ func NewRegionalAPI(client *scw.Client) *RegionalAPI {
client: client,
}
}

func (s *RegionalAPI) Regions() []scw.Region {
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
}
Expand Down
9 changes: 4 additions & 5 deletions api/cockpit/v1beta1/cockpit_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -993,8 +993,7 @@ type SelectPlanRequest struct {
}

// SelectPlanResponse: Response returned when selecting a pricing plan.
type SelectPlanResponse struct {
}
type SelectPlanResponse struct{}

// TriggerTestAlertRequest: trigger test alert request.
type TriggerTestAlertRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion api/cockpit/v1beta1/cockpit_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cockpit
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
2 changes: 1 addition & 1 deletion api/container/v1beta1/container_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package container
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
7 changes: 4 additions & 3 deletions api/container/v1beta1/container_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -1816,6 +1816,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Regions() []scw.Region {
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
}
Expand Down
7 changes: 4 additions & 3 deletions api/dedibox/v1/dedibox_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -5905,6 +5905,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Zones() []scw.Zone {
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1}
}
Expand Down
2 changes: 1 addition & 1 deletion api/dedibox/v1/dedibox_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package dedibox
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
25 changes: 10 additions & 15 deletions api/documentdb/v1beta1/documentdb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"strings"
"time"

"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/marshaler"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/parameter"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -892,12 +892,10 @@ func (enum *VolumeType) UnmarshalJSON(data []byte) error {
}

// EndpointDirectAccessDetails: endpoint direct access details.
type EndpointDirectAccessDetails struct {
}
type EndpointDirectAccessDetails struct{}

// EndpointLoadBalancerDetails: endpoint load balancer details.
type EndpointLoadBalancerDetails struct {
}
type EndpointLoadBalancerDetails struct{}

// EndpointPrivateNetworkDetails: endpoint private network details.
type EndpointPrivateNetworkDetails struct {
Expand All @@ -912,12 +910,10 @@ type EndpointPrivateNetworkDetails struct {
}

// EndpointSpecPrivateNetworkIpamConfig: endpoint spec private network ipam config.
type EndpointSpecPrivateNetworkIpamConfig struct {
}
type EndpointSpecPrivateNetworkIpamConfig struct{}

// ReadReplicaEndpointSpecPrivateNetworkIpamConfig: read replica endpoint spec private network ipam config.
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct {
}
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct{}

// EngineSetting: engine setting.
type EngineSetting struct {
Expand Down Expand Up @@ -989,8 +985,7 @@ type Endpoint struct {
}

// EndpointSpecLoadBalancer: endpoint spec load balancer.
type EndpointSpecLoadBalancer struct {
}
type EndpointSpecLoadBalancer struct{}

// EndpointSpecPrivateNetwork: endpoint spec private network.
type EndpointSpecPrivateNetwork struct {
Expand All @@ -1007,8 +1002,7 @@ type EndpointSpecPrivateNetwork struct {
}

// ReadReplicaEndpointSpecDirectAccess: read replica endpoint spec direct access.
type ReadReplicaEndpointSpecDirectAccess struct {
}
type ReadReplicaEndpointSpecDirectAccess struct{}

// ReadReplicaEndpointSpecPrivateNetwork: read replica endpoint spec private network.
type ReadReplicaEndpointSpecPrivateNetwork struct {
Expand Down Expand Up @@ -2518,6 +2512,7 @@ func NewAPI(client *scw.Client) *API {
client: client,
}
}

func (s *API) Regions() []scw.Region {
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
}
Expand Down
2 changes: 1 addition & 1 deletion api/documentdb/v1beta1/documentdb_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package documentdb
import (
"time"

"github.com/scaleway/scaleway-sdk-go/errors"
"github.com/scaleway/scaleway-sdk-go/internal/async"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down
Loading

0 comments on commit bec257c

Please sign in to comment.