Update module cloud.google.com/go/compute/metadata to v0.3.0 #148

Merged
Renovate merged 1 commits from renovate/cloud.google.com-go-compute-metadata-0.x into master 2024-04-15 17:13:32 -04:00
Collaborator

This PR contains the following updates:

Package Type Update Change
cloud.google.com/go/compute/metadata indirect minor v0.2.3 -> v0.3.0

Release Notes

googleapis/google-cloud-go (cloud.google.com/go/compute/metadata)

v0.3.0

  • storage:

    • AdminClient replaced by methods on Client.
      Replace

      adminClient.CreateBucket(ctx, bucketName, attrs)
      

      with

      client.Bucket(bucketName).Create(ctx, projectID, attrs)
      
    • BucketHandle.List replaced by BucketHandle.Objects.
      Replace

      for query != nil {
          objs, err := bucket.List(d.ctx, query)
          if err != nil { ... }
          query = objs.Next
          for _, obj := range objs.Results {
              fmt.Println(obj)
          }
      }
      

      with

      iter := bucket.Objects(d.ctx, query)
      for {
          obj, err := iter.Next()
          if err == iterator.Done {
              break
          }
          if err != nil { ... }
          fmt.Println(obj)
      }
      

      (The iterator package is at google.golang.org/api/iterator.)

      Replace Query.Cursor with ObjectIterator.PageInfo().Token.

      Replace Query.MaxResults with ObjectIterator.PageInfo().MaxSize.

    • ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
      Replace

      attrs, err := src.CopyTo(ctx, dst, nil)
      

      with

      attrs, err := dst.CopierFrom(src).Run(ctx)
      

      Replace

      attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})
      

      with

      c := dst.CopierFrom(src)
      c.ContextType = "text/html"
      attrs, err := c.Run(ctx)
      
    • ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
      Replace

      attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)
      

      with

      attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
      
    • ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
      Replace

      attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})
      

      with

      attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
      
    • ObjectHandle.WithConditions replaced by ObjectHandle.If.
      Replace

      obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))
      

      with

      obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})
      

      Replace

      obj.WithConditions(storage.IfGenerationMatch(0))
      

      with

      obj.If(storage.Conditions{DoesNotExist: true})
      
    • storage.Done replaced by iterator.Done (from package google.golang.org/api/iterator).

  • Package preview/logging deleted. Use logging instead.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [cloud.google.com/go/compute/metadata](https://github.com/googleapis/google-cloud-go) | indirect | minor | `v0.2.3` -> `v0.3.0` | --- ### Release Notes <details> <summary>googleapis/google-cloud-go (cloud.google.com/go/compute/metadata)</summary> ### [`v0.3.0`](https://github.com/googleapis/google-cloud-go/blob/HEAD/CHANGES.md#v030) - storage: - AdminClient replaced by methods on Client. Replace ```go adminClient.CreateBucket(ctx, bucketName, attrs) ``` with ```go client.Bucket(bucketName).Create(ctx, projectID, attrs) ``` - BucketHandle.List replaced by BucketHandle.Objects. Replace ```go for query != nil { objs, err := bucket.List(d.ctx, query) if err != nil { ... } query = objs.Next for _, obj := range objs.Results { fmt.Println(obj) } } ``` with ```go iter := bucket.Objects(d.ctx, query) for { obj, err := iter.Next() if err == iterator.Done { break } if err != nil { ... } fmt.Println(obj) } ``` (The `iterator` package is at `google.golang.org/api/iterator`.) Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. - ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. Replace ```go attrs, err := src.CopyTo(ctx, dst, nil) ``` with ```go attrs, err := dst.CopierFrom(src).Run(ctx) ``` Replace ```go attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) ``` with ```go c := dst.CopierFrom(src) c.ContextType = "text/html" attrs, err := c.Run(ctx) ``` - ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. Replace ```go attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) ``` with ```go attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) ``` - ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. Replace ```go attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) ``` with ```go attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) ``` - ObjectHandle.WithConditions replaced by ObjectHandle.If. Replace ```go obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) ``` with ```go obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) ``` Replace ```go obj.WithConditions(storage.IfGenerationMatch(0)) ``` with ```go obj.If(storage.Conditions{DoesNotExist: true}) ``` - `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). - Package preview/logging deleted. Use logging instead. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yODcuMSIsInVwZGF0ZWRJblZlciI6IjM3LjI4Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
Renovate added 1 commit 2024-04-15 17:13:32 -04:00
Renovate scheduled this pull request to auto merge when all checks succeed 2024-04-15 17:13:32 -04:00
Renovate merged commit 285e0ddee5 into master 2024-04-15 17:13:32 -04:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: toast/Corn-Utility#148
No description provided.