Skip to content

Commit bec257c

Browse files
authored
chore: extract errors, marshaler and parameter pkgs from internal (#2205)
1 parent cf9914f commit bec257c

File tree

89 files changed

+239
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+239
-231
lines changed

api/account/v2/account_sdk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

api/account/v2alpha1/account_sdk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

api/account/v3/account_sdk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

api/applesilicon/v1alpha1/apple_silicon_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package applesilicon
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/applesilicon/v1alpha1/applesilicon_sdk.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -525,6 +525,7 @@ func NewAPI(client *scw.Client) *API {
525525
client: client,
526526
}
527527
}
528+
528529
func (s *API) Zones() []scw.Zone {
529530
return []scw.Zone{scw.ZoneFrPar3}
530531
}

api/baremetal/v1/baremetal_sdk.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -1765,6 +1765,7 @@ func NewAPI(client *scw.Client) *API {
17651765
client: client,
17661766
}
17671767
}
1768+
17681769
func (s *API) Zones() []scw.Zone {
17691770
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2}
17701771
}
@@ -2679,6 +2680,7 @@ func NewPrivateNetworkAPI(client *scw.Client) *PrivateNetworkAPI {
26792680
client: client,
26802681
}
26812682
}
2683+
26822684
func (s *PrivateNetworkAPI) Zones() []scw.Zone {
26832685
return []scw.Zone{scw.ZoneFrPar2}
26842686
}

api/baremetal/v1/server_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package baremetal
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/billing/v2alpha1/billing_sdk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

api/billing/v2beta1/billing_sdk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

api/block/v1alpha1/block_sdk.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -906,6 +906,7 @@ func NewAPI(client *scw.Client) *API {
906906
client: client,
907907
}
908908
}
909+
909910
func (s *API) Zones() []scw.Zone {
910911
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw3}
911912
}

api/block/v1alpha1/snapshot_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package block
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/block/v1alpha1/volume_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package block
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/cockpit/v1/cockpit_sdk.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -1652,6 +1652,7 @@ func NewRegionalAPI(client *scw.Client) *RegionalAPI {
16521652
client: client,
16531653
}
16541654
}
1655+
16551656
func (s *RegionalAPI) Regions() []scw.Region {
16561657
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
16571658
}

api/cockpit/v1beta1/cockpit_sdk.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -993,8 +993,7 @@ type SelectPlanRequest struct {
993993
}
994994

995995
// SelectPlanResponse: Response returned when selecting a pricing plan.
996-
type SelectPlanResponse struct {
997-
}
996+
type SelectPlanResponse struct{}
998997

999998
// TriggerTestAlertRequest: trigger test alert request.
1000999
type TriggerTestAlertRequest struct {

api/cockpit/v1beta1/cockpit_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cockpit
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/container/v1beta1/container_helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package container
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/container/v1beta1/container_sdk.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -1816,6 +1816,7 @@ func NewAPI(client *scw.Client) *API {
18161816
client: client,
18171817
}
18181818
}
1819+
18191820
func (s *API) Regions() []scw.Region {
18201821
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
18211822
}

api/dedibox/v1/dedibox_sdk.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

@@ -5905,6 +5905,7 @@ func NewAPI(client *scw.Client) *API {
59055905
client: client,
59065906
}
59075907
}
5908+
59085909
func (s *API) Zones() []scw.Zone {
59095910
return []scw.Zone{scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1}
59105911
}

api/dedibox/v1/dedibox_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package dedibox
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

api/documentdb/v1beta1/documentdb_sdk.go

+10-15
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"strings"
1515
"time"
1616

17-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
18-
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
19-
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
17+
"github.com/scaleway/scaleway-sdk-go/errors"
18+
"github.com/scaleway/scaleway-sdk-go/marshaler"
2019
"github.com/scaleway/scaleway-sdk-go/namegenerator"
20+
"github.com/scaleway/scaleway-sdk-go/parameter"
2121
"github.com/scaleway/scaleway-sdk-go/scw"
2222
)
2323

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

894894
// EndpointDirectAccessDetails: endpoint direct access details.
895-
type EndpointDirectAccessDetails struct {
896-
}
895+
type EndpointDirectAccessDetails struct{}
897896

898897
// EndpointLoadBalancerDetails: endpoint load balancer details.
899-
type EndpointLoadBalancerDetails struct {
900-
}
898+
type EndpointLoadBalancerDetails struct{}
901899

902900
// EndpointPrivateNetworkDetails: endpoint private network details.
903901
type EndpointPrivateNetworkDetails struct {
@@ -912,12 +910,10 @@ type EndpointPrivateNetworkDetails struct {
912910
}
913911

914912
// EndpointSpecPrivateNetworkIpamConfig: endpoint spec private network ipam config.
915-
type EndpointSpecPrivateNetworkIpamConfig struct {
916-
}
913+
type EndpointSpecPrivateNetworkIpamConfig struct{}
917914

918915
// ReadReplicaEndpointSpecPrivateNetworkIpamConfig: read replica endpoint spec private network ipam config.
919-
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct {
920-
}
916+
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct{}
921917

922918
// EngineSetting: engine setting.
923919
type EngineSetting struct {
@@ -989,8 +985,7 @@ type Endpoint struct {
989985
}
990986

991987
// EndpointSpecLoadBalancer: endpoint spec load balancer.
992-
type EndpointSpecLoadBalancer struct {
993-
}
988+
type EndpointSpecLoadBalancer struct{}
994989

995990
// EndpointSpecPrivateNetwork: endpoint spec private network.
996991
type EndpointSpecPrivateNetwork struct {
@@ -1007,8 +1002,7 @@ type EndpointSpecPrivateNetwork struct {
10071002
}
10081003

10091004
// ReadReplicaEndpointSpecDirectAccess: read replica endpoint spec direct access.
1010-
type ReadReplicaEndpointSpecDirectAccess struct {
1011-
}
1005+
type ReadReplicaEndpointSpecDirectAccess struct{}
10121006

10131007
// ReadReplicaEndpointSpecPrivateNetwork: read replica endpoint spec private network.
10141008
type ReadReplicaEndpointSpecPrivateNetwork struct {
@@ -2518,6 +2512,7 @@ func NewAPI(client *scw.Client) *API {
25182512
client: client,
25192513
}
25202514
}
2515+
25212516
func (s *API) Regions() []scw.Region {
25222517
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
25232518
}

api/documentdb/v1beta1/documentdb_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package documentdb
33
import (
44
"time"
55

6+
"github.com/scaleway/scaleway-sdk-go/errors"
67
"github.com/scaleway/scaleway-sdk-go/internal/async"
7-
"github.com/scaleway/scaleway-sdk-go/internal/errors"
88
"github.com/scaleway/scaleway-sdk-go/scw"
99
)
1010

0 commit comments

Comments
 (0)