From b7c7f63efd0832d66e0f1cf5d9230bafb5e4c20f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 18:43:39 +0000 Subject: [PATCH] deps: bump the go-minor-patch group with 2 updates Bumps the go-minor-patch group with 2 updates: [github.com/mattn/go-shellwords](https://github.com/mattn/go-shellwords) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client). Updates `github.com/mattn/go-shellwords` from 1.0.15 to 1.0.16 - [Release notes](https://github.com/mattn/go-shellwords/releases) - [Commits](https://github.com/mattn/go-shellwords/compare/v1.0.15...v1.0.16) Updates `google.golang.org/api` from 0.299.0 to 0.300.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.299.0...v0.300.0) --- updated-dependencies: - dependency-name: github.com/mattn/go-shellwords dependency-version: 1.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-minor-patch - dependency-name: google.golang.org/api dependency-version: 0.300.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-minor-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 8 +- vendor/github.com/aws/smithy-go/AGENTS.md | 173 ++++++++++++++++ .../mattn/go-shellwords/shellwords.go | 196 +++++++++--------- .../google.golang.org/api/internal/version.go | 2 +- .../api/storage/v1/storage-api.json | 103 ++++++++- .../api/storage/v1/storage-gen.go | 176 ++++++++++++++++ vendor/modules.txt | 4 +- 8 files changed, 552 insertions(+), 114 deletions(-) create mode 100644 vendor/github.com/aws/smithy-go/AGENTS.md diff --git a/go.mod b/go.mod index cac265752..1a322a0e2 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/jhunt/go-envirotron v0.0.0-20191007155228-c8f2a184ad0f github.com/jhunt/go-table v0.0.0-20181127210244-68a841ca53dc github.com/mattn/go-isatty v0.0.24 - github.com/mattn/go-shellwords v1.0.15 + github.com/mattn/go-shellwords v1.0.16 github.com/mattn/go-sqlite3 v1.14.52 github.com/ncw/swift/v2 v2.0.5 github.com/okta/okta-jwt-verifier-golang/v2 v2.1.1 @@ -34,7 +34,7 @@ require ( golang.org/x/crypto v0.57.0 golang.org/x/net v0.59.0 golang.org/x/oauth2 v0.37.0 - google.golang.org/api v0.299.0 + google.golang.org/api v0.300.0 ) require ( diff --git a/go.sum b/go.sum index df10a88f2..2e1b446b1 100644 --- a/go.sum +++ b/go.sum @@ -220,8 +220,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= -github.com/mattn/go-shellwords v1.0.15 h1:rx0n8+ZdM9JWZMlr2BMPAjtLU0rfluLNtwMC2FJOTtY= -github.com/mattn/go-shellwords v1.0.15/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-shellwords v1.0.16 h1:RRxAaRzU1YbzOSCj9NJqg2/VIbSWv0dnPoD3EwE8kxI= +github.com/mattn/go-shellwords v1.0.16/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U= github.com/mattn/go-sqlite3 v1.14.52/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= @@ -376,8 +376,8 @@ golang.org/x/tools v0.50.0 h1:c2ifzfcuY7L90lZ2aKd8S4K2NpASF08SZx9ZuJkHmSU= golang.org/x/tools v0.50.0/go.mod h1:7ulVMw3831Mwi5EZD6RomGyffr4VFjuNYXf2BbCEAV0= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/api v0.299.0 h1:b3K+ydSMd0kh6TQI6bJyApRQfqQX2MfSOaVkpM59mJw= -google.golang.org/api v0.299.0/go.mod h1:zlR3GVA8b2R5nv5Ij9UWe37StVB3cxDD7DBFi4ZFsHw= +google.golang.org/api v0.300.0 h1:2rvPV2bqnPuHOaF4gGOBiT1IIc6JVXYyHCkZeqdzjNk= +google.golang.org/api v0.300.0/go.mod h1:tKfTSDfK+0FlOVl8N30VL5fU5TuaEkJjvdyTIKNwzPg= google.golang.org/genproto v0.0.0-20260825221802-da73d73af1c5 h1:jPP56YzdY899KJ5W7efXHt/CkjlVfAaoFOwdi/IEAFA= google.golang.org/genproto v0.0.0-20260825221802-da73d73af1c5/go.mod h1:gutZdP0DwAHp4vu5WaXgEK7tjsJ77ZEqzlOFWGZGziE= google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc h1:rZHRz0ogq4Pid1IKtA/ivHi8XONVF5tqUQXA2TtgpkE= diff --git a/vendor/github.com/aws/smithy-go/AGENTS.md b/vendor/github.com/aws/smithy-go/AGENTS.md new file mode 100644 index 000000000..de1e3b2bb --- /dev/null +++ b/vendor/github.com/aws/smithy-go/AGENTS.md @@ -0,0 +1,173 @@ +# AGENTS.md + +## Project overview + +smithy-go is the Go code generator and runtime for [Smithy](https://smithy.io/). +It has two major components: + +1. **Codegen** (`codegen/`) — A Smithy build plugin written in Java that + generates Go client/server/shape code from Smithy models. +2. **Runtime** (`./`, top-level Go module) — The Go packages that generated + code depends on at runtime. + +The primary downstream consumer is +[aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). + +## Repository layout + +``` +. # Root Go module (github.com/aws/smithy-go) +├── auth/ # Auth identity + scheme interfaces +│ └── bearer/ # Bearer token auth +├── aws-http-auth/ # Separate module: AWS SigV4/SigV4A HTTP signing +├── codegen/ # Java/Gradle: Smithy code generator +│ ├── smithy-go-codegen/ # Main codegen source (Java) +│ └── smithy-go-codegen-test/ # Codegen integration tests +├── container/ # Generic container types +├── context/ # Context helpers +├── document/ # Smithy document type abstraction +│ └── json/ # JSON document codec +├── encoding/ # Wire format encoders/decoders +│ ├── cbor/ # CBOR (used by rpcv2Cbor) +│ ├── httpbinding/ # HTTP binding serde helpers +│ ├── json/ # JSON encoder/decoder +│ └── xml/ # XML encoder/decoder +├── endpoints/ # Endpoint resolution types +├── internal/ # Internal utilities (singleflight, etc.) +├── io/ # I/O helpers +├── logging/ # Logging interfaces +├── metrics/ # Metrics interfaces +│ └── smithyotelmetrics/ # Separate module: OpenTelemetry metrics adapter +├── middleware/ # Middleware stack (the core of the operation pipeline) +├── ptr/ # Pointer-to/from-value helpers +├── testing/ # Test assertion helpers for generated protocol tests +│ └── xml/ # XML comparison utilities +├── time/ # Smithy timestamp format helpers +├── tracing/ # Tracing interfaces +│ └── smithyoteltracing/ # Separate module: OpenTelemetry tracing adapter +└── transport/ + └── http/ # HTTP request/response types and middleware +``` + +## Building and testing + +### Runtime (Go) + +```bash +# Run unit tests +make unit +``` + +### Codegen (Java) + +```bash +# Build and test codegen +cd codegen && ./gradlew build + +# Publish to local Maven for downstream use +cd codegen && ./gradlew publishToMavenLocal +``` + +The codegen artifact version is published to Maven Central and bumped on each +release. For local development against unreleased codegen changes, use +`publishToMavenLocal` and point consumers at `mavenLocal()`. + +## Runtime architecture + +### Middleware stack + +The operation pipeline is built on a middleware stack defined in `middleware/`. +Steps execute in order: Initialize → Serialize → Build → Finalize → +Deserialize. Each step is a `middleware.Step` that holds an ordered list of +middleware. The codegen generates middleware registrations for each operation. + +### Encoding packages + +Each wire format has its own encoder/decoder under `encoding/`. These are +low-level — they produce/consume raw tokens or values, not full Smithy shapes. +Generated serde code calls into these packages. + +## Codegen: GoWriter and template system + +GoWriter extends Smithy's `SymbolWriter` and is the primary mechanism for +generating Go source. It has **two distinct writing styles** that must not be +confused. + +### Style 1: Positional args (`writer.write` / `writer.openBlock`) + +Inherited from `SymbolWriter`. Arguments are positional and referenced with +`$`-prefixed format characters. Each `$X` consumes the next argument in order. + +Format characters: +- `$L` — Literal (toString). Strings, names, anything that should be inserted + verbatim. +- `$S` — String, quoted. Wraps the value in Go double-quotes. +- `$T` — Type (Symbol). Inserts the symbol name and auto-adds its import. +- `$P` — Pointable type (Symbol). Like `$T` but prepends `*` if the symbol is + marked pointable. +- `$W` — Writable. Evaluates a `Writable` (lambda/closure) inline. +- `$D` — Dependency. Adds a `GoDependency` import, expands to empty string. + +Numbered variants (`$1L`, `$2T`, etc.) allow reusing the same argument +multiple times. The number is 1-indexed and refers to the position in the +argument list: + +```java +// $1L is used twice, $2L once — only 2 args needed +writer.write("type $1L struct{}\nvar _ $2L = (*$1L)(nil)", + DEFAULT_NAME, INTERFACE_NAME); +``` + +`openBlock`/`closeBlock` manage indentation for braced blocks. Arguments are +positional: + +```java +writer.openBlock("func (c $P) $T(ctx $T) ($P, error) {", "}", + serviceSymbol, operationSymbol, contextSymbol, outputSymbol, + () -> { + writer.write("return nil, nil"); + }); +``` + +### Style 2: Named template args (`goTemplate` / `writeGoTemplate`) + +Uses `$name:X` syntax where `name` is a key in a `Map` and `X` +is the format character. Arguments are passed as one or more maps. This is the +**preferred style for new code** — it is more readable and less error-prone +than positional args. + +```java +return goTemplate(""" + func $name:L(v $cborValue:T) ($type:T, error) { + return $coercer:T(v) + } + """, + Map.of( + "name", getDeserializerName(shape), + "cborValue", SmithyGoTypes.Encoding.Cbor.Value, + "type", symbolProvider.toSymbol(shape), + "coercer", coercer + )); +``` + +Rules: +- `goTemplate(String, Map...)` is a **static** method that returns a + `Writable` (a `Consumer` lambda). It does NOT write immediately. +- `writeGoTemplate(String, Map...)` is an **instance** method that writes + immediately to the writer. +- Maps are merged into the writer's context scope for the duration of the + template. Multiple maps can be passed and are applied in order. +- The writer pre-populates common symbols in context: `fmt.Sprintf`, + `fmt.Errorf`, `errors.As`, `context.Context`, `time.Now`. + +### Composing writables + +- `ChainWritable` — Collects multiple `Writable`s and composes them with + newlines between each. Use `.compose()` (with newlines) or + `.compose(false)` (without). + +### Symbol constants + +For symbols, use `SmithyGoDependency.*.valueSymbol("Name")` or +`SmithyGoDependency.*.pointableSymbol("Name")`. + diff --git a/vendor/github.com/mattn/go-shellwords/shellwords.go b/vendor/github.com/mattn/go-shellwords/shellwords.go index 9c6040e85..21c5a75fd 100644 --- a/vendor/github.com/mattn/go-shellwords/shellwords.go +++ b/vendor/github.com/mattn/go-shellwords/shellwords.go @@ -1,7 +1,6 @@ package shellwords import ( - "bytes" "errors" "os" "strings" @@ -24,78 +23,29 @@ func isSpace(r rune) bool { return false } -func replaceEnv(getenv func(string) string, s string) string { - if getenv == nil { - getenv = os.Getenv - } +func isEnvNameRune(r rune) bool { + return unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' +} - var buf bytes.Buffer - rs := []rune(s) - for i := 0; i < len(rs); i++ { - r := rs[i] - if r == '\\' { - i++ - if i == len(rs) { - break - } - buf.WriteRune(rs[i]) - continue - } else if r == '$' { - i++ - if i == len(rs) { - buf.WriteRune(r) - break - } - if rs[i] == 0x7b { - i++ - p := i - for ; i < len(rs); i++ { - r = rs[i] - if r == '\\' { - i++ - if i == len(rs) { - return s - } - continue - } - if r == 0x7d || (!unicode.IsLetter(r) && r != '_' && !unicode.IsDigit(r)) { - break - } - } - if r != 0x7d { - return s - } - if i > p { - buf.WriteString(getenv(string(rs[p:i]))) - } - } else { - p := i - for ; i < len(rs); i++ { - r := rs[i] - if r == '\\' { - i++ - if i == len(rs) { - return s - } - continue - } - if !unicode.IsLetter(r) && r != '_' && !unicode.IsDigit(r) { - break - } - } - if i > p { - buf.WriteString(getenv(string(rs[p:i]))) - i-- - } else { - buf.WriteRune('$') - i-- - } - } - } else { - buf.WriteRune(r) +// parseEnvName parses the variable reference that follows a '$' at the start +// of s, either NAME or {NAME}. It returns the name and the number of bytes +// consumed, or ok == false if s does not start with a reference. +func parseEnvName(s string) (name string, n int, ok bool) { + if strings.HasPrefix(s, "{") { + end := strings.IndexFunc(s[1:], func(r rune) bool { return !isEnvNameRune(r) }) + if end < 0 || s[1+end] != '}' { + return "", 0, false } + return s[1 : 1+end], end + 2, true } - return buf.String() + end := strings.IndexFunc(s, func(r rune) bool { return !isEnvNameRune(r) }) + if end < 0 { + end = len(s) + } + if end == 0 { + return "", 0, false + } + return s[:end], end, true } type Parser struct { @@ -159,44 +109,58 @@ func (p *Parser) Parse(line string) ([]string, error) { pos := -1 got := argNo + // Whether the pending token contains any quoted or escaped character. + tokenQuoted := false + // Whether the pending token contains output of a command substitution + // or an environment variable expansion. + substituted := false + // Whether the previous character was an unquoted, unescaped '$'. + afterDollar := false + // Byte offset in line up to which characters were already consumed. + skip := 0 + + getenv := p.Getenv + if getenv == nil { + getenv = os.Getenv + } - flush := func() error { + flush := func() { if got == argQuoted || (got != argNo && len(buf) > 0) { - token := string(buf) - if p.ParseEnv { - if got == argSingle { - parser := &Parser{ParseEnv: false, ParseBacktick: false, Position: 0, Dir: p.Dir} - strs, err := parser.Parse(replaceEnv(p.Getenv, token)) - if err != nil { - return err - } - args = append(args, strs...) - } else { - args = append(args, replaceEnv(p.Getenv, token)) - } - } else { - args = append(args, token) - } + args = append(args, string(buf)) } buf = buf[:0] got = argNo - return nil + tokenQuoted = false + substituted = false } i := -1 loop: - for _, r := range line { + for idx, r := range line { i++ + if idx < skip { + continue + } + + prevDollar := afterDollar + afterDollar = false + if comment { if r == '\n' { comment = false + // Defensive only: a comment can begin just when got == argNo, + // which is reached solely through flush (which clears this + // flag), and nothing inside a comment sets it. Kept so the + // invariant survives if either of those ever changes. + tokenQuoted = false } continue } if escaped { escaped = false + tokenQuoted = true if backQuote || dollarQuote { buf = append(buf, '\\') buf = append(buf, string(r)...) @@ -205,13 +169,6 @@ loop: got = argSingle continue } - if p.ParseEnv && r == '$' { - // Keep the backslash so replaceEnv treats the '$' as - // literal instead of expanding it. - buf = append(buf, '\\', '$') - got = argSingle - continue - } if r == 't' { r = '\t' } @@ -247,8 +204,8 @@ loop: if backQuote || dollarQuote { backtick = append(backtick, byte(r)) } - } else if err := flush(); err != nil { - return nil, err + } else { + flush() } continue } @@ -263,6 +220,7 @@ loop: return nil, err } buf = append(buf[:len(buf)-len(backtick)], out...) + substituted = true } backtick = backtick[:0] backQuote = !backQuote @@ -295,6 +253,7 @@ loop: } buf = append(buf[:len(buf)-len(backtick)-2], out...) + substituted = true backtick = backtick[:0] dollarQuote = false continue @@ -316,7 +275,7 @@ loop: case '(': if !singleQuoted && !doubleQuoted && !backQuote { - if n := len(buf); !dollarQuote && n > 0 && buf[n-1] == '$' && !(n > 1 && buf[n-2] == '\\') { + if !dollarQuote && prevDollar { dollarQuote = true buf = append(buf, '(') continue @@ -331,6 +290,7 @@ loop: got = argQuoted } doubleQuoted = !doubleQuoted + tokenQuoted = true continue } @@ -340,12 +300,17 @@ loop: got = argQuoted } singleQuoted = !singleQuoted + tokenQuoted = true continue } case ';', '&', '|', '<', '>': if !(escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote) { - if r == '>' && len(buf) > 0 { + // A file descriptor number is only a redirect prefix while it + // is unquoted; quoting makes it an ordinary argument. Output of + // a command substitution is never one either, and its length + // does not match the source text. + if r == '>' && len(buf) > 0 && !tokenQuoted && !substituted { isDigits := true for _, c := range buf { if c < '0' || c > '9' { @@ -361,8 +326,34 @@ loop: pos = i break loop } + case '$': + if p.ParseEnv && !singleQuoted && !backQuote && !dollarQuote { + name, n, ok := parseEnvName(line[idx+1:]) + if !ok { + break + } + skip = idx + 1 + n + value := getenv(name) + if doubleQuoted { + buf = append(buf, value...) + } else { + // Split the value into fields, but never interpret its + // contents as shell syntax. + for _, c := range value { + if isSpace(c) && !p.isExcluded(c) { + flush() + continue + } + buf = append(buf, string(c)...) + got = argSingle + } + } + substituted = true + continue + } + case '#': - if p.ParseComment && got == argNo && !(escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote) { + if p.ParseComment && got == argNo && !substituted && !(escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote) { comment = true continue loop } @@ -373,11 +364,10 @@ loop: if backQuote || dollarQuote { backtick = append(backtick, string(r)...) } + afterDollar = r == '$' && !(singleQuoted || doubleQuoted || backQuote || dollarQuote) } - if err := flush(); err != nil { - return nil, err - } + flush() if escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote { return nil, errInvalidCmdLine diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go index 2a34e0bef..f2cd9f49c 100644 --- a/vendor/google.golang.org/api/internal/version.go +++ b/vendor/google.golang.org/api/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.299.0" +const Version = "0.300.0" diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 449df5535..f075cf4a4 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -253,7 +253,7 @@ "location": "northamerica-south1" } ], - "etag": "\"35383135343338383530313436313234313131\"", + "etag": "\"3132373433353833303733323234363038313037\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -4167,6 +4167,57 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] + }, + "viewFullContext": { + "description": "Retrieves a specific object context with its extended data for a given object.", + "httpMethod": "GET", + "id": "storage.objects.viewFullContext", + "parameterOrder": [ + "bucket", + "object" + ], + "parameters": { + "bucket": { + "description": "Name of the bucket in which the object resides.", + "location": "path", + "required": true, + "type": "string" + }, + "contextKey": { + "description": "Key identifying the object context to retrieve.", + "location": "query", + "required": true, + "type": "string" + }, + "generation": { + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query", + "type": "string" + }, + "object": { + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "location": "path", + "required": true, + "type": "string" + }, + "userProject": { + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query", + "type": "string" + } + }, + "path": "b/{bucket}/o/{object}/viewFullContext", + "response": { + "$ref": "ObjectFullContext" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] } } }, @@ -4731,7 +4782,7 @@ } } }, - "revision": "20260911", + "revision": "20260926", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AdvanceRelocateBucketOperationRequest": { @@ -6540,6 +6591,54 @@ }, "type": "object" }, + "ObjectFullContext": { + "description": "A full representation of an object context.", + "id": "ObjectFullContext", + "properties": { + "createTime": { + "description": "The time at which the object context was created. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "extendedData": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The extended data of the object context.", + "type": "object" + }, + "key": { + "description": "The key of the object context.", + "type": "string" + }, + "kind": { + "default": "storage#objectFullContext", + "description": "The kind of item this is. For ObjectFullContext, this is always storage#objectFullContext.", + "type": "string" + }, + "type": { + "description": "The type of the object context.", + "enum": [ + "CUSTOM" + ], + "enumDescriptions": [ + "Custom object context." + ], + "type": "string" + }, + "updateTime": { + "description": "The time at which the object context was last updated. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "value": { + "description": "The value of the object context.", + "type": "string" + } + }, + "type": "object" + }, "Objects": { "description": "A list of objects.", "id": "Objects", diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index 4c3c79ba6..628f32b85 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -2749,6 +2749,49 @@ func (s ObjectCustomContextPayload) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ObjectFullContext: A full representation of an object context. +type ObjectFullContext struct { + // CreateTime: The time at which the object context was created. This value is + // in RFC 3339 format. + CreateTime string `json:"createTime,omitempty"` + // ExtendedData: The extended data of the object context. + ExtendedData googleapi.RawMessage `json:"extendedData,omitempty"` + // Key: The key of the object context. + Key string `json:"key,omitempty"` + // Kind: The kind of item this is. For ObjectFullContext, this is always + // storage#objectFullContext. + Kind string `json:"kind,omitempty"` + // Type: The type of the object context. + // + // Possible values: + // "CUSTOM" - Custom object context. + Type string `json:"type,omitempty"` + // UpdateTime: The time at which the object context was last updated. This + // value is in RFC 3339 format. + UpdateTime string `json:"updateTime,omitempty"` + // Value: The value of the object context. + Value string `json:"value,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ObjectFullContext) MarshalJSON() ([]byte, error) { + type NoMethod ObjectFullContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Objects: A list of objects. type Objects struct { // Items: The list of items. @@ -13134,6 +13177,139 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { return ret, nil } +type ObjectsViewFullContextCall struct { + s *Service + bucket string + object string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ViewFullContext: Retrieves a specific object context with its extended data +// for a given object. +// +// - bucket: Name of the bucket in which the object resides. +// - contextKey: Key identifying the object context to retrieve. +// - object: Name of the object. For information about how to URL encode object +// names to be path safe, see Encoding URI Path Parts +// (https://cloud.google.com/storage/docs/request-endpoints#encoding). +func (r *ObjectsService) ViewFullContext(bucket string, object string) *ObjectsViewFullContextCall { + c := &ObjectsViewFullContextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.bucket = bucket + c.object = object + return c +} + +// Generation sets the optional parameter "generation": If present, selects a +// specific revision of this object (as opposed to the latest version, the +// default). +func (c *ObjectsViewFullContextCall) Generation(generation int64) *ObjectsViewFullContextCall { + c.urlParams_.Set("generation", fmt.Sprint(generation)) + return c +} + +// UserProject sets the optional parameter "userProject": The project to be +// billed for this request. Required for Requester Pays buckets. +func (c *ObjectsViewFullContextCall) UserProject(userProject string) *ObjectsViewFullContextCall { + c.urlParams_.Set("userProject", userProject) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ObjectsViewFullContextCall) Fields(s ...googleapi.Field) *ObjectsViewFullContextCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ObjectsViewFullContextCall) IfNoneMatch(entityTag string) *ObjectsViewFullContextCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ObjectsViewFullContextCall) Context(ctx context.Context) *ObjectsViewFullContextCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ObjectsViewFullContextCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ObjectsViewFullContextCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/viewFullContext") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "bucket": c.bucket, + "object": c.object, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "storage.objects.viewFullContext", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "storage.objects.viewFullContext" call. +// Any non-2xx status code is an error. Response headers are in either +// *ObjectFullContext.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ObjectsViewFullContextCall) Do(opts ...googleapi.CallOption) (*ObjectFullContext, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ObjectFullContext{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "storage.objects.viewFullContext", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type OperationsAdvanceRelocateBucketCall struct { s *Service bucket string diff --git a/vendor/modules.txt b/vendor/modules.txt index 46a72dab5..bd76db474 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -438,7 +438,7 @@ github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.24 ## explicit; go 1.20 github.com/mattn/go-isatty -# github.com/mattn/go-shellwords v1.0.15 +# github.com/mattn/go-shellwords v1.0.16 ## explicit; go 1.13 github.com/mattn/go-shellwords # github.com/mattn/go-sqlite3 v1.14.52 @@ -775,7 +775,7 @@ golang.org/x/tools/internal/pkgbits golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/api v0.299.0 +# google.golang.org/api v0.300.0 ## explicit; go 1.26.0 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport