Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 api/account/v2alpha1/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (r *ListSSHKeysResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListSSHKeysResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListSSHKeysResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListSSHKeysResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
8 changes: 4 additions & 4 deletions api/baremetal/v1alpha1/baremetal_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func (r *ListServersResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListServersResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1087,7 +1087,7 @@ func (r *ListServerEventsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListServerEventsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListServerEventsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListServerEventsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1334,7 +1334,7 @@ func (r *ListOffersResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListOffersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListOffersResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListOffersResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1401,7 +1401,7 @@ func (r *ListOsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListOsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListOsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListOsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
4 changes: 2 additions & 2 deletions api/baremetal/v1alpha1/server_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type WaitForServerRequest struct {

// WaitForServer wait for the server to be in a "terminal state" before returning.
// This function can be used to wait for a server to be created.
func (s *API) WaitForServer(req *WaitForServerRequest) (*Server, scw.SdkError) {
func (s *API) WaitForServer(req *WaitForServerRequest) (*Server, error) {
terminalStatus := map[ServerStatus]struct{}{
ServerStatusReady: {},
ServerStatusStopped: {},
Expand Down Expand Up @@ -59,7 +59,7 @@ type WaitForServerInstallRequest struct {
// WaitForServerInstall wait for the server install to be in a
// "terminal state" before returning.
// This function can be used to wait for a server to be installed.
func (s *API) WaitForServerInstall(req *WaitForServerInstallRequest) (*Server, scw.SdkError) {
func (s *API) WaitForServerInstall(req *WaitForServerInstallRequest) (*Server, error) {
installTerminalStatus := map[ServerInstallStatus]struct{}{
ServerInstallStatusCompleted: {},
ServerInstallStatusError: {},
Expand Down
18 changes: 9 additions & 9 deletions api/instance/v1/instance_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ func (r *ListServersResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListServersResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2010,7 +2010,7 @@ func (r *ListImagesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListImagesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2297,7 +2297,7 @@ func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListSnapshotsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2575,7 +2575,7 @@ func (r *ListVolumesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListVolumesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2797,7 +2797,7 @@ func (r *ListSecurityGroupsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListSecurityGroupsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListSecurityGroupsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListSecurityGroupsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -3088,7 +3088,7 @@ func (r *ListSecurityGroupRulesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListSecurityGroupRulesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListSecurityGroupRulesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListSecurityGroupRulesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -3391,7 +3391,7 @@ func (r *ListPlacementGroupsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListPlacementGroupsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListPlacementGroupsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListPlacementGroupsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -3853,7 +3853,7 @@ func (r *ListIPsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListIPsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -4156,7 +4156,7 @@ func (r *ListBootscriptsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListBootscriptsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListBootscriptsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListBootscriptsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
2 changes: 1 addition & 1 deletion api/instance/v1/instance_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (r *ListServersTypesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListServersTypesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListServersTypesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListServersTypesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
6 changes: 3 additions & 3 deletions api/k8s/v1beta3/k8s_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ func (r *ListClustersResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListClustersResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1154,7 +1154,7 @@ func (r *ListPoolsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListPoolsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListPoolsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListPoolsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1490,7 +1490,7 @@ func (r *ListNodesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListNodesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListNodesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListNodesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
16 changes: 8 additions & 8 deletions api/lb/v1/lb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ func (r *ListLbsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListLbsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListLbsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListLbsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1515,7 +1515,7 @@ func (r *ListIPsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListIPsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1669,7 +1669,7 @@ func (r *ListBackendsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListBackendsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListBackendsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListBackendsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2306,7 +2306,7 @@ func (r *ListFrontendsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListFrontendsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListFrontendsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListFrontendsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2653,7 +2653,7 @@ func (r *ListBackendStatsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListBackendStatsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListBackendStatsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListBackendStatsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2731,7 +2731,7 @@ func (r *ListACLResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListACLResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListACLResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListACLResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -3045,7 +3045,7 @@ func (r *ListCertificatesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListCertificatesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListCertificatesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListCertificatesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -3229,7 +3229,7 @@ func (r *ListLbTypesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListLbTypesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListLbTypesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListLbTypesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
2 changes: 1 addition & 1 deletion api/marketplace/v1/marketplace_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (r *ListImagesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListImagesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
16 changes: 8 additions & 8 deletions api/rdb/v1/rdb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ func (r *ListDatabaseBackupsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListDatabaseBackupsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListDatabaseBackupsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListDatabaseBackupsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1394,7 +1394,7 @@ func (r *ListDatabaseEnginesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListDatabaseEnginesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListDatabaseEnginesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListDatabaseEnginesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -1516,7 +1516,7 @@ func (r *ListInstancesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListInstancesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListInstancesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListInstancesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2086,7 +2086,7 @@ func (r *ListInstanceACLRulesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListInstanceACLRulesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListInstanceACLRulesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListInstanceACLRulesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2296,7 +2296,7 @@ func (r *ListUsersResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListUsersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListUsersResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListUsersResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2521,7 +2521,7 @@ func (r *ListDatabasesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListDatabasesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListDatabasesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListDatabasesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2687,7 +2687,7 @@ func (r *ListPrivilegesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListPrivilegesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListPrivilegesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListPrivilegesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -2804,7 +2804,7 @@ func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListNodeTypesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListNodeTypesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListNodeTypesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
6 changes: 3 additions & 3 deletions api/registry/v1/registry_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ func (r *ListNamespacesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListNamespacesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -742,7 +742,7 @@ func (r *ListImagesResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListImagesResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down Expand Up @@ -950,7 +950,7 @@ func (r *ListTagsResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListTagsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListTagsResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListTagsResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
2 changes: 1 addition & 1 deletion api/registry/v1/registry_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type WaitForNamespaceRequest struct {

// WaitForNamespace wait for the namespace to be in a "terminal state" before returning.
// This function can be used to wait for a namespace to be ready for example.
func (s *API) WaitForNamespace(req *WaitForNamespaceRequest) (*Namespace, scw.SdkError) {
func (s *API) WaitForNamespace(req *WaitForNamespaceRequest) (*Namespace, error) {
terminalStatus := map[NamespaceStatus]struct{}{
NamespaceStatusReady: {},
NamespaceStatusLocked: {},
Expand Down
2 changes: 1 addition & 1 deletion api/test/v1/test_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func (r *ListHumansResponse) UnsafeGetTotalCount() uint32 {

// UnsafeAppend should not be used
// Internal usage only
func (r *ListHumansResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError) {
func (r *ListHumansResponse) UnsafeAppend(res interface{}) (uint32, error) {
results, ok := res.(*ListHumansResponse)
if !ok {
return 0, errors.New("%T type cannot be appended to type %T", res, r)
Expand Down
Loading