Skip to content

Commit

Permalink
chore(deps): update wrpc bindgen
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Adossi <[email protected]>
  • Loading branch information
vados-cosmonic committed Nov 25, 2024
1 parent 0467cdc commit 9287b43
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 8 deletions.
89 changes: 85 additions & 4 deletions bindings/exports/wasmcloud/couchbase/document/bindings.wrpc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen-wrpc-go` 0.9.1. DO NOT EDIT!
// Generated by `wit-bindgen-wrpc-go` 0.11.0. DO NOT EDIT!
package document

import (
Expand Down Expand Up @@ -2670,6 +2670,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -2752,6 +2755,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -3177,6 +3183,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -3348,6 +3357,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -3430,6 +3442,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -3902,6 +3917,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -4073,6 +4091,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -4155,6 +4176,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -4600,6 +4624,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -4771,6 +4798,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -4859,11 +4889,14 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
return nil, fmt.Errorf("failed to read list length byte: %w", err)
}
if s == 28 && b > 0x0f {
return nil, errors.New("list length overflows a 32-bit integer")
}
if b < 0x80 {
if i == 4 && b > 1 {
return nil, errors.New("list length overflows a 32-bit integer")
}
x = x | uint32(b)<<s
if x == 0 {
return nil, nil
}
vs := make([]string, x)
for i := range vs {
slog.Debug("reading list element", "i", i)
Expand All @@ -4887,6 +4920,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -5192,6 +5228,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -5363,6 +5402,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -5611,6 +5653,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -5782,6 +5827,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -6030,6 +6078,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -6256,6 +6307,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -6635,6 +6689,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -6806,6 +6863,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -7081,6 +7141,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -7252,6 +7315,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -7527,6 +7593,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -7690,6 +7759,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -7965,6 +8037,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -8136,6 +8211,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -8411,6 +8489,9 @@ func ServeInterface(s wrpc.Server, h Handler) (stop func() error, err error) {
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down
2 changes: 1 addition & 1 deletion bindings/interfaces.wrpc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen-wrpc-go` 0.9.1. DO NOT EDIT!
// Generated by `wit-bindgen-wrpc-go` 0.11.0. DO NOT EDIT!
// interfaces package contains wRPC bindings for `interfaces` world
package interfaces

Expand Down
8 changes: 7 additions & 1 deletion bindings/wasmcloud/couchbase/types/bindings.wrpc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen-wrpc-go` 0.9.1. DO NOT EDIT!
// Generated by `wit-bindgen-wrpc-go` 0.11.0. DO NOT EDIT!
package types

import (
Expand Down Expand Up @@ -1301,6 +1301,9 @@ func DocumentValue_ToString(ctx__ context.Context, wrpc__ wrpc.Invoker, self wrp
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down Expand Up @@ -1469,6 +1472,9 @@ func DocumentValue_FromJson(ctx__ context.Context, wrpc__ wrpc.Invoker, json str
}
if b < 0x80 {
x = x | uint32(b)<<s
if x == 0 {
return "", nil
}
buf := make([]byte, x)
slog.Debug("reading string bytes", "len", x)
_, err = r.Read(buf)
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"syscall"
"time"

server "github.com/couchbase-examples/wasmcloud-provider-couchbase/bindings"
wrpc "github.com/couchbase-examples/wasmcloud-provider-couchbase/bindings"
gocbt "github.com/couchbase/gocb-opentelemetry"
"github.com/couchbase/gocb/v2"
"go.opentelemetry.io/otel"
Expand Down Expand Up @@ -63,7 +63,7 @@ func run() error {
signalCh := make(chan os.Signal, 1)

// Handle RPC operations
stopFunc, err := server.Serve(p.RPCClient, &providerHandler)
stopFunc, err := wrpc.Serve(p.RPCClient, &providerHandler)
if err != nil {
p.Shutdown()
return err
Expand Down

0 comments on commit 9287b43

Please sign in to comment.