chore: work save
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 4m1s
CI Workflow / CI run build and linting (pull_request) Failing after 5m1s
CI Workflow / CI run tests (pull_request) Failing after 5m16s
CI Workflow / Code coverage report (pull_request) Has been skipped
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 4m1s
CI Workflow / CI run build and linting (pull_request) Failing after 5m1s
CI Workflow / CI run tests (pull_request) Failing after 5m16s
CI Workflow / Code coverage report (pull_request) Has been skipped
This commit is contained in:
parent
d6d3a795bb
commit
7f5802aff0
27 changed files with 802 additions and 962 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
|
|
@ -207,11 +208,14 @@ func GetUserByIdWaitHandler(
|
|||
ctx context.Context,
|
||||
a APIClientUserInterface,
|
||||
projectId, instanceId, region string,
|
||||
userId int32,
|
||||
userId int64,
|
||||
) *wait.AsyncActionHandler[v3alpha1api.GetUserResponse] {
|
||||
handler := wait.New(
|
||||
func() (waitFinished bool, response *v3alpha1api.GetUserResponse, err error) {
|
||||
userId32 := userId
|
||||
if userId > math.MaxInt32 {
|
||||
return false, nil, fmt.Errorf("userID too large for int32")
|
||||
}
|
||||
userId32 := int32(userId)
|
||||
s, err := a.GetUserRequest(ctx, projectId, region, instanceId, userId32).Execute()
|
||||
if err != nil {
|
||||
var oapiErr *oapierror.GenericOpenAPIError
|
||||
|
|
@ -243,11 +247,14 @@ func GetDatabaseByIdWaitHandler(
|
|||
ctx context.Context,
|
||||
a APIClientDatabaseInterface,
|
||||
projectId, instanceId, region string,
|
||||
databaseId int32,
|
||||
databaseId int64,
|
||||
) *wait.AsyncActionHandler[v3alpha1api.GetDatabaseResponse] {
|
||||
handler := wait.New(
|
||||
func() (waitFinished bool, response *v3alpha1api.GetDatabaseResponse, err error) {
|
||||
dbId32 := databaseId
|
||||
if databaseId > math.MaxInt32 {
|
||||
return false, nil, fmt.Errorf("databaseID too large for int32")
|
||||
}
|
||||
dbId32 := int32(databaseId)
|
||||
s, err := a.GetDatabaseRequest(ctx, projectId, region, instanceId, dbId32).Execute()
|
||||
if err != nil {
|
||||
var oapiErr *oapierror.GenericOpenAPIError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue