diff --git a/bass/bass.bass b/bass/bass.bass index d88db87b..889c6d46 100644 --- a/bass/bass.bass +++ b/bass/bass.bass @@ -50,24 +50,28 @@ ($ go mod download)))) (provide [build smoke-test tests docs coverage] + (defn dist [src version os arch] + (subpath + (with-deps-and-shims + ($ make + (str "VERSION=" version) + (str "GOOS=" os) + (str "GOARCH=" arch) + "DESTDIR=./dist/" + install) + src) + ./dist/)) + ; compiles a bass binary for the given platform and puts it in an archive (defn build [src version os arch] - (let [staged (with-shims - ($ make - (str "VERSION=" version) - (str "GOOS=" os) - (str "GOARCH=" arch) - "DESTDIR=./dist/" - install) - src)] - (archive src staged/dist/ os arch))) - - (defn with-shims [thunk src] + (archive src (dist src version os arch) os arch)) + + (defn with-deps-and-shims [thunk src] (let [only-shim (subgit src ./pkg/runtimes/ship/ ./Makefile ./go.mod ./go.sum) - built (make-shims only-shim)] + built-shims (make-shims only-shim)] (-> thunk (with-mount src ./) - (with-mount built/pkg/runtimes/bin/ ./pkg/runtimes/bin/) + (with-mount built-shims/pkg/runtimes/bin/ ./pkg/runtimes/bin/) (with-image (deps+go src))))) ; returns a thunk with the make targets built into the output directory, as @@ -123,17 +127,26 @@ (map (fn [image] (check-dist dist image)) smoke-tests)) - (defn with-deps [thunk src] - (-> thunk - (wrap-cmd ./hack/with-deps) ; TODO: maybe swap the order here - (with-shims src) - ; runtime tests currently need elevated privileges - insecure!)) + (def *buildkit-version* "v0.10.3") + + (def buildkitd + (from (linux/moby/buildkit (string->symbol *buildkit-version*)) + (-> ($ buildkitd --addr "tcp://0.0.0.0:6107") + (with-port :grpc 6107) + insecure!))) + + (defn with-bass-and-buildkitd [thunk src] + (let [built-bass (dist src "dev" "linux" "amd64")] + (-> thunk + (with-env {:BUILDKIT_HOST (addr buildkitd :grpc "tcp://$host:$port")}) + (with-mount built-bass/bass /bin/bass) + ; TODO: would be nice to set this one var rather than replace them all + (with-deps-and-shims src)))) ; returns a directory containing the built docs HTML (defn docs [src] (-> ($ ./docs/scripts/build) - (with-deps src) + (with-bass-and-buildkitd src) (subpath ./docs/))) ; returns a thunk that runs the tests @@ -144,7 +157,7 @@ -coverprofile ./cover.out -covermode count & $testflags) - (with-deps src))) + (with-bass-and-buildkitd src))) ; returns a thunk that will run the tests and return cover.html (defn coverage [src testflags] diff --git a/bass/bass.lock b/bass/bass.lock index cbfd0702..d125a944 100644 --- a/bass/bass.lock +++ b/bass/bass.lock @@ -50,6 +50,14 @@ memos: { } output: { object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "alpine/git" + } + } + } bindings: { symbol: "platform" value: { @@ -65,14 +73,6 @@ memos: { } } } - bindings: { - symbol: "repository" - value: { - string: { - value: "alpine/git" - } - } - } bindings: { symbol: "tag" value: { @@ -85,7 +85,7 @@ memos: { symbol: "digest" value: { string: { - value: "sha256:23dcd3edfd1d9c7cbb14f7823d07a4934716cfa4d4dbc402d37ee011c440a685" + value: "sha256:760aaf0d59c93f87572ec40dee1efd10a7ea13a78dff1f59a904e908449329ae" } } } @@ -134,6 +134,14 @@ memos: { } output: { object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "ubuntu" + } + } + } bindings: { symbol: "platform" value: { @@ -149,14 +157,6 @@ memos: { } } } - bindings: { - symbol: "repository" - value: { - string: { - value: "ubuntu" - } - } - } bindings: { symbol: "tag" value: { @@ -169,7 +169,7 @@ memos: { symbol: "digest" value: { string: { - value: "sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac" + value: "sha256:34fea4f31bf187bc915536831fd0afc9d214755bf700b5cdb1336c82516d154e" } } } @@ -218,6 +218,14 @@ memos: { } output: { object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "alpine" + } + } + } bindings: { symbol: "platform" value: { @@ -233,11 +241,87 @@ memos: { } } } + bindings: { + symbol: "tag" + value: { + string: { + value: "latest" + } + } + } + bindings: { + symbol: "digest" + value: { + string: { + value: "sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872" + } + } + } + } + } + } + results: { + input: { + array: { + values: { + object: { + bindings: { + symbol: "platform" + value: { + object: { + bindings: { + symbol: "os" + value: { + string: { + value: "linux" + } + } + } + } + } + } + bindings: { + symbol: "repository" + value: { + string: { + value: "moby/buildkit" + } + } + } + bindings: { + symbol: "tag" + value: { + string: { + value: "v0.10.3" + } + } + } + } + } + } + } + output: { + object: { bindings: { symbol: "repository" value: { string: { - value: "alpine" + value: "moby/buildkit" + } + } + } + bindings: { + symbol: "platform" + value: { + object: { + bindings: { + symbol: "os" + value: { + string: { + value: "linux" + } + } + } } } } @@ -245,7 +329,7 @@ memos: { symbol: "tag" value: { string: { - value: "latest" + value: "v0.10.3" } } } @@ -253,7 +337,7 @@ memos: { symbol: "digest" value: { string: { - value: "sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c" + value: "sha256:0dc312b04eac1b44cd2cad566deb1e886c753109208affbbec8384f381ff7f38" } } } @@ -332,7 +416,7 @@ memos: { } output: { string: { - value: "b3109bfbd35fd036bb53872e5d96efbe4e70d63c" + value: "d04ee56d1947e0f7b1178f98915be6cfab1f6198" } } } @@ -353,7 +437,7 @@ memos: { } output: { string: { - value: "287efdc670dfa5a0b830dba24213e20cb1afe199" + value: "c6c74c982a0b14ecd50a1a35c2f7ebbb33ad4cab" } } } @@ -429,7 +513,83 @@ memos: { } output: { string: { - value: "b3109bfbd35fd036bb53872e5d96efbe4e70d63c" + value: "d04ee56d1947e0f7b1178f98915be6cfab1f6198" + } + } + } + } +} +memos: { + module: { + cmd: { + command: { + name: "git" + } + } + stdin: { + object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "alpine/git" + } + } + } + bindings: { + symbol: "platform" + value: { + object: { + bindings: { + symbol: "os" + value: { + string: { + value: "linux" + } + } + } + } + } + } + bindings: { + symbol: "tag" + value: { + string: { + value: "latest" + } + } + } + bindings: { + symbol: "digest" + value: { + string: { + value: "sha256:760aaf0d59c93f87572ec40dee1efd10a7ea13a78dff1f59a904e908449329ae" + } + } + } + } + } + } + calls: { + binding: "ls-remote" + results: { + input: { + array: { + values: { + string: { + value: "https://github.com/vito/tabs" + } + } + values: { + string: { + value: "main" + } + } + } + } + output: { + string: { + value: "d04ee56d1947e0f7b1178f98915be6cfab1f6198" } } } diff --git a/cmd/bass/bump.go b/cmd/bass/bump.go index 4bd18139..0eec4a2e 100644 --- a/cmd/bass/bump.go +++ b/cmd/bass/bump.go @@ -14,69 +14,79 @@ import ( func bump(ctx context.Context) error { return cli.Task(ctx, cmdline, func(ctx context.Context, vertex *progrock.VertexRecorder) error { - lockContent, err := os.ReadFile(bumpLock) + for _, bumpLock := range flags.Args() { + if err := bumpLockfile(ctx, bumpLock); err != nil { + return err + } + } + + return nil + }) +} + +func bumpLockfile(ctx context.Context, bumpLock string) error { + lockContent, err := os.ReadFile(bumpLock) + if err != nil { + return err + } + + content := &proto.Memosphere{} + err = prototext.Unmarshal(lockContent, content) + if err != nil { + return err + } + + for _, memo := range content.Memos { + thunk := bass.Thunk{} + err := thunk.UnmarshalProto(memo.Module) if err != nil { return err } - content := &proto.Memosphere{} - err = prototext.Unmarshal(lockContent, content) + scope, err := bass.Bass.Load(ctx, thunk) if err != nil { return err } - for _, memo := range content.Memos { - thunk := bass.Thunk{} - err := thunk.UnmarshalProto(memo.Module) - if err != nil { - return err - } + for _, call := range memo.Calls { + binding := bass.Symbol(call.Binding) - scope, err := bass.Bass.Load(ctx, thunk) + var comb bass.Combiner + err = scope.GetDecode(binding, &comb) if err != nil { return err } - for _, call := range memo.Calls { - binding := bass.Symbol(call.Binding) - - var comb bass.Combiner - err = scope.GetDecode(binding, &comb) + for _, res := range call.Results { + input, err := bass.FromProto(res.Input) if err != nil { return err } - for _, res := range call.Results { - input, err := bass.FromProto(res.Input) - if err != nil { - return err - } - - out, err := bass.Trampoline(ctx, comb.Call(ctx, input, bass.NewEmptyScope(), bass.Identity)) - if err != nil { - return err - } - - output, err := bass.MarshalProto(out) - if err != nil { - return err - } + out, err := bass.Trampoline(ctx, comb.Call(ctx, input, bass.NewEmptyScope(), bass.Identity)) + if err != nil { + return err + } - res.Output = output + output, err := bass.MarshalProto(out) + if err != nil { + return err } + + res.Output = output } } + } - payload, err := prototext.MarshalOptions{Multiline: true}.Marshal(content) - if err != nil { - return err - } + payload, err := prototext.MarshalOptions{Multiline: true}.Marshal(content) + if err != nil { + return err + } - fmted, err := parser.Format(payload) - if err != nil { - return err - } + fmted, err := parser.Format(payload) + if err != nil { + return err + } - return os.WriteFile(bumpLock, fmted, 0644) - }) + return os.WriteFile(bumpLock, fmted, 0644) } diff --git a/cmd/bass/main.go b/cmd/bass/main.go index befd3dc6..bb742946 100644 --- a/cmd/bass/main.go +++ b/cmd/bass/main.go @@ -27,7 +27,7 @@ var inputs []string var runRun bool var runExport bool -var bumpLock string +var runBump bool var runPrune bool var runnerAddr string @@ -49,7 +49,7 @@ func init() { flags.BoolVarP(&runExport, "export", "e", false, "write a thunk path to stdout as a tar stream, or log the tar contents if stdout is a tty") flags.BoolVar(&runRun, "run", false, "run a thunk read from stdin in JSON format") - flags.StringVarP(&bumpLock, "bump", "b", "", "re-generate all values in a bass.lock file") + flags.BoolVarP(&runBump, "bump", "b", false, "re-generate all calls in bass.lock files") flags.BoolVarP(&runPrune, "prune", "p", false, "release data and caches retained by runtimes") @@ -181,7 +181,7 @@ func root(ctx context.Context) error { return langServer(ctx) } - if bumpLock != "" { + if runBump { return cli.WithProgress(ctx, bump) } diff --git a/demos/bass.lock b/demos/bass.lock index d59d0809..d4915626 100644 --- a/demos/bass.lock +++ b/demos/bass.lock @@ -50,6 +50,14 @@ memos: { } output: { object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "alpine/git" + } + } + } bindings: { symbol: "platform" value: { @@ -65,14 +73,6 @@ memos: { } } } - bindings: { - symbol: "repository" - value: { - string: { - value: "alpine/git" - } - } - } bindings: { symbol: "tag" value: { @@ -164,7 +164,7 @@ memos: { } output: { string: { - value: "b3109bfbd35fd036bb53872e5d96efbe4e70d63c" + value: "d04ee56d1947e0f7b1178f98915be6cfab1f6198" } } } @@ -240,7 +240,7 @@ memos: { } output: { string: { - value: "b3109bfbd35fd036bb53872e5d96efbe4e70d63c" + value: "d04ee56d1947e0f7b1178f98915be6cfab1f6198" } } } diff --git a/docs/scripts/booklit b/docs/scripts/booklit index c18866bd..d046f881 100755 --- a/docs/scripts/booklit +++ b/docs/scripts/booklit @@ -4,6 +4,8 @@ set -e -u -x cd $(dirname $0)/.. +export PATH=$(go env GOPATH)/bin:$PATH + go install github.com/vito/booklit/cmd/booklit booklit -i ./lit/index.lit \ diff --git a/hack/with-deps b/hack/with-deps deleted file mode 100755 index 2b0f0fa8..00000000 --- a/hack/with-deps +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e -u - -$(dirname $0)/buildkit/start -trap "$(dirname $0)/buildkit/stop" EXIT - -echo "waiting for buildkitd..." >&2 -until buildctl debug workers >&2; do - echo "waiting for buildkitd..." >&2 - sleep 0.5 -done - -dest=$(go env GOPATH)/bin -make -j "DESTDIR=${dest}" install -export PATH="$PATH:${dest}" - -bass --version - -"$@" diff --git a/pkg/bass/proto.go b/pkg/bass/proto.go index beb8e45e..63fc751a 100644 --- a/pkg/bass/proto.go +++ b/pkg/bass/proto.go @@ -98,6 +98,13 @@ func FromProto(val *proto.Value) (Value, error) { return tp, nil case *proto.Value_CommandPath: return CommandPath{x.CommandPath.Name}, nil + case *proto.Value_ThunkAddr: + var ta ThunkAddr + if err := ta.UnmarshalProto(x.ThunkAddr); err != nil { + return nil, err + } + + return ta, nil default: return nil, fmt.Errorf("unexpected type %T", x) } diff --git a/pkg/bass/thunk_types.go b/pkg/bass/thunk_types.go index 67752351..5b04881e 100644 --- a/pkg/bass/thunk_types.go +++ b/pkg/bass/thunk_types.go @@ -95,9 +95,9 @@ func (ref *ImageRef) UnmarshalProto(msg proto.Message) error { return fmt.Errorf("platform: %w", err) } - switch repo := p.GetRepository().(type) { - case *proto.ImageRef_Static: - ref.Repository.Static = repo.Static + switch repo := p.GetSource().(type) { + case *proto.ImageRef_Repository: + ref.Repository.Static = repo.Repository case *proto.ImageRef_Addr: ref.Repository.Addr = &ThunkAddr{} if err := ref.Repository.Addr.UnmarshalProto(repo.Addr); err != nil { @@ -128,8 +128,8 @@ func (ref ImageRef) MarshalProto() (proto.Message, error) { } if ref.Repository.Static != "" { - pv.Repository = &proto.ImageRef_Static{ - Static: ref.Repository.Static, + pv.Source = &proto.ImageRef_Repository{ + Repository: ref.Repository.Static, } } else if ref.Repository.Addr != nil { tp, err := ref.Repository.Addr.MarshalProto() @@ -137,7 +137,7 @@ func (ref ImageRef) MarshalProto() (proto.Message, error) { return nil, fmt.Errorf("file: %w", err) } - pv.Repository = &proto.ImageRef_Addr{ + pv.Source = &proto.ImageRef_Addr{ Addr: tp.(*proto.ThunkAddr), } } @@ -357,25 +357,40 @@ func (img *ThunkImage) UnmarshalProto(msg proto.Message) error { if protoImage.GetRef() != nil { i := protoImage.GetRef() - img.Ref = &ImageRef{} + // TODO: pre-0.10.0 backwards compatibility + if i.GetFile() != nil { + img.Archive = &ImageArchive{} - if i.GetStatic() != "" { - img.Ref.Repository.Static = i.GetStatic() - } + if err := img.Archive.File.UnmarshalProto(i.GetFile()); err != nil { + return err + } - if i.GetAddr() != nil { - img.Ref.Repository.Addr = &ThunkAddr{} - if err := img.Ref.Repository.Addr.UnmarshalProto(i.GetAddr()); err != nil { + if err := img.Archive.Platform.UnmarshalProto(i.GetPlatform()); err != nil { return err } - } - if err := img.Ref.Platform.UnmarshalProto(i.Platform); err != nil { - return err - } + img.Archive.Tag = i.GetTag() + } else { + img.Ref = &ImageRef{} - img.Ref.Tag = i.GetTag() - img.Ref.Digest = i.GetDigest() + if i.GetRepository() != "" { + img.Ref.Repository.Static = i.GetRepository() + } + + if i.GetAddr() != nil { + img.Ref.Repository.Addr = &ThunkAddr{} + if err := img.Ref.Repository.Addr.UnmarshalProto(i.GetAddr()); err != nil { + return err + } + } + + if err := img.Ref.Platform.UnmarshalProto(i.GetPlatform()); err != nil { + return err + } + + img.Ref.Tag = i.GetTag() + img.Ref.Digest = i.GetDigest() + } } else if protoImage.GetThunk() != nil { img.Thunk = &Thunk{} if err := img.Thunk.UnmarshalProto(protoImage.GetThunk()); err != nil { @@ -389,7 +404,7 @@ func (img *ThunkImage) UnmarshalProto(msg proto.Message) error { return err } - if err := img.Archive.Platform.UnmarshalProto(i.Platform); err != nil { + if err := img.Archive.Platform.UnmarshalProto(i.GetPlatform()); err != nil { return err } diff --git a/pkg/proto/bass.pb.go b/pkg/proto/bass.pb.go index 51034ddd..68c448eb 100644 --- a/pkg/proto/bass.pb.go +++ b/pkg/proto/bass.pb.go @@ -618,13 +618,14 @@ type ImageRef struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Repository: - // *ImageRef_Static + // Types that are assignable to Source: + // *ImageRef_Repository + // *ImageRef_File // *ImageRef_Addr - Repository isImageRef_Repository `protobuf_oneof:"repository"` - Platform *Platform `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` - Tag *string `protobuf:"bytes,4,opt,name=tag,proto3,oneof" json:"tag,omitempty"` - Digest *string `protobuf:"bytes,5,opt,name=digest,proto3,oneof" json:"digest,omitempty"` + Source isImageRef_Source `protobuf_oneof:"source"` + Platform *Platform `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + Tag *string `protobuf:"bytes,4,opt,name=tag,proto3,oneof" json:"tag,omitempty"` + Digest *string `protobuf:"bytes,5,opt,name=digest,proto3,oneof" json:"digest,omitempty"` } func (x *ImageRef) Reset() { @@ -659,22 +660,30 @@ func (*ImageRef) Descriptor() ([]byte, []int) { return file_bass_proto_rawDescGZIP(), []int{5} } -func (m *ImageRef) GetRepository() isImageRef_Repository { +func (m *ImageRef) GetSource() isImageRef_Source { if m != nil { - return m.Repository + return m.Source } return nil } -func (x *ImageRef) GetStatic() string { - if x, ok := x.GetRepository().(*ImageRef_Static); ok { - return x.Static +func (x *ImageRef) GetRepository() string { + if x, ok := x.GetSource().(*ImageRef_Repository); ok { + return x.Repository } return "" } +// Deprecated: Do not use. +func (x *ImageRef) GetFile() *ThunkPath { + if x, ok := x.GetSource().(*ImageRef_File); ok { + return x.File + } + return nil +} + func (x *ImageRef) GetAddr() *ThunkAddr { - if x, ok := x.GetRepository().(*ImageRef_Addr); ok { + if x, ok := x.GetSource().(*ImageRef_Addr); ok { return x.Addr } return nil @@ -701,22 +710,28 @@ func (x *ImageRef) GetDigest() string { return "" } -type isImageRef_Repository interface { - isImageRef_Repository() +type isImageRef_Source interface { + isImageRef_Source() } -type ImageRef_Static struct { - Static string `protobuf:"bytes,2,opt,name=static,proto3,oneof"` +type ImageRef_Repository struct { + Repository string `protobuf:"bytes,2,opt,name=repository,proto3,oneof"` +} + +type ImageRef_File struct { + // Deprecated: Do not use. + File *ThunkPath `protobuf:"bytes,3,opt,name=file,proto3,oneof"` } type ImageRef_Addr struct { - // ThunkPath file = 3; Addr *ThunkAddr `protobuf:"bytes,6,opt,name=addr,proto3,oneof"` } -func (*ImageRef_Static) isImageRef_Repository() {} +func (*ImageRef_Repository) isImageRef_Source() {} + +func (*ImageRef_File) isImageRef_Source() {} -func (*ImageRef_Addr) isImageRef_Repository() {} +func (*ImageRef_Addr) isImageRef_Source() {} type ImageArchive struct { state protoimpl.MessageState @@ -2280,140 +2295,143 @@ var file_bass_proto_rawDesc = []byte{ 0x12, 0x2e, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x48, 0x00, 0x52, 0x07, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x08, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x12, 0x25, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x48, - 0x00, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, - 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, - 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x0a, - 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, - 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x22, 0x2e, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x22, 0x8d, 0x02, 0x0a, 0x08, 0x54, 0x68, 0x75, - 0x6e, 0x6b, 0x43, 0x6d, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x68, - 0x75, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, - 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x74, 0x68, - 0x75, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, - 0x68, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x6c, 0x6f, 0x67, - 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, - 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, - 0x07, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x42, 0x05, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x08, 0x54, 0x68, 0x75, - 0x6e, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x50, - 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, - 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, - 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, - 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, - 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x64, - 0x69, 0x72, 0x22, 0xeb, 0x01, 0x0a, 0x10, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, - 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, - 0x12, 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, - 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x6f, - 0x67, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x26, - 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x22, 0x6a, 0x0a, 0x0a, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2c, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x05, - 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x23, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x06, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x42, 0x69, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, - 0x44, 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x1c, 0x0a, - 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x03, 0x49, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, - 0x1c, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, - 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x1e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x22, 0x1d, 0x0a, 0x07, 0x44, 0x69, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x08, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, + 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x04, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x64, + 0x64, 0x72, 0x48, 0x00, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, 0x08, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, + 0x61, 0x73, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, + 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x08, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x88, 0x01, 0x01, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x61, 0x67, 0x22, 0x2e, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x22, 0x8d, 0x02, 0x0a, 0x08, 0x54, 0x68, 0x75, 0x6e, + 0x6b, 0x43, 0x6d, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x68, 0x75, + 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, + 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x74, 0x68, 0x75, + 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x69, + 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, + 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x07, + 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x42, 0x05, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x08, 0x54, 0x68, 0x75, 0x6e, + 0x6b, 0x44, 0x69, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x50, 0x61, + 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, 0x74, + 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, + 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x74, + 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x64, 0x69, + 0x72, 0x22, 0xeb, 0x01, 0x0a, 0x10, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, + 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x12, + 0x24, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x62, 0x61, 0x73, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x26, 0x0a, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x62, 0x61, 0x73, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0x6a, 0x0a, 0x0a, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2c, 0x0a, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x05, 0x41, + 0x72, 0x72, 0x61, 0x79, 0x12, 0x23, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x06, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x44, + 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, + 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x1c, 0x0a, 0x04, + 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x03, 0x49, 0x6e, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1c, + 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x0b, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x1e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, - 0x61, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x74, - 0x68, 0x12, 0x24, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, - 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x50, - 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x03, 0x64, 0x69, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x22, 0x58, 0x0a, 0x09, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x21, 0x0a, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x74, 0x68, 0x75, - 0x6e, 0x6b, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x4e, 0x0a, 0x08, - 0x48, 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xec, 0x01, 0x0a, - 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x04, - 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x61, 0x73, - 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x46, 0x69, - 0x6c, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x69, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, - 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x69, 0x72, 0x48, 0x00, - 0x52, 0x03, 0x64, 0x69, 0x72, 0x1a, 0x34, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x46, 0x0a, 0x03, 0x44, - 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, - 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0b, 0x5a, 0x09, 0x70, - 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1d, 0x0a, 0x07, 0x44, 0x69, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x61, + 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x24, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, + 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x50, 0x61, + 0x74, 0x68, 0x48, 0x00, 0x52, 0x03, 0x64, 0x69, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x22, 0x58, 0x0a, 0x09, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, + 0x0a, 0x05, 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x62, 0x61, 0x73, 0x73, 0x2e, 0x54, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x74, 0x68, 0x75, 0x6e, + 0x6b, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x4e, 0x0a, 0x08, 0x48, + 0x6f, 0x73, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xec, 0x01, 0x0a, 0x0b, + 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x04, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x61, 0x73, 0x73, + 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x69, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x44, 0x69, 0x72, 0x48, 0x00, 0x52, + 0x03, 0x64, 0x69, 0x72, 0x1a, 0x34, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x46, 0x0a, 0x03, 0x44, 0x69, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x73, 0x2e, 0x4c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2490,43 +2508,44 @@ var file_bass_proto_depIdxs = []int32{ 5, // 25: bass.ThunkImage.ref:type_name -> bass.ImageRef 1, // 26: bass.ThunkImage.thunk:type_name -> bass.Thunk 6, // 27: bass.ThunkImage.archive:type_name -> bass.ImageArchive - 2, // 28: bass.ImageRef.addr:type_name -> bass.ThunkAddr - 7, // 29: bass.ImageRef.platform:type_name -> bass.Platform - 25, // 30: bass.ImageArchive.file:type_name -> bass.ThunkPath - 7, // 31: bass.ImageArchive.platform:type_name -> bass.Platform - 21, // 32: bass.ThunkCmd.command:type_name -> bass.CommandPath - 22, // 33: bass.ThunkCmd.file:type_name -> bass.FilePath - 25, // 34: bass.ThunkCmd.thunk:type_name -> bass.ThunkPath - 26, // 35: bass.ThunkCmd.host:type_name -> bass.HostPath - 27, // 36: bass.ThunkCmd.logical:type_name -> bass.LogicalPath - 19, // 37: bass.ThunkCmd.cache:type_name -> bass.CachePath - 23, // 38: bass.ThunkDir.local:type_name -> bass.DirPath - 25, // 39: bass.ThunkDir.thunk:type_name -> bass.ThunkPath - 26, // 40: bass.ThunkDir.host:type_name -> bass.HostPath - 25, // 41: bass.ThunkMountSource.thunk:type_name -> bass.ThunkPath - 26, // 42: bass.ThunkMountSource.host:type_name -> bass.HostPath - 27, // 43: bass.ThunkMountSource.logical:type_name -> bass.LogicalPath - 19, // 44: bass.ThunkMountSource.cache:type_name -> bass.CachePath - 20, // 45: bass.ThunkMountSource.secret:type_name -> bass.Secret - 10, // 46: bass.ThunkMount.source:type_name -> bass.ThunkMountSource - 24, // 47: bass.ThunkMount.target:type_name -> bass.FilesystemPath - 0, // 48: bass.Array.values:type_name -> bass.Value - 14, // 49: bass.Object.bindings:type_name -> bass.Binding - 0, // 50: bass.Binding.value:type_name -> bass.Value - 24, // 51: bass.CachePath.path:type_name -> bass.FilesystemPath - 22, // 52: bass.FilesystemPath.file:type_name -> bass.FilePath - 23, // 53: bass.FilesystemPath.dir:type_name -> bass.DirPath - 1, // 54: bass.ThunkPath.thunk:type_name -> bass.Thunk - 24, // 55: bass.ThunkPath.path:type_name -> bass.FilesystemPath - 24, // 56: bass.HostPath.path:type_name -> bass.FilesystemPath - 28, // 57: bass.LogicalPath.file:type_name -> bass.LogicalPath.File - 29, // 58: bass.LogicalPath.dir:type_name -> bass.LogicalPath.Dir - 27, // 59: bass.LogicalPath.Dir.entries:type_name -> bass.LogicalPath - 60, // [60:60] is the sub-list for method output_type - 60, // [60:60] is the sub-list for method input_type - 60, // [60:60] is the sub-list for extension type_name - 60, // [60:60] is the sub-list for extension extendee - 0, // [0:60] is the sub-list for field type_name + 25, // 28: bass.ImageRef.file:type_name -> bass.ThunkPath + 2, // 29: bass.ImageRef.addr:type_name -> bass.ThunkAddr + 7, // 30: bass.ImageRef.platform:type_name -> bass.Platform + 25, // 31: bass.ImageArchive.file:type_name -> bass.ThunkPath + 7, // 32: bass.ImageArchive.platform:type_name -> bass.Platform + 21, // 33: bass.ThunkCmd.command:type_name -> bass.CommandPath + 22, // 34: bass.ThunkCmd.file:type_name -> bass.FilePath + 25, // 35: bass.ThunkCmd.thunk:type_name -> bass.ThunkPath + 26, // 36: bass.ThunkCmd.host:type_name -> bass.HostPath + 27, // 37: bass.ThunkCmd.logical:type_name -> bass.LogicalPath + 19, // 38: bass.ThunkCmd.cache:type_name -> bass.CachePath + 23, // 39: bass.ThunkDir.local:type_name -> bass.DirPath + 25, // 40: bass.ThunkDir.thunk:type_name -> bass.ThunkPath + 26, // 41: bass.ThunkDir.host:type_name -> bass.HostPath + 25, // 42: bass.ThunkMountSource.thunk:type_name -> bass.ThunkPath + 26, // 43: bass.ThunkMountSource.host:type_name -> bass.HostPath + 27, // 44: bass.ThunkMountSource.logical:type_name -> bass.LogicalPath + 19, // 45: bass.ThunkMountSource.cache:type_name -> bass.CachePath + 20, // 46: bass.ThunkMountSource.secret:type_name -> bass.Secret + 10, // 47: bass.ThunkMount.source:type_name -> bass.ThunkMountSource + 24, // 48: bass.ThunkMount.target:type_name -> bass.FilesystemPath + 0, // 49: bass.Array.values:type_name -> bass.Value + 14, // 50: bass.Object.bindings:type_name -> bass.Binding + 0, // 51: bass.Binding.value:type_name -> bass.Value + 24, // 52: bass.CachePath.path:type_name -> bass.FilesystemPath + 22, // 53: bass.FilesystemPath.file:type_name -> bass.FilePath + 23, // 54: bass.FilesystemPath.dir:type_name -> bass.DirPath + 1, // 55: bass.ThunkPath.thunk:type_name -> bass.Thunk + 24, // 56: bass.ThunkPath.path:type_name -> bass.FilesystemPath + 24, // 57: bass.HostPath.path:type_name -> bass.FilesystemPath + 28, // 58: bass.LogicalPath.file:type_name -> bass.LogicalPath.File + 29, // 59: bass.LogicalPath.dir:type_name -> bass.LogicalPath.Dir + 27, // 60: bass.LogicalPath.Dir.entries:type_name -> bass.LogicalPath + 61, // [61:61] is the sub-list for method output_type + 61, // [61:61] is the sub-list for method input_type + 61, // [61:61] is the sub-list for extension type_name + 61, // [61:61] is the sub-list for extension extendee + 0, // [0:61] is the sub-list for field type_name } func init() { file_bass_proto_init() } @@ -2919,7 +2938,8 @@ func file_bass_proto_init() { (*ThunkImage_Archive)(nil), } file_bass_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*ImageRef_Static)(nil), + (*ImageRef_Repository)(nil), + (*ImageRef_File)(nil), (*ImageRef_Addr)(nil), } file_bass_proto_msgTypes[6].OneofWrappers = []interface{}{} diff --git a/pkg/runtimes/buildkit.go b/pkg/runtimes/buildkit.go index b06ad089..4d0e1883 100644 --- a/pkg/runtimes/buildkit.go +++ b/pkg/runtimes/buildkit.go @@ -132,6 +132,10 @@ func NewBuildkit(ctx context.Context, _ bass.RuntimePool, cfg *bass.Scope) (bass } func dialBuildkit(ctx context.Context, addr string) (*kitdclient.Client, error) { + if addr == "" { + addr = os.Getenv("BUILDKIT_HOST") + } + if addr == "" { sockPath, err := xdg.SearchConfigFile("bass/buildkitd.sock") if err == nil { diff --git a/pkg/runtimes/testdata/bass.lock b/pkg/runtimes/testdata/bass.lock index a98b183e..f4b123b1 100644 --- a/pkg/runtimes/testdata/bass.lock +++ b/pkg/runtimes/testdata/bass.lock @@ -50,6 +50,14 @@ memos: { } output: { object: { + bindings: { + symbol: "repository" + value: { + string: { + value: "alpine" + } + } + } bindings: { symbol: "platform" value: { @@ -65,14 +73,6 @@ memos: { } } } - bindings: { - symbol: "repository" - value: { - string: { - value: "alpine" - } - } - } bindings: { symbol: "tag" value: { @@ -85,7 +85,7 @@ memos: { symbol: "digest" value: { string: { - value: "sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c" + value: "sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872" } } } diff --git a/proto/bass.proto b/proto/bass.proto index 5521d182..0e58c0b4 100644 --- a/proto/bass.proto +++ b/proto/bass.proto @@ -56,9 +56,9 @@ message ThunkImage { } message ImageRef { - oneof repository { - string static = 2; - /* ThunkPath file = 3; */ + oneof source { + string repository = 2; + ThunkPath file = 3 [deprecated=true]; ThunkAddr addr = 6; }; Platform platform = 1;