chore: bump stuff

Also fix .golangci.yml file.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
This commit is contained in:
Dmitriy Matrenichev 2024-02-09 17:42:50 +03:00
parent 087b50f429
commit 5324d39167
No known key found for this signature in database
GPG Key ID: D3363CF894E68892
97 changed files with 6511 additions and 9916 deletions

View File

@ -3,12 +3,11 @@
# options for analysis running # options for analysis running
run: run:
go: '1.18'
# default concurrency is a available CPU number # default concurrency is a available CPU number
# concurrency: 4 # concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m # timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 10m timeout: 10m
# exit code when at least one issue was found, default is 1 # exit code when at least one issue was found, default is 1
issues-exit-code: 1 issues-exit-code: 1
@ -35,6 +34,7 @@ run:
output: output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: line-number format: line-number
sort-results: true
# all available settings of specific linters # all available settings of specific linters
linters-settings: linters-settings:
@ -55,9 +55,6 @@ linters-settings:
gocyclo: gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20) # minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10 min-complexity: 10
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
dupl: dupl:
# tokens count to trigger issue, 150 by default # tokens count to trigger issue, 150 by default
threshold: 100 threshold: 100
@ -66,14 +63,6 @@ linters-settings:
min-len: 3 min-len: 3
# minimal occurrences count to trigger, 3 by default # minimal occurrences count to trigger, 3 by default
min-occurrences: 3 min-occurrences: 3
depguard:
list-type: blacklist
packages:
- github.com/golang/protobuf/proto
- google.golang.org/protobuf/proto
packages-with-error-message:
- google.golang.org/protobuf/proto: Use "github.com/siderolabs/talos/pkg/machinery/proto" instead.
github.com/golang/protobuf/proto: Use "github.com/siderolabs/talos/pkg/machinery/proto" instead.
misspell: misspell:
# Correct spellings using locale preferences for US or UK. # Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English. # Default is to use a neutral variety of English.
@ -85,28 +74,8 @@ linters-settings:
line-length: 200 line-length: 200
# tab width in spaces. Default to 1. # tab width in spaces. Default to 1.
tab-width: 1 tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
# and rta for programs with main packages. Default is cha.
algo: cha
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 30
nolintlint: nolintlint:
allow-unused: false allow-unused: false
allow-leading-space: false
allow-no-explanation: [] allow-no-explanation: []
require-explanation: false require-explanation: false
require-specific: true require-specific: true
@ -146,14 +115,13 @@ linters:
- forbidigo - forbidigo
- forcetypeassert - forcetypeassert
- funlen - funlen
- gas
- gochecknoglobals - gochecknoglobals
- gochecknoinits - gochecknoinits
- gocognit - gocognit
- godox - godox
- goerr113 - goerr113
- gomnd - gomnd
- ifshort - gosec
- ireturn # we return interfaces - ireturn # we return interfaces
- maintidx - maintidx
- nestif - nestif
@ -184,7 +152,8 @@ linters:
- varcheck - varcheck
- structcheck - structcheck
- deadcode - deadcode
- ifshort
- perfsprint
disable-all: false disable-all: false
fast: false fast: false

View File

@ -55,17 +55,17 @@ GO_VERSION ?= 1.21
# renovate: datasource=go depName=golang.org/x/tools # renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.17.0 GOIMPORTS_VERSION ?= v0.17.0
# renovate: datasource=go depName=mvdan.cc/gofumpt # renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION ?= v0.5.0 GOFUMPT_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint # renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCILINT_VERSION ?= v1.55.2 GOLANGCILINT_VERSION ?= v1.56.1
# renovate: datasource=go depName=golang.org/x/tools # renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.17.0 STRINGER_VERSION ?= v0.17.0
# renovate: datasource=go depName=github.com/alvaroloes/enumer # renovate: datasource=go depName=github.com/alvaroloes/enumer
ENUMER_VERSION ?= v1.1.2 ENUMER_VERSION ?= v1.1.2
# renovate: datasource=go depName=k8s.io/code-generator # renovate: datasource=go depName=k8s.io/code-generator
DEEPCOPY_GEN_VERSION ?= v0.29.0 DEEPCOPY_GEN_VERSION ?= v0.29.1
# renovate: datasource=go depName=github.com/planetscale/vtprotobuf # renovate: datasource=go depName=github.com/planetscale/vtprotobuf
VTPROTOBUF_VERSION ?= v0.5.0 VTPROTOBUF_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/siderolabs/deep-copy # renovate: datasource=go depName=github.com/siderolabs/deep-copy
DEEPCOPY_VERSION ?= v0.5.5 DEEPCOPY_VERSION ?= v0.5.5
# renovate: datasource=go depName=github.com/siderolabs/importvet # renovate: datasource=go depName=github.com/siderolabs/importvet

Binary file not shown.

View File

@ -211,7 +211,7 @@ func (i *Installer) Install(ctx context.Context, mode Mode) (err error) {
} }
for _, label := range bootLabels { for _, label := range bootLabels {
err = func() error { if err = func() error {
var device string var device string
// searching targets for the device to be used // searching targets for the device to be used
OuterLoop: OuterLoop:
@ -248,9 +248,7 @@ func (i *Installer) Install(ctx context.Context, mode Mode) (err error) {
mountpoints.Set(label, mountpoint) mountpoints.Set(label, mountpoint)
return nil return nil
}() }(); err != nil {
if err != nil {
return err return err
} }
} }

View File

@ -391,7 +391,6 @@ func (m *Manifest) executeOnDevice(device Device, targets []*Target) (err error)
return nil return nil
}) })
if err != nil { if err != nil {
return fmt.Errorf("failed to format device: %w", err) return fmt.Errorf("failed to format device: %w", err)
} }

View File

@ -141,7 +141,6 @@ func extractAndMerge(data []byte, localPath string) error {
return askOverwriteOrRename(fmt.Sprintf("%s %q already exists", component, name)) return askOverwriteOrRename(fmt.Sprintf("%s %q already exists", component, name))
}, },
}) })
if err != nil { if err != nil {
return err return err
} }

View File

@ -46,7 +46,6 @@ var memoryCmd = &cobra.Command{
verboseRender(&remotePeer, resp) verboseRender(&remotePeer, resp)
} else { } else {
err = briefRender(&remotePeer, resp) err = briefRender(&remotePeer, resp)
if err != nil { if err != nil {
return err return err
} }

View File

@ -151,7 +151,7 @@ func getPathFromNode(path, filter string) map[string]struct{} {
} }
func getServiceFromNode() []string { func getServiceFromNode() []string {
var svcIds []string var svcIDs []string
//nolint:errcheck //nolint:errcheck
GlobalArgs.WithClient( GlobalArgs.WithClient(
@ -166,7 +166,7 @@ func getServiceFromNode() []string {
for _, msg := range resp.Messages { for _, msg := range resp.Messages {
for _, s := range msg.Services { for _, s := range msg.Services {
svc := cli.ServiceInfoWrapper{ServiceInfo: s} svc := cli.ServiceInfoWrapper{ServiceInfo: s}
svcIds = append(svcIds, svc.Id) svcIDs = append(svcIDs, svc.Id)
} }
} }
@ -174,11 +174,11 @@ func getServiceFromNode() []string {
}, },
) )
return svcIds return svcIDs
} }
func getContainersFromNode(kubernetes bool) []string { func getContainersFromNode(kubernetes bool) []string {
var containerIds []string var containerIDs []string
//nolint:errcheck //nolint:errcheck
GlobalArgs.WithClient( GlobalArgs.WithClient(
@ -211,7 +211,7 @@ func getContainersFromNode(kubernetes bool) []string {
continue continue
} }
containerIds = append(containerIds, p.Id) containerIDs = append(containerIDs, p.Id)
} }
} }
@ -219,7 +219,7 @@ func getContainersFromNode(kubernetes bool) []string {
}, },
) )
return containerIds return containerIDs
} }
func mergeSuggestions(a, b []string) []string { func mergeSuggestions(a, b []string) []string {

View File

@ -212,7 +212,9 @@ func openArchive() (*os.File, error) {
} }
} else { } else {
buf := bufio.NewReader(os.Stdin) buf := bufio.NewReader(os.Stdin)
fmt.Printf("%s already exists, overwrite? [y/N]: ", supportCmdFlags.output) fmt.Printf("%s already exists, overwrite? [y/N]: ", supportCmdFlags.output)
choice, err := buf.ReadString('\n') choice, err := buf.ReadString('\n')
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -129,6 +129,7 @@ func (a *nodeTracker) trackEventsWithRetry(actorIDCh chan string) error {
// retryable function // retryable function
err := func() error { err := func() error {
eventCh := make(chan client.EventResult) eventCh := make(chan client.EventResult)
err := a.cli.EventsWatchV2(ctx, eventCh, client.WithTailEvents(tailEvents)) err := a.cli.EventsWatchV2(ctx, eventCh, client.WithTailEvents(tailEvents))
if err != nil { if err != nil {
return err return err

38
go.mod
View File

@ -28,7 +28,7 @@ require (
require ( require (
cloud.google.com/go/compute/metadata v0.2.3 cloud.google.com/go/compute/metadata v0.2.3
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1
@ -47,9 +47,9 @@ require (
github.com/containernetworking/plugins v1.4.0 github.com/containernetworking/plugins v1.4.0
github.com/coredns/coredns v1.11.1 github.com/coredns/coredns v1.11.1
github.com/coreos/go-iptables v0.7.0 github.com/coreos/go-iptables v0.7.0
github.com/cosi-project/runtime v0.4.0-alpha.4 github.com/cosi-project/runtime v0.4.0-alpha.5
github.com/distribution/reference v0.5.0 github.com/distribution/reference v0.5.0
github.com/docker/docker v25.0.2+incompatible github.com/docker/docker v25.0.3+incompatible
github.com/docker/go-connections v0.5.0 github.com/docker/go-connections v0.5.0
github.com/dustin/go-humanize v1.0.1 github.com/dustin/go-humanize v1.0.1
github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb
@ -94,16 +94,15 @@ require (
github.com/opencontainers/runtime-spec v1.1.0 github.com/opencontainers/runtime-spec v1.1.0
github.com/packethost/packngo v0.31.0 github.com/packethost/packngo v0.31.0
github.com/pelletier/go-toml v1.9.5 github.com/pelletier/go-toml v1.9.5
github.com/pin/tftp v2.1.1-0.20200117065540-2f79be2dba4e+incompatible
github.com/pin/tftp/v3 v3.1.0 github.com/pin/tftp/v3 v3.1.0
github.com/pmorjan/kmod v1.1.1 github.com/pmorjan/kmod v1.1.1
github.com/prometheus/procfs v0.12.0 github.com/prometheus/procfs v0.12.0
github.com/rivo/tview v0.0.0-20240122063236-8526c9fe1b54 github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8
github.com/rs/xid v1.5.0 github.com/rs/xid v1.5.0
github.com/ryanuber/columnize v2.1.2+incompatible github.com/ryanuber/columnize v2.1.2+incompatible
github.com/ryanuber/go-glob v1.0.0 github.com/ryanuber/go-glob v1.0.0
github.com/safchain/ethtool v0.3.0 github.com/safchain/ethtool v0.3.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22 github.com/scaleway/scaleway-sdk-go v1.0.0-beta.23
github.com/siderolabs/crypto v0.4.1 github.com/siderolabs/crypto v0.4.1
github.com/siderolabs/discovery-api v0.1.3 github.com/siderolabs/discovery-api v0.1.3
github.com/siderolabs/discovery-client v0.1.6 github.com/siderolabs/discovery-client v0.1.6
@ -131,7 +130,7 @@ require (
github.com/spf13/cobra v1.8.0 github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4 github.com/stretchr/testify v1.8.4
github.com/u-root/u-root v0.12.0 github.com/u-root/u-root v0.13.0
github.com/ulikunitz/xz v0.5.11 github.com/ulikunitz/xz v0.5.11
github.com/vishvananda/netlink v1.2.1-beta.2 github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vmware-tanzu/sonobuoy v0.57.1 github.com/vmware-tanzu/sonobuoy v0.57.1
@ -143,11 +142,11 @@ require (
go.etcd.io/etcd/etcdutl/v3 v3.5.12 go.etcd.io/etcd/etcdutl/v3 v3.5.12
go.uber.org/zap v1.26.0 go.uber.org/zap v1.26.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
golang.org/x/net v0.20.0 golang.org/x/net v0.21.0
golang.org/x/oauth2 v0.16.0 golang.org/x/oauth2 v0.17.0
golang.org/x/sync v0.6.0 golang.org/x/sync v0.6.0
golang.org/x/sys v0.16.0 golang.org/x/sys v0.17.0
golang.org/x/term v0.16.0 golang.org/x/term v0.17.0
golang.org/x/text v0.14.0 golang.org/x/text v0.14.0
golang.org/x/time v0.5.0 golang.org/x/time v0.5.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
@ -164,7 +163,7 @@ require (
github.com/0x5a17ed/itkit v0.6.0 // indirect github.com/0x5a17ed/itkit v0.6.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
@ -193,7 +192,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cilium/ebpf v0.12.3 // indirect github.com/cilium/ebpf v0.12.3 // indirect
github.com/cloudflare/circl v1.3.3 // indirect github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/continuity v0.4.2 // indirect github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/fifo v1.1.0 // indirect
@ -284,12 +283,13 @@ require (
github.com/pierrec/lz4/v4 v4.1.14 // indirect github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/common v0.45.0 // indirect
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 // indirect github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 // indirect
github.com/rivo/uniseg v0.4.4 // indirect github.com/rivo/uniseg v0.4.7-0.20240127222946-601bbb3750c2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sethgrid/pester v1.2.0 // indirect github.com/sethgrid/pester v1.2.0 // indirect
@ -301,7 +301,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.14.0 // indirect github.com/spf13/viper v1.14.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect github.com/subosito/gotenv v1.4.1 // indirect
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 // indirect github.com/u-root/uio v0.0.0-20240118234441-a3c409a6018e // indirect
github.com/vbatts/tar-split v0.11.3 // indirect github.com/vbatts/tar-split v0.11.3 // indirect
github.com/vishvananda/netns v0.0.4 // indirect github.com/vishvananda/netns v0.0.4 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
@ -319,16 +319,16 @@ require (
go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.18.0 // indirect golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect
golang.org/x/mod v0.14.0 // indirect golang.org/x/mod v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect golang.org/x/tools v0.17.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb // indirect golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb // indirect
google.golang.org/appengine v1.6.8 // indirect google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect

79
go.sum
View File

@ -46,12 +46,12 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA=
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0 h1:jfh/0wklBNgF8+zaEEYISFZ4kviGG9aWAgUaVClDbaA= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0 h1:jfh/0wklBNgF8+zaEEYISFZ4kviGG9aWAgUaVClDbaA=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0/go.mod h1:jYmTBxPYmbqUp5pCuTC58jMXVk/NxmqeYdoMbQGVUKo= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0/go.mod h1:jYmTBxPYmbqUp5pCuTC58jMXVk/NxmqeYdoMbQGVUKo=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw=
@ -143,8 +143,9 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/cilium/ebpf v0.12.3 h1:8ht6F9MquybnY97at+VDZb3eQQr8ev79RueWeVaEcG4= github.com/cilium/ebpf v0.12.3 h1:8ht6F9MquybnY97at+VDZb3eQQr8ev79RueWeVaEcG4=
github.com/cilium/ebpf v0.12.3/go.mod h1:TctK1ivibvI3znr66ljgi4hqOT8EYQjz1KWBfb1UVgM= github.com/cilium/ebpf v0.12.3/go.mod h1:TctK1ivibvI3znr66ljgi4hqOT8EYQjz1KWBfb1UVgM=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
@ -184,8 +185,8 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cosi-project/runtime v0.4.0-alpha.4 h1:3TN+Y0NVKa/1QXqR3QTJ6ceWrcflyUeIZbQnrU2BprM= github.com/cosi-project/runtime v0.4.0-alpha.5 h1:23xzdFn/8rduI+Y5odBAyQF+Q93r/eG6jyrYuLr6pA8=
github.com/cosi-project/runtime v0.4.0-alpha.4/go.mod h1:JE9yuyufGRCd28AyCWFkTNf3UMiZJT722bpfPEPnsNE= github.com/cosi-project/runtime v0.4.0-alpha.5/go.mod h1:JE9yuyufGRCd28AyCWFkTNf3UMiZJT722bpfPEPnsNE=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@ -204,8 +205,8 @@ github.com/docker/cli v24.0.0+incompatible h1:0+1VshNwBQzQAx9lOl+OYCTCEAD8fKs/qe
github.com/docker/cli v24.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v25.0.2+incompatible h1:/OaKeauroa10K4Nqavw4zlhcDq/WBcPMc5DbjOGgozY= github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ=
github.com/docker/docker v25.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
@ -425,8 +426,8 @@ github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSo
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8= github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8=
github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis=
github.com/hugelgupf/vmtest v0.0.0-20240110072021-f6f07acb7aa1 h1:aa9+0fjwoGotyC8A3QjdITMAX89g/+qvDAhKPrK1NKE= github.com/hugelgupf/vmtest v0.0.0-20240127073930-89f92b39a1fa h1:2q0UvEA7TSTrjU4aFrpF6u28tHat3KnCkqsy/gB86v0=
github.com/hugelgupf/vmtest v0.0.0-20240110072021-f6f07acb7aa1/go.mod h1:a4SVM0HTMEt2IqrtCMOF44++nnzhrkHmQpkpw6Yrpso= github.com/hugelgupf/vmtest v0.0.0-20240127073930-89f92b39a1fa/go.mod h1:Z22CpRFjhoR/NoxBeEuyeGTwMC7G5s4RfKa9Bs/j74w=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
@ -591,8 +592,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+v
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pin/tftp v2.1.1-0.20200117065540-2f79be2dba4e+incompatible h1:zQDvVdw4rn2smQfJZwbD5FboCiiTgw/1lpER60easPM=
github.com/pin/tftp v2.1.1-0.20200117065540-2f79be2dba4e+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY=
github.com/pin/tftp/v3 v3.1.0 h1:rQaxd4pGwcAJnpId8zC+O2NX3B2/NscjDZQaqEjuE7c= github.com/pin/tftp/v3 v3.1.0 h1:rQaxd4pGwcAJnpId8zC+O2NX3B2/NscjDZQaqEjuE7c=
github.com/pin/tftp/v3 v3.1.0/go.mod h1:xwQaN4viYL019tM4i8iecm++5cGxSqen6AJEOEyEI0w= github.com/pin/tftp/v3 v3.1.0/go.mod h1:xwQaN4viYL019tM4i8iecm++5cGxSqen6AJEOEyEI0w=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
@ -601,6 +600,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA=
github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmorjan/kmod v1.1.1 h1:Vfw6bMaOg/sYSBCqJPT9TbqHHf5zK00GbaL5JQLO4r0= github.com/pmorjan/kmod v1.1.1 h1:Vfw6bMaOg/sYSBCqJPT9TbqHHf5zK00GbaL5JQLO4r0=
@ -617,12 +618,12 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
github.com/rivo/tview v0.0.0-20240122063236-8526c9fe1b54 h1:O2sPgzemzBPoeLuVrIyyNPwFxWqgh/AuAOfd65OIqMc= github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8 h1:aW0ILZ0lkphO/2mUWocSfP1iebWtSFcxL8BiSNR+/8g=
github.com/rivo/tview v0.0.0-20240122063236-8526c9fe1b54/go.mod h1:c0SPlNPXkM+/Zgjn/0vD3W0Ds1yxstN7lpquqLDpWCg= github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8/go.mod h1:sGSvhfWFNS7FpYxS8K+e22OTOI3UsB5rDs0nRtoZkpA=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.7-0.20240127222946-601bbb3750c2 h1:tcc3ZFBvjydcgrAxavZRYqFqCKzy0FJ+UY4ATq4QVXk=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7-0.20240127222946-601bbb3750c2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
@ -640,8 +641,8 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6Ng
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22 h1:wJrcTdddKOI8TFxs8cemnhKP2EmKy3yfUKHj3ZdfzYo= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.23 h1:zr2sP1pxJ+iPAmZipnwz+uXmpvMEJOndD9Y+F0Dn42A=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.23/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sethgrid/pester v1.2.0 h1:adC9RS29rRUef3rIKWPOuP1Jm3/MmB6ke+OhE5giENI= github.com/sethgrid/pester v1.2.0 h1:adC9RS29rRUef3rIKWPOuP1Jm3/MmB6ke+OhE5giENI=
@ -733,10 +734,10 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/u-root/u-root v0.12.0 h1:K0AuBFriwr0w/PGS3HawiAw89e3+MU7ks80GpghAsNs= github.com/u-root/u-root v0.13.0 h1:/1+vJHGLKChB6pcyJsTuHTEXCL3tmWDZ2LgCvta4YnA=
github.com/u-root/u-root v0.12.0/go.mod h1:FYjTOh4IkIZHhjsd17lb8nYW6udgXdJhG1c0r6u0arI= github.com/u-root/u-root v0.13.0/go.mod h1:YVsWXhneYu0CGWX7RNlpOPbrR4/qaHKaRvDC/o9IvzE=
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 h1:YcojQL98T/OO+rybuzn2+5KrD5dBwXIvYBvQ2cD3Avg= github.com/u-root/uio v0.0.0-20240118234441-a3c409a6018e h1:BA9O3BmlTmpjbvajAwzWx4Wo2TRVdpPXZEeemGQcajw=
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264= github.com/u-root/uio v0.0.0-20240118234441-a3c409a6018e/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264=
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c h1:Vn6nVVu9MdOYvXPkJP83iX5jVIfvxFC9v9xIKb+DlaQ= github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c h1:Vn6nVVu9MdOYvXPkJP83iX5jVIfvxFC9v9xIKb+DlaQ=
@ -836,8 +837,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@ -918,8 +919,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -929,8 +930,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1011,8 +1012,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@ -1020,8 +1021,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1172,12 +1173,12 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac h1:OZkkudMUu9LVQMCoRUbI/1p5VCo9BOrlvkqMvWtqa6s=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:B5xPO//w8qmBDjGReYLpR6UJPnkldGkCSMoH/2vxJeg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 h1:FSL3lRCkhaPFxqi0s9o+V4UI2WTzAVOvkgbd4kVV4Wg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014/go.mod h1:SaPjaZGWb0lPqs6Ittu0spdfrOArqji4ZdeP5IC/9N4=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=

View File

@ -105,12 +105,14 @@ func (azu *AzureUploader) AzureGalleryUpload(ctx context.Context) error {
g.Go(func() error { g.Go(func() error {
log.Printf("azure: starting upload blob for %s\n", arch) log.Printf("azure: starting upload blob for %s\n", arch)
err = azu.uploadAzureBlob(ctx, arch) err = azu.uploadAzureBlob(ctx, arch)
if err != nil { if err != nil {
return fmt.Errorf("azure: error uploading page blob for %s: %w", arch, err) return fmt.Errorf("azure: error uploading page blob for %s: %w", arch, err)
} }
log.Printf("azure: starting image version creation for %s\n", arch) log.Printf("azure: starting image version creation for %s\n", arch)
err = azu.createAzureImageVersion(ctx, arch) err = azu.createAzureImageVersion(ctx, arch)
if err != nil { if err != nil {
return fmt.Errorf("azure: error creating image version: %w", err) return fmt.Errorf("azure: error creating image version: %w", err)
@ -268,7 +270,6 @@ func (azu *AzureUploader) createAzureImageVersion(ctx context.Context, arch stri
log.Printf("azure: image version exists for %s\n azure: removing old image version\n", *v.Name) log.Printf("azure: image version exists for %s\n azure: removing old image version\n", *v.Name)
err = azu.deleteImageVersion(ctx, arch) err = azu.deleteImageVersion(ctx, arch)
if err != nil { if err != nil {
return err return err
} }
@ -310,7 +311,6 @@ func (azu *AzureUploader) createAzureImageVersion(ctx context.Context, arch stri
} }
_, err = poller.PollUntilDone(ctx, nil) _, err = poller.PollUntilDone(ctx, nil)
if err != nil { if err != nil {
return fmt.Errorf("azure: failed to pull the result for image version creation: %w", err) return fmt.Errorf("azure: failed to pull the result for image version creation: %w", err)
} }
@ -331,7 +331,6 @@ func (azu *AzureUploader) deleteImageVersion(ctx context.Context, arch string) e
} }
_, err = poller.PollUntilDone(ctx, nil) _, err = poller.PollUntilDone(ctx, nil)
if err != nil { if err != nil {
return fmt.Errorf("azure: failed to pull the result for image deletion: %w", err) return fmt.Errorf("azure: failed to pull the result for image deletion: %w", err)
} }

View File

@ -4,14 +4,14 @@ go 1.21.6
require ( require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1
github.com/Azure/go-autorest/autorest v0.11.29 github.com/Azure/go-autorest/autorest v0.11.29
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
github.com/aws/aws-sdk-go v1.50.8 github.com/aws/aws-sdk-go v1.50.14
github.com/blang/semver/v4 v4.0.0 github.com/blang/semver/v4 v4.0.0
github.com/google/uuid v1.6.0 github.com/google/uuid v1.6.0
github.com/siderolabs/gen v0.4.7 github.com/siderolabs/gen v0.4.7
@ -22,7 +22,7 @@ require (
) )
require ( require (
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
@ -39,8 +39,8 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
golang.org/x/crypto v0.17.0 // indirect golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.19.0 // indirect golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.15.0 // indirect golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect
) )

View File

@ -1,11 +1,11 @@
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU=
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do=
@ -45,8 +45,8 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/aws/aws-sdk-go v1.50.8 h1:gY0WoOW+/Wz6XmYSgDH9ge3wnAevYDSQWPxxJvqAkP4= github.com/aws/aws-sdk-go v1.50.14 h1:m1bxKtd1lJpNnl+Owah0+UPRuS9f3GFvxBPgc8RiodE=
github.com/aws/aws-sdk-go v1.50.8/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go v1.50.14/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -99,16 +99,16 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
@ -121,8 +121,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=

View File

@ -966,6 +966,7 @@ func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineSer
) )
} else { } else {
currentDepth := int32(strings.Count(fi.FullPath, archiver.OSPathSeparator)) - rootDepth currentDepth := int32(strings.Count(fi.FullPath, archiver.OSPathSeparator)) - rootDepth
size := fi.FileInfo.Size() size := fi.FileInfo.Size()
if size < 0 { if size < 0 {
size = 0 size = 0
@ -989,7 +990,6 @@ func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineSer
RelativeName: fi.RelPath, RelativeName: fi.RelPath,
Size: size, Size: size,
}, currentDepth, false) }, currentDepth, false)
if err != nil { if err != nil {
return err return err
} }
@ -998,9 +998,8 @@ func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineSer
// depth goes down when walker gets to the next sibling folder // depth goes down when walker gets to the next sibling folder
if currentDepth < depth { if currentDepth < depth {
nextPrefix := fi.FullPath nextPrefix := fi.FullPath
err = flushFolders(prefix, nextPrefix)
if err != nil { if err = flushFolders(prefix, nextPrefix); err != nil {
return err return err
} }
@ -1010,6 +1009,7 @@ func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineSer
if fi.FileInfo.IsDir() { if fi.FileInfo.IsDir() {
prefix = fi.FullPath prefix = fi.FullPath
} }
depth = currentDepth depth = currentDepth
} }
} }
@ -1023,7 +1023,6 @@ func (s *Server) DiskUsage(req *machine.DiskUsageRequest, obj machine.MachineSer
} }
err = sendSize(folder, 0, true) err = sendSize(folder, 0, true)
if err != nil { if err != nil {
return err return err
} }

View File

@ -203,6 +203,7 @@ func (suite *ManagerSuite) TestReconcile() {
spec := res.TypedSpec() spec := res.TypedSpec()
asrt.Len(spec.Wireguard.Peers, 2) asrt.Len(spec.Wireguard.Peers, 2)
if len(spec.Wireguard.Peers) != 2 { if len(spec.Wireguard.Peers) != 2 {
return return
} }
@ -246,6 +247,7 @@ func (suite *ManagerSuite) TestReconcile() {
asrt.Equal(nethelpers.VerdictAccept, spec.Policy) asrt.Equal(nethelpers.VerdictAccept, spec.Policy)
asrt.Len(spec.Rules, 2) asrt.Len(spec.Rules, 2)
if len(spec.Rules) != 2 { if len(spec.Rules) != 2 {
return return
} }

View File

@ -230,6 +230,7 @@ func (suite *AddressMergeSuite) TestMergeFlapping() {
continue continue
} }
suite.T().Log("finalizer added") suite.T().Log("finalizer added")
time.Sleep(10 * time.Millisecond) time.Sleep(10 * time.Millisecond)

View File

@ -149,27 +149,27 @@ func (suite *EtcFileConfigSuite) testFiles(resources []resource.Resource, conten
} }
var ( var (
expectedIds []string expectedIDs []string
unexpectedIds []string unexpectedIDs []string
) )
if contents.resolvConf != "" { if contents.resolvConf != "" {
expectedIds = append(expectedIds, "resolv.conf") expectedIDs = append(expectedIDs, "resolv.conf")
} else { } else {
unexpectedIds = append(unexpectedIds, "resolv.conf") unexpectedIDs = append(unexpectedIDs, "resolv.conf")
} }
if contents.hosts != "" { if contents.hosts != "" {
expectedIds = append(expectedIds, "hosts") expectedIDs = append(expectedIDs, "hosts")
} else { } else {
unexpectedIds = append(unexpectedIds, "hosts") unexpectedIDs = append(unexpectedIDs, "hosts")
} }
assertResources( assertResources(
suite.ctx, suite.ctx,
suite.T(), suite.T(),
suite.state, suite.state,
expectedIds, expectedIDs,
func(r *files.EtcFileSpec, asrt *assert.Assertions) { func(r *files.EtcFileSpec, asrt *assert.Assertions) {
switch r.Metadata().ID() { switch r.Metadata().ID() {
case "hosts": case "hosts":
@ -183,6 +183,7 @@ func (suite *EtcFileConfigSuite) testFiles(resources []resource.Resource, conten
retry.Constant(10*time.Second, retry.WithUnits(100*time.Millisecond)).Retry(func() error { retry.Constant(10*time.Second, retry.WithUnits(100*time.Millisecond)).Retry(func() error {
if contents.resolvGlobalConf == "" { if contents.resolvGlobalConf == "" {
_, err := os.Lstat(suite.podResolvConfPath) _, err := os.Lstat(suite.podResolvConfPath)
switch { switch {
case err == nil: case err == nil:
return retry.ExpectedErrorf("unexpected pod %s", suite.podResolvConfPath) return retry.ExpectedErrorf("unexpected pod %s", suite.podResolvConfPath)
@ -194,6 +195,7 @@ func (suite *EtcFileConfigSuite) testFiles(resources []resource.Resource, conten
} }
file, err := os.ReadFile(suite.podResolvConfPath) file, err := os.ReadFile(suite.podResolvConfPath)
switch { switch {
case errors.Is(err, os.ErrNotExist): case errors.Is(err, os.ErrNotExist):
return retry.ExpectedErrorf("missing pod %s", suite.podResolvConfPath) return retry.ExpectedErrorf("missing pod %s", suite.podResolvConfPath)
@ -207,7 +209,7 @@ func (suite *EtcFileConfigSuite) testFiles(resources []resource.Resource, conten
}), }),
) )
for _, id := range unexpectedIds { for _, id := range unexpectedIDs {
id := id id := id
assertNoResource[*files.EtcFileSpec](suite.ctx, suite.T(), suite.state, id) assertNoResource[*files.EtcFileSpec](suite.ctx, suite.T(), suite.state, id)

View File

@ -102,7 +102,6 @@ func (ctrl *LinkConfigController) Run(ctx context.Context, r controller.Runtime,
ConfigLayer: network.ConfigDefault, ConfigLayer: network.ConfigDefault,
}, },
}) })
if err != nil { if err != nil {
return fmt.Errorf("error applying cmdline route: %w", err) return fmt.Errorf("error applying cmdline route: %w", err)
} }
@ -197,7 +196,6 @@ func (ctrl *LinkConfigController) Run(ctx context.Context, r controller.Runtime,
ConfigLayer: network.ConfigDefault, ConfigLayer: network.ConfigDefault,
}, },
}) })
if err != nil { if err != nil {
return fmt.Errorf("error applying default link up: %w", err) return fmt.Errorf("error applying default link up: %w", err)
} }

View File

@ -254,6 +254,7 @@ func (suite *LinkMergeSuite) TestMergeFlapping() {
continue continue
} }
suite.T().Log("finalizer added") suite.T().Log("finalizer added")
time.Sleep(10 * time.Millisecond) time.Sleep(10 * time.Millisecond)

View File

@ -253,6 +253,7 @@ func (suite *OperatorMergeSuite) TestMergeFlapping() {
continue continue
} }
suite.T().Log("finalizer added") suite.T().Log("finalizer added")
time.Sleep(10 * time.Millisecond) time.Sleep(10 * time.Millisecond)

View File

@ -296,6 +296,7 @@ func (suite *RouteMergeSuite) TestMergeFlapping() {
continue continue
} }
suite.T().Log("finalizer added") suite.T().Log("finalizer added")
time.Sleep(10 * time.Millisecond) time.Sleep(10 * time.Millisecond)

View File

@ -115,6 +115,7 @@ func (suite *KubernetesCertSANsSuite) TestReconcile() {
suite.AssertWithin(10*time.Second, 100*time.Millisecond, func() error { suite.AssertWithin(10*time.Second, 100*time.Millisecond, func() error {
var certSANs resource.Resource var certSANs resource.Resource
certSANs, err := ctest.Get[*secrets.CertSAN]( certSANs, err := ctest.Get[*secrets.CertSAN](
suite, suite,
resource.NewMetadata( resource.NewMetadata(

View File

@ -69,6 +69,7 @@ func (suite *MaintenanceSuite) TestReconcile() {
serverCert, err := spec.Server.GetCert() serverCert, err := spec.Server.GetCert()
asrt.NoError(err) asrt.NoError(err)
if err != nil { if err != nil {
return return
} }

View File

@ -165,7 +165,6 @@ func (handler *circularHandler) Reader(opts ...runtime.LogOption) (io.ReadCloser
var err error var err error
handler.buf, err = handler.manager.getBuffer(handler.id, false) handler.buf, err = handler.manager.getBuffer(handler.id, false)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -89,6 +89,7 @@ func TestParseMode(t *testing.T) {
return return
} }
if !reflect.DeepEqual(gotM, tt.wantM) { if !reflect.DeepEqual(gotM, tt.wantM) {
t.Errorf("ParseMode() = %v, want %v", gotM, tt.wantM) t.Errorf("ParseMode() = %v, want %v", gotM, tt.wantM)
} }

View File

@ -132,6 +132,7 @@ func TestParseSequence(t *testing.T) {
return return
} }
if gotSeq != tt.wantSeq { if gotSeq != tt.wantSeq {
t.Errorf("ParseSequence() = %v, want %v", gotSeq, tt.wantSeq) t.Errorf("ParseSequence() = %v, want %v", gotSeq, tt.wantSeq)
} }

View File

@ -67,6 +67,7 @@ func Test_parse(t *testing.T) {
return return
} }
if got != tt.want { if got != tt.want {
t.Errorf("parse() = %v, want %v", got, tt.want) t.Errorf("parse() = %v, want %v", got, tt.want)
} }

View File

@ -76,6 +76,7 @@ func TestMapValues(t *testing.T) {
t.Parallel() t.Parallel()
st := state.WrapCore(namespaced.NewState(inmem.Build)) st := state.WrapCore(namespaced.NewState(inmem.Build))
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel() defer cancel()

View File

@ -94,6 +94,7 @@ func TestPopulate(t *testing.T) {
t.Parallel() t.Parallel()
st := state.WrapCore(namespaced.NewState(inmem.Build)) st := state.WrapCore(namespaced.NewState(inmem.Build))
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel() defer cancel()

View File

@ -96,7 +96,9 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
ConfigLayer: network.ConfigPlatform, ConfigLayer: network.ConfigPlatform,
}, },
) )
var mtu uint32 var mtu uint32
if oneContext[ifaceName+"_MTU"] == "" { if oneContext[ifaceName+"_MTU"] == "" {
mtu = 0 mtu = 0
} else { } else {
@ -148,6 +150,7 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
// Parse DNS servers // Parse DNS servers
dnsServers := strings.Fields(oneContext[ifaceName+"_DNS"]) dnsServers := strings.Fields(oneContext[ifaceName+"_DNS"])
var dnsIPs []netip.Addr var dnsIPs []netip.Addr
for _, dnsServer := range dnsServers { for _, dnsServer := range dnsServers {
@ -155,6 +158,7 @@ func (o *OpenNebula) ParseMetadata(st state.State, oneContextPlain []byte) (*run
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to parse DNS server IP: %w", err) return nil, fmt.Errorf("failed to parse DNS server IP: %w", err)
} }
dnsIPs = append(dnsIPs, ip) dnsIPs = append(dnsIPs, ip)
} }

View File

@ -67,6 +67,7 @@ func TestApplyNetworkConfigV2a(t *testing.T) {
require.NoError(t, st.Create(ctx, eth2)) require.NoError(t, st.Create(ctx, eth2))
var metadata vmware.NetworkConfig var metadata vmware.NetworkConfig
require.NoError(t, yaml.Unmarshal(tt.raw, &metadata)) require.NoError(t, yaml.Unmarshal(tt.raw, &metadata))
v := &vmware.VMware{} v := &vmware.VMware{}

View File

@ -141,6 +141,7 @@ func TestRun(t *testing.T) {
e := NewEvents(1000, 10) e := NewEvents(1000, 10)
t.Setenv("PLATFORM", "container") t.Setenv("PLATFORM", "container")
s, err := NewState() s, err := NewState()
require.NoError(err) require.NoError(err)

View File

@ -71,6 +71,7 @@ func TestEvents_Publish(t *testing.T) {
e := NewEvents(tt.cap, tt.cap/10) e := NewEvents(tt.cap, tt.cap/10)
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(tt.watchers) wg.Add(tt.watchers)
got := uint32(0) got := uint32(0)

View File

@ -1726,6 +1726,7 @@ func VerifyDiskAvailability(runtime.Sequence, any) (runtime.TaskExecutionFunc, s
// if disk is busy, report mounts for debugging purposes but just once // if disk is busy, report mounts for debugging purposes but just once
// otherwise console might be flooded with messages // otherwise console might be flooded with messages
dumpMounts(logger) dumpMounts(logger)
mountsReported = true mountsReported = true
} }

View File

@ -111,6 +111,7 @@ func (events *ServiceEvents) Get(count int) (result []ServiceEvent) {
if events.events[i].Message != "" { if events.events[i].Message != "" {
result = append(result, events.events[i]) result = append(result, events.events[i])
} }
count-- count--
} }

View File

@ -210,6 +210,7 @@ func (suite *ServiceRunnerSuite) TestWaitingDescriptionChange() {
suite.Require().NoError(retry.Constant(time.Minute, retry.WithUnits(10*time.Millisecond)).Retry(func() error { suite.Require().NoError(retry.Constant(time.Minute, retry.WithUnits(10*time.Millisecond)).Retry(func() error {
events := sr.AsProto().Events.Events events := sr.AsProto().Events.Events
lastMsg := events[len(events)-1].Msg lastMsg := events[len(events)-1].Msg
if lastMsg != "Waiting for cond2" { if lastMsg != "Waiting for cond2" {
return retry.ExpectedError(errors.New("service should be waiting on 2nd condition")) return retry.ExpectedError(errors.New("service should be waiting on 2nd condition"))

View File

@ -367,7 +367,6 @@ func buildInitialCluster(ctx context.Context, r runtime.Runtime, name string, pe
return nil return nil
}) })
if err != nil { if err != nil {
return "", 0, fmt.Errorf("failed to build cluster arguments: %w", err) return "", 0, fmt.Errorf("failed to build cluster arguments: %w", err)
} }

View File

@ -135,7 +135,6 @@ func (suite *EtcdRecoverSuite) TestSnapshotRecover() {
defer requestCtxCancel() defer requestCtxCancel()
bootIDAfter, err = suite.ReadBootID(requestCtx) bootIDAfter, err = suite.ReadBootID(requestCtx)
if err != nil { if err != nil {
// API might be unresponsive during reboot // API might be unresponsive during reboot
return retry.ExpectedError(err) return retry.ExpectedError(err)

View File

@ -258,7 +258,6 @@ func (suite *ServiceAccountSuite) configureAPIAccess(
Data: bytes, Data: bytes,
Mode: machineapi.ApplyConfigurationRequest_NO_REBOOT, Mode: machineapi.ApplyConfigurationRequest_NO_REBOOT,
}) })
if err != nil { if err != nil {
return err return err
} }

View File

@ -294,7 +294,6 @@ func (apiSuite *APISuite) AssertRebootedNoChecks(ctx context.Context, node strin
err = retry.Constant(time.Minute * 5).Retry(func() error { err = retry.Constant(time.Minute * 5).Retry(func() error {
// read boot_id before reboot // read boot_id before reboot
bootIDBefore, err = apiSuite.ReadBootID(nodeCtx) bootIDBefore, err = apiSuite.ReadBootID(nodeCtx)
if err != nil { if err != nil {
return retry.ExpectedError(err) return retry.ExpectedError(err)
} }

View File

@ -84,7 +84,9 @@ func (suite *DiskUsageSuite) TestSuccess() {
} }
parts := splitLine(lines[1]) parts := splitLine(lines[1])
var err error var err error
folderSize, err = strconv.ParseInt(parts[4], 10, 64) folderSize, err = strconv.ParseInt(parts[4], 10, 64)
if err != nil { if err != nil {
return err return err
@ -102,6 +104,7 @@ func (suite *DiskUsageSuite) TestSuccess() {
} }
var totalExpected int64 var totalExpected int64
for _, line := range lines[1 : len(lines)-1] { for _, line := range lines[1 : len(lines)-1] {
info, err := parseLine(line) info, err := parseLine(line)
if err != nil { if err != nil {
@ -118,6 +121,7 @@ func (suite *DiskUsageSuite) TestSuccess() {
if err != nil { if err != nil {
return err return err
} }
if info.size != totalExpected { if info.size != totalExpected {
return fmt.Errorf("folder size was calculated incorrectly. Expected %d, got %d", totalExpected, info.size) return fmt.Errorf("folder size was calculated incorrectly. Expected %d, got %d", totalExpected, info.size)
} }

View File

@ -140,19 +140,16 @@ func Generate(ctx context.Context, in *machine.GenerateConfigurationRequest) (re
in.MachineConfig.KubernetesVersion, in.MachineConfig.KubernetesVersion,
options..., options...,
) )
if err != nil { if err != nil {
return nil, err return nil, err
} }
c, err = input.Config(machineType) c, err = input.Config(machineType)
if err != nil { if err != nil {
return nil, err return nil, err
} }
cfgBytes, err = c.Bytes() cfgBytes, err = c.Bytes()
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -172,7 +169,6 @@ func Generate(ctx context.Context, in *machine.GenerateConfigurationRequest) (re
} }
taloscfgBytes, err = talosconfig.Bytes() taloscfgBytes, err = talosconfig.Bytes()
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -112,7 +112,6 @@ func Pull(ctx context.Context, reg config.Registries, client *containerd.Client,
return nil return nil
}) })
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -62,6 +62,7 @@ func TestDNS(t *testing.T) {
r, err := dnssrv.Exchange(createQuery(), "127.0.0.1:10700") r, err := dnssrv.Exchange(createQuery(), "127.0.0.1:10700")
test.errCheck(t, err) test.errCheck(t, err)
if r != nil { if r != nil {
require.Equal(t, test.expectedCode, r.Rcode, r) require.Equal(t, test.expectedCode, r.Rcode, r)
} }

View File

@ -153,6 +153,7 @@ func extractRootfsFromInitramfs(r io.Reader, rootfsFilePath string) error {
} }
reader := io.NewSectionReader(r.ReaderAt, 0, int64(r.FileSize)) reader := io.NewSectionReader(r.ReaderAt, 0, int64(r.FileSize))
f, err := os.Create(rootfsFilePath) f, err := os.Create(rootfsFilePath)
if err != nil { if err != nil {
return err return err

View File

@ -53,6 +53,7 @@ func TestNewADV(t *testing.T) {
return return
} }
if !reflect.DeepEqual(gotAdv, tt.wantAdv) { if !reflect.DeepEqual(gotAdv, tt.wantAdv) {
t.Errorf("NewADV() = %v, want %v", gotAdv, tt.wantAdv) t.Errorf("NewADV() = %v, want %v", gotAdv, tt.wantAdv)
} }
@ -88,10 +89,12 @@ func TestADV_ReadTag(t *testing.T) {
if len(tt.a) != 2*AdvSize { if len(tt.a) != 2*AdvSize {
t.Errorf("Test data is invalid, ADV size = %v, want %v", len(tt.a), 2*AdvSize) t.Errorf("Test data is invalid, ADV size = %v, want %v", len(tt.a), 2*AdvSize)
} }
gotVal, gotOk := tt.a.ReadTag(tt.args.t) gotVal, gotOk := tt.a.ReadTag(tt.args.t)
if gotVal != tt.wantVal { if gotVal != tt.wantVal {
t.Errorf("ADV.ReadTag() gotVal = %v, want %v", gotVal, tt.wantVal) t.Errorf("ADV.ReadTag() gotVal = %v, want %v", gotVal, tt.wantVal)
} }
if gotOk != tt.wantOk { if gotOk != tt.wantOk {
t.Errorf("ADV.ReadTag() gotOk = %v, want %v", gotOk, tt.wantOk) t.Errorf("ADV.ReadTag() gotOk = %v, want %v", gotOk, tt.wantOk)
} }
@ -144,12 +147,15 @@ func TestADV_SetTag(t *testing.T) {
if len(tt.a) != 2*AdvSize { if len(tt.a) != 2*AdvSize {
t.Errorf("Test data is invalid, source ADV size = %v, want %v", len(tt.a), 2*AdvSize) t.Errorf("Test data is invalid, source ADV size = %v, want %v", len(tt.a), 2*AdvSize)
} }
if len(tt.wantADV) != 2*AdvSize { if len(tt.wantADV) != 2*AdvSize {
t.Errorf("Test data is invalid, target ADV size = %v, want %v", len(tt.wantADV), 2*AdvSize) t.Errorf("Test data is invalid, target ADV size = %v, want %v", len(tt.wantADV), 2*AdvSize)
} }
if gotOk := tt.a.SetTag(tt.args.t, tt.args.val); gotOk != tt.wantOk { if gotOk := tt.a.SetTag(tt.args.t, tt.args.val); gotOk != tt.wantOk {
t.Errorf("ADV.SetTag() = %v, want %v", gotOk, tt.wantOk) t.Errorf("ADV.SetTag() = %v, want %v", gotOk, tt.wantOk)
} }
if !bytes.Equal(tt.a, tt.wantADV) { if !bytes.Equal(tt.a, tt.wantADV) {
t.Errorf("ADV = %v, want %v", tt.a, tt.wantADV) t.Errorf("ADV = %v, want %v", tt.a, tt.wantADV)
} }
@ -203,12 +209,15 @@ func TestADV_DeleteTag(t *testing.T) {
if len(tt.a) != 2*AdvSize { if len(tt.a) != 2*AdvSize {
t.Errorf("Test data is invalid, source ADV size = %v, want %v", len(tt.a), 2*AdvSize) t.Errorf("Test data is invalid, source ADV size = %v, want %v", len(tt.a), 2*AdvSize)
} }
if len(tt.wantADV) != 2*AdvSize { if len(tt.wantADV) != 2*AdvSize {
t.Errorf("Test data is invalid, target ADV size = %v, want %v", len(tt.wantADV), 2*AdvSize) t.Errorf("Test data is invalid, target ADV size = %v, want %v", len(tt.wantADV), 2*AdvSize)
} }
if gotOk := tt.a.DeleteTag(tt.args.t); gotOk != tt.wantOk { if gotOk := tt.a.DeleteTag(tt.args.t); gotOk != tt.wantOk {
t.Errorf("ADV.DeleteTag() = %v, want %v", gotOk, tt.wantOk) t.Errorf("ADV.DeleteTag() = %v, want %v", gotOk, tt.wantOk)
} }
if !bytes.Equal(tt.a, tt.wantADV) { if !bytes.Equal(tt.a, tt.wantADV) {
t.Errorf("ADV = %v, want %v", tt.a, tt.wantADV) t.Errorf("ADV = %v, want %v", tt.a, tt.wantADV)
} }
@ -231,6 +240,7 @@ func TestADV_cleanup(t *testing.T) {
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
tt.a.cleanup() tt.a.cleanup()
if !bytes.Equal(tt.a, tt.want) { if !bytes.Equal(tt.a, tt.want) {
t.Errorf("ADV.cleanup() = %v, want %v", tt.a, tt.want) t.Errorf("ADV.cleanup() = %v, want %v", tt.a, tt.want)
} }
@ -251,16 +261,20 @@ func TestADV_head(t *testing.T) {
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
tt.a.head() tt.a.head()
// Expecting 165, 47, 45, 90. // Expecting 165, 47, 45, 90.
if tt.a[0] != 165 { if tt.a[0] != 165 {
t.Errorf("head() = %v, want %v", tt.a[0], 165) t.Errorf("head() = %v, want %v", tt.a[0], 165)
} }
if tt.a[1] != 47 { if tt.a[1] != 47 {
t.Errorf("head() = %v, want %v", tt.a[0], 47) t.Errorf("head() = %v, want %v", tt.a[0], 47)
} }
if tt.a[2] != 45 { if tt.a[2] != 45 {
t.Errorf("head() = %v, want %v", tt.a[0], 45) t.Errorf("head() = %v, want %v", tt.a[0], 45)
} }
if tt.a[3] != 90 { if tt.a[3] != 90 {
t.Errorf("head() = %v, want %v", tt.a[0], 90) t.Errorf("head() = %v, want %v", tt.a[0], 90)
} }
@ -285,12 +299,15 @@ func TestADV_total(t *testing.T) {
if tt.a[4] != 103 { if tt.a[4] != 103 {
t.Errorf("head() = %v, want %v", tt.a[4], 103) t.Errorf("head() = %v, want %v", tt.a[4], 103)
} }
if tt.a[5] != 23 { if tt.a[5] != 23 {
t.Errorf("head() = %v, want %v", tt.a[5], 23) t.Errorf("head() = %v, want %v", tt.a[5], 23)
} }
if tt.a[6] != 4 { if tt.a[6] != 4 {
t.Errorf("head() = %v, want %v", tt.a[6], 4) t.Errorf("head() = %v, want %v", tt.a[6], 4)
} }
if tt.a[7] != 163 { if tt.a[7] != 163 {
t.Errorf("head() = %v, want %v", tt.a[7], 163) t.Errorf("head() = %v, want %v", tt.a[7], 163)
} }
@ -311,16 +328,20 @@ func TestADV_tail(t *testing.T) {
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
tt.a.tail() tt.a.tail()
// Expecting 100, 191, 40, 221. // Expecting 100, 191, 40, 221.
if tt.a[len(tt.a)-4] != 100 { if tt.a[len(tt.a)-4] != 100 {
t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-4], 100) t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-4], 100)
} }
if tt.a[len(tt.a)-3] != 191 { if tt.a[len(tt.a)-3] != 191 {
t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-3], 191) t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-3], 191)
} }
if tt.a[len(tt.a)-2] != 40 { if tt.a[len(tt.a)-2] != 40 {
t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-2], 40) t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-2], 40)
} }
if tt.a[len(tt.a)-1] != 221 { if tt.a[len(tt.a)-1] != 221 {
t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-1], 221) t.Errorf("head() = %v, want %v", tt.a[len(tt.a)-1], 221)
} }

View File

@ -61,6 +61,7 @@ func UnmountAll() error {
log.Printf("unmounted %s (%s)", mountInfo.MountPoint, mountInfo.MountSource) log.Printf("unmounted %s (%s)", mountInfo.MountPoint, mountInfo.MountSource)
} else { } else {
log.Printf("failed unmounting %s: %s", mountInfo.MountPoint, err) log.Printf("failed unmounting %s: %s", mountInfo.MountPoint, err)
failedUnmounts++ failedUnmounts++
} }
} }

View File

@ -171,11 +171,14 @@ func (item *Item) createFormItems() ([]tview.Primitive, error) {
} else { } else {
input := tview.NewInputField() input := tview.NewInputField()
formItem = input formItem = input
input.SetLabel(label) input.SetLabel(label)
text, err := yaml.Marshal(item.dest) text, err := yaml.Marshal(item.dest)
if err != nil { if err != nil {
return nil, err return nil, err
} }
input.SetText(string(text)) input.SetText(string(text))
input.SetChangedFunc(func(text string) { input.SetChangedFunc(func(text string) {
if err := item.assign(text); err != nil { if err := item.assign(text); err != nil {

View File

@ -52,6 +52,7 @@ func (eg *Group) NextFocus() {
// PrevFocus switch focus to the prev element. // PrevFocus switch focus to the prev element.
func (eg *Group) PrevFocus() { func (eg *Group) PrevFocus() {
eg.detectFocus() eg.detectFocus()
eg.current-- eg.current--
if eg.current < 0 { if eg.current < 0 {

View File

@ -81,6 +81,7 @@ func (s *Spinner) Draw(screen tcell.Screen) {
line := fmt.Sprintf(s.label+" %s", spinner) line := fmt.Sprintf(s.label+" %s", spinner)
tview.Print(screen, line, x, y, width, tview.AlignLeft, tcell.ColorWhite) tview.Print(screen, line, x, y, width, tview.AlignLeft, tcell.ColorWhite)
s.index++ s.index++
if s.index == len(s.spinner) { if s.index == len(s.spinner) {

View File

@ -293,7 +293,6 @@ func (installer *Installer) configure() error {
return nil return nil
}(i) }(i)
if err != nil { if err != nil {
return err return err
} }
@ -345,8 +344,8 @@ func (installer *Installer) apply(conn *Connection) error {
} }
config = response.Messages[0].Data[0] config = response.Messages[0].Data[0]
talosconfig, err = clientconfig.FromBytes(response.Messages[0].Talosconfig)
talosconfig, err = clientconfig.FromBytes(response.Messages[0].Talosconfig)
if err != nil { if err != nil {
return err return err
} }
@ -364,6 +363,7 @@ func (installer *Installer) apply(conn *Connection) error {
// TODO: progress bar, logs? // TODO: progress bar, logs?
list.AddItem(s, 1, 1, false) list.AddItem(s, 1, 1, false)
reply, err = conn.ApplyConfiguration( reply, err = conn.ApplyConfiguration(
&machineapi.ApplyConfigurationRequest{ &machineapi.ApplyConfigurationRequest{
Data: config, Data: config,
@ -503,6 +503,7 @@ func (installer *Installer) showModal(title, text string, buttons ...string) int
SetDoneFunc( SetDoneFunc(
func(buttonIndex int, buttonLabel string) { func(buttonIndex int, buttonLabel string) {
index = buttonIndex index = buttonIndex
close(done) close(done)
}, },
) )

View File

@ -245,6 +245,7 @@ func configureAdapter(installer *Installer, opts *machineapi.GenerateConfigurati
return components.NewFormModalButton(item.Name, "configure"). return components.NewFormModalButton(item.Name, "configure").
SetSelectedFunc(func() { SetSelectedFunc(func() {
deviceIndex := -1 deviceIndex := -1
var adapterSettings *machineapi.NetworkDeviceConfig var adapterSettings *machineapi.NetworkDeviceConfig
for i, iface := range opts.MachineConfig.NetworkConfig.Interfaces { for i, iface := range opts.MachineConfig.NetworkConfig.Interfaces {

View File

@ -133,6 +133,7 @@ func Walker(ctx context.Context, rootPath string, options ...WalkerOption) (<-ch
case SymlinkFileType: case SymlinkFileType:
matches = fileInfo.Mode()&os.ModeSymlink != 0 matches = fileInfo.Mode()&os.ModeSymlink != 0
} }
if matches { if matches {
break break
} }

View File

@ -105,6 +105,7 @@ func (suite *WalkerSuite) TestIterationMaxRecurseDepth() {
suite.Require().NoError(err) suite.Require().NoError(err)
var result []string var result []string
for fi := range ch { for fi := range ch {
suite.Require().NoError(fi.Error) suite.Require().NoError(fi.Error)
result = append(result, fi.RelPath) result = append(result, fi.RelPath)

View File

@ -191,8 +191,7 @@ func RenderGraph(ctx context.Context, c *client.Client, resp *inspect.Controller
graph.Edge(graph.Node(resourceTypeID(edge)), graph.Node(edge.ControllerName), idLabels...).Solid() graph.Edge(graph.Node(resourceTypeID(edge)), graph.Node(edge.ControllerName), idLabels...).Solid()
case inspect.DependencyEdgeType_INPUT_WEAK: case inspect.DependencyEdgeType_INPUT_WEAK:
graph.Edge(graph.Node(resourceTypeID(edge)), graph.Node(edge.ControllerName), idLabels...).Dotted() graph.Edge(graph.Node(resourceTypeID(edge)), graph.Node(edge.ControllerName), idLabels...).Dotted()
case inspect.DependencyEdgeType_INPUT_DESTROY_READY: case inspect.DependencyEdgeType_INPUT_DESTROY_READY: // don't show the DestroyReady inputs to reduce the visual clutter
// don't show the DestroyReady inputs to reduce the visual clutter
} }
} }
} }

View File

@ -64,7 +64,6 @@ func (s *APIBootstrapper) Bootstrap(ctx context.Context, out io.Writer) error {
return nil return nil
}) })
if err != nil { if err != nil {
return err return err
} }

View File

@ -52,7 +52,6 @@ func AllNodesBootedAssertion(ctx context.Context, cluster ClusterInfo) error {
} }
} }
}, client.WithTailEvents(-1)) }, client.WithTailEvents(-1))
if err != nil { if err != nil {
unwrappedErr := err unwrappedErr := err

View File

@ -22,6 +22,7 @@ func TestPollingCondition(t *testing.T) {
t.Parallel() t.Parallel()
var calls int var calls int
cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error { cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error {
calls++ calls++
@ -42,6 +43,7 @@ func TestPollingCondition(t *testing.T) {
t.Parallel() t.Parallel()
var calls int var calls int
cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error { cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error {
calls++ calls++
@ -62,6 +64,7 @@ func TestPollingCondition(t *testing.T) {
t.Parallel() t.Parallel()
var calls int var calls int
cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error { cond := conditions.PollingCondition("Test condition", func(ctx context.Context) error {
calls++ calls++

View File

@ -150,6 +150,7 @@ func Download(ctx context.Context, endpoint string, opts ...Option) (b []byte, e
)..., )...,
).RetryWithContext(ctx, func(ctx context.Context) error { ).RetryWithContext(ctx, func(ctx context.Context) error {
var attemptEndpoint string var attemptEndpoint string
attemptEndpoint, err = options.EndpointFunc(ctx) attemptEndpoint, err = options.EndpointFunc(ctx)
if err != nil { if err != nil {
return err return err

View File

@ -61,7 +61,7 @@ func (g *RemoteGenerator) IdentityContext(ctx context.Context, csr *x509.Certifi
ctx, cancel := context.WithTimeout(ctx, time.Minute) ctx, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel() defer cancel()
err = retry.Exponential(time.Minute, if err = retry.Exponential(time.Minute,
retry.WithAttemptTimeout(10*time.Second), retry.WithAttemptTimeout(10*time.Second),
retry.WithUnits(time.Second), retry.WithUnits(time.Second),
retry.WithJitter(100*time.Millisecond), retry.WithJitter(100*time.Millisecond),
@ -77,9 +77,7 @@ func (g *RemoteGenerator) IdentityContext(ctx context.Context, csr *x509.Certifi
crt = resp.Crt crt = resp.Crt
return nil return nil
}) }); err != nil {
if err != nil {
return nil, nil, err return nil, nil, err
} }

View File

@ -278,6 +278,7 @@ func (h *Client) evict(ctx context.Context, p corev1.Pod, gracePeriod int64) err
func (h *Client) waitForPodDeleted(ctx context.Context, p *corev1.Pod) error { func (h *Client) waitForPodDeleted(ctx context.Context, p *corev1.Pod) error {
return retry.Constant(time.Minute, retry.WithUnits(3*time.Second)).RetryWithContext(ctx, func(ctx context.Context) error { return retry.Constant(time.Minute, retry.WithUnits(3*time.Second)).RetryWithContext(ctx, func(ctx context.Context) error {
pod, err := h.CoreV1().Pods(p.GetNamespace()).Get(ctx, p.GetName(), metav1.GetOptions{}) pod, err := h.CoreV1().Pods(p.GetNamespace()).Get(ctx, p.GetName(), metav1.GetOptions{})
switch { switch {
case apierrors.IsNotFound(err): case apierrors.IsNotFound(err):
return nil return nil

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: cluster/cluster.proto // source: cluster/cluster.proto
package cluster package cluster
@ -7,11 +7,12 @@ package cluster
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
proto "google.golang.org/protobuf/proto" proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb" durationpb1 "google.golang.org/protobuf/types/known/durationpb"
common "github.com/siderolabs/talos/pkg/machinery/api/common" common "github.com/siderolabs/talos/pkg/machinery/api/common"
) )
@ -59,29 +60,17 @@ func (m *HealthCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if m.WaitTimeout != nil { if m.WaitTimeout != nil {
if vtmsg, ok := interface{}(m.WaitTimeout).(interface { size, err := (*durationpb.Duration)(m.WaitTimeout).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.WaitTimeout)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -121,7 +110,7 @@ func (m *ClusterInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.ForceEndpoint) > 0 { if len(m.ForceEndpoint) > 0 {
i -= len(m.ForceEndpoint) i -= len(m.ForceEndpoint)
copy(dAtA[i:], m.ForceEndpoint) copy(dAtA[i:], m.ForceEndpoint)
i = encodeVarint(dAtA, i, uint64(len(m.ForceEndpoint))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ForceEndpoint)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -129,7 +118,7 @@ func (m *ClusterInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.WorkerNodes) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.WorkerNodes) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.WorkerNodes[iNdEx]) i -= len(m.WorkerNodes[iNdEx])
copy(dAtA[i:], m.WorkerNodes[iNdEx]) copy(dAtA[i:], m.WorkerNodes[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.WorkerNodes[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.WorkerNodes[iNdEx])))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -138,7 +127,7 @@ func (m *ClusterInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.ControlPlaneNodes) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.ControlPlaneNodes) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.ControlPlaneNodes[iNdEx]) i -= len(m.ControlPlaneNodes[iNdEx])
copy(dAtA[i:], m.ControlPlaneNodes[iNdEx]) copy(dAtA[i:], m.ControlPlaneNodes[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.ControlPlaneNodes[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ControlPlaneNodes[iNdEx])))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -179,7 +168,7 @@ func (m *HealthCheckProgress) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Message) > 0 { if len(m.Message) > 0 {
i -= len(m.Message) i -= len(m.Message)
copy(dAtA[i:], m.Message) copy(dAtA[i:], m.Message)
i = encodeVarint(dAtA, i, uint64(len(m.Message))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -192,7 +181,7 @@ func (m *HealthCheckProgress) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.Metadata) encoded, err := proto.Marshal(m.Metadata)
if err != nil { if err != nil {
@ -200,7 +189,7 @@ func (m *HealthCheckProgress) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
@ -208,17 +197,6 @@ func (m *HealthCheckProgress) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *HealthCheckRequest) SizeVT() (n int) { func (m *HealthCheckRequest) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -226,18 +204,12 @@ func (m *HealthCheckRequest) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.WaitTimeout != nil { if m.WaitTimeout != nil {
if size, ok := interface{}(m.WaitTimeout).(interface { l = (*durationpb.Duration)(m.WaitTimeout).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.WaitTimeout)
}
n += 1 + l + sov(uint64(l))
} }
if m.ClusterInfo != nil { if m.ClusterInfo != nil {
l = m.ClusterInfo.SizeVT() l = m.ClusterInfo.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -252,18 +224,18 @@ func (m *ClusterInfo) SizeVT() (n int) {
if len(m.ControlPlaneNodes) > 0 { if len(m.ControlPlaneNodes) > 0 {
for _, s := range m.ControlPlaneNodes { for _, s := range m.ControlPlaneNodes {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.WorkerNodes) > 0 { if len(m.WorkerNodes) > 0 {
for _, s := range m.WorkerNodes { for _, s := range m.WorkerNodes {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
l = len(m.ForceEndpoint) l = len(m.ForceEndpoint)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -283,22 +255,16 @@ func (m *HealthCheckProgress) SizeVT() (n int) {
} else { } else {
l = proto.Size(m.Metadata) l = proto.Size(m.Metadata)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Message) l = len(m.Message)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error { func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -307,7 +273,7 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -335,7 +301,7 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -348,28 +314,20 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.WaitTimeout == nil { if m.WaitTimeout == nil {
m.WaitTimeout = &durationpb.Duration{} m.WaitTimeout = &durationpb1.Duration{}
} }
if unmarshal, ok := interface{}(m.WaitTimeout).(interface { if err := (*durationpb.Duration)(m.WaitTimeout).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.WaitTimeout); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
@ -379,7 +337,7 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -392,11 +350,11 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -410,12 +368,12 @@ func (m *HealthCheckRequest) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -438,7 +396,7 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -466,7 +424,7 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -480,11 +438,11 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -498,7 +456,7 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -512,11 +470,11 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -530,7 +488,7 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -544,11 +502,11 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -557,12 +515,12 @@ func (m *ClusterInfo) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -585,7 +543,7 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -613,7 +571,7 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -626,11 +584,11 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -657,7 +615,7 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -671,11 +629,11 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -684,12 +642,12 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -704,88 +662,3 @@ func (m *HealthCheckProgress) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: inspect/inspect.proto // source: inspect/inspect.proto
package inspect package inspect
@ -7,8 +7,8 @@ package inspect
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
proto "google.golang.org/protobuf/proto" proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -59,7 +59,7 @@ func (m *ControllerRuntimeDependency) MarshalToSizedBufferVT(dAtA []byte) (int,
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -73,7 +73,7 @@ func (m *ControllerRuntimeDependency) MarshalToSizedBufferVT(dAtA []byte) (int,
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.Metadata) encoded, err := proto.Marshal(m.Metadata)
if err != nil { if err != nil {
@ -81,7 +81,7 @@ func (m *ControllerRuntimeDependency) MarshalToSizedBufferVT(dAtA []byte) (int,
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
@ -126,7 +126,7 @@ func (m *ControllerRuntimeDependenciesResponse) MarshalToSizedBufferVT(dAtA []by
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -167,50 +167,39 @@ func (m *ControllerDependencyEdge) MarshalToSizedBufferVT(dAtA []byte) (int, err
if len(m.ResourceId) > 0 { if len(m.ResourceId) > 0 {
i -= len(m.ResourceId) i -= len(m.ResourceId)
copy(dAtA[i:], m.ResourceId) copy(dAtA[i:], m.ResourceId)
i = encodeVarint(dAtA, i, uint64(len(m.ResourceId))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceId)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if len(m.ResourceType) > 0 { if len(m.ResourceType) > 0 {
i -= len(m.ResourceType) i -= len(m.ResourceType)
copy(dAtA[i:], m.ResourceType) copy(dAtA[i:], m.ResourceType)
i = encodeVarint(dAtA, i, uint64(len(m.ResourceType))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceType)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(m.ResourceNamespace) > 0 { if len(m.ResourceNamespace) > 0 {
i -= len(m.ResourceNamespace) i -= len(m.ResourceNamespace)
copy(dAtA[i:], m.ResourceNamespace) copy(dAtA[i:], m.ResourceNamespace)
i = encodeVarint(dAtA, i, uint64(len(m.ResourceNamespace))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceNamespace)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if m.EdgeType != 0 { if m.EdgeType != 0 {
i = encodeVarint(dAtA, i, uint64(m.EdgeType)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EdgeType))
i-- i--
dAtA[i] = 0x10 dAtA[i] = 0x10
} }
if len(m.ControllerName) > 0 { if len(m.ControllerName) > 0 {
i -= len(m.ControllerName) i -= len(m.ControllerName)
copy(dAtA[i:], m.ControllerName) copy(dAtA[i:], m.ControllerName)
i = encodeVarint(dAtA, i, uint64(len(m.ControllerName))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ControllerName)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ControllerRuntimeDependency) SizeVT() (n int) { func (m *ControllerRuntimeDependency) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -225,12 +214,12 @@ func (m *ControllerRuntimeDependency) SizeVT() (n int) {
} else { } else {
l = proto.Size(m.Metadata) l = proto.Size(m.Metadata)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.Edges) > 0 { if len(m.Edges) > 0 {
for _, e := range m.Edges { for _, e := range m.Edges {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
@ -246,7 +235,7 @@ func (m *ControllerRuntimeDependenciesResponse) SizeVT() (n int) {
if len(m.Messages) > 0 { if len(m.Messages) > 0 {
for _, e := range m.Messages { for _, e := range m.Messages {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
@ -261,33 +250,27 @@ func (m *ControllerDependencyEdge) SizeVT() (n int) {
_ = l _ = l
l = len(m.ControllerName) l = len(m.ControllerName)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.EdgeType != 0 { if m.EdgeType != 0 {
n += 1 + sov(uint64(m.EdgeType)) n += 1 + protohelpers.SizeOfVarint(uint64(m.EdgeType))
} }
l = len(m.ResourceNamespace) l = len(m.ResourceNamespace)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.ResourceType) l = len(m.ResourceType)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.ResourceId) l = len(m.ResourceId)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error { func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -296,7 +279,7 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -324,7 +307,7 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -337,11 +320,11 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -368,7 +351,7 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -381,11 +364,11 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -397,12 +380,12 @@ func (m *ControllerRuntimeDependency) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -425,7 +408,7 @@ func (m *ControllerRuntimeDependenciesResponse) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -453,7 +436,7 @@ func (m *ControllerRuntimeDependenciesResponse) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -466,11 +449,11 @@ func (m *ControllerRuntimeDependenciesResponse) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -482,12 +465,12 @@ func (m *ControllerRuntimeDependenciesResponse) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -510,7 +493,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -538,7 +521,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -552,11 +535,11 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -570,7 +553,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
m.EdgeType = 0 m.EdgeType = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -589,7 +572,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -603,11 +586,11 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -621,7 +604,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -635,11 +618,11 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -653,7 +636,7 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -667,11 +650,11 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -680,12 +663,12 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -700,88 +683,3 @@ func (m *ControllerDependencyEdge) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/config/config.proto // source: resource/config/config.proto
package config package config
@ -7,8 +7,8 @@ package config
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -52,7 +52,7 @@ func (m *MachineConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.YamlMarshalled) > 0 { if len(m.YamlMarshalled) > 0 {
i -= len(m.YamlMarshalled) i -= len(m.YamlMarshalled)
copy(dAtA[i:], m.YamlMarshalled) copy(dAtA[i:], m.YamlMarshalled)
i = encodeVarint(dAtA, i, uint64(len(m.YamlMarshalled))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.YamlMarshalled)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -90,24 +90,13 @@ func (m *MachineTypeSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.MachineType != 0 { if m.MachineType != 0 {
i = encodeVarint(dAtA, i, uint64(m.MachineType)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MachineType))
i-- i--
dAtA[i] = 0x8 dAtA[i] = 0x8
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *MachineConfigSpec) SizeVT() (n int) { func (m *MachineConfigSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -116,7 +105,7 @@ func (m *MachineConfigSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.YamlMarshalled) l = len(m.YamlMarshalled)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -129,18 +118,12 @@ func (m *MachineTypeSpec) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.MachineType != 0 { if m.MachineType != 0 {
n += 1 + sov(uint64(m.MachineType)) n += 1 + protohelpers.SizeOfVarint(uint64(m.MachineType))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error { func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -149,7 +132,7 @@ func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -177,7 +160,7 @@ func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -190,11 +173,11 @@ func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -206,12 +189,12 @@ func (m *MachineConfigSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -234,7 +217,7 @@ func (m *MachineTypeSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -262,7 +245,7 @@ func (m *MachineTypeSpec) UnmarshalVT(dAtA []byte) error {
m.MachineType = 0 m.MachineType = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -276,12 +259,12 @@ func (m *MachineTypeSpec) UnmarshalVT(dAtA []byte) error {
} }
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -296,88 +279,3 @@ func (m *MachineTypeSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/cri/cri.proto // source: resource/definitions/cri/cri.proto
package cri package cri
@ -7,11 +7,11 @@ package cri
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
proto "google.golang.org/protobuf/proto" protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
structpb "github.com/planetscale/vtprotobuf/types/known/structpb"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
structpb "google.golang.org/protobuf/types/known/structpb" structpb1 "google.golang.org/protobuf/types/known/structpb"
) )
const ( const (
@ -52,48 +52,25 @@ func (m *SeccompProfileSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.Value != nil { if m.Value != nil {
if vtmsg, ok := interface{}(m.Value).(interface { size, err := (*structpb.Struct)(m.Value).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.Value)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Name) > 0 { if len(m.Name) > 0 {
i -= len(m.Name) i -= len(m.Name)
copy(dAtA[i:], m.Name) copy(dAtA[i:], m.Name)
i = encodeVarint(dAtA, i, uint64(len(m.Name))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *SeccompProfileSpec) SizeVT() (n int) { func (m *SeccompProfileSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -102,28 +79,16 @@ func (m *SeccompProfileSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.Name) l = len(m.Name)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Value != nil { if m.Value != nil {
if size, ok := interface{}(m.Value).(interface { l = (*structpb.Struct)(m.Value).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.Value)
}
n += 1 + l + sov(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error { func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -132,7 +97,7 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -160,7 +125,7 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -174,11 +139,11 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -192,7 +157,7 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -205,38 +170,30 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.Value == nil { if m.Value == nil {
m.Value = &structpb.Struct{} m.Value = &structpb1.Struct{}
} }
if unmarshal, ok := interface{}(m.Value).(interface { if err := (*structpb.Struct)(m.Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Value); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -251,88 +208,3 @@ func (m *SeccompProfileSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/etcd/etcd.proto // source: resource/definitions/etcd/etcd.proto
package etcd package etcd
@ -7,8 +7,8 @@ package etcd
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
proto "google.golang.org/protobuf/proto" proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -56,7 +56,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.ListenExcludeSubnets) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.ListenExcludeSubnets) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.ListenExcludeSubnets[iNdEx]) i -= len(m.ListenExcludeSubnets[iNdEx])
copy(dAtA[i:], m.ListenExcludeSubnets[iNdEx]) copy(dAtA[i:], m.ListenExcludeSubnets[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.ListenExcludeSubnets[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ListenExcludeSubnets[iNdEx])))
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
} }
@ -65,7 +65,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.ListenValidSubnets) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.ListenValidSubnets) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.ListenValidSubnets[iNdEx]) i -= len(m.ListenValidSubnets[iNdEx])
copy(dAtA[i:], m.ListenValidSubnets[iNdEx]) copy(dAtA[i:], m.ListenValidSubnets[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.ListenValidSubnets[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ListenValidSubnets[iNdEx])))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
@ -76,15 +76,15 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
baseI := i baseI := i
i -= len(v) i -= len(v)
copy(dAtA[i:], v) copy(dAtA[i:], v)
i = encodeVarint(dAtA, i, uint64(len(v))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
i -= len(k) i -= len(k)
copy(dAtA[i:], k) copy(dAtA[i:], k)
i = encodeVarint(dAtA, i, uint64(len(k))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
i = encodeVarint(dAtA, i, uint64(baseI-i)) i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
@ -92,7 +92,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Image) > 0 { if len(m.Image) > 0 {
i -= len(m.Image) i -= len(m.Image)
copy(dAtA[i:], m.Image) copy(dAtA[i:], m.Image)
i = encodeVarint(dAtA, i, uint64(len(m.Image))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Image)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -100,7 +100,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.AdvertiseExcludeSubnets) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.AdvertiseExcludeSubnets) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AdvertiseExcludeSubnets[iNdEx]) i -= len(m.AdvertiseExcludeSubnets[iNdEx])
copy(dAtA[i:], m.AdvertiseExcludeSubnets[iNdEx]) copy(dAtA[i:], m.AdvertiseExcludeSubnets[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.AdvertiseExcludeSubnets[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AdvertiseExcludeSubnets[iNdEx])))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -109,7 +109,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.AdvertiseValidSubnets) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.AdvertiseValidSubnets) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AdvertiseValidSubnets[iNdEx]) i -= len(m.AdvertiseValidSubnets[iNdEx])
copy(dAtA[i:], m.AdvertiseValidSubnets[iNdEx]) copy(dAtA[i:], m.AdvertiseValidSubnets[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.AdvertiseValidSubnets[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AdvertiseValidSubnets[iNdEx])))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -150,7 +150,7 @@ func (m *MemberSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.MemberId) > 0 { if len(m.MemberId) > 0 {
i -= len(m.MemberId) i -= len(m.MemberId)
copy(dAtA[i:], m.MemberId) copy(dAtA[i:], m.MemberId)
i = encodeVarint(dAtA, i, uint64(len(m.MemberId))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MemberId)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -190,7 +190,7 @@ func (m *PKIStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Version) > 0 { if len(m.Version) > 0 {
i -= len(m.Version) i -= len(m.Version)
copy(dAtA[i:], m.Version) copy(dAtA[i:], m.Version)
i = encodeVarint(dAtA, i, uint64(len(m.Version))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -247,7 +247,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.ListenClientAddresses[iNdEx]) encoded, err := proto.Marshal(m.ListenClientAddresses[iNdEx])
if err != nil { if err != nil {
@ -255,7 +255,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
@ -271,7 +271,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.ListenPeerAddresses[iNdEx]) encoded, err := proto.Marshal(m.ListenPeerAddresses[iNdEx])
if err != nil { if err != nil {
@ -279,7 +279,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
@ -291,15 +291,15 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
baseI := i baseI := i
i -= len(v) i -= len(v)
copy(dAtA[i:], v) copy(dAtA[i:], v)
i = encodeVarint(dAtA, i, uint64(len(v))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
i -= len(k) i -= len(k)
copy(dAtA[i:], k) copy(dAtA[i:], k)
i = encodeVarint(dAtA, i, uint64(len(k))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
i = encodeVarint(dAtA, i, uint64(baseI-i)) i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
@ -307,7 +307,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Image) > 0 { if len(m.Image) > 0 {
i -= len(m.Image) i -= len(m.Image)
copy(dAtA[i:], m.Image) copy(dAtA[i:], m.Image)
i = encodeVarint(dAtA, i, uint64(len(m.Image))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Image)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -321,7 +321,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.AdvertisedAddresses[iNdEx]) encoded, err := proto.Marshal(m.AdvertisedAddresses[iNdEx])
if err != nil { if err != nil {
@ -329,7 +329,7 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
@ -338,24 +338,13 @@ func (m *SpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Name) > 0 { if len(m.Name) > 0 {
i -= len(m.Name) i -= len(m.Name)
copy(dAtA[i:], m.Name) copy(dAtA[i:], m.Name)
i = encodeVarint(dAtA, i, uint64(len(m.Name))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ConfigSpec) SizeVT() (n int) { func (m *ConfigSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -365,37 +354,37 @@ func (m *ConfigSpec) SizeVT() (n int) {
if len(m.AdvertiseValidSubnets) > 0 { if len(m.AdvertiseValidSubnets) > 0 {
for _, s := range m.AdvertiseValidSubnets { for _, s := range m.AdvertiseValidSubnets {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.AdvertiseExcludeSubnets) > 0 { if len(m.AdvertiseExcludeSubnets) > 0 {
for _, s := range m.AdvertiseExcludeSubnets { for _, s := range m.AdvertiseExcludeSubnets {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
l = len(m.Image) l = len(m.Image)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.ExtraArgs) > 0 { if len(m.ExtraArgs) > 0 {
for k, v := range m.ExtraArgs { for k, v := range m.ExtraArgs {
_ = k _ = k
_ = v _ = v
mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v)))
n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize))
} }
} }
if len(m.ListenValidSubnets) > 0 { if len(m.ListenValidSubnets) > 0 {
for _, s := range m.ListenValidSubnets { for _, s := range m.ListenValidSubnets {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.ListenExcludeSubnets) > 0 { if len(m.ListenExcludeSubnets) > 0 {
for _, s := range m.ListenExcludeSubnets { for _, s := range m.ListenExcludeSubnets {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
@ -410,7 +399,7 @@ func (m *MemberSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.MemberId) l = len(m.MemberId)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -427,7 +416,7 @@ func (m *PKIStatusSpec) SizeVT() (n int) {
} }
l = len(m.Version) l = len(m.Version)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -441,7 +430,7 @@ func (m *SpecSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.Name) l = len(m.Name)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.AdvertisedAddresses) > 0 { if len(m.AdvertisedAddresses) > 0 {
for _, e := range m.AdvertisedAddresses { for _, e := range m.AdvertisedAddresses {
@ -452,19 +441,19 @@ func (m *SpecSpec) SizeVT() (n int) {
} else { } else {
l = proto.Size(e) l = proto.Size(e)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
l = len(m.Image) l = len(m.Image)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.ExtraArgs) > 0 { if len(m.ExtraArgs) > 0 {
for k, v := range m.ExtraArgs { for k, v := range m.ExtraArgs {
_ = k _ = k
_ = v _ = v
mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v)))
n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize))
} }
} }
if len(m.ListenPeerAddresses) > 0 { if len(m.ListenPeerAddresses) > 0 {
@ -476,7 +465,7 @@ func (m *SpecSpec) SizeVT() (n int) {
} else { } else {
l = proto.Size(e) l = proto.Size(e)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.ListenClientAddresses) > 0 { if len(m.ListenClientAddresses) > 0 {
@ -488,19 +477,13 @@ func (m *SpecSpec) SizeVT() (n int) {
} else { } else {
l = proto.Size(e) l = proto.Size(e)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error { func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -509,7 +492,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -537,7 +520,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -551,11 +534,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -569,7 +552,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -583,11 +566,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -601,7 +584,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -615,11 +598,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -633,7 +616,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -646,11 +629,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -665,7 +648,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -682,7 +665,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLenmapkey uint64 var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -696,11 +679,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLenmapkey := int(stringLenmapkey) intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 { if intStringLenmapkey < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postStringIndexmapkey := iNdEx + intStringLenmapkey postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 { if postStringIndexmapkey < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postStringIndexmapkey > l { if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -711,7 +694,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLenmapvalue uint64 var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -725,11 +708,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLenmapvalue := int(stringLenmapvalue) intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 { if intStringLenmapvalue < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postStringIndexmapvalue := iNdEx + intStringLenmapvalue postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 { if postStringIndexmapvalue < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postStringIndexmapvalue > l { if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -738,12 +721,12 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postStringIndexmapvalue iNdEx = postStringIndexmapvalue
} else { } else {
iNdEx = entryPreIndex iNdEx = entryPreIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > postIndex { if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -760,7 +743,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -774,11 +757,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -792,7 +775,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -806,11 +789,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -819,12 +802,12 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -847,7 +830,7 @@ func (m *MemberSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -875,7 +858,7 @@ func (m *MemberSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -889,11 +872,11 @@ func (m *MemberSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -902,12 +885,12 @@ func (m *MemberSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -930,7 +913,7 @@ func (m *PKIStatusSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -958,7 +941,7 @@ func (m *PKIStatusSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -978,7 +961,7 @@ func (m *PKIStatusSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -992,11 +975,11 @@ func (m *PKIStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1005,12 +988,12 @@ func (m *PKIStatusSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1033,7 +1016,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1061,7 +1044,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1075,11 +1058,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1093,7 +1076,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1106,11 +1089,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1135,7 +1118,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1149,11 +1132,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1167,7 +1150,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1180,11 +1163,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1199,7 +1182,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1216,7 +1199,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var stringLenmapkey uint64 var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1230,11 +1213,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLenmapkey := int(stringLenmapkey) intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 { if intStringLenmapkey < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postStringIndexmapkey := iNdEx + intStringLenmapkey postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 { if postStringIndexmapkey < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postStringIndexmapkey > l { if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1245,7 +1228,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var stringLenmapvalue uint64 var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1259,11 +1242,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLenmapvalue := int(stringLenmapvalue) intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 { if intStringLenmapvalue < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postStringIndexmapvalue := iNdEx + intStringLenmapvalue postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 { if postStringIndexmapvalue < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postStringIndexmapvalue > l { if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1272,12 +1255,12 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postStringIndexmapvalue iNdEx = postStringIndexmapvalue
} else { } else {
iNdEx = entryPreIndex iNdEx = entryPreIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > postIndex { if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1294,7 +1277,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1307,11 +1290,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1336,7 +1319,7 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1349,11 +1332,11 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1373,12 +1356,12 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1393,88 +1376,3 @@ func (m *SpecSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/extensions/extensions.proto // source: resource/definitions/extensions/extensions.proto
package extensions package extensions
@ -7,8 +7,8 @@ package extensions
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -55,7 +55,7 @@ func (m *Compatibility) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -95,7 +95,7 @@ func (m *Constraint) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Version) > 0 { if len(m.Version) > 0 {
i -= len(m.Version) i -= len(m.Version)
copy(dAtA[i:], m.Version) copy(dAtA[i:], m.Version)
i = encodeVarint(dAtA, i, uint64(len(m.Version))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -138,14 +138,14 @@ func (m *Layer) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Image) > 0 { if len(m.Image) > 0 {
i -= len(m.Image) i -= len(m.Image)
copy(dAtA[i:], m.Image) copy(dAtA[i:], m.Image)
i = encodeVarint(dAtA, i, uint64(len(m.Image))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Image)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -188,52 +188,41 @@ func (m *Metadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if len(m.Description) > 0 { if len(m.Description) > 0 {
i -= len(m.Description) i -= len(m.Description)
copy(dAtA[i:], m.Description) copy(dAtA[i:], m.Description)
i = encodeVarint(dAtA, i, uint64(len(m.Description))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(m.Author) > 0 { if len(m.Author) > 0 {
i -= len(m.Author) i -= len(m.Author)
copy(dAtA[i:], m.Author) copy(dAtA[i:], m.Author)
i = encodeVarint(dAtA, i, uint64(len(m.Author))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Author)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.Version) > 0 { if len(m.Version) > 0 {
i -= len(m.Version) i -= len(m.Version)
copy(dAtA[i:], m.Version) copy(dAtA[i:], m.Version)
i = encodeVarint(dAtA, i, uint64(len(m.Version))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Name) > 0 { if len(m.Name) > 0 {
i -= len(m.Name) i -= len(m.Name)
copy(dAtA[i:], m.Name) copy(dAtA[i:], m.Name)
i = encodeVarint(dAtA, i, uint64(len(m.Name))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Compatibility) SizeVT() (n int) { func (m *Compatibility) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -242,7 +231,7 @@ func (m *Compatibility) SizeVT() (n int) {
_ = l _ = l
if m.Talos != nil { if m.Talos != nil {
l = m.Talos.SizeVT() l = m.Talos.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -256,7 +245,7 @@ func (m *Constraint) SizeVT() (n int) {
_ = l _ = l
l = len(m.Version) l = len(m.Version)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -270,11 +259,11 @@ func (m *Layer) SizeVT() (n int) {
_ = l _ = l
l = len(m.Image) l = len(m.Image)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Metadata != nil { if m.Metadata != nil {
l = m.Metadata.SizeVT() l = m.Metadata.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -288,34 +277,28 @@ func (m *Metadata) SizeVT() (n int) {
_ = l _ = l
l = len(m.Name) l = len(m.Name)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Version) l = len(m.Version)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Author) l = len(m.Author)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Description) l = len(m.Description)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Compatibility != nil { if m.Compatibility != nil {
l = m.Compatibility.SizeVT() l = m.Compatibility.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Compatibility) UnmarshalVT(dAtA []byte) error { func (m *Compatibility) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -324,7 +307,7 @@ func (m *Compatibility) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -352,7 +335,7 @@ func (m *Compatibility) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -365,11 +348,11 @@ func (m *Compatibility) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -383,12 +366,12 @@ func (m *Compatibility) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -411,7 +394,7 @@ func (m *Constraint) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -439,7 +422,7 @@ func (m *Constraint) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -453,11 +436,11 @@ func (m *Constraint) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -466,12 +449,12 @@ func (m *Constraint) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -494,7 +477,7 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -522,7 +505,7 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -536,11 +519,11 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -554,7 +537,7 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -567,11 +550,11 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -585,12 +568,12 @@ func (m *Layer) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -613,7 +596,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -641,7 +624,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -655,11 +638,11 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -673,7 +656,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -687,11 +670,11 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -705,7 +688,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -719,11 +702,11 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -737,7 +720,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -751,11 +734,11 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -769,7 +752,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -782,11 +765,11 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -800,12 +783,12 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -820,88 +803,3 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/files/files.proto // source: resource/definitions/files/files.proto
package files package files
@ -7,8 +7,8 @@ package files
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -50,14 +50,14 @@ func (m *EtcFileSpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.Mode != 0 { if m.Mode != 0 {
i = encodeVarint(dAtA, i, uint64(m.Mode)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mode))
i-- i--
dAtA[i] = 0x10 dAtA[i] = 0x10
} }
if len(m.Contents) > 0 { if len(m.Contents) > 0 {
i -= len(m.Contents) i -= len(m.Contents)
copy(dAtA[i:], m.Contents) copy(dAtA[i:], m.Contents)
i = encodeVarint(dAtA, i, uint64(len(m.Contents))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Contents)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -97,24 +97,13 @@ func (m *EtcFileStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.SpecVersion) > 0 { if len(m.SpecVersion) > 0 {
i -= len(m.SpecVersion) i -= len(m.SpecVersion)
copy(dAtA[i:], m.SpecVersion) copy(dAtA[i:], m.SpecVersion)
i = encodeVarint(dAtA, i, uint64(len(m.SpecVersion))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpecVersion)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *EtcFileSpecSpec) SizeVT() (n int) { func (m *EtcFileSpecSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -123,10 +112,10 @@ func (m *EtcFileSpecSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.Contents) l = len(m.Contents)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Mode != 0 { if m.Mode != 0 {
n += 1 + sov(uint64(m.Mode)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Mode))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -140,18 +129,12 @@ func (m *EtcFileStatusSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.SpecVersion) l = len(m.SpecVersion)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error { func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -160,7 +143,7 @@ func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -188,7 +171,7 @@ func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -201,11 +184,11 @@ func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -222,7 +205,7 @@ func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
m.Mode = 0 m.Mode = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -236,12 +219,12 @@ func (m *EtcFileSpecSpec) UnmarshalVT(dAtA []byte) error {
} }
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -264,7 +247,7 @@ func (m *EtcFileStatusSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -292,7 +275,7 @@ func (m *EtcFileStatusSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -306,11 +289,11 @@ func (m *EtcFileStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -319,12 +302,12 @@ func (m *EtcFileStatusSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -339,88 +322,3 @@ func (m *EtcFileStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/hardware/hardware.proto // source: resource/definitions/hardware/hardware.proto
package hardware package hardware
@ -7,8 +7,8 @@ package hardware
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -52,52 +52,52 @@ func (m *MemoryModuleSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.ProductName) > 0 { if len(m.ProductName) > 0 {
i -= len(m.ProductName) i -= len(m.ProductName)
copy(dAtA[i:], m.ProductName) copy(dAtA[i:], m.ProductName)
i = encodeVarint(dAtA, i, uint64(len(m.ProductName))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProductName)))
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
if len(m.AssetTag) > 0 { if len(m.AssetTag) > 0 {
i -= len(m.AssetTag) i -= len(m.AssetTag)
copy(dAtA[i:], m.AssetTag) copy(dAtA[i:], m.AssetTag)
i = encodeVarint(dAtA, i, uint64(len(m.AssetTag))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetTag)))
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
} }
if len(m.SerialNumber) > 0 { if len(m.SerialNumber) > 0 {
i -= len(m.SerialNumber) i -= len(m.SerialNumber)
copy(dAtA[i:], m.SerialNumber) copy(dAtA[i:], m.SerialNumber)
i = encodeVarint(dAtA, i, uint64(len(m.SerialNumber))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerialNumber)))
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
} }
if len(m.Manufacturer) > 0 { if len(m.Manufacturer) > 0 {
i -= len(m.Manufacturer) i -= len(m.Manufacturer)
copy(dAtA[i:], m.Manufacturer) copy(dAtA[i:], m.Manufacturer)
i = encodeVarint(dAtA, i, uint64(len(m.Manufacturer))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Manufacturer)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if m.Speed != 0 { if m.Speed != 0 {
i = encodeVarint(dAtA, i, uint64(m.Speed)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Speed))
i-- i--
dAtA[i] = 0x20 dAtA[i] = 0x20
} }
if len(m.BankLocator) > 0 { if len(m.BankLocator) > 0 {
i -= len(m.BankLocator) i -= len(m.BankLocator)
copy(dAtA[i:], m.BankLocator) copy(dAtA[i:], m.BankLocator)
i = encodeVarint(dAtA, i, uint64(len(m.BankLocator))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BankLocator)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.DeviceLocator) > 0 { if len(m.DeviceLocator) > 0 {
i -= len(m.DeviceLocator) i -= len(m.DeviceLocator)
copy(dAtA[i:], m.DeviceLocator) copy(dAtA[i:], m.DeviceLocator)
i = encodeVarint(dAtA, i, uint64(len(m.DeviceLocator))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeviceLocator)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if m.Size != 0 { if m.Size != 0 {
i = encodeVarint(dAtA, i, uint64(m.Size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size))
i-- i--
dAtA[i] = 0x8 dAtA[i] = 0x8
} }
@ -135,74 +135,74 @@ func (m *ProcessorSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.ThreadCount != 0 { if m.ThreadCount != 0 {
i = encodeVarint(dAtA, i, uint64(m.ThreadCount)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ThreadCount))
i-- i--
dAtA[i] = 0x60 dAtA[i] = 0x60
} }
if m.CoreEnabled != 0 { if m.CoreEnabled != 0 {
i = encodeVarint(dAtA, i, uint64(m.CoreEnabled)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CoreEnabled))
i-- i--
dAtA[i] = 0x58 dAtA[i] = 0x58
} }
if m.CoreCount != 0 { if m.CoreCount != 0 {
i = encodeVarint(dAtA, i, uint64(m.CoreCount)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CoreCount))
i-- i--
dAtA[i] = 0x50 dAtA[i] = 0x50
} }
if len(m.PartNumber) > 0 { if len(m.PartNumber) > 0 {
i -= len(m.PartNumber) i -= len(m.PartNumber)
copy(dAtA[i:], m.PartNumber) copy(dAtA[i:], m.PartNumber)
i = encodeVarint(dAtA, i, uint64(len(m.PartNumber))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PartNumber)))
i-- i--
dAtA[i] = 0x4a dAtA[i] = 0x4a
} }
if len(m.AssetTag) > 0 { if len(m.AssetTag) > 0 {
i -= len(m.AssetTag) i -= len(m.AssetTag)
copy(dAtA[i:], m.AssetTag) copy(dAtA[i:], m.AssetTag)
i = encodeVarint(dAtA, i, uint64(len(m.AssetTag))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssetTag)))
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
if len(m.SerialNumber) > 0 { if len(m.SerialNumber) > 0 {
i -= len(m.SerialNumber) i -= len(m.SerialNumber)
copy(dAtA[i:], m.SerialNumber) copy(dAtA[i:], m.SerialNumber)
i = encodeVarint(dAtA, i, uint64(len(m.SerialNumber))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerialNumber)))
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
} }
if m.Status != 0 { if m.Status != 0 {
i = encodeVarint(dAtA, i, uint64(m.Status)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status))
i-- i--
dAtA[i] = 0x30 dAtA[i] = 0x30
} }
if m.BootSpeed != 0 { if m.BootSpeed != 0 {
i = encodeVarint(dAtA, i, uint64(m.BootSpeed)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BootSpeed))
i-- i--
dAtA[i] = 0x28 dAtA[i] = 0x28
} }
if m.MaxSpeed != 0 { if m.MaxSpeed != 0 {
i = encodeVarint(dAtA, i, uint64(m.MaxSpeed)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxSpeed))
i-- i--
dAtA[i] = 0x20 dAtA[i] = 0x20
} }
if len(m.ProductName) > 0 { if len(m.ProductName) > 0 {
i -= len(m.ProductName) i -= len(m.ProductName)
copy(dAtA[i:], m.ProductName) copy(dAtA[i:], m.ProductName)
i = encodeVarint(dAtA, i, uint64(len(m.ProductName))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProductName)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.Manufacturer) > 0 { if len(m.Manufacturer) > 0 {
i -= len(m.Manufacturer) i -= len(m.Manufacturer)
copy(dAtA[i:], m.Manufacturer) copy(dAtA[i:], m.Manufacturer)
i = encodeVarint(dAtA, i, uint64(len(m.Manufacturer))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Manufacturer)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Socket) > 0 { if len(m.Socket) > 0 {
i -= len(m.Socket) i -= len(m.Socket)
copy(dAtA[i:], m.Socket) copy(dAtA[i:], m.Socket)
i = encodeVarint(dAtA, i, uint64(len(m.Socket))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Socket)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -242,66 +242,55 @@ func (m *SystemInformationSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error)
if len(m.SkuNumber) > 0 { if len(m.SkuNumber) > 0 {
i -= len(m.SkuNumber) i -= len(m.SkuNumber)
copy(dAtA[i:], m.SkuNumber) copy(dAtA[i:], m.SkuNumber)
i = encodeVarint(dAtA, i, uint64(len(m.SkuNumber))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SkuNumber)))
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
} }
if len(m.WakeUpType) > 0 { if len(m.WakeUpType) > 0 {
i -= len(m.WakeUpType) i -= len(m.WakeUpType)
copy(dAtA[i:], m.WakeUpType) copy(dAtA[i:], m.WakeUpType)
i = encodeVarint(dAtA, i, uint64(len(m.WakeUpType))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.WakeUpType)))
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
} }
if len(m.Uuid) > 0 { if len(m.Uuid) > 0 {
i -= len(m.Uuid) i -= len(m.Uuid)
copy(dAtA[i:], m.Uuid) copy(dAtA[i:], m.Uuid)
i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uuid)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if len(m.SerialNumber) > 0 { if len(m.SerialNumber) > 0 {
i -= len(m.SerialNumber) i -= len(m.SerialNumber)
copy(dAtA[i:], m.SerialNumber) copy(dAtA[i:], m.SerialNumber)
i = encodeVarint(dAtA, i, uint64(len(m.SerialNumber))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerialNumber)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(m.Version) > 0 { if len(m.Version) > 0 {
i -= len(m.Version) i -= len(m.Version)
copy(dAtA[i:], m.Version) copy(dAtA[i:], m.Version)
i = encodeVarint(dAtA, i, uint64(len(m.Version))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.ProductName) > 0 { if len(m.ProductName) > 0 {
i -= len(m.ProductName) i -= len(m.ProductName)
copy(dAtA[i:], m.ProductName) copy(dAtA[i:], m.ProductName)
i = encodeVarint(dAtA, i, uint64(len(m.ProductName))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProductName)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Manufacturer) > 0 { if len(m.Manufacturer) > 0 {
i -= len(m.Manufacturer) i -= len(m.Manufacturer)
copy(dAtA[i:], m.Manufacturer) copy(dAtA[i:], m.Manufacturer)
i = encodeVarint(dAtA, i, uint64(len(m.Manufacturer))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Manufacturer)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *MemoryModuleSpec) SizeVT() (n int) { func (m *MemoryModuleSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -309,34 +298,34 @@ func (m *MemoryModuleSpec) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.Size != 0 { if m.Size != 0 {
n += 1 + sov(uint64(m.Size)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Size))
} }
l = len(m.DeviceLocator) l = len(m.DeviceLocator)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.BankLocator) l = len(m.BankLocator)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Speed != 0 { if m.Speed != 0 {
n += 1 + sov(uint64(m.Speed)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Speed))
} }
l = len(m.Manufacturer) l = len(m.Manufacturer)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.SerialNumber) l = len(m.SerialNumber)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.AssetTag) l = len(m.AssetTag)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.ProductName) l = len(m.ProductName)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -350,45 +339,45 @@ func (m *ProcessorSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.Socket) l = len(m.Socket)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Manufacturer) l = len(m.Manufacturer)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.ProductName) l = len(m.ProductName)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.MaxSpeed != 0 { if m.MaxSpeed != 0 {
n += 1 + sov(uint64(m.MaxSpeed)) n += 1 + protohelpers.SizeOfVarint(uint64(m.MaxSpeed))
} }
if m.BootSpeed != 0 { if m.BootSpeed != 0 {
n += 1 + sov(uint64(m.BootSpeed)) n += 1 + protohelpers.SizeOfVarint(uint64(m.BootSpeed))
} }
if m.Status != 0 { if m.Status != 0 {
n += 1 + sov(uint64(m.Status)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Status))
} }
l = len(m.SerialNumber) l = len(m.SerialNumber)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.AssetTag) l = len(m.AssetTag)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.PartNumber) l = len(m.PartNumber)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.CoreCount != 0 { if m.CoreCount != 0 {
n += 1 + sov(uint64(m.CoreCount)) n += 1 + protohelpers.SizeOfVarint(uint64(m.CoreCount))
} }
if m.CoreEnabled != 0 { if m.CoreEnabled != 0 {
n += 1 + sov(uint64(m.CoreEnabled)) n += 1 + protohelpers.SizeOfVarint(uint64(m.CoreEnabled))
} }
if m.ThreadCount != 0 { if m.ThreadCount != 0 {
n += 1 + sov(uint64(m.ThreadCount)) n += 1 + protohelpers.SizeOfVarint(uint64(m.ThreadCount))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -402,42 +391,36 @@ func (m *SystemInformationSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.Manufacturer) l = len(m.Manufacturer)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.ProductName) l = len(m.ProductName)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Version) l = len(m.Version)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.SerialNumber) l = len(m.SerialNumber)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Uuid) l = len(m.Uuid)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.WakeUpType) l = len(m.WakeUpType)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.SkuNumber) l = len(m.SkuNumber)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error { func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -446,7 +429,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -474,7 +457,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
m.Size = 0 m.Size = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -493,7 +476,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -507,11 +490,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -525,7 +508,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -539,11 +522,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -557,7 +540,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
m.Speed = 0 m.Speed = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -576,7 +559,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -590,11 +573,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -608,7 +591,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -622,11 +605,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -640,7 +623,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -654,11 +637,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -672,7 +655,7 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -686,11 +669,11 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -699,12 +682,12 @@ func (m *MemoryModuleSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -727,7 +710,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -755,7 +738,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -769,11 +752,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -787,7 +770,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -801,11 +784,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -819,7 +802,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -833,11 +816,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -851,7 +834,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.MaxSpeed = 0 m.MaxSpeed = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -870,7 +853,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.BootSpeed = 0 m.BootSpeed = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -889,7 +872,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.Status = 0 m.Status = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -908,7 +891,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -922,11 +905,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -940,7 +923,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -954,11 +937,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -972,7 +955,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -986,11 +969,11 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1004,7 +987,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.CoreCount = 0 m.CoreCount = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1023,7 +1006,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.CoreEnabled = 0 m.CoreEnabled = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1042,7 +1025,7 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
m.ThreadCount = 0 m.ThreadCount = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1056,12 +1039,12 @@ func (m *ProcessorSpec) UnmarshalVT(dAtA []byte) error {
} }
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1084,7 +1067,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1112,7 +1095,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1126,11 +1109,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1144,7 +1127,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1158,11 +1141,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1176,7 +1159,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1190,11 +1173,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1208,7 +1191,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1222,11 +1205,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1240,7 +1223,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1254,11 +1237,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1272,7 +1255,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1286,11 +1269,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1304,7 +1287,7 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1318,11 +1301,11 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1331,12 +1314,12 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1351,88 +1334,3 @@ func (m *SystemInformationSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/kubeaccess/kubeaccess.proto // source: resource/definitions/kubeaccess/kubeaccess.proto
package kubeaccess package kubeaccess
@ -7,8 +7,8 @@ package kubeaccess
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -53,7 +53,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.AllowedKubernetesNamespaces) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.AllowedKubernetesNamespaces) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AllowedKubernetesNamespaces[iNdEx]) i -= len(m.AllowedKubernetesNamespaces[iNdEx])
copy(dAtA[i:], m.AllowedKubernetesNamespaces[iNdEx]) copy(dAtA[i:], m.AllowedKubernetesNamespaces[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.AllowedKubernetesNamespaces[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AllowedKubernetesNamespaces[iNdEx])))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -62,7 +62,7 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.AllowedApiRoles) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.AllowedApiRoles) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AllowedApiRoles[iNdEx]) i -= len(m.AllowedApiRoles[iNdEx])
copy(dAtA[i:], m.AllowedApiRoles[iNdEx]) copy(dAtA[i:], m.AllowedApiRoles[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.AllowedApiRoles[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AllowedApiRoles[iNdEx])))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -80,17 +80,6 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ConfigSpec) SizeVT() (n int) { func (m *ConfigSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -103,25 +92,19 @@ func (m *ConfigSpec) SizeVT() (n int) {
if len(m.AllowedApiRoles) > 0 { if len(m.AllowedApiRoles) > 0 {
for _, s := range m.AllowedApiRoles { for _, s := range m.AllowedApiRoles {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.AllowedKubernetesNamespaces) > 0 { if len(m.AllowedKubernetesNamespaces) > 0 {
for _, s := range m.AllowedKubernetesNamespaces { for _, s := range m.AllowedKubernetesNamespaces {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error { func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -130,7 +113,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -158,7 +141,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -178,7 +161,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -192,11 +175,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -210,7 +193,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -224,11 +207,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -237,12 +220,12 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -257,88 +240,3 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/proto/proto.proto // source: resource/definitions/proto/proto.proto
package proto package proto
@ -7,8 +7,8 @@ package proto
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -50,17 +50,17 @@ func (m *LinuxIDMapping) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.Size != 0 { if m.Size != 0 {
i = encodeVarint(dAtA, i, uint64(m.Size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size))
i-- i--
dAtA[i] = 0x18 dAtA[i] = 0x18
} }
if m.HostId != 0 { if m.HostId != 0 {
i = encodeVarint(dAtA, i, uint64(m.HostId)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HostId))
i-- i--
dAtA[i] = 0x10 dAtA[i] = 0x10
} }
if m.ContainerId != 0 { if m.ContainerId != 0 {
i = encodeVarint(dAtA, i, uint64(m.ContainerId)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ContainerId))
i-- i--
dAtA[i] = 0x8 dAtA[i] = 0x8
} }
@ -104,7 +104,7 @@ func (m *Mount) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
} }
@ -116,7 +116,7 @@ func (m *Mount) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
@ -125,7 +125,7 @@ func (m *Mount) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Options[iNdEx]) i -= len(m.Options[iNdEx])
copy(dAtA[i:], m.Options[iNdEx]) copy(dAtA[i:], m.Options[iNdEx])
i = encodeVarint(dAtA, i, uint64(len(m.Options[iNdEx]))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Options[iNdEx])))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
@ -133,38 +133,27 @@ func (m *Mount) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Source) > 0 { if len(m.Source) > 0 {
i -= len(m.Source) i -= len(m.Source)
copy(dAtA[i:], m.Source) copy(dAtA[i:], m.Source)
i = encodeVarint(dAtA, i, uint64(len(m.Source))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Source)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.Type) > 0 { if len(m.Type) > 0 {
i -= len(m.Type) i -= len(m.Type)
copy(dAtA[i:], m.Type) copy(dAtA[i:], m.Type)
i = encodeVarint(dAtA, i, uint64(len(m.Type))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Destination) > 0 { if len(m.Destination) > 0 {
i -= len(m.Destination) i -= len(m.Destination)
copy(dAtA[i:], m.Destination) copy(dAtA[i:], m.Destination)
i = encodeVarint(dAtA, i, uint64(len(m.Destination))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Destination)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *LinuxIDMapping) SizeVT() (n int) { func (m *LinuxIDMapping) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -172,13 +161,13 @@ func (m *LinuxIDMapping) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.ContainerId != 0 { if m.ContainerId != 0 {
n += 1 + sov(uint64(m.ContainerId)) n += 1 + protohelpers.SizeOfVarint(uint64(m.ContainerId))
} }
if m.HostId != 0 { if m.HostId != 0 {
n += 1 + sov(uint64(m.HostId)) n += 1 + protohelpers.SizeOfVarint(uint64(m.HostId))
} }
if m.Size != 0 { if m.Size != 0 {
n += 1 + sov(uint64(m.Size)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Size))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -192,44 +181,38 @@ func (m *Mount) SizeVT() (n int) {
_ = l _ = l
l = len(m.Destination) l = len(m.Destination)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Type) l = len(m.Type)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Source) l = len(m.Source)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.Options) > 0 { if len(m.Options) > 0 {
for _, s := range m.Options { for _, s := range m.Options {
l = len(s) l = len(s)
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.UidMappings) > 0 { if len(m.UidMappings) > 0 {
for _, e := range m.UidMappings { for _, e := range m.UidMappings {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
if len(m.GidMappings) > 0 { if len(m.GidMappings) > 0 {
for _, e := range m.GidMappings { for _, e := range m.GidMappings {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error { func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -238,7 +221,7 @@ func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -266,7 +249,7 @@ func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
m.ContainerId = 0 m.ContainerId = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -285,7 +268,7 @@ func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
m.HostId = 0 m.HostId = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -304,7 +287,7 @@ func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
m.Size = 0 m.Size = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -318,12 +301,12 @@ func (m *LinuxIDMapping) UnmarshalVT(dAtA []byte) error {
} }
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -346,7 +329,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -374,7 +357,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -388,11 +371,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -406,7 +389,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -420,11 +403,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -438,7 +421,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -452,11 +435,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -470,7 +453,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -484,11 +467,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -502,7 +485,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -515,11 +498,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -536,7 +519,7 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -549,11 +532,11 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -565,12 +548,12 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -585,88 +568,3 @@ func (m *Mount) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/siderolink/siderolink.proto // source: resource/definitions/siderolink/siderolink.proto
package siderolink package siderolink
@ -7,8 +7,8 @@ package siderolink
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -52,24 +52,13 @@ func (m *ConfigSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.ApiEndpoint) > 0 { if len(m.ApiEndpoint) > 0 {
i -= len(m.ApiEndpoint) i -= len(m.ApiEndpoint)
copy(dAtA[i:], m.ApiEndpoint) copy(dAtA[i:], m.ApiEndpoint)
i = encodeVarint(dAtA, i, uint64(len(m.ApiEndpoint))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ApiEndpoint)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ConfigSpec) SizeVT() (n int) { func (m *ConfigSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -78,18 +67,12 @@ func (m *ConfigSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.ApiEndpoint) l = len(m.ApiEndpoint)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error { func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -98,7 +81,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -126,7 +109,7 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -140,11 +123,11 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -153,12 +136,12 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -173,88 +156,3 @@ func (m *ConfigSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/time/time.proto // source: resource/definitions/time/time.proto
package time package time
@ -9,11 +9,11 @@ import (
fmt "fmt" fmt "fmt"
io "io" io "io"
math "math" math "math"
bits "math/bits"
proto "google.golang.org/protobuf/proto" protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb" durationpb1 "google.golang.org/protobuf/types/known/durationpb"
) )
const ( const (
@ -56,7 +56,7 @@ func (m *AdjtimeStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.State) > 0 { if len(m.State) > 0 {
i -= len(m.State) i -= len(m.State)
copy(dAtA[i:], m.State) copy(dAtA[i:], m.State)
i = encodeVarint(dAtA, i, uint64(len(m.State))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.State)))
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
@ -71,58 +71,34 @@ func (m *AdjtimeStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
dAtA[i] = 0x38 dAtA[i] = 0x38
} }
if m.Constant != 0 { if m.Constant != 0 {
i = encodeVarint(dAtA, i, uint64(m.Constant)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Constant))
i-- i--
dAtA[i] = 0x30 dAtA[i] = 0x30
} }
if len(m.Status) > 0 { if len(m.Status) > 0 {
i -= len(m.Status) i -= len(m.Status)
copy(dAtA[i:], m.Status) copy(dAtA[i:], m.Status)
i = encodeVarint(dAtA, i, uint64(len(m.Status))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Status)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if m.EstError != nil { if m.EstError != nil {
if vtmsg, ok := interface{}(m.EstError).(interface { size, err := (*durationpb.Duration)(m.EstError).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.EstError)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if m.MaxError != nil { if m.MaxError != nil {
if vtmsg, ok := interface{}(m.MaxError).(interface { size, err := (*durationpb.Duration)(m.MaxError).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.MaxError)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
@ -133,24 +109,12 @@ func (m *AdjtimeStatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
dAtA[i] = 0x11 dAtA[i] = 0x11
} }
if m.Offset != nil { if m.Offset != nil {
if vtmsg, ok := interface{}(m.Offset).(interface { size, err := (*durationpb.Duration)(m.Offset).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.Offset)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -198,7 +162,7 @@ func (m *StatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
dAtA[i] = 0x18 dAtA[i] = 0x18
} }
if m.Epoch != 0 { if m.Epoch != 0 {
i = encodeVarint(dAtA, i, uint64(m.Epoch)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Epoch))
i-- i--
dAtA[i] = 0x10 dAtA[i] = 0x10
} }
@ -215,17 +179,6 @@ func (m *StatusSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *AdjtimeStatusSpec) SizeVT() (n int) { func (m *AdjtimeStatusSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -233,51 +186,33 @@ func (m *AdjtimeStatusSpec) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.Offset != nil { if m.Offset != nil {
if size, ok := interface{}(m.Offset).(interface { l = (*durationpb.Duration)(m.Offset).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.Offset)
}
n += 1 + l + sov(uint64(l))
} }
if m.FrequencyAdjustmentRatio != 0 { if m.FrequencyAdjustmentRatio != 0 {
n += 9 n += 9
} }
if m.MaxError != nil { if m.MaxError != nil {
if size, ok := interface{}(m.MaxError).(interface { l = (*durationpb.Duration)(m.MaxError).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.MaxError)
}
n += 1 + l + sov(uint64(l))
} }
if m.EstError != nil { if m.EstError != nil {
if size, ok := interface{}(m.EstError).(interface { l = (*durationpb.Duration)(m.EstError).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.EstError)
}
n += 1 + l + sov(uint64(l))
} }
l = len(m.Status) l = len(m.Status)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Constant != 0 { if m.Constant != 0 {
n += 1 + sov(uint64(m.Constant)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Constant))
} }
if m.SyncStatus { if m.SyncStatus {
n += 2 n += 2
} }
l = len(m.State) l = len(m.State)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -293,7 +228,7 @@ func (m *StatusSpec) SizeVT() (n int) {
n += 2 n += 2
} }
if m.Epoch != 0 { if m.Epoch != 0 {
n += 1 + sov(uint64(m.Epoch)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Epoch))
} }
if m.SyncDisabled { if m.SyncDisabled {
n += 2 n += 2
@ -302,12 +237,6 @@ func (m *StatusSpec) SizeVT() (n int) {
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error { func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -316,7 +245,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -344,7 +273,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -357,28 +286,20 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.Offset == nil { if m.Offset == nil {
m.Offset = &durationpb.Duration{} m.Offset = &durationpb1.Duration{}
} }
if unmarshal, ok := interface{}(m.Offset).(interface { if err := (*durationpb.Duration)(m.Offset).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Offset); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
@ -399,7 +320,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -412,28 +333,20 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.MaxError == nil { if m.MaxError == nil {
m.MaxError = &durationpb.Duration{} m.MaxError = &durationpb1.Duration{}
} }
if unmarshal, ok := interface{}(m.MaxError).(interface { if err := (*durationpb.Duration)(m.MaxError).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.MaxError); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
case 4: case 4:
@ -443,7 +356,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -456,28 +369,20 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.EstError == nil { if m.EstError == nil {
m.EstError = &durationpb.Duration{} m.EstError = &durationpb1.Duration{}
} }
if unmarshal, ok := interface{}(m.EstError).(interface { if err := (*durationpb.Duration)(m.EstError).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.EstError); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
case 5: case 5:
@ -487,7 +392,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -501,11 +406,11 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -519,7 +424,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
m.Constant = 0 m.Constant = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -538,7 +443,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -558,7 +463,7 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -572,11 +477,11 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -585,12 +490,12 @@ func (m *AdjtimeStatusSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -613,7 +518,7 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -641,7 +546,7 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -661,7 +566,7 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
m.Epoch = 0 m.Epoch = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -680,7 +585,7 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -695,12 +600,12 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
m.SyncDisabled = bool(v != 0) m.SyncDisabled = bool(v != 0)
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -715,88 +620,3 @@ func (m *StatusSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/definitions/v1alpha1/v1alpha1.proto // source: resource/definitions/v1alpha1/v1alpha1.proto
package v1alpha1 package v1alpha1
@ -7,8 +7,8 @@ package v1alpha1
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -82,17 +82,6 @@ func (m *ServiceSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ServiceSpec) SizeVT() (n int) { func (m *ServiceSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -112,12 +101,6 @@ func (m *ServiceSpec) SizeVT() (n int) {
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error { func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -126,7 +109,7 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -154,7 +137,7 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -174,7 +157,7 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -194,7 +177,7 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -209,12 +192,12 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
m.Unknown = bool(v != 0) m.Unknown = bool(v != 0)
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -229,88 +212,3 @@ func (m *ServiceSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: resource/network/device_config.proto // source: resource/network/device_config.proto
package network package network
@ -7,8 +7,8 @@ package network
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -52,24 +52,13 @@ func (m *DeviceConfigSpecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error)
if len(m.YamlMarshalled) > 0 { if len(m.YamlMarshalled) > 0 {
i -= len(m.YamlMarshalled) i -= len(m.YamlMarshalled)
copy(dAtA[i:], m.YamlMarshalled) copy(dAtA[i:], m.YamlMarshalled)
i = encodeVarint(dAtA, i, uint64(len(m.YamlMarshalled))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.YamlMarshalled)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *DeviceConfigSpecSpec) SizeVT() (n int) { func (m *DeviceConfigSpecSpec) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -78,18 +67,12 @@ func (m *DeviceConfigSpecSpec) SizeVT() (n int) {
_ = l _ = l
l = len(m.YamlMarshalled) l = len(m.YamlMarshalled)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error { func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -98,7 +81,7 @@ func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -126,7 +109,7 @@ func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -139,11 +122,11 @@ func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -155,12 +138,12 @@ func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -175,88 +158,3 @@ func (m *DeviceConfigSpecSpec) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: security/security.proto // source: security/security.proto
package security package security
@ -7,8 +7,8 @@ package security
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
@ -52,7 +52,7 @@ func (m *CertificateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Csr) > 0 { if len(m.Csr) > 0 {
i -= len(m.Csr) i -= len(m.Csr)
copy(dAtA[i:], m.Csr) copy(dAtA[i:], m.Csr)
i = encodeVarint(dAtA, i, uint64(len(m.Csr))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Csr)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -92,31 +92,20 @@ func (m *CertificateResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Crt) > 0 { if len(m.Crt) > 0 {
i -= len(m.Crt) i -= len(m.Crt)
copy(dAtA[i:], m.Crt) copy(dAtA[i:], m.Crt)
i = encodeVarint(dAtA, i, uint64(len(m.Crt))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Crt)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Ca) > 0 { if len(m.Ca) > 0 {
i -= len(m.Ca) i -= len(m.Ca)
copy(dAtA[i:], m.Ca) copy(dAtA[i:], m.Ca)
i = encodeVarint(dAtA, i, uint64(len(m.Ca))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ca)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *CertificateRequest) SizeVT() (n int) { func (m *CertificateRequest) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -125,7 +114,7 @@ func (m *CertificateRequest) SizeVT() (n int) {
_ = l _ = l
l = len(m.Csr) l = len(m.Csr)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -139,22 +128,16 @@ func (m *CertificateResponse) SizeVT() (n int) {
_ = l _ = l
l = len(m.Ca) l = len(m.Ca)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Crt) l = len(m.Crt)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error { func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -163,7 +146,7 @@ func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -191,7 +174,7 @@ func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -204,11 +187,11 @@ func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -220,12 +203,12 @@ func (m *CertificateRequest) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -248,7 +231,7 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -276,7 +259,7 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -289,11 +272,11 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -310,7 +293,7 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
var byteLen int var byteLen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -323,11 +306,11 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
} }
} }
if byteLen < 0 { if byteLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + byteLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -339,12 +322,12 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -359,88 +342,3 @@ func (m *CertificateResponse) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: storage/storage.proto // source: storage/storage.proto
package storage package storage
@ -7,8 +7,8 @@ package storage
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
proto "google.golang.org/protobuf/proto" proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@ -65,7 +65,7 @@ func (m *Disk) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Subsystem) > 0 { if len(m.Subsystem) > 0 {
i -= len(m.Subsystem) i -= len(m.Subsystem)
copy(dAtA[i:], m.Subsystem) copy(dAtA[i:], m.Subsystem)
i = encodeVarint(dAtA, i, uint64(len(m.Subsystem))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subsystem)))
i-- i--
dAtA[i] = 0x62 dAtA[i] = 0x62
} }
@ -82,66 +82,66 @@ func (m *Disk) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.BusPath) > 0 { if len(m.BusPath) > 0 {
i -= len(m.BusPath) i -= len(m.BusPath)
copy(dAtA[i:], m.BusPath) copy(dAtA[i:], m.BusPath)
i = encodeVarint(dAtA, i, uint64(len(m.BusPath))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BusPath)))
i-- i--
dAtA[i] = 0x52 dAtA[i] = 0x52
} }
if m.Type != 0 { if m.Type != 0 {
i = encodeVarint(dAtA, i, uint64(m.Type)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type))
i-- i--
dAtA[i] = 0x48 dAtA[i] = 0x48
} }
if len(m.Wwid) > 0 { if len(m.Wwid) > 0 {
i -= len(m.Wwid) i -= len(m.Wwid)
copy(dAtA[i:], m.Wwid) copy(dAtA[i:], m.Wwid)
i = encodeVarint(dAtA, i, uint64(len(m.Wwid))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Wwid)))
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
if len(m.Uuid) > 0 { if len(m.Uuid) > 0 {
i -= len(m.Uuid) i -= len(m.Uuid)
copy(dAtA[i:], m.Uuid) copy(dAtA[i:], m.Uuid)
i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uuid)))
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
} }
if len(m.Modalias) > 0 { if len(m.Modalias) > 0 {
i -= len(m.Modalias) i -= len(m.Modalias)
copy(dAtA[i:], m.Modalias) copy(dAtA[i:], m.Modalias)
i = encodeVarint(dAtA, i, uint64(len(m.Modalias))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Modalias)))
i-- i--
dAtA[i] = 0x32 dAtA[i] = 0x32
} }
if len(m.Serial) > 0 { if len(m.Serial) > 0 {
i -= len(m.Serial) i -= len(m.Serial)
copy(dAtA[i:], m.Serial) copy(dAtA[i:], m.Serial)
i = encodeVarint(dAtA, i, uint64(len(m.Serial))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Serial)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x2a
} }
if len(m.Name) > 0 { if len(m.Name) > 0 {
i -= len(m.Name) i -= len(m.Name)
copy(dAtA[i:], m.Name) copy(dAtA[i:], m.Name)
i = encodeVarint(dAtA, i, uint64(len(m.Name))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if len(m.DeviceName) > 0 { if len(m.DeviceName) > 0 {
i -= len(m.DeviceName) i -= len(m.DeviceName)
copy(dAtA[i:], m.DeviceName) copy(dAtA[i:], m.DeviceName)
i = encodeVarint(dAtA, i, uint64(len(m.DeviceName))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeviceName)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.Model) > 0 { if len(m.Model) > 0 {
i -= len(m.Model) i -= len(m.Model)
copy(dAtA[i:], m.Model) copy(dAtA[i:], m.Model)
i = encodeVarint(dAtA, i, uint64(len(m.Model))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Model)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if m.Size != 0 { if m.Size != 0 {
i = encodeVarint(dAtA, i, uint64(m.Size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size))
i-- i--
dAtA[i] = 0x8 dAtA[i] = 0x8
} }
@ -185,7 +185,7 @@ func (m *Disks) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -199,7 +199,7 @@ func (m *Disks) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.Metadata) encoded, err := proto.Marshal(m.Metadata)
if err != nil { if err != nil {
@ -207,7 +207,7 @@ func (m *Disks) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
@ -252,7 +252,7 @@ func (m *DisksResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -260,17 +260,6 @@ func (m *DisksResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Disk) SizeVT() (n int) { func (m *Disk) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -278,49 +267,49 @@ func (m *Disk) SizeVT() (n int) {
var l int var l int
_ = l _ = l
if m.Size != 0 { if m.Size != 0 {
n += 1 + sov(uint64(m.Size)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Size))
} }
l = len(m.Model) l = len(m.Model)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.DeviceName) l = len(m.DeviceName)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Name) l = len(m.Name)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Serial) l = len(m.Serial)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Modalias) l = len(m.Modalias)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Uuid) l = len(m.Uuid)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Wwid) l = len(m.Wwid)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Type != 0 { if m.Type != 0 {
n += 1 + sov(uint64(m.Type)) n += 1 + protohelpers.SizeOfVarint(uint64(m.Type))
} }
l = len(m.BusPath) l = len(m.BusPath)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.SystemDisk { if m.SystemDisk {
n += 2 n += 2
} }
l = len(m.Subsystem) l = len(m.Subsystem)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Readonly { if m.Readonly {
n += 2 n += 2
@ -343,12 +332,12 @@ func (m *Disks) SizeVT() (n int) {
} else { } else {
l = proto.Size(m.Metadata) l = proto.Size(m.Metadata)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if len(m.Disks) > 0 { if len(m.Disks) > 0 {
for _, e := range m.Disks { for _, e := range m.Disks {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
@ -364,19 +353,13 @@ func (m *DisksResponse) SizeVT() (n int) {
if len(m.Messages) > 0 { if len(m.Messages) > 0 {
for _, e := range m.Messages { for _, e := range m.Messages {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Disk) UnmarshalVT(dAtA []byte) error { func (m *Disk) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -385,7 +368,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -413,7 +396,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
m.Size = 0 m.Size = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -432,7 +415,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -446,11 +429,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -464,7 +447,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -478,11 +461,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -496,7 +479,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -510,11 +493,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -528,7 +511,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -542,11 +525,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -560,7 +543,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -574,11 +557,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -592,7 +575,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -606,11 +589,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -624,7 +607,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -638,11 +621,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -656,7 +639,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
m.Type = 0 m.Type = 0
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -675,7 +658,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -689,11 +672,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -707,7 +690,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -727,7 +710,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -741,11 +724,11 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -759,7 +742,7 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
var v int var v int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -774,12 +757,12 @@ func (m *Disk) UnmarshalVT(dAtA []byte) error {
m.Readonly = bool(v != 0) m.Readonly = bool(v != 0)
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -802,7 +785,7 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -830,7 +813,7 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -843,11 +826,11 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -874,7 +857,7 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -887,11 +870,11 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -903,12 +886,12 @@ func (m *Disks) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -931,7 +914,7 @@ func (m *DisksResponse) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -959,7 +942,7 @@ func (m *DisksResponse) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -972,11 +955,11 @@ func (m *DisksResponse) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -988,12 +971,12 @@ func (m *DisksResponse) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -1008,88 +991,3 @@ func (m *DisksResponse) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.5.0 // protoc-gen-go-vtproto version: v0.6.0
// source: time/time.proto // source: time/time.proto
package time package time
@ -7,11 +7,12 @@ package time
import ( import (
fmt "fmt" fmt "fmt"
io "io" io "io"
bits "math/bits"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
timestamppb "github.com/planetscale/vtprotobuf/types/known/timestamppb"
proto "google.golang.org/protobuf/proto" proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb" timestamppb1 "google.golang.org/protobuf/types/known/timestamppb"
common "github.com/siderolabs/talos/pkg/machinery/api/common" common "github.com/siderolabs/talos/pkg/machinery/api/common"
) )
@ -56,7 +57,7 @@ func (m *TimeRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if len(m.Server) > 0 { if len(m.Server) > 0 {
i -= len(m.Server) i -= len(m.Server)
copy(dAtA[i:], m.Server) copy(dAtA[i:], m.Server)
i = encodeVarint(dAtA, i, uint64(len(m.Server))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Server)))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -94,53 +95,29 @@ func (m *Time) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
copy(dAtA[i:], m.unknownFields) copy(dAtA[i:], m.unknownFields)
} }
if m.Remotetime != nil { if m.Remotetime != nil {
if vtmsg, ok := interface{}(m.Remotetime).(interface { size, err := (*timestamppb.Timestamp)(m.Remotetime).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.Remotetime)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x22
} }
if m.Localtime != nil { if m.Localtime != nil {
if vtmsg, ok := interface{}(m.Localtime).(interface { size, err := (*timestamppb.Timestamp)(m.Localtime).MarshalToSizedBufferVT(dAtA[:i])
MarshalToSizedBufferVT([]byte) (int, error) if err != nil {
}); ok { return 0, err
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
} else {
encoded, err := proto.Marshal(m.Localtime)
if err != nil {
return 0, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded)))
} }
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x1a
} }
if len(m.Server) > 0 { if len(m.Server) > 0 {
i -= len(m.Server) i -= len(m.Server)
copy(dAtA[i:], m.Server) copy(dAtA[i:], m.Server)
i = encodeVarint(dAtA, i, uint64(len(m.Server))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Server)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
@ -153,7 +130,7 @@ func (m *Time) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
} else { } else {
encoded, err := proto.Marshal(m.Metadata) encoded, err := proto.Marshal(m.Metadata)
if err != nil { if err != nil {
@ -161,7 +138,7 @@ func (m *Time) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
} }
i -= len(encoded) i -= len(encoded)
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = encodeVarint(dAtA, i, uint64(len(encoded))) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
} }
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
@ -206,7 +183,7 @@ func (m *TimeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return 0, err return 0, err
} }
i -= size i -= size
i = encodeVarint(dAtA, i, uint64(size)) i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
@ -214,17 +191,6 @@ func (m *TimeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *TimeRequest) SizeVT() (n int) { func (m *TimeRequest) SizeVT() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -233,7 +199,7 @@ func (m *TimeRequest) SizeVT() (n int) {
_ = l _ = l
l = len(m.Server) l = len(m.Server)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -253,31 +219,19 @@ func (m *Time) SizeVT() (n int) {
} else { } else {
l = proto.Size(m.Metadata) l = proto.Size(m.Metadata)
} }
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
l = len(m.Server) l = len(m.Server)
if l > 0 { if l > 0 {
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
if m.Localtime != nil { if m.Localtime != nil {
if size, ok := interface{}(m.Localtime).(interface { l = (*timestamppb.Timestamp)(m.Localtime).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.Localtime)
}
n += 1 + l + sov(uint64(l))
} }
if m.Remotetime != nil { if m.Remotetime != nil {
if size, ok := interface{}(m.Remotetime).(interface { l = (*timestamppb.Timestamp)(m.Remotetime).SizeVT()
SizeVT() int n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}); ok {
l = size.SizeVT()
} else {
l = proto.Size(m.Remotetime)
}
n += 1 + l + sov(uint64(l))
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
@ -292,19 +246,13 @@ func (m *TimeResponse) SizeVT() (n int) {
if len(m.Messages) > 0 { if len(m.Messages) > 0 {
for _, e := range m.Messages { for _, e := range m.Messages {
l = e.SizeVT() l = e.SizeVT()
n += 1 + l + sov(uint64(l)) n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
} }
} }
n += len(m.unknownFields) n += len(m.unknownFields)
return n return n
} }
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *TimeRequest) UnmarshalVT(dAtA []byte) error { func (m *TimeRequest) UnmarshalVT(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -313,7 +261,7 @@ func (m *TimeRequest) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -341,7 +289,7 @@ func (m *TimeRequest) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -355,11 +303,11 @@ func (m *TimeRequest) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -368,12 +316,12 @@ func (m *TimeRequest) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -396,7 +344,7 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -424,7 +372,7 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -437,11 +385,11 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -468,7 +416,7 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
var stringLen uint64 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -482,11 +430,11 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
} }
intStringLen := int(stringLen) intStringLen := int(stringLen)
if intStringLen < 0 { if intStringLen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + intStringLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -500,7 +448,7 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -513,28 +461,20 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.Localtime == nil { if m.Localtime == nil {
m.Localtime = &timestamppb.Timestamp{} m.Localtime = &timestamppb1.Timestamp{}
} }
if unmarshal, ok := interface{}(m.Localtime).(interface { if err := (*timestamppb.Timestamp)(m.Localtime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Localtime); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
case 4: case 4:
@ -544,7 +484,7 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -557,38 +497,30 @@ func (m *Time) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.Remotetime == nil { if m.Remotetime == nil {
m.Remotetime = &timestamppb.Timestamp{} m.Remotetime = &timestamppb1.Timestamp{}
} }
if unmarshal, ok := interface{}(m.Remotetime).(interface { if err := (*timestamppb.Timestamp)(m.Remotetime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
UnmarshalVT([]byte) error return err
}); ok {
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
} else {
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Remotetime); err != nil {
return err
}
} }
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -611,7 +543,7 @@ func (m *TimeResponse) UnmarshalVT(dAtA []byte) error {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -639,7 +571,7 @@ func (m *TimeResponse) UnmarshalVT(dAtA []byte) error {
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflow return protohelpers.ErrIntOverflow
} }
if iNdEx >= l { if iNdEx >= l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -652,11 +584,11 @@ func (m *TimeResponse) UnmarshalVT(dAtA []byte) error {
} }
} }
if msglen < 0 { if msglen < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
postIndex := iNdEx + msglen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -668,12 +600,12 @@ func (m *TimeResponse) UnmarshalVT(dAtA []byte) error {
iNdEx = postIndex iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:]) skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil { if err != nil {
return err return err
} }
if (skippy < 0) || (iNdEx+skippy) < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength return protohelpers.ErrInvalidLength
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
@ -688,88 +620,3 @@ func (m *TimeResponse) UnmarshalVT(dAtA []byte) error {
} }
return nil return nil
} }
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -655,7 +655,6 @@ func (c *Client) ServiceInfo(ctx context.Context, id string, callOptions ...grpc
&emptypb.Empty{}, &emptypb.Empty{},
callOptions..., callOptions...,
) )
if err != nil { if err != nil {
return services, err return services, err
} }

View File

@ -212,7 +212,6 @@ func (c *Client) EventsWatchV2(ctx context.Context, ch chan<- EventResult, opts
} }
} }
}() }()
if err != nil { if err != nil {
select { select {
case ch <- EventResult{Error: err}: case ch <- EventResult{Error: err}:

View File

@ -312,9 +312,11 @@ config:
d := decoder.NewDecoder() d := decoder.NewDecoder()
actual, err := d.Decode(bytes.NewReader(tt.source)) actual, err := d.Decode(bytes.NewReader(tt.source))
if tt.expected != nil { if tt.expected != nil {
assert.Equal(t, tt.expected, actual) assert.Equal(t, tt.expected, actual)
} }
if tt.expectedErr == "" { if tt.expectedErr == "" {
assert.NoError(t, err) assert.NoError(t, err)
} else { } else {

View File

@ -19,7 +19,6 @@ func TestParseType(t *testing.T) {
t.Run("Values", func(t *testing.T) { t.Run("Values", func(t *testing.T) {
// We have to use the same values as defined in proto as we use direct type conversions in many places. // We have to use the same values as defined in proto as we use direct type conversions in many places.
assert.EqualValues(t, machineapi.MachineConfig_TYPE_UNKNOWN, machine.TypeUnknown) assert.EqualValues(t, machineapi.MachineConfig_TYPE_UNKNOWN, machine.TypeUnknown)
assert.EqualValues(t, machineapi.MachineConfig_TYPE_INIT, machine.TypeInit) assert.EqualValues(t, machineapi.MachineConfig_TYPE_INIT, machine.TypeInit)
assert.EqualValues(t, machineapi.MachineConfig_TYPE_CONTROL_PLANE, machine.TypeControlPlane) assert.EqualValues(t, machineapi.MachineConfig_TYPE_CONTROL_PLANE, machine.TypeControlPlane)

View File

@ -9,7 +9,7 @@ replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b
require ( require (
github.com/blang/semver/v4 v4.0.0 github.com/blang/semver/v4 v4.0.0
github.com/containerd/go-cni v1.1.9 github.com/containerd/go-cni v1.1.9
github.com/cosi-project/runtime v0.4.0-alpha.4 github.com/cosi-project/runtime v0.4.0-alpha.5
github.com/dustin/go-humanize v1.0.1 github.com/dustin/go-humanize v1.0.1
github.com/evanphx/json-patch v5.9.0+incompatible github.com/evanphx/json-patch v5.9.0+incompatible
github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml v1.0.0
@ -17,6 +17,7 @@ require (
github.com/jsimonetti/rtnetlink v1.4.1 github.com/jsimonetti/rtnetlink v1.4.1
github.com/mdlayher/ethtool v0.1.0 github.com/mdlayher/ethtool v0.1.0
github.com/opencontainers/runtime-spec v1.1.0 github.com/opencontainers/runtime-spec v1.1.0
github.com/planetscale/vtprotobuf v0.6.0
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/siderolabs/crypto v0.4.1 github.com/siderolabs/crypto v0.4.1
github.com/siderolabs/gen v0.4.7 github.com/siderolabs/gen v0.4.7
@ -26,7 +27,7 @@ require (
github.com/siderolabs/net v0.4.0 github.com/siderolabs/net v0.4.0
github.com/siderolabs/protoenc v0.2.1 github.com/siderolabs/protoenc v0.2.1
github.com/stretchr/testify v1.8.4 github.com/stretchr/testify v1.8.4
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014
google.golang.org/grpc v1.61.0 google.golang.org/grpc v1.61.0
google.golang.org/protobuf v1.32.0 google.golang.org/protobuf v1.32.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1

View File

@ -22,8 +22,8 @@ github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9
github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM=
github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ=
github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw=
github.com/cosi-project/runtime v0.4.0-alpha.4 h1:3TN+Y0NVKa/1QXqR3QTJ6ceWrcflyUeIZbQnrU2BprM= github.com/cosi-project/runtime v0.4.0-alpha.5 h1:23xzdFn/8rduI+Y5odBAyQF+Q93r/eG6jyrYuLr6pA8=
github.com/cosi-project/runtime v0.4.0-alpha.4/go.mod h1:JE9yuyufGRCd28AyCWFkTNf3UMiZJT722bpfPEPnsNE= github.com/cosi-project/runtime v0.4.0-alpha.5/go.mod h1:JE9yuyufGRCd28AyCWFkTNf3UMiZJT722bpfPEPnsNE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -106,6 +106,8 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA=
github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
@ -230,12 +232,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 h1:FSL3lRCkhaPFxqi0s9o+V4UI2WTzAVOvkgbd4kVV4Wg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014/go.mod h1:SaPjaZGWb0lPqs6Ittu0spdfrOArqji4ZdeP5IC/9N4=
google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=

View File

@ -49,8 +49,8 @@ func (p *provisioner) Reflect(ctx context.Context, clusterName, stateDirectory s
} }
mtuStr := network.Options["com.docker.network.driver.mtu"] mtuStr := network.Options["com.docker.network.driver.mtu"]
res.clusterInfo.Network.MTU, err = strconv.Atoi(mtuStr)
res.clusterInfo.Network.MTU, err = strconv.Atoi(mtuStr)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -8,7 +8,7 @@ import (
"net" "net"
"time" "time"
"github.com/pin/tftp" "github.com/pin/tftp/v3"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
"github.com/siderolabs/talos/pkg/provision/providers/vm/internal/ipxe" "github.com/siderolabs/talos/pkg/provision/providers/vm/internal/ipxe"