diff --git a/.github/workflows/main_darwin.yml b/.github/workflows/main_darwin.yml index 2791bce3..eb3f3a25 100644 --- a/.github/workflows/main_darwin.yml +++ b/.github/workflows/main_darwin.yml @@ -12,6 +12,7 @@ jobs: strategy: matrix: os: [ macos-12, macos-13, macos-13-xlarge, macos-14 ] + cgo: [ '1', '0' ] runs-on: ${{ matrix.os }} steps: - name: Git checkout @@ -22,5 +23,7 @@ jobs: with: go-version: 1.22 - # Parallel tests - - run: go test ./... + - name: Go test + env: + CGO_ENABLED: ${{ matrix.cgo }} + run: go test ./... diff --git a/.github/workflows/main_linux.yml b/.github/workflows/main_linux.yml index e9cbd9e1..149baacd 100644 --- a/.github/workflows/main_linux.yml +++ b/.github/workflows/main_linux.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest ] + cgo: [ '1', '0' ] runs-on: ${{ matrix.os }} steps: - name: Git checkout @@ -21,11 +22,10 @@ jobs: with: go-version: 1.22 - - name: CGO_ENABLED=0 go test - run: CGO_ENABLED=0 go test ./... - - - name: CGO_ENABLED=1 go test - run: CGO_ENABLED=1 go test ./... + - name: Go test + env: + CGO_ENABLED: ${{ matrix.cgo }} + run: go test ./... - run: go test -v -coverprofile=profile.cov ./... - uses: shogo82148/actions-goveralls@v1 diff --git a/.github/workflows/main_windows.yml b/.github/workflows/main_windows.yml index 050f26d9..dd66e691 100644 --- a/.github/workflows/main_windows.yml +++ b/.github/workflows/main_windows.yml @@ -7,7 +7,11 @@ on: - "releases/*" jobs: build-and-test: - runs-on: windows-2019 + strategy: + matrix: + os: [ windows-latest ] + cgo: [ '1', '0' ] + runs-on: ${{ matrix.os }} steps: - name: Git checkout uses: actions/checkout@v4 @@ -17,5 +21,7 @@ jobs: with: go-version: 1.22 - # Parallel tests - - run: go test ./... + - name: Go test + env: + CGO_ENABLED: ${{ matrix.cgo }} + run: go test ./... diff --git a/go.mod b/go.mod index 3144960f..bed54859 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 - kcl-lang.io/lib v0.10.0-rc.1 + kcl-lang.io/lib v0.10.0-rc.2 ) require ( diff --git a/go.sum b/go.sum index c555cb9a..8c477343 100644 --- a/go.sum +++ b/go.sum @@ -115,5 +115,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -kcl-lang.io/lib v0.10.0-rc.1 h1:HRHMW2ane3mjKMVBUQQVvln9Z7FDkUJVXRWEVXPtP+w= -kcl-lang.io/lib v0.10.0-rc.1/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs= +kcl-lang.io/lib v0.10.0-rc.2 h1:zMiwQVKzKqLD0gRPuKdDgX0MzbcWe8a+IlsXhhWeUvk= +kcl-lang.io/lib v0.10.0-rc.2/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs= diff --git a/kcl.go b/kcl.go index 56349dbb..3f2e47ba 100644 --- a/kcl.go +++ b/kcl.go @@ -36,7 +36,6 @@ import ( "kcl-lang.io/kcl-go/pkg/kcl" "kcl-lang.io/kcl-go/pkg/loader" "kcl-lang.io/kcl-go/pkg/parser" - "kcl-lang.io/kcl-go/pkg/runtime" "kcl-lang.io/kcl-go/pkg/tools/format" "kcl-lang.io/kcl-go/pkg/tools/lint" "kcl-lang.io/kcl-go/pkg/tools/list" @@ -71,16 +70,6 @@ type ( ParseProgramResult = parser.ParseProgramResult ) -// InitKclvmPath init kclvm path. -func InitKclvmPath(kclvmRoot string) { - runtime.InitKclvmRoot(kclvmRoot) -} - -// InitKclvmRuntime init kclvm process. -func InitKclvmRuntime(n int) { - runtime.InitRuntime(n) -} - // MustRun is like Run but panics if return any error. func MustRun(path string, opts ...Option) *KCLResultList { return kcl.MustRun(path, opts...) diff --git a/kcl_test.go b/kcl_test.go index dcf59761..0fe6e192 100644 --- a/kcl_test.go +++ b/kcl_test.go @@ -7,12 +7,10 @@ package kcl_test import ( "bytes" - "flag" "os" "path/filepath" "reflect" "sort" - "strconv" "strings" "testing" @@ -25,21 +23,6 @@ import ( "kcl-lang.io/kcl-go/pkg/spec/gpyrpc" ) -const tEnvNumCpu = "KCL_GO_API_TEST_NUM_CPU" - -func TestMain(m *testing.M) { - flag.Parse() - - if s := os.Getenv(tEnvNumCpu); s != "" { - if x, err := strconv.Atoi(s); err == nil { - println(tEnvNumCpu, "=", s) - kcl.InitKclvmRuntime(x) - } - } - - os.Exit(m.Run()) -} - func TestStreamResult(t *testing.T) { file, err := filepath.Abs("./testdata/stream/one_stream.k") if err != nil { diff --git a/pkg/3rdparty/dlopen/dlopen_unix.go b/pkg/3rdparty/dlopen/dlopen_unix.go deleted file mode 100644 index 67ade530..00000000 --- a/pkg/3rdparty/dlopen/dlopen_unix.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2016 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build linux || darwin -// +build linux darwin - -// Package dlopen provides some convenience functions to dlopen a library and -// get its symbols. -package dlopen - -// #cgo LDFLAGS: -ldl -// #include -// #include -import "C" -import ( - "errors" - "fmt" - "unsafe" -) - -var ErrSoNotFound = errors.New("unable to open a handle to the library") - -// LibHandle represents an open handle to a library (.so) -type LibHandle struct { - Handle unsafe.Pointer - LibName string -} - -// GetHandle tries to get a handle to a library (.so), attempting to access it -// by the names specified in libs and returning the first that is successfully -// opened. Callers are responsible for closing the handler. If no library can -// be successfully opened, an error is returned. -func GetHandle(libs []string) (*LibHandle, error) { - for _, name := range libs { - libname := C.CString(name) - defer C.free(unsafe.Pointer(libname)) - handle := C.dlopen(libname, C.RTLD_LAZY) - if handle != nil { - h := &LibHandle{ - Handle: handle, - LibName: name, - } - return h, nil - } - } - return nil, ErrSoNotFound -} - -// GetSymbolPointer takes a symbol name and returns a pointer to the symbol. -func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error) { - sym := C.CString(symbol) - defer C.free(unsafe.Pointer(sym)) - - C.dlerror() - p := C.dlsym(l.Handle, sym) - e := C.dlerror() - if e != nil { - return nil, fmt.Errorf("error resolving symbol %q: %v", symbol, errors.New(C.GoString(e))) - } - - return p, nil -} - -// Close closes a LibHandle. -func (l *LibHandle) Close() error { - C.dlerror() - C.dlclose(l.Handle) - e := C.dlerror() - if e != nil { - return fmt.Errorf("error closing %v: %v", l.LibName, errors.New(C.GoString(e))) - } - - return nil -} diff --git a/pkg/3rdparty/dlopen/dlopen_windws.go b/pkg/3rdparty/dlopen/dlopen_windws.go deleted file mode 100644 index 159c75d8..00000000 --- a/pkg/3rdparty/dlopen/dlopen_windws.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build windows -// +build windows - -// Package dlopen provides some convenience functions to dlopen a library and -// get its symbols. -package dlopen - -import ( - "errors" - "unsafe" - - "syscall" -) - -var ErrSoNotFound = errors.New("unable to open a handle to the library") - -// LibHandle represents an open handle to a library (.so) -type LibHandle struct { - Handle syscall.Handle - LibName string -} - -func GetHandle(libs []string) (*LibHandle, error) { - if len(libs) == 0 { - return nil, ErrSoNotFound - } - name := libs[0] - dll, err := syscall.LoadLibrary(name) - if err != nil { - return nil, err - } - return &LibHandle{ - Handle: dll, - LibName: name, - }, nil -} - -// GetSymbolPointer takes a symbol name and returns a pointer to the symbol. -func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error) { - proc, err := syscall.GetProcAddress(l.Handle, symbol) - if err != nil { - return nil, err - } - return unsafe.Pointer(proc), nil -} - -// Close closes a LibHandle. -func (l *LibHandle) Close() error { - _ = syscall.FreeLibrary(l.Handle) - return nil -} diff --git a/pkg/kcl/rpc_service.go b/pkg/kcl/rpc_service.go index ce2eb244..4bfeb683 100644 --- a/pkg/kcl/rpc_service.go +++ b/pkg/kcl/rpc_service.go @@ -3,11 +3,14 @@ package kcl -import "kcl-lang.io/kcl-go/pkg/service" +import ( + "kcl-lang.io/kcl-go/pkg/service" + "kcl-lang.io/lib/go/api" +) // Service returns the interaction interface between KCL Go SDK and KCL Rust core. // When `go build tags=rpc` is opened, use the default RPC interaction logic to avoid CGO usage. // When closed, use CGO and dynamic libraries to interact. -func Service() service.KclvmService { +func Service() api.ServiceClient { return service.NewKclvmServiceClient() } diff --git a/pkg/kcl/service.go b/pkg/kcl/service.go index fb53f6f4..f57090f6 100644 --- a/pkg/kcl/service.go +++ b/pkg/kcl/service.go @@ -4,13 +4,13 @@ package kcl import ( - "kcl-lang.io/kcl-go/pkg/native" - "kcl-lang.io/kcl-go/pkg/service" + "kcl-lang.io/lib/go/api" + "kcl-lang.io/lib/go/native" ) // Service returns the interaction interface between KCL Go SDK and KCL Rust core. // When `go build tags=rpc` is opened, use the default RPC interaction logic to avoid CGO usage. // When closed, use CGO and dynamic libraries to interact. -func Service() service.KclvmService { +func Service() api.ServiceClient { return native.NewNativeServiceClient() } diff --git a/pkg/native/cgo.go b/pkg/native/cgo.go deleted file mode 100644 index e63fd804..00000000 --- a/pkg/native/cgo.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build cgo -// +build cgo - -package native - -/* -#include -#include -#include -typedef struct kclvm_service kclvm_service; -kclvm_service * kclvm_service_new(void *f,uint64_t plugin_agent){ - kclvm_service * (*new_service)(uint64_t); - new_service = (kclvm_service * (*)(uint64_t))f; - return new_service(plugin_agent); -} -void kclvm_service_delete(void *f,kclvm_service * c){ - void (*delete_service)(kclvm_service *); - delete_service = (void (*)(kclvm_service *))f; - return delete_service(c); -} -void kclvm_service_free_string(void *f,const char * res) { - void (*free_string)(const char *); - free_string = (void (*)(const char *))f; - return free_string(res); -} -const char* kclvm_service_call_with_length(void *f,kclvm_service* c,const char * method,const char * args,size_t args_len,size_t * result_len){ - const char* (*service_call_with_length)(kclvm_service*,const char *,const char *,size_t,size_t *); - service_call_with_length = (const char* (*)(kclvm_service*,const char *,const char *,size_t,size_t *))f; - return service_call_with_length(c,method,args,args_len,result_len); -} -*/ -import "C" - -// NewKclvmService takes a pluginAgent and returns a pointer of capi kclvm_service. -// pluginAgent is the address of C function pointer with type :const char * (*)(const char *method,const char *args,const char *kwargs), -// in which "method" is the fully qualified name of plugin method, -// and "args" ,"kwargs" and return value of pluginAgent are JSON string -func NewKclvmService(pluginAgent C.uint64_t) *C.kclvm_service { - const fnName = "kclvm_service_new" - - newServ, err := lib.GetSymbolPointer(fnName) - - if err != nil { - panic(err) - } - - return C.kclvm_service_new(newServ, pluginAgent) -} - -// NewKclvmService releases the memory of kclvm_service -func DeleteKclvmService(serv *C.kclvm_service) { - const fnName = "kclvm_service_delete" - - deleteServ, err := lib.GetSymbolPointer(fnName) - - if err != nil { - panic(err) - } - - C.kclvm_service_delete(deleteServ, serv) -} - -// KclvmServiceFreeString releases the memory of the return value of KclvmServiceCall -func KclvmServiceFreeString(str *C.char) { - const fnName = "kclvm_service_free_string" - - freeString, err := lib.GetSymbolPointer(fnName) - - if err != nil { - panic(err) - } - - C.kclvm_service_free_string(freeString, str) -} - -// KclvmServiceCall calls kclvm service by c api -// args should be serialized as protobuf byte stream -func KclvmServiceCall(serv *C.kclvm_service, method *C.char, args *C.char, args_len C.size_t) (*C.char, C.size_t) { - const fnName = "kclvm_service_call_with_length" - - serviceCall, err := lib.GetSymbolPointer(fnName) - - if err != nil { - panic(err) - } - - var size C.size_t = C.SIZE_MAX - buf := C.kclvm_service_call_with_length(serviceCall, serv, method, args, args_len, &size) - return buf, size -} diff --git a/pkg/native/client.go b/pkg/native/client.go index 92ac6789..7f7b39a6 100644 --- a/pkg/native/client.go +++ b/pkg/native/client.go @@ -10,191 +10,11 @@ typedef struct kclvm_service kclvm_service; */ import "C" import ( - "bytes" - "errors" - "runtime" - "strings" - "sync" - "unsafe" - - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "kcl-lang.io/kcl-go/pkg/3rdparty/dlopen" - "kcl-lang.io/kcl-go/pkg/plugin" - "kcl-lang.io/kcl-go/pkg/service" - "kcl-lang.io/kcl-go/pkg/spec/gpyrpc" + "kcl-lang.io/lib/go/native" ) -type validator interface { - Validate() error -} - -var libInit sync.Once - -var lib *dlopen.LibHandle - -type NativeServiceClient struct { - client *C.kclvm_service -} - -var _ service.KclvmService = (*NativeServiceClient)(nil) - -func NewNativeServiceClient() *NativeServiceClient { - libInit.Do(func() { - lib = loadServiceNativeLib() - }) - c := new(NativeServiceClient) - c.client = NewKclvmService(C.uint64_t(plugin.GetInvokeJsonProxyPtr())) - runtime.SetFinalizer(c, func(x *NativeServiceClient) { - DeleteKclvmService(x.client) - x.client = nil - }) - return c -} - -func cApiCall[I interface { - *TI - proto.Message -}, O interface { - *TO - protoreflect.ProtoMessage -}, TI any, TO any](c *NativeServiceClient, callName string, in I) (O, error) { - if callName == "" { - return nil, errors.New("kclvm service c api call: empty method name") - } - - if in == nil { - in = new(TI) - } - - if x, ok := proto.Message(in).(validator); ok { - if err := x.Validate(); err != nil { - return nil, err - } - } - inBytes, err := proto.Marshal(in) - if err != nil { - return nil, err - } - - cCallName := C.CString(callName) - - defer C.free(unsafe.Pointer(cCallName)) - - cIn := C.CString(string(inBytes)) - - defer C.free(unsafe.Pointer(cIn)) - - cOut, cOutSize := KclvmServiceCall(c.client, cCallName, cIn, C.size_t(len(inBytes))) - - defer KclvmServiceFreeString(cOut) - - if cOutSize == C.SIZE_MAX { - msg := C.GoString(cOut) - return nil, errors.New(strings.TrimPrefix(string(msg), "ERROR:")) - } - - msg := C.GoBytes(unsafe.Pointer(cOut), C.int(cOutSize)) - - if bytes.HasPrefix(msg, []byte("ERROR:")) { - return nil, errors.New(strings.TrimPrefix(string(msg), "ERROR:")) - } - - var out O = new(TO) - err = proto.Unmarshal(msg, out) - if err != nil { - return nil, errors.New(string(msg)) - } - - return out, nil -} - -func (c *NativeServiceClient) Ping(in *gpyrpc.Ping_Args) (*gpyrpc.Ping_Result, error) { - return cApiCall[*gpyrpc.Ping_Args, *gpyrpc.Ping_Result](c, "KclvmService.Ping", in) -} +type NativeServiceClient = native.NativeServiceClient -func (c *NativeServiceClient) ExecProgram(in *gpyrpc.ExecProgram_Args) (*gpyrpc.ExecProgram_Result, error) { - return cApiCall[*gpyrpc.ExecProgram_Args, *gpyrpc.ExecProgram_Result](c, "KclvmService.ExecProgram", in) -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (c *NativeServiceClient) BuildProgram(in *gpyrpc.BuildProgram_Args) (*gpyrpc.BuildProgram_Result, error) { - return cApiCall[*gpyrpc.BuildProgram_Args, *gpyrpc.BuildProgram_Result](c, "KclvmService.BuildProgram", in) -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (c *NativeServiceClient) ExecArtifact(in *gpyrpc.ExecArtifact_Args) (*gpyrpc.ExecProgram_Result, error) { - return cApiCall[*gpyrpc.ExecArtifact_Args, *gpyrpc.ExecProgram_Result](c, "KclvmService.ExecArtifact", in) -} - -func (c *NativeServiceClient) ParseFile(in *gpyrpc.ParseFile_Args) (*gpyrpc.ParseFile_Result, error) { - return cApiCall[*gpyrpc.ParseFile_Args, *gpyrpc.ParseFile_Result](c, "KclvmService.ParseFile", in) -} - -func (c *NativeServiceClient) ParseProgram(in *gpyrpc.ParseProgram_Args) (*gpyrpc.ParseProgram_Result, error) { - return cApiCall[*gpyrpc.ParseProgram_Args, *gpyrpc.ParseProgram_Result](c, "KclvmService.ParseProgram", in) -} - -func (c *NativeServiceClient) ListOptions(in *gpyrpc.ParseProgram_Args) (*gpyrpc.ListOptions_Result, error) { - return cApiCall[*gpyrpc.ParseProgram_Args, *gpyrpc.ListOptions_Result](c, "KclvmService.ListOptions", in) -} - -func (c *NativeServiceClient) ListVariables(in *gpyrpc.ListVariables_Args) (*gpyrpc.ListVariables_Result, error) { - return cApiCall[*gpyrpc.ListVariables_Args, *gpyrpc.ListVariables_Result](c, "KclvmService.ListVariables", in) -} - -func (c *NativeServiceClient) LoadPackage(in *gpyrpc.LoadPackage_Args) (*gpyrpc.LoadPackage_Result, error) { - return cApiCall[*gpyrpc.LoadPackage_Args, *gpyrpc.LoadPackage_Result](c, "KclvmService.LoadPackage", in) -} - -func (c *NativeServiceClient) FormatCode(in *gpyrpc.FormatCode_Args) (*gpyrpc.FormatCode_Result, error) { - return cApiCall[*gpyrpc.FormatCode_Args, *gpyrpc.FormatCode_Result](c, "KclvmService.FormatCode", in) -} - -func (c *NativeServiceClient) FormatPath(in *gpyrpc.FormatPath_Args) (*gpyrpc.FormatPath_Result, error) { - return cApiCall[*gpyrpc.FormatPath_Args, *gpyrpc.FormatPath_Result](c, "KclvmService.FormatPath", in) -} - -func (c *NativeServiceClient) LintPath(in *gpyrpc.LintPath_Args) (*gpyrpc.LintPath_Result, error) { - return cApiCall[*gpyrpc.LintPath_Args, *gpyrpc.LintPath_Result](c, "KclvmService.LintPath", in) -} - -func (c *NativeServiceClient) OverrideFile(in *gpyrpc.OverrideFile_Args) (*gpyrpc.OverrideFile_Result, error) { - return cApiCall[*gpyrpc.OverrideFile_Args, *gpyrpc.OverrideFile_Result](c, "KclvmService.OverrideFile", in) -} - -func (c *NativeServiceClient) GetSchemaTypeMapping(in *gpyrpc.GetSchemaTypeMapping_Args) (*gpyrpc.GetSchemaTypeMapping_Result, error) { - return cApiCall[*gpyrpc.GetSchemaTypeMapping_Args, *gpyrpc.GetSchemaTypeMapping_Result](c, "KclvmService.GetSchemaTypeMapping", in) -} - -func (c *NativeServiceClient) ValidateCode(in *gpyrpc.ValidateCode_Args) (*gpyrpc.ValidateCode_Result, error) { - return cApiCall[*gpyrpc.ValidateCode_Args, *gpyrpc.ValidateCode_Result](c, "KclvmService.ValidateCode", in) -} - -func (c *NativeServiceClient) ListDepFiles(in *gpyrpc.ListDepFiles_Args) (*gpyrpc.ListDepFiles_Result, error) { - return cApiCall[*gpyrpc.ListDepFiles_Args, *gpyrpc.ListDepFiles_Result](c, "KclvmService.ListDepFiles", in) -} - -func (c *NativeServiceClient) LoadSettingsFiles(in *gpyrpc.LoadSettingsFiles_Args) (*gpyrpc.LoadSettingsFiles_Result, error) { - return cApiCall[*gpyrpc.LoadSettingsFiles_Args, *gpyrpc.LoadSettingsFiles_Result](c, "KclvmService.LoadSettingsFiles", in) -} - -func (c *NativeServiceClient) Rename(in *gpyrpc.Rename_Args) (*gpyrpc.Rename_Result, error) { - return cApiCall[*gpyrpc.Rename_Args, *gpyrpc.Rename_Result](c, "KclvmService.Rename", in) -} - -func (c *NativeServiceClient) RenameCode(in *gpyrpc.RenameCode_Args) (*gpyrpc.RenameCode_Result, error) { - return cApiCall[*gpyrpc.RenameCode_Args, *gpyrpc.RenameCode_Result](c, "KclvmService.RenameCode", in) -} - -func (c *NativeServiceClient) Test(in *gpyrpc.Test_Args) (*gpyrpc.Test_Result, error) { - return cApiCall[*gpyrpc.Test_Args, *gpyrpc.Test_Result](c, "KclvmService.Test", in) -} - -func (c *NativeServiceClient) UpdateDependencies(in *gpyrpc.UpdateDependencies_Args) (*gpyrpc.UpdateDependencies_Result, error) { - return cApiCall[*gpyrpc.UpdateDependencies_Args, *gpyrpc.UpdateDependencies_Result](c, "KclvmService.UpdateDependencies", in) -} - -func (c *NativeServiceClient) GetVersion(in *gpyrpc.GetVersion_Args) (*gpyrpc.GetVersion_Result, error) { - return cApiCall[*gpyrpc.GetVersion_Args, *gpyrpc.GetVersion_Result](c, "KclvmService.GetVersion", in) -} +var ( + NewNativeServiceClient = native.NewNativeServiceClient +) diff --git a/pkg/native/loader.go b/pkg/native/loader.go deleted file mode 100644 index abb8efc7..00000000 --- a/pkg/native/loader.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build cgo -// +build cgo - -package native - -import ( - "fmt" - "path/filepath" - "runtime" - - "kcl-lang.io/kcl-go/pkg/3rdparty/dlopen" - kcl_runtime "kcl-lang.io/kcl-go/pkg/runtime" - "kcl-lang.io/kcl-go/pkg/utils" -) - -const libName = "kclvm_cli_cdylib" - -func loadServiceNativeLib() *dlopen.LibHandle { - root := kcl_runtime.MustGetKclvmRoot() - libPaths := []string{} - sysType := runtime.GOOS - fullLibName := "lib" + libName + ".so" - - if sysType == "darwin" { - fullLibName = "lib" + libName + ".dylib" - } else if sysType == "windows" { - fullLibName = libName + ".dll" - } - - libPath := filepath.Join(root, "bin", fullLibName) - if !utils.FileExists(libPath) { - libPath = filepath.Join(root, "lib", fullLibName) - } - - libPaths = append(libPaths, libPath) - - h, err := dlopen.GetHandle(libPaths) - - if err != nil { - panic(fmt.Errorf(`couldn't get a handle to kcl native library from %v: %v`, libPaths, err)) - } - - runtime.SetFinalizer(h, func(x *dlopen.LibHandle) { - x.Close() - }) - - return h -} diff --git a/pkg/plugin/api.go b/pkg/plugin/api.go index 0202e0d5..6abaf2d5 100644 --- a/pkg/plugin/api.go +++ b/pkg/plugin/api.go @@ -6,68 +6,16 @@ package plugin import ( - "strings" - "sync" + "kcl-lang.io/lib/go/plugin" ) -var pluginManager struct { - allPlugin map[string]Plugin - allMethodSpec map[string]MethodSpec - sync.Mutex -} - -func init() { - pluginManager.allPlugin = make(map[string]Plugin) - pluginManager.allMethodSpec = make(map[string]MethodSpec) -} - -// Register register a new kcl plugin. -func RegisterPlugin(plugin Plugin) { - pluginManager.Lock() - defer pluginManager.Unlock() - - if plugin.Name == "" { - panic("invalid plugin: empty name") - } - - pluginManager.allPlugin[plugin.Name] = plugin - for methodName, methodSpec := range plugin.MethodMap { - methodAbsName := "kcl_plugin." + plugin.Name + "." + methodName - pluginManager.allMethodSpec[methodAbsName] = methodSpec - } -} - -// GetPlugin get plugin object by name. -func GetPlugin(name string) (plugin Plugin, ok bool) { - pluginManager.Lock() - defer pluginManager.Unlock() - - x, ok := pluginManager.allPlugin[name] - return x, ok -} - -// GetMethodSpec get plugin method by name. -func GetMethodSpec(methodName string) (method MethodSpec, ok bool) { - pluginManager.Lock() - defer pluginManager.Unlock() - - idx := strings.LastIndex(methodName, ".") - if idx <= 0 || idx >= len(methodName)-1 { - return MethodSpec{}, false - } - - x, ok := pluginManager.allMethodSpec[methodName] - return x, ok -} - -// ResetPlugin reset all kcl plugin state. -func ResetPlugin() { - pluginManager.Lock() - defer pluginManager.Unlock() - - for _, p := range pluginManager.allPlugin { - if p.ResetFunc != nil { - p.ResetFunc() - } - } -} +var ( + // Register register a new kcl plugin. + RegisterPlugin = plugin.RegisterPlugin + // GetPlugin get plugin object by name. + GetPlugin = plugin.GetPlugin + // GetMethodSpec get plugin method by name. + GetMethodSpec = plugin.GetMethodSpec + // ResetPlugin reset all kcl plugin state. + ResetPlugin = plugin.ResetPlugin +) diff --git a/pkg/plugin/api_test.go b/pkg/plugin/api_test.go index 542c2097..8135be7f 100644 --- a/pkg/plugin/api_test.go +++ b/pkg/plugin/api_test.go @@ -22,7 +22,7 @@ func init() { for i := range args.Args { ss = append(ss, args.StrArg(i)) } - return &MethodResult{strings.Join(ss, ".")}, nil + return &MethodResult{V: strings.Join(ss, ".")}, nil }, }, "panic": { @@ -36,9 +36,6 @@ func init() { } func TestPlugin_strings_join(t *testing.T) { - if !CgoEnabled { - t.Skip("cgo disabled") - } result_json := Invoke("kcl_plugin.strings.join", []interface{}{"KCL", "KCL", 123}, nil) if result_json != `"KCL.KCL.123"` { t.Fatal(result_json) @@ -46,9 +43,6 @@ func TestPlugin_strings_join(t *testing.T) { } func TestPlugin_strings_panic(t *testing.T) { - if !CgoEnabled { - t.Skip("cgo disabled") - } result_json := Invoke("kcl_plugin.strings.panic", []interface{}{"KCL", "KCL", 123}, nil) if result_json != `{"__kcl_PanicInfo__":"[KCL KCL 123]"}` { t.Fatal(result_json) diff --git a/pkg/plugin/error.go b/pkg/plugin/error.go index 52932c17..d299ee45 100644 --- a/pkg/plugin/error.go +++ b/pkg/plugin/error.go @@ -6,38 +6,13 @@ package plugin import ( - "encoding/json" + "kcl-lang.io/lib/go/plugin" ) -type PanicInfo struct { - Message string `json:"__kcl_PanicInfo__"` -} +type PanicInfo = plugin.PanicInfo -type BacktraceFrame struct { - File string `json:"file,omitempty"` - Func string `json:"func,omitempty"` - Line int `json:"line,omitempty"` - Col int `json:"col,omitempty"` -} +type BacktraceFrame = plugin.BacktraceFrame -func JSONError(err error) string { - if x, ok := err.(*PanicInfo); ok { - return x.JSONError() - } - if err != nil { - x := &PanicInfo{ - Message: err.Error(), - } - return x.JSONError() - } - return "" -} - -func (p *PanicInfo) JSONError() string { - d, _ := json.Marshal(p) - return string(d) -} - -func (p *PanicInfo) Error() string { - return p.JSONError() -} +var ( + JSONError = plugin.JSONError +) diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index ee87b528..8a16e862 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -5,119 +5,12 @@ package plugin -/* -#include -#include - -extern char* kcl_go_capi_InvokeJsonProxy( - char* method, - char* args_json, - char* kwargs_json -); - -static uint64_t kcl_go_capi_getInvokeJsonProxyPtr() { - return (uint64_t)(kcl_go_capi_InvokeJsonProxy); -} -*/ -import "C" import ( - "encoding/json" - "errors" - "fmt" + "kcl-lang.io/lib/go/plugin" ) -const CgoEnabled = true - -//export kcl_go_capi_InvokeJsonProxy -func kcl_go_capi_InvokeJsonProxy(_method, _args_json, _kwargs_json *C.char) (result_json *C.char) { - var method, args_json, kwargs_json string - - if _method != nil { - method = C.GoString(_method) - } - if _args_json != nil { - args_json = C.GoString(_args_json) - } - if _kwargs_json != nil { - kwargs_json = C.GoString(_kwargs_json) - } - - result := InvokeJson(method, args_json, kwargs_json) - return c_String_new(result) -} - -func GetInvokeJsonProxyPtr() uint64 { - ptr := uint64(C.kcl_go_capi_getInvokeJsonProxyPtr()) - return ptr -} - -func Invoke(method string, args []interface{}, kwargs map[string]interface{}) (result_json string) { - var args_json, kwargs_json string - - if len(args) > 0 { - d, err := json.Marshal(args) - if err != nil { - return JSONError(err) - } - args_json = string(d) - } - - if kwargs != nil { - d, err := json.Marshal(kwargs) - if err != nil { - return JSONError(err) - } - kwargs_json = string(d) - } - - return _Invoke(method, args_json, kwargs_json) -} - -func InvokeJson(method, args_json, kwargs_json string) (result_json string) { - return _Invoke(method, args_json, kwargs_json) -} - -func _Invoke(method, args_json, kwargs_json string) (result_json string) { - defer func() { - if r := recover(); r != nil { - result_json = JSONError(errors.New(fmt.Sprint(r))) - } - }() - - // check method - if method == "" { - return JSONError(fmt.Errorf("empty method")) - } - - // parse args, kwargs - args, err := ParseMethodArgs(args_json, kwargs_json) - if err != nil { - return JSONError(err) - } - - // todo: check args type - // todo: check kwargs type - - // get method - methodSpec, found := GetMethodSpec(method) - if !found { - return JSONError(fmt.Errorf("invalid method: %s, not found", method)) - } - - // call plugin method - result, err := methodSpec.Body(args) - if err != nil { - return JSONError(err) - } - if result == nil { - result = new(MethodResult) - } - - // encode result - data, err := json.Marshal(result.V) - if err != nil { - return JSONError(err) - } - - return string(data) -} +var ( + GetInvokeJsonProxyPtr = plugin.GetInvokeJsonProxyPtr + Invoke = plugin.Invoke + InvokeJson = plugin.InvokeJson +) diff --git a/pkg/plugin/spec.go b/pkg/plugin/spec.go index cd7f705f..f6065d34 100644 --- a/pkg/plugin/spec.go +++ b/pkg/plugin/spec.go @@ -6,192 +6,33 @@ package plugin import ( - "encoding/json" - "fmt" - "strconv" + "kcl-lang.io/lib/go/plugin" ) // Plugin represents a KCL Plugin with metadata and methods. // It contains the plugin name, version, a reset function, and a map of methods. -type Plugin struct { - Name string // Name of the plugin - Version string // Version of the plugin - ResetFunc func() // Reset function for the plugin - MethodMap map[string]MethodSpec // Map of method names to their specifications -} +type Plugin = plugin.Plugin // MethodSpec defines the specification for a KCL Plugin method. // It includes the method type and the body function which executes the method logic. -type MethodSpec struct { - Type *MethodType // Specification of the method's type - Body func(args *MethodArgs) (*MethodResult, error) // Function to execute the method's logic -} +type MethodSpec = plugin.MethodSpec // MethodType describes the type of a KCL Plugin method's arguments, keyword arguments, and result. // It specifies the types of positional arguments, keyword arguments, and the result type. -type MethodType struct { - ArgsType []string // List of types for positional arguments - KwArgsType map[string]string // Map of keyword argument names to their types - ResultType string // Type of the result -} +type MethodType = plugin.MethodType // MethodArgs represents the arguments passed to a KCL Plugin method. // It includes a list of positional arguments and a map of keyword arguments. -type MethodArgs struct { - Args []interface{} // List of positional arguments - KwArgs map[string]interface{} // Map of keyword arguments -} +type MethodArgs = plugin.MethodArgs // MethodResult represents the result returned from a KCL Plugin method. // It holds the value of the result. -type MethodResult struct { - V interface{} // Result value -} - -// ParseMethodArgs parses JSON strings for positional and keyword arguments -// and returns a MethodArgs object. -// args_json: JSON string of positional arguments -// kwargs_json: JSON string of keyword arguments -func ParseMethodArgs(args_json, kwargs_json string) (*MethodArgs, error) { - p := &MethodArgs{ - KwArgs: make(map[string]interface{}), - } - if args_json != "" { - if err := json.Unmarshal([]byte(args_json), &p.Args); err != nil { - return nil, err - } - } - if kwargs_json != "" { - if err := json.Unmarshal([]byte(kwargs_json), &p.KwArgs); err != nil { - return nil, err - } - } - return p, nil -} - -// GetCallArg retrieves an argument by index or key. -// If the key exists in KwArgs, it returns the corresponding value. -// Otherwise, it returns the positional argument at the given index. -func (p *MethodArgs) GetCallArg(index int, key string) any { - if val, ok := p.KwArgs[key]; ok { - return val - } - if index < len(p.Args) { - return p.Args[index] - } - return nil -} - -// Arg returns the positional argument at the specified index. -func (p *MethodArgs) Arg(i int) interface{} { - return p.Args[i] -} - -// KwArg returns the keyword argument with the given name. -func (p *MethodArgs) KwArg(name string) interface{} { - return p.KwArgs[name] -} - -// IntArg returns the positional argument at the specified index -// as an int64. It panics if the conversion fails. -func (p *MethodArgs) IntArg(i int) int64 { - s := fmt.Sprint(p.Args[i]) - v, err := strconv.ParseInt(s, 10, 64) - if err != nil { - panic(err) - } - return v -} - -// FloatArg returns the positional argument at the specified index -// as a float64. It panics if the conversion fails. -func (p *MethodArgs) FloatArg(i int) float64 { - s := fmt.Sprint(p.Args[i]) - v, err := strconv.ParseFloat(s, 64) - if err != nil { - panic(err) - } - return v -} - -// BoolArg returns the positional argument at the specified index -// as a bool. It panics if the conversion fails. -func (p *MethodArgs) BoolArg(i int) bool { - s := fmt.Sprint(p.Args[i]) - v, err := strconv.ParseBool(s) - if err != nil { - panic(err) - } - return v -} - -// StrArg returns the positional argument at the specified index -// as a string. -func (p *MethodArgs) StrArg(i int) string { - s := fmt.Sprint(p.Args[i]) - return s -} - -// ListArg returns the positional argument at the specified index -// as a list of any type. -func (p *MethodArgs) ListArg(i int) []any { - return p.Args[i].([]any) -} - -// MapArg returns the positional argument at the specified index -// as a map with string keys and any type values. -func (p *MethodArgs) MapArg(i int) map[string]any { - return p.Args[i].(map[string]any) -} - -// IntKwArg returns the keyword argument with the given name -// as an int64. It panics if the conversion fails. -func (p *MethodArgs) IntKwArg(name string) int64 { - s := fmt.Sprint(p.KwArgs[name]) - v, err := strconv.ParseInt(s, 10, 64) - if err != nil { - panic(err) - } - return v -} - -// FloatKwArg returns the keyword argument with the given name -// as a float64. It panics if the conversion fails. -func (p *MethodArgs) FloatKwArg(name string) float64 { - s := fmt.Sprint(p.KwArgs[name]) - v, err := strconv.ParseFloat(s, 64) - if err != nil { - panic(err) - } - return v -} - -// BoolKwArg returns the keyword argument with the given name -// as a bool. It panics if the conversion fails. -func (p *MethodArgs) BoolKwArg(name string) bool { - s := fmt.Sprint(p.KwArgs[name]) - v, err := strconv.ParseBool(s) - if err != nil { - panic(err) - } - return v -} - -// StrKwArg returns the keyword argument with the given name -// as a string. -func (p *MethodArgs) StrKwArg(name string) string { - s := fmt.Sprint(p.KwArgs[name]) - return s -} - -// ListKwArg returns the keyword argument with the given name -// as a list of any type. -func (p *MethodArgs) ListKwArg(name string) []any { - return p.KwArgs[name].([]any) -} - -// MapKwArg returns the keyword argument with the given name -// as a map with string keys and any type values. -func (p *MethodArgs) MapKwArg(name string) map[string]any { - return p.KwArgs[name].(map[string]any) -} +type MethodResult = plugin.MethodResult + +var ( + // ParseMethodArgs parses JSON strings for positional and keyword arguments + // and returns a MethodArgs object. + // args_json: JSON string of positional arguments + // kwargs_json: JSON string of keyword arguments + ParseMethodArgs = plugin.ParseMethodArgs +) diff --git a/pkg/plugin/utils_c_string.go b/pkg/plugin/utils_c_string.go deleted file mode 100644 index 72e3c7ed..00000000 --- a/pkg/plugin/utils_c_string.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2023 The KCL Authors. All rights reserved. - -//go:build cgo -// +build cgo - -package plugin - -// #include -import "C" -import ( - "sync" - "unsafe" -) - -var c_String struct { - sync.Mutex - nextId int - buf []*C.char -} - -func init() { - c_String.buf = make([]*C.char, 100) -} - -func c_String_new(s string) *C.char { - c_String.Lock() - defer c_String.Unlock() - - id := c_String.nextId % len(c_String.buf) - c_String.nextId++ - - if cs := c_String.buf[id]; cs != nil { - C.free(unsafe.Pointer(cs)) - } - - cs := C.CString(s) - c_String.buf[id] = cs - return cs -} diff --git a/pkg/runtime/builtin_service_client.go b/pkg/runtime/builtin_service_client.go index c8c088ba..e6ae3c25 100644 --- a/pkg/runtime/builtin_service_client.go +++ b/pkg/runtime/builtin_service_client.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package runtime diff --git a/pkg/runtime/init.go b/pkg/runtime/init.go index e36aff74..f549c873 100644 --- a/pkg/runtime/init.go +++ b/pkg/runtime/init.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package runtime diff --git a/pkg/runtime/kclvm.go b/pkg/runtime/kclvm.go index bb2adc40..5a4bb2bf 100644 --- a/pkg/runtime/kclvm.go +++ b/pkg/runtime/kclvm.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package runtime @@ -20,7 +23,6 @@ import ( ) func init() { - env.EnableFastEvalMode() if !env.GetDisableInstallArtifact() { installKclArtifact() } diff --git a/pkg/runtime/proc.go b/pkg/runtime/proc.go index 4cdde43a..3e3a5a77 100644 --- a/pkg/runtime/proc.go +++ b/pkg/runtime/proc.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package runtime diff --git a/pkg/runtime/runtime.go b/pkg/runtime/runtime.go index 1ba2bc2a..10494444 100644 --- a/pkg/runtime/runtime.go +++ b/pkg/runtime/runtime.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package runtime diff --git a/pkg/service/client_builtin_service.go b/pkg/service/client_builtin_service.go index fe3742d7..ba83805c 100644 --- a/pkg/service/client_builtin_service.go +++ b/pkg/service/client_builtin_service.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package service diff --git a/pkg/service/client_kclvm_service.go b/pkg/service/client_kclvm_service.go index 15852247..d064d9c3 100644 --- a/pkg/service/client_kclvm_service.go +++ b/pkg/service/client_kclvm_service.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package service diff --git a/pkg/service/grpc_server.go b/pkg/service/grpc_server.go index 0b26d55e..3b64d9d9 100644 --- a/pkg/service/grpc_server.go +++ b/pkg/service/grpc_server.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package service diff --git a/pkg/service/kclvm_service.go b/pkg/service/kclvm_service.go index eff69ab0..e0d05f62 100644 --- a/pkg/service/kclvm_service.go +++ b/pkg/service/kclvm_service.go @@ -1,50 +1,9 @@ package service -import "kcl-lang.io/kcl-go/pkg/spec/gpyrpc" +import "kcl-lang.io/lib/go/api" +// KCL service client interface. +// Deprecated: use `ServiceClient` at `kcl-lang.io/lib/go/api` type KclvmService interface { - // Ping KclvmService, return the same value as the parameter - Ping(in *gpyrpc.Ping_Args) (out *gpyrpc.Ping_Result, err error) - // Execute KCL file with arguments and return the JSON/YAML result. - ExecProgram(in *gpyrpc.ExecProgram_Args) (out *gpyrpc.ExecProgram_Result, err error) - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - BuildProgram(in *gpyrpc.BuildProgram_Args) (out *gpyrpc.BuildProgram_Result, err error) - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - ExecArtifact(in *gpyrpc.ExecArtifact_Args) (out *gpyrpc.ExecProgram_Result, err error) - // Parse KCL single file to Module AST JSON string with import dependencies and parse errors. - ParseFile(in *gpyrpc.ParseFile_Args) (out *gpyrpc.ParseFile_Result, err error) - // Parse KCL program with entry files and return the AST JSON string. - ParseProgram(in *gpyrpc.ParseProgram_Args) (out *gpyrpc.ParseProgram_Result, err error) - // ListOptions provides users with the ability to parse KCL program and get all option information. - ListOptions(in *gpyrpc.ParseProgram_Args) (out *gpyrpc.ListOptions_Result, err error) - // ListVariables provides users with the ability to parse KCL program and get all variables by specs. - ListVariables(in *gpyrpc.ListVariables_Args) (out *gpyrpc.ListVariables_Result, err error) - // LoadPackage provides users with the ability to parse KCL program and semantic model information including symbols, types, definitions, etc. - LoadPackage(in *gpyrpc.LoadPackage_Args) (out *gpyrpc.LoadPackage_Result, err error) - // Format the code source. - FormatCode(in *gpyrpc.FormatCode_Args) (out *gpyrpc.FormatCode_Result, err error) - // Format KCL file or directory path contains KCL files and returns the changed file paths. - FormatPath(in *gpyrpc.FormatPath_Args) (out *gpyrpc.FormatPath_Result, err error) - // Lint files and return error messages including errors and warnings. - LintPath(in *gpyrpc.LintPath_Args) (out *gpyrpc.LintPath_Result, err error) - // Override KCL file with arguments. See [https://www.kcl-lang.io/docs/user_docs/guides/automation](https://www.kcl-lang.io/docs/user_docs/guides/automation) for more override spec guide. - OverrideFile(in *gpyrpc.OverrideFile_Args) (out *gpyrpc.OverrideFile_Result, err error) - // Get schema type mapping defined in the program. - GetSchemaTypeMapping(in *gpyrpc.GetSchemaTypeMapping_Args) (out *gpyrpc.GetSchemaTypeMapping_Result, err error) - // Validate code using schema and JSON/YAML data strings. - ValidateCode(in *gpyrpc.ValidateCode_Args) (out *gpyrpc.ValidateCode_Result, err error) - // List dependencies files of input paths. - ListDepFiles(in *gpyrpc.ListDepFiles_Args) (out *gpyrpc.ListDepFiles_Result, err error) - // Load the setting file config defined in `kcl.yaml`. - LoadSettingsFiles(in *gpyrpc.LoadSettingsFiles_Args) (out *gpyrpc.LoadSettingsFiles_Result, err error) - // Rename all the occurrences of the target symbol in the files. This API will rewrite files if they contain symbols to be renamed. Return the file paths that got changed. - Rename(in *gpyrpc.Rename_Args) (out *gpyrpc.Rename_Result, err error) - // Rename all the occurrences of the target symbol and return the modified code if any code has been changed. This API won't rewrite files but return the changed code. - RenameCode(in *gpyrpc.RenameCode_Args) (out *gpyrpc.RenameCode_Result, err error) - // Test KCL packages with test arguments. - Test(in *gpyrpc.Test_Args) (out *gpyrpc.Test_Result, err error) - // Download and update dependencies defined in the `kcl.mod` file and return the external package name and location list. - UpdateDependencies(in *gpyrpc.UpdateDependencies_Args) (out *gpyrpc.UpdateDependencies_Result, err error) - // GetVersion KclvmService, return the kclvm service version information - GetVersion(in *gpyrpc.GetVersion_Args) (out *gpyrpc.GetVersion_Result, err error) + api.ServiceClient } diff --git a/pkg/service/rest_client.go b/pkg/service/rest_client.go index b1cbaaf8..1504932e 100644 --- a/pkg/service/rest_client.go +++ b/pkg/service/rest_client.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + package service import ( diff --git a/pkg/service/rest_client_test.go b/pkg/service/rest_client_test.go index 9573d9a0..c8d19129 100644 --- a/pkg/service/rest_client_test.go +++ b/pkg/service/rest_client_test.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + package service import ( diff --git a/pkg/service/rest_server.go b/pkg/service/rest_server.go index bfafac03..7290ad8d 100644 --- a/pkg/service/rest_server.go +++ b/pkg/service/rest_server.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package service diff --git a/pkg/service/testmain_test.go b/pkg/service/testmain_test.go index 62cbf301..0ac45a74 100644 --- a/pkg/service/testmain_test.go +++ b/pkg/service/testmain_test.go @@ -1,3 +1,6 @@ +//go:build rpc || !cgo +// +build rpc !cgo + // Copyright The KCL Authors. All rights reserved. package service diff --git a/pkg/spec/gpyrpc/gpyrpc.pb.go b/pkg/spec/gpyrpc/gpyrpc.pb.go index 24d8efaa..ad2b81df 100644 --- a/pkg/spec/gpyrpc/gpyrpc.pb.go +++ b/pkg/spec/gpyrpc/gpyrpc.pb.go @@ -1,8464 +1,201 @@ // Copyright The KCL Authors. All rights reserved. -// -// This file defines the request parameters and return structure of the KCL RPC server. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.0 -// source: gpyrpc.proto package gpyrpc import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) + "kcl-lang.io/lib/go/api" ) // Message representing an external package for KCL. // kcl main.k -E pkg_name=pkg_path -type ExternalPkg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the package. - PkgName string `protobuf:"bytes,1,opt,name=pkg_name,json=pkgName,proto3" json:"pkg_name,omitempty"` - // Path of the package. - PkgPath string `protobuf:"bytes,2,opt,name=pkg_path,json=pkgPath,proto3" json:"pkg_path,omitempty"` -} - -func (x *ExternalPkg) Reset() { - *x = ExternalPkg{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExternalPkg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExternalPkg) ProtoMessage() {} - -func (x *ExternalPkg) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExternalPkg.ProtoReflect.Descriptor instead. -func (*ExternalPkg) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{0} -} - -func (x *ExternalPkg) GetPkgName() string { - if x != nil { - return x.PkgName - } - return "" -} - -func (x *ExternalPkg) GetPkgPath() string { - if x != nil { - return x.PkgPath - } - return "" -} +type ExternalPkg = api.ExternalPkg // Message representing a key-value argument for KCL. // kcl main.k -D name=value -type Argument struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the argument. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Value of the argument. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Argument) Reset() { - *x = Argument{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Argument) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Argument) ProtoMessage() {} - -func (x *Argument) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Argument.ProtoReflect.Descriptor instead. -func (*Argument) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{1} -} - -func (x *Argument) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Argument) GetValue() string { - if x != nil { - return x.Value - } - return "" -} +type Argument = api.Argument // Message representing an error. -type Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Level of the error (e.g., "Error", "Warning"). - Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` - // Error code. (e.g., "E1001") - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - // List of error messages. - Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` -} - -func (x *Error) Reset() { - *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Error) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Error) ProtoMessage() {} - -func (x *Error) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Error.ProtoReflect.Descriptor instead. -func (*Error) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{2} -} - -func (x *Error) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *Error) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *Error) GetMessages() []*Message { - if x != nil { - return x.Messages - } - return nil -} +type Error = api.Error // Message representing a detailed error message with a position. -type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The error message text. - Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` - // The position in the source code where the error occurred. - Pos *Position `protobuf:"bytes,2,opt,name=pos,proto3" json:"pos,omitempty"` -} - -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message) ProtoMessage() {} - -func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message.ProtoReflect.Descriptor instead. -func (*Message) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{3} -} - -func (x *Message) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *Message) GetPos() *Position { - if x != nil { - return x.Pos - } - return nil -} +type Message = api.Message // Message for ping request arguments. -type Ping_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Value to be sent in the ping request. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Ping_Args) Reset() { - *x = Ping_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Ping_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Ping_Args) ProtoMessage() {} - -func (x *Ping_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Ping_Args.ProtoReflect.Descriptor instead. -func (*Ping_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{4} -} - -func (x *Ping_Args) GetValue() string { - if x != nil { - return x.Value - } - return "" -} +type Ping_Args = api.Ping_Args // Message for ping response. -type Ping_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Value received in the ping response. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Ping_Result) Reset() { - *x = Ping_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Ping_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Ping_Result) ProtoMessage() {} - -func (x *Ping_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Ping_Result.ProtoReflect.Descriptor instead. -func (*Ping_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{5} -} - -func (x *Ping_Result) GetValue() string { - if x != nil { - return x.Value - } - return "" -} +type Ping_Result = api.Ping_Result // Message for version request arguments. Empty message. -type GetVersion_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetVersion_Args) Reset() { - *x = GetVersion_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetVersion_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetVersion_Args) ProtoMessage() {} - -func (x *GetVersion_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetVersion_Args.ProtoReflect.Descriptor instead. -func (*GetVersion_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{6} -} +type GetVersion_Args = api.GetVersion_Args // Message for version response. -type GetVersion_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // KCL version. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Checksum of the KCL version. - Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"` - // Git Git SHA of the KCL code repo. - GitSha string `protobuf:"bytes,3,opt,name=git_sha,json=gitSha,proto3" json:"git_sha,omitempty"` - // Detailed version information as a string. - VersionInfo string `protobuf:"bytes,4,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` -} - -func (x *GetVersion_Result) Reset() { - *x = GetVersion_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetVersion_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetVersion_Result) ProtoMessage() {} - -func (x *GetVersion_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetVersion_Result.ProtoReflect.Descriptor instead. -func (*GetVersion_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{7} -} - -func (x *GetVersion_Result) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *GetVersion_Result) GetChecksum() string { - if x != nil { - return x.Checksum - } - return "" -} - -func (x *GetVersion_Result) GetGitSha() string { - if x != nil { - return x.GitSha - } - return "" -} - -func (x *GetVersion_Result) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} +type GetVersion_Result = api.GetVersion_Result // Message for list method request arguments. Empty message. -type ListMethod_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListMethod_Args) Reset() { - *x = ListMethod_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMethod_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMethod_Args) ProtoMessage() {} - -func (x *ListMethod_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMethod_Args.ProtoReflect.Descriptor instead. -func (*ListMethod_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{8} -} +type ListMethod_Args = api.ListMethod_Args // Message for list method response. -type ListMethod_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of available method names. - MethodNameList []string `protobuf:"bytes,1,rep,name=method_name_list,json=methodNameList,proto3" json:"method_name_list,omitempty"` -} - -func (x *ListMethod_Result) Reset() { - *x = ListMethod_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMethod_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMethod_Result) ProtoMessage() {} - -func (x *ListMethod_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMethod_Result.ProtoReflect.Descriptor instead. -func (*ListMethod_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{9} -} - -func (x *ListMethod_Result) GetMethodNameList() []string { - if x != nil { - return x.MethodNameList - } - return nil -} +type ListMethod_Result = api.ListMethod_Result // Message for parse file request arguments. -type ParseFile_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path of the file to be parsed. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Source code to be parsed. - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` - // External packages path. - ExternalPkgs []*ExternalPkg `protobuf:"bytes,3,rep,name=external_pkgs,json=externalPkgs,proto3" json:"external_pkgs,omitempty"` -} - -func (x *ParseFile_Args) Reset() { - *x = ParseFile_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseFile_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseFile_Args) ProtoMessage() {} - -func (x *ParseFile_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseFile_Args.ProtoReflect.Descriptor instead. -func (*ParseFile_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{10} -} - -func (x *ParseFile_Args) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ParseFile_Args) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *ParseFile_Args) GetExternalPkgs() []*ExternalPkg { - if x != nil { - return x.ExternalPkgs - } - return nil -} +type ParseFile_Args = api.ParseFile_Args // Message for parse file response. -type ParseFile_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Abstract Syntax Tree (AST) in JSON format. - AstJson string `protobuf:"bytes,1,opt,name=ast_json,json=astJson,proto3" json:"ast_json,omitempty"` - // File dependency paths. - Deps []string `protobuf:"bytes,2,rep,name=deps,proto3" json:"deps,omitempty"` - // List of parse errors. - Errors []*Error `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` -} - -func (x *ParseFile_Result) Reset() { - *x = ParseFile_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseFile_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseFile_Result) ProtoMessage() {} - -func (x *ParseFile_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseFile_Result.ProtoReflect.Descriptor instead. -func (*ParseFile_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{11} -} - -func (x *ParseFile_Result) GetAstJson() string { - if x != nil { - return x.AstJson - } - return "" -} - -func (x *ParseFile_Result) GetDeps() []string { - if x != nil { - return x.Deps - } - return nil -} - -func (x *ParseFile_Result) GetErrors() []*Error { - if x != nil { - return x.Errors - } - return nil -} +type ParseFile_Result = api.ParseFile_Result // Message for parse program request arguments. -type ParseProgram_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Paths of the program files to be parsed. - Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` - // Source codes to be parsed. - Sources []string `protobuf:"bytes,2,rep,name=sources,proto3" json:"sources,omitempty"` - // External packages path. - ExternalPkgs []*ExternalPkg `protobuf:"bytes,3,rep,name=external_pkgs,json=externalPkgs,proto3" json:"external_pkgs,omitempty"` -} - -func (x *ParseProgram_Args) Reset() { - *x = ParseProgram_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseProgram_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseProgram_Args) ProtoMessage() {} - -func (x *ParseProgram_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseProgram_Args.ProtoReflect.Descriptor instead. -func (*ParseProgram_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{12} -} - -func (x *ParseProgram_Args) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil -} - -func (x *ParseProgram_Args) GetSources() []string { - if x != nil { - return x.Sources - } - return nil -} - -func (x *ParseProgram_Args) GetExternalPkgs() []*ExternalPkg { - if x != nil { - return x.ExternalPkgs - } - return nil -} +type ParseProgram_Args = api.ParseProgram_Args // Message for parse program response. -type ParseProgram_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Abstract Syntax Tree (AST) in JSON format. - AstJson string `protobuf:"bytes,1,opt,name=ast_json,json=astJson,proto3" json:"ast_json,omitempty"` - // Returns the files in the order they should be compiled. - Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` - // List of parse errors. - Errors []*Error `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` -} - -func (x *ParseProgram_Result) Reset() { - *x = ParseProgram_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseProgram_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseProgram_Result) ProtoMessage() {} - -func (x *ParseProgram_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseProgram_Result.ProtoReflect.Descriptor instead. -func (*ParseProgram_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{13} -} - -func (x *ParseProgram_Result) GetAstJson() string { - if x != nil { - return x.AstJson - } - return "" -} - -func (x *ParseProgram_Result) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil -} - -func (x *ParseProgram_Result) GetErrors() []*Error { - if x != nil { - return x.Errors - } - return nil -} +type ParseProgram_Result = api.ParseProgram_Result // Message for load package request arguments. -type LoadPackage_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Arguments for parsing the program. - ParseArgs *ParseProgram_Args `protobuf:"bytes,1,opt,name=parse_args,json=parseArgs,proto3" json:"parse_args,omitempty"` - // Flag indicating whether to resolve AST. - ResolveAst bool `protobuf:"varint,2,opt,name=resolve_ast,json=resolveAst,proto3" json:"resolve_ast,omitempty"` - // Flag indicating whether to load built-in modules. - LoadBuiltin bool `protobuf:"varint,3,opt,name=load_builtin,json=loadBuiltin,proto3" json:"load_builtin,omitempty"` - // Flag indicating whether to include AST index. - WithAstIndex bool `protobuf:"varint,4,opt,name=with_ast_index,json=withAstIndex,proto3" json:"with_ast_index,omitempty"` -} - -func (x *LoadPackage_Args) Reset() { - *x = LoadPackage_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadPackage_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadPackage_Args) ProtoMessage() {} - -func (x *LoadPackage_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadPackage_Args.ProtoReflect.Descriptor instead. -func (*LoadPackage_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{14} -} - -func (x *LoadPackage_Args) GetParseArgs() *ParseProgram_Args { - if x != nil { - return x.ParseArgs - } - return nil -} - -func (x *LoadPackage_Args) GetResolveAst() bool { - if x != nil { - return x.ResolveAst - } - return false -} - -func (x *LoadPackage_Args) GetLoadBuiltin() bool { - if x != nil { - return x.LoadBuiltin - } - return false -} - -func (x *LoadPackage_Args) GetWithAstIndex() bool { - if x != nil { - return x.WithAstIndex - } - return false -} +type LoadPackage_Args = api.LoadPackage_Args // Message for load package response. -type LoadPackage_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Program Abstract Syntax Tree (AST) in JSON format. - Program string `protobuf:"bytes,1,opt,name=program,proto3" json:"program,omitempty"` - // Returns the files in the order they should be compiled. - Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` - // List of parse errors. - ParseErrors []*Error `protobuf:"bytes,3,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` - // List of type errors. - TypeErrors []*Error `protobuf:"bytes,4,rep,name=type_errors,json=typeErrors,proto3" json:"type_errors,omitempty"` - // Map of scopes with scope index as key. - Scopes map[string]*Scope `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map of symbols with symbol index as key. - Symbols map[string]*Symbol `protobuf:"bytes,6,rep,name=symbols,proto3" json:"symbols,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map of node-symbol associations with AST index UUID as key. - NodeSymbolMap map[string]*SymbolIndex `protobuf:"bytes,7,rep,name=node_symbol_map,json=nodeSymbolMap,proto3" json:"node_symbol_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map of symbol-node associations with symbol index as key. - SymbolNodeMap map[string]string `protobuf:"bytes,8,rep,name=symbol_node_map,json=symbolNodeMap,proto3" json:"symbol_node_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map of fully qualified names with symbol index as key. - FullyQualifiedNameMap map[string]*SymbolIndex `protobuf:"bytes,9,rep,name=fully_qualified_name_map,json=fullyQualifiedNameMap,proto3" json:"fully_qualified_name_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map of package scope with package path as key. - PkgScopeMap map[string]*ScopeIndex `protobuf:"bytes,10,rep,name=pkg_scope_map,json=pkgScopeMap,proto3" json:"pkg_scope_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *LoadPackage_Result) Reset() { - *x = LoadPackage_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadPackage_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadPackage_Result) ProtoMessage() {} - -func (x *LoadPackage_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadPackage_Result.ProtoReflect.Descriptor instead. -func (*LoadPackage_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{15} -} - -func (x *LoadPackage_Result) GetProgram() string { - if x != nil { - return x.Program - } - return "" -} - -func (x *LoadPackage_Result) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil -} - -func (x *LoadPackage_Result) GetParseErrors() []*Error { - if x != nil { - return x.ParseErrors - } - return nil -} - -func (x *LoadPackage_Result) GetTypeErrors() []*Error { - if x != nil { - return x.TypeErrors - } - return nil -} - -func (x *LoadPackage_Result) GetScopes() map[string]*Scope { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *LoadPackage_Result) GetSymbols() map[string]*Symbol { - if x != nil { - return x.Symbols - } - return nil -} - -func (x *LoadPackage_Result) GetNodeSymbolMap() map[string]*SymbolIndex { - if x != nil { - return x.NodeSymbolMap - } - return nil -} - -func (x *LoadPackage_Result) GetSymbolNodeMap() map[string]string { - if x != nil { - return x.SymbolNodeMap - } - return nil -} - -func (x *LoadPackage_Result) GetFullyQualifiedNameMap() map[string]*SymbolIndex { - if x != nil { - return x.FullyQualifiedNameMap - } - return nil -} - -func (x *LoadPackage_Result) GetPkgScopeMap() map[string]*ScopeIndex { - if x != nil { - return x.PkgScopeMap - } - return nil -} +type LoadPackage_Result = api.LoadPackage_Result // Message for list options response. -type ListOptions_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of available options. - Options []*OptionHelp `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *ListOptions_Result) Reset() { - *x = ListOptions_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListOptions_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOptions_Result) ProtoMessage() {} - -func (x *ListOptions_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOptions_Result.ProtoReflect.Descriptor instead. -func (*ListOptions_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{16} -} - -func (x *ListOptions_Result) GetOptions() []*OptionHelp { - if x != nil { - return x.Options - } - return nil -} +type ListOptions_Result = api.ListOptions_Result // Message representing a help option. -type OptionHelp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the option. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Type of the option. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Flag indicating if the option is required. - Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"` - // Default value of the option. - DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Help text for the option. - Help string `protobuf:"bytes,5,opt,name=help,proto3" json:"help,omitempty"` -} - -func (x *OptionHelp) Reset() { - *x = OptionHelp{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OptionHelp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OptionHelp) ProtoMessage() {} - -func (x *OptionHelp) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OptionHelp.ProtoReflect.Descriptor instead. -func (*OptionHelp) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{17} -} - -func (x *OptionHelp) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *OptionHelp) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *OptionHelp) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -func (x *OptionHelp) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -func (x *OptionHelp) GetHelp() string { - if x != nil { - return x.Help - } - return "" -} +type OptionHelp = api.OptionHelp // Message representing a symbol in KCL. -type Symbol struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type of the symbol. - Ty *KclType `protobuf:"bytes,1,opt,name=ty,proto3" json:"ty,omitempty"` - // Name of the symbol. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Owner of the symbol. - Owner *SymbolIndex `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - // Definition of the symbol. - Def *SymbolIndex `protobuf:"bytes,4,opt,name=def,proto3" json:"def,omitempty"` - // Attributes of the symbol. - Attrs []*SymbolIndex `protobuf:"bytes,5,rep,name=attrs,proto3" json:"attrs,omitempty"` - // Flag indicating if the symbol is global. - IsGlobal bool `protobuf:"varint,6,opt,name=is_global,json=isGlobal,proto3" json:"is_global,omitempty"` -} - -func (x *Symbol) Reset() { - *x = Symbol{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Symbol) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Symbol) ProtoMessage() {} - -func (x *Symbol) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Symbol.ProtoReflect.Descriptor instead. -func (*Symbol) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{18} -} - -func (x *Symbol) GetTy() *KclType { - if x != nil { - return x.Ty - } - return nil -} - -func (x *Symbol) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Symbol) GetOwner() *SymbolIndex { - if x != nil { - return x.Owner - } - return nil -} - -func (x *Symbol) GetDef() *SymbolIndex { - if x != nil { - return x.Def - } - return nil -} - -func (x *Symbol) GetAttrs() []*SymbolIndex { - if x != nil { - return x.Attrs - } - return nil -} - -func (x *Symbol) GetIsGlobal() bool { - if x != nil { - return x.IsGlobal - } - return false -} +type Symbol = api.Symbol // Message representing a scope in KCL. -type Scope struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type of the scope. - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // Parent scope. - Parent *ScopeIndex `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // Owner of the scope. - Owner *SymbolIndex `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - // Children of the scope. - Children []*ScopeIndex `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` - // Definitions in the scope. - Defs []*SymbolIndex `protobuf:"bytes,5,rep,name=defs,proto3" json:"defs,omitempty"` -} - -func (x *Scope) Reset() { - *x = Scope{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Scope) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scope) ProtoMessage() {} - -func (x *Scope) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Scope.ProtoReflect.Descriptor instead. -func (*Scope) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{19} -} - -func (x *Scope) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Scope) GetParent() *ScopeIndex { - if x != nil { - return x.Parent - } - return nil -} - -func (x *Scope) GetOwner() *SymbolIndex { - if x != nil { - return x.Owner - } - return nil -} - -func (x *Scope) GetChildren() []*ScopeIndex { - if x != nil { - return x.Children - } - return nil -} - -func (x *Scope) GetDefs() []*SymbolIndex { - if x != nil { - return x.Defs - } - return nil -} +type Scope = api.Scope // Message representing a symbol index. -type SymbolIndex struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Index identifier. - I uint64 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"` - // Global identifier. - G uint64 `protobuf:"varint,2,opt,name=g,proto3" json:"g,omitempty"` - // Type of the symbol or scope. - Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` -} - -func (x *SymbolIndex) Reset() { - *x = SymbolIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SymbolIndex) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SymbolIndex) ProtoMessage() {} - -func (x *SymbolIndex) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SymbolIndex.ProtoReflect.Descriptor instead. -func (*SymbolIndex) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{20} -} - -func (x *SymbolIndex) GetI() uint64 { - if x != nil { - return x.I - } - return 0 -} - -func (x *SymbolIndex) GetG() uint64 { - if x != nil { - return x.G - } - return 0 -} - -func (x *SymbolIndex) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} +type SymbolIndex = api.SymbolIndex // Message representing a scope index. -type ScopeIndex struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Index identifier. - I uint64 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"` - // Global identifier. - G uint64 `protobuf:"varint,2,opt,name=g,proto3" json:"g,omitempty"` - // Type of the scope. - Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` -} - -func (x *ScopeIndex) Reset() { - *x = ScopeIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopeIndex) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopeIndex) ProtoMessage() {} - -func (x *ScopeIndex) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopeIndex.ProtoReflect.Descriptor instead. -func (*ScopeIndex) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{21} -} - -func (x *ScopeIndex) GetI() uint64 { - if x != nil { - return x.I - } - return 0 -} - -func (x *ScopeIndex) GetG() uint64 { - if x != nil { - return x.G - } - return 0 -} - -func (x *ScopeIndex) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} +type ScopeIndex = api.ScopeIndex // Message for execute program request arguments. -type ExecProgram_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Working directory. - WorkDir string `protobuf:"bytes,1,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"` - // List of KCL filenames. - KFilenameList []string `protobuf:"bytes,2,rep,name=k_filename_list,json=kFilenameList,proto3" json:"k_filename_list,omitempty"` - // List of KCL codes. - KCodeList []string `protobuf:"bytes,3,rep,name=k_code_list,json=kCodeList,proto3" json:"k_code_list,omitempty"` - // Arguments for the program. - Args []*Argument `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` - // Override configurations. - Overrides []string `protobuf:"bytes,5,rep,name=overrides,proto3" json:"overrides,omitempty"` - // Flag to disable YAML result. - DisableYamlResult bool `protobuf:"varint,6,opt,name=disable_yaml_result,json=disableYamlResult,proto3" json:"disable_yaml_result,omitempty"` - // Flag to print override AST. - PrintOverrideAst bool `protobuf:"varint,7,opt,name=print_override_ast,json=printOverrideAst,proto3" json:"print_override_ast,omitempty"` - // Flag for strict range check. - StrictRangeCheck bool `protobuf:"varint,8,opt,name=strict_range_check,json=strictRangeCheck,proto3" json:"strict_range_check,omitempty"` - // Flag to disable none values. - DisableNone bool `protobuf:"varint,9,opt,name=disable_none,json=disableNone,proto3" json:"disable_none,omitempty"` - // Verbose level. - Verbose int32 `protobuf:"varint,10,opt,name=verbose,proto3" json:"verbose,omitempty"` - // Debug level. - Debug int32 `protobuf:"varint,11,opt,name=debug,proto3" json:"debug,omitempty"` - // Flag to sort keys in YAML/JSON results. - SortKeys bool `protobuf:"varint,12,opt,name=sort_keys,json=sortKeys,proto3" json:"sort_keys,omitempty"` - // External packages path. - ExternalPkgs []*ExternalPkg `protobuf:"bytes,13,rep,name=external_pkgs,json=externalPkgs,proto3" json:"external_pkgs,omitempty"` - // Flag to include schema type path in results. - IncludeSchemaTypePath bool `protobuf:"varint,14,opt,name=include_schema_type_path,json=includeSchemaTypePath,proto3" json:"include_schema_type_path,omitempty"` - // Flag to compile only without execution. - CompileOnly bool `protobuf:"varint,15,opt,name=compile_only,json=compileOnly,proto3" json:"compile_only,omitempty"` - // Flag to show hidden attributes. - ShowHidden bool `protobuf:"varint,16,opt,name=show_hidden,json=showHidden,proto3" json:"show_hidden,omitempty"` - // Path selectors for results. - PathSelector []string `protobuf:"bytes,17,rep,name=path_selector,json=pathSelector,proto3" json:"path_selector,omitempty"` - // Flag for fast evaluation. - FastEval bool `protobuf:"varint,18,opt,name=fast_eval,json=fastEval,proto3" json:"fast_eval,omitempty"` -} - -func (x *ExecProgram_Args) Reset() { - *x = ExecProgram_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExecProgram_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExecProgram_Args) ProtoMessage() {} - -func (x *ExecProgram_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExecProgram_Args.ProtoReflect.Descriptor instead. -func (*ExecProgram_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{22} -} - -func (x *ExecProgram_Args) GetWorkDir() string { - if x != nil { - return x.WorkDir - } - return "" -} - -func (x *ExecProgram_Args) GetKFilenameList() []string { - if x != nil { - return x.KFilenameList - } - return nil -} - -func (x *ExecProgram_Args) GetKCodeList() []string { - if x != nil { - return x.KCodeList - } - return nil -} - -func (x *ExecProgram_Args) GetArgs() []*Argument { - if x != nil { - return x.Args - } - return nil -} +type ExecProgram_Args = api.ExecProgram_Args -func (x *ExecProgram_Args) GetOverrides() []string { - if x != nil { - return x.Overrides - } - return nil -} - -func (x *ExecProgram_Args) GetDisableYamlResult() bool { - if x != nil { - return x.DisableYamlResult - } - return false -} - -func (x *ExecProgram_Args) GetPrintOverrideAst() bool { - if x != nil { - return x.PrintOverrideAst - } - return false -} - -func (x *ExecProgram_Args) GetStrictRangeCheck() bool { - if x != nil { - return x.StrictRangeCheck - } - return false -} - -func (x *ExecProgram_Args) GetDisableNone() bool { - if x != nil { - return x.DisableNone - } - return false -} +// Message for execute program response. +type ExecProgram_Result = api.ExecProgram_Result -func (x *ExecProgram_Args) GetVerbose() int32 { - if x != nil { - return x.Verbose - } - return 0 -} +// Message for build program request arguments. +type BuildProgram_Args = api.BuildProgram_Args -func (x *ExecProgram_Args) GetDebug() int32 { - if x != nil { - return x.Debug - } - return 0 -} +// Message for build program response. +type BuildProgram_Result = api.BuildProgram_Result -func (x *ExecProgram_Args) GetSortKeys() bool { - if x != nil { - return x.SortKeys - } - return false -} +// Message for execute artifact request arguments. +type ExecArtifact_Args = api.ExecArtifact_Args -func (x *ExecProgram_Args) GetExternalPkgs() []*ExternalPkg { - if x != nil { - return x.ExternalPkgs - } - return nil -} +// Message for format code request arguments. +type FormatCode_Args = api.FormatCode_Args -func (x *ExecProgram_Args) GetIncludeSchemaTypePath() bool { - if x != nil { - return x.IncludeSchemaTypePath - } - return false -} +// Message for format code response. +type FormatCode_Result = api.FormatCode_Result -func (x *ExecProgram_Args) GetCompileOnly() bool { - if x != nil { - return x.CompileOnly - } - return false -} +// Message for format file path request arguments. +type FormatPath_Args = api.FormatPath_Args -func (x *ExecProgram_Args) GetShowHidden() bool { - if x != nil { - return x.ShowHidden - } - return false -} +// Message for format file path response. +type FormatPath_Result = api.FormatPath_Result -func (x *ExecProgram_Args) GetPathSelector() []string { - if x != nil { - return x.PathSelector - } - return nil -} +// Message for lint file path request arguments. +type LintPath_Args = api.LintPath_Args -func (x *ExecProgram_Args) GetFastEval() bool { - if x != nil { - return x.FastEval - } - return false -} +// Message for lint file path response. +type LintPath_Result = api.LintPath_Result -// Message for execute program response. -type ExecProgram_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Message for override file request arguments. +type OverrideFile_Args = api.OverrideFile_Args - // Result in JSON format. - JsonResult string `protobuf:"bytes,1,opt,name=json_result,json=jsonResult,proto3" json:"json_result,omitempty"` - // Result in YAML format. - YamlResult string `protobuf:"bytes,2,opt,name=yaml_result,json=yamlResult,proto3" json:"yaml_result,omitempty"` - // Log message from execution. - LogMessage string `protobuf:"bytes,3,opt,name=log_message,json=logMessage,proto3" json:"log_message,omitempty"` - // Error message from execution. - ErrMessage string `protobuf:"bytes,4,opt,name=err_message,json=errMessage,proto3" json:"err_message,omitempty"` -} +// Message for override file response. +type OverrideFile_Result = api.OverrideFile_Result -func (x *ExecProgram_Result) Reset() { - *x = ExecProgram_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} +// Message for list variables options. +type ListVariables_Options = api.ListVariables_Options -func (x *ExecProgram_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} +// Message representing a list of variables. +type VariableList = api.VariableList -func (*ExecProgram_Result) ProtoMessage() {} +// Message for list variables request arguments. +type ListVariables_Args = api.ListVariables_Args -func (x *ExecProgram_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} +// Message for list variables response. +type ListVariables_Result = api.ListVariables_Result -// Deprecated: Use ExecProgram_Result.ProtoReflect.Descriptor instead. -func (*ExecProgram_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{23} -} +// Message representing a variable. +type Variable = api.Variable -func (x *ExecProgram_Result) GetJsonResult() string { - if x != nil { - return x.JsonResult - } - return "" -} +// Message representing a map entry. +type MapEntry = api.MapEntry -func (x *ExecProgram_Result) GetYamlResult() string { - if x != nil { - return x.YamlResult - } - return "" -} +// Message for get schema type mapping request arguments. +type GetSchemaTypeMapping_Args = api.GetSchemaTypeMapping_Args -func (x *ExecProgram_Result) GetLogMessage() string { - if x != nil { - return x.LogMessage - } - return "" -} +// Message for get schema type mapping response. +type GetSchemaTypeMapping_Result = api.GetSchemaTypeMapping_Result -func (x *ExecProgram_Result) GetErrMessage() string { - if x != nil { - return x.ErrMessage - } - return "" -} +// Message for validate code request arguments. +type ValidateCode_Args = api.ValidateCode_Args -// Message for build program request arguments. -type BuildProgram_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Message for validate code response. +type ValidateCode_Result = api.ValidateCode_Result - // Arguments for executing the program. - ExecArgs *ExecProgram_Args `protobuf:"bytes,1,opt,name=exec_args,json=execArgs,proto3" json:"exec_args,omitempty"` - // Output path. - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` -} +// Message representing a position in the source code. +type Position = api.Position -func (x *BuildProgram_Args) Reset() { - *x = BuildProgram_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} +// Message for list dependency files request arguments. +type ListDepFiles_Args = api.ListDepFiles_Args -func (x *BuildProgram_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} +// Message for list dependency files response. +type ListDepFiles_Result = api.ListDepFiles_Result -func (*BuildProgram_Args) ProtoMessage() {} +// Message for load settings files request arguments. +type LoadSettingsFiles_Args = api.LoadSettingsFiles_Args -func (x *BuildProgram_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} +// Message for load settings files response. +type LoadSettingsFiles_Result = api.LoadSettingsFiles_Result -// Deprecated: Use BuildProgram_Args.ProtoReflect.Descriptor instead. -func (*BuildProgram_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{24} -} +// Message representing KCL CLI configuration. +type CliConfig = api.CliConfig -func (x *BuildProgram_Args) GetExecArgs() *ExecProgram_Args { - if x != nil { - return x.ExecArgs - } - return nil -} +// Message representing a key-value pair. +type KeyValuePair = api.KeyValuePair -func (x *BuildProgram_Args) GetOutput() string { - if x != nil { - return x.Output - } - return "" -} +// Message for rename request arguments. +type Rename_Args = api.Rename_Args -// Message for build program response. -type BuildProgram_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Message for rename response. +type Rename_Result = api.Rename_Result - // Path of the built program. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} +// Message for rename code request arguments. +type RenameCode_Args = api.RenameCode_Args -func (x *BuildProgram_Result) Reset() { - *x = BuildProgram_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} +// Message for rename code response. +type RenameCode_Result = api.RenameCode_Result -func (x *BuildProgram_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} +// Message for test request arguments. +type Test_Args = api.Test_Args -func (*BuildProgram_Result) ProtoMessage() {} +// Message for test response. +type Test_Result = api.Test_Result -func (x *BuildProgram_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} +// Message representing information about a single test case. +type TestCaseInfo = api.TestCaseInfo -// Deprecated: Use BuildProgram_Result.ProtoReflect.Descriptor instead. -func (*BuildProgram_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{25} -} +// Message for update dependencies request arguments. +type UpdateDependencies_Args = api.UpdateDependencies_Args -func (x *BuildProgram_Result) GetPath() string { - if x != nil { - return x.Path - } - return "" -} +// Message for update dependencies response. +type UpdateDependencies_Result = api.UpdateDependencies_Result -// Message for execute artifact request arguments. -type ExecArtifact_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Message representing a KCL type. +type KclType = api.KclType - // Path of the artifact. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Arguments for executing the program. - ExecArgs *ExecProgram_Args `protobuf:"bytes,2,opt,name=exec_args,json=execArgs,proto3" json:"exec_args,omitempty"` -} - -func (x *ExecArtifact_Args) Reset() { - *x = ExecArtifact_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExecArtifact_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExecArtifact_Args) ProtoMessage() {} - -func (x *ExecArtifact_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExecArtifact_Args.ProtoReflect.Descriptor instead. -func (*ExecArtifact_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{26} -} - -func (x *ExecArtifact_Args) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ExecArtifact_Args) GetExecArgs() *ExecProgram_Args { - if x != nil { - return x.ExecArgs - } - return nil -} - -// Message for format code request arguments. -type FormatCode_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Source code to be formatted. - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` -} - -func (x *FormatCode_Args) Reset() { - *x = FormatCode_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FormatCode_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FormatCode_Args) ProtoMessage() {} - -func (x *FormatCode_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FormatCode_Args.ProtoReflect.Descriptor instead. -func (*FormatCode_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{27} -} - -func (x *FormatCode_Args) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -// Message for format code response. -type FormatCode_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Formatted code as bytes. - Formatted []byte `protobuf:"bytes,1,opt,name=formatted,proto3" json:"formatted,omitempty"` -} - -func (x *FormatCode_Result) Reset() { - *x = FormatCode_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FormatCode_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FormatCode_Result) ProtoMessage() {} - -func (x *FormatCode_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FormatCode_Result.ProtoReflect.Descriptor instead. -func (*FormatCode_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{28} -} - -func (x *FormatCode_Result) GetFormatted() []byte { - if x != nil { - return x.Formatted - } - return nil -} - -// Message for format file path request arguments. -type FormatPath_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path of the file to format. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *FormatPath_Args) Reset() { - *x = FormatPath_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FormatPath_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FormatPath_Args) ProtoMessage() {} - -func (x *FormatPath_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FormatPath_Args.ProtoReflect.Descriptor instead. -func (*FormatPath_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{29} -} - -func (x *FormatPath_Args) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -// Message for format file path response. -type FormatPath_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of changed file paths. - ChangedPaths []string `protobuf:"bytes,1,rep,name=changed_paths,json=changedPaths,proto3" json:"changed_paths,omitempty"` -} - -func (x *FormatPath_Result) Reset() { - *x = FormatPath_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FormatPath_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FormatPath_Result) ProtoMessage() {} - -func (x *FormatPath_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FormatPath_Result.ProtoReflect.Descriptor instead. -func (*FormatPath_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{30} -} - -func (x *FormatPath_Result) GetChangedPaths() []string { - if x != nil { - return x.ChangedPaths - } - return nil -} - -// Message for lint file path request arguments. -type LintPath_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Paths of the files to lint. - Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` -} - -func (x *LintPath_Args) Reset() { - *x = LintPath_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LintPath_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LintPath_Args) ProtoMessage() {} - -func (x *LintPath_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LintPath_Args.ProtoReflect.Descriptor instead. -func (*LintPath_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{31} -} - -func (x *LintPath_Args) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil -} - -// Message for lint file path response. -type LintPath_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of lint results. - Results []string `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` -} - -func (x *LintPath_Result) Reset() { - *x = LintPath_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LintPath_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LintPath_Result) ProtoMessage() {} - -func (x *LintPath_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LintPath_Result.ProtoReflect.Descriptor instead. -func (*LintPath_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{32} -} - -func (x *LintPath_Result) GetResults() []string { - if x != nil { - return x.Results - } - return nil -} - -// Message for override file request arguments. -type OverrideFile_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path of the file to override. - File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` - // List of override specifications. - Specs []string `protobuf:"bytes,2,rep,name=specs,proto3" json:"specs,omitempty"` - // List of import paths. - ImportPaths []string `protobuf:"bytes,3,rep,name=import_paths,json=importPaths,proto3" json:"import_paths,omitempty"` -} - -func (x *OverrideFile_Args) Reset() { - *x = OverrideFile_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OverrideFile_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OverrideFile_Args) ProtoMessage() {} - -func (x *OverrideFile_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OverrideFile_Args.ProtoReflect.Descriptor instead. -func (*OverrideFile_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{33} -} - -func (x *OverrideFile_Args) GetFile() string { - if x != nil { - return x.File - } - return "" -} - -func (x *OverrideFile_Args) GetSpecs() []string { - if x != nil { - return x.Specs - } - return nil -} - -func (x *OverrideFile_Args) GetImportPaths() []string { - if x != nil { - return x.ImportPaths - } - return nil -} - -// Message for override file response. -type OverrideFile_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Result of the override operation. - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` - // List of parse errors encountered. - ParseErrors []*Error `protobuf:"bytes,2,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` -} - -func (x *OverrideFile_Result) Reset() { - *x = OverrideFile_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OverrideFile_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OverrideFile_Result) ProtoMessage() {} - -func (x *OverrideFile_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OverrideFile_Result.ProtoReflect.Descriptor instead. -func (*OverrideFile_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{34} -} - -func (x *OverrideFile_Result) GetResult() bool { - if x != nil { - return x.Result - } - return false -} - -func (x *OverrideFile_Result) GetParseErrors() []*Error { - if x != nil { - return x.ParseErrors - } - return nil -} - -// Message for list variables options. -type ListVariables_Options struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Flag to merge program configuration. - MergeProgram bool `protobuf:"varint,1,opt,name=merge_program,json=mergeProgram,proto3" json:"merge_program,omitempty"` -} - -func (x *ListVariables_Options) Reset() { - *x = ListVariables_Options{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListVariables_Options) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListVariables_Options) ProtoMessage() {} - -func (x *ListVariables_Options) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListVariables_Options.ProtoReflect.Descriptor instead. -func (*ListVariables_Options) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{35} -} - -func (x *ListVariables_Options) GetMergeProgram() bool { - if x != nil { - return x.MergeProgram - } - return false -} - -// Message representing a list of variables. -type VariableList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of variables. - Variables []*Variable `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty"` -} - -func (x *VariableList) Reset() { - *x = VariableList{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VariableList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VariableList) ProtoMessage() {} - -func (x *VariableList) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VariableList.ProtoReflect.Descriptor instead. -func (*VariableList) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{36} -} - -func (x *VariableList) GetVariables() []*Variable { - if x != nil { - return x.Variables - } - return nil -} - -// Message for list variables request arguments. -type ListVariables_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Files to be processed. - Files []string `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` - // Specifications for variables. - Specs []string `protobuf:"bytes,2,rep,name=specs,proto3" json:"specs,omitempty"` - // Options for listing variables. - Options *ListVariables_Options `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *ListVariables_Args) Reset() { - *x = ListVariables_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListVariables_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListVariables_Args) ProtoMessage() {} - -func (x *ListVariables_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListVariables_Args.ProtoReflect.Descriptor instead. -func (*ListVariables_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{37} -} - -func (x *ListVariables_Args) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -func (x *ListVariables_Args) GetSpecs() []string { - if x != nil { - return x.Specs - } - return nil -} - -func (x *ListVariables_Args) GetOptions() *ListVariables_Options { - if x != nil { - return x.Options - } - return nil -} - -// Message for list variables response. -type ListVariables_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Map of variable lists by file. - Variables map[string]*VariableList `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // List of unsupported codes. - UnsupportedCodes []string `protobuf:"bytes,2,rep,name=unsupported_codes,json=unsupportedCodes,proto3" json:"unsupported_codes,omitempty"` - // List of parse errors encountered. - ParseErrors []*Error `protobuf:"bytes,3,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` -} - -func (x *ListVariables_Result) Reset() { - *x = ListVariables_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListVariables_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListVariables_Result) ProtoMessage() {} - -func (x *ListVariables_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListVariables_Result.ProtoReflect.Descriptor instead. -func (*ListVariables_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{38} -} - -func (x *ListVariables_Result) GetVariables() map[string]*VariableList { - if x != nil { - return x.Variables - } - return nil -} - -func (x *ListVariables_Result) GetUnsupportedCodes() []string { - if x != nil { - return x.UnsupportedCodes - } - return nil -} - -func (x *ListVariables_Result) GetParseErrors() []*Error { - if x != nil { - return x.ParseErrors - } - return nil -} - -// Message representing a variable. -type Variable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Value of the variable. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // Type name of the variable. - TypeName string `protobuf:"bytes,2,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - // Operation symbol associated with the variable. - OpSym string `protobuf:"bytes,3,opt,name=op_sym,json=opSym,proto3" json:"op_sym,omitempty"` - // List items if the variable is a list. - ListItems []*Variable `protobuf:"bytes,4,rep,name=list_items,json=listItems,proto3" json:"list_items,omitempty"` - // Dictionary entries if the variable is a dictionary. - DictEntries []*MapEntry `protobuf:"bytes,5,rep,name=dict_entries,json=dictEntries,proto3" json:"dict_entries,omitempty"` -} - -func (x *Variable) Reset() { - *x = Variable{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Variable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Variable) ProtoMessage() {} - -func (x *Variable) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Variable.ProtoReflect.Descriptor instead. -func (*Variable) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{39} -} - -func (x *Variable) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Variable) GetTypeName() string { - if x != nil { - return x.TypeName - } - return "" -} - -func (x *Variable) GetOpSym() string { - if x != nil { - return x.OpSym - } - return "" -} - -func (x *Variable) GetListItems() []*Variable { - if x != nil { - return x.ListItems - } - return nil -} - -func (x *Variable) GetDictEntries() []*MapEntry { - if x != nil { - return x.DictEntries - } - return nil -} - -// Message representing a map entry. -type MapEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key of the map entry. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Value of the map entry. - Value *Variable `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *MapEntry) Reset() { - *x = MapEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapEntry) ProtoMessage() {} - -func (x *MapEntry) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapEntry.ProtoReflect.Descriptor instead. -func (*MapEntry) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{40} -} - -func (x *MapEntry) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *MapEntry) GetValue() *Variable { - if x != nil { - return x.Value - } - return nil -} - -// Message for get schema type mapping request arguments. -type GetSchemaTypeMapping_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Arguments for executing the program. - ExecArgs *ExecProgram_Args `protobuf:"bytes,1,opt,name=exec_args,json=execArgs,proto3" json:"exec_args,omitempty"` - // Name of the schema. - SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` -} - -func (x *GetSchemaTypeMapping_Args) Reset() { - *x = GetSchemaTypeMapping_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaTypeMapping_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaTypeMapping_Args) ProtoMessage() {} - -func (x *GetSchemaTypeMapping_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaTypeMapping_Args.ProtoReflect.Descriptor instead. -func (*GetSchemaTypeMapping_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{41} -} - -func (x *GetSchemaTypeMapping_Args) GetExecArgs() *ExecProgram_Args { - if x != nil { - return x.ExecArgs - } - return nil -} - -func (x *GetSchemaTypeMapping_Args) GetSchemaName() string { - if x != nil { - return x.SchemaName - } - return "" -} - -// Message for get schema type mapping response. -type GetSchemaTypeMapping_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Map of schema type mappings. - SchemaTypeMapping map[string]*KclType `protobuf:"bytes,1,rep,name=schema_type_mapping,json=schemaTypeMapping,proto3" json:"schema_type_mapping,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GetSchemaTypeMapping_Result) Reset() { - *x = GetSchemaTypeMapping_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaTypeMapping_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaTypeMapping_Result) ProtoMessage() {} - -func (x *GetSchemaTypeMapping_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaTypeMapping_Result.ProtoReflect.Descriptor instead. -func (*GetSchemaTypeMapping_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{42} -} - -func (x *GetSchemaTypeMapping_Result) GetSchemaTypeMapping() map[string]*KclType { - if x != nil { - return x.SchemaTypeMapping - } - return nil -} - -// Message for validate code request arguments. -type ValidateCode_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the data file. - Datafile string `protobuf:"bytes,1,opt,name=datafile,proto3" json:"datafile,omitempty"` - // Data content. - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // Path to the code file. - File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` - // Source code content. - Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` - // Name of the schema. - Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` - // Name of the attribute. - AttributeName string `protobuf:"bytes,6,opt,name=attribute_name,json=attributeName,proto3" json:"attribute_name,omitempty"` - // Format of the validation (e.g., "json", "yaml"). - Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"` -} - -func (x *ValidateCode_Args) Reset() { - *x = ValidateCode_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateCode_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateCode_Args) ProtoMessage() {} - -func (x *ValidateCode_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateCode_Args.ProtoReflect.Descriptor instead. -func (*ValidateCode_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{43} -} - -func (x *ValidateCode_Args) GetDatafile() string { - if x != nil { - return x.Datafile - } - return "" -} - -func (x *ValidateCode_Args) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *ValidateCode_Args) GetFile() string { - if x != nil { - return x.File - } - return "" -} - -func (x *ValidateCode_Args) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *ValidateCode_Args) GetSchema() string { - if x != nil { - return x.Schema - } - return "" -} - -func (x *ValidateCode_Args) GetAttributeName() string { - if x != nil { - return x.AttributeName - } - return "" -} - -func (x *ValidateCode_Args) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -// Message for validate code response. -type ValidateCode_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Flag indicating if validation was successful. - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - // Error message from validation. - ErrMessage string `protobuf:"bytes,2,opt,name=err_message,json=errMessage,proto3" json:"err_message,omitempty"` -} - -func (x *ValidateCode_Result) Reset() { - *x = ValidateCode_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateCode_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateCode_Result) ProtoMessage() {} - -func (x *ValidateCode_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateCode_Result.ProtoReflect.Descriptor instead. -func (*ValidateCode_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{44} -} - -func (x *ValidateCode_Result) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *ValidateCode_Result) GetErrMessage() string { - if x != nil { - return x.ErrMessage - } - return "" -} - -// Message representing a position in the source code. -type Position struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Line number. - Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` - // Column number. - Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` - // Filename the position refers to. - Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` -} - -func (x *Position) Reset() { - *x = Position{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Position) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Position) ProtoMessage() {} - -func (x *Position) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Position.ProtoReflect.Descriptor instead. -func (*Position) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{45} -} - -func (x *Position) GetLine() int64 { - if x != nil { - return x.Line - } - return 0 -} - -func (x *Position) GetColumn() int64 { - if x != nil { - return x.Column - } - return 0 -} - -func (x *Position) GetFilename() string { - if x != nil { - return x.Filename - } - return "" -} - -// Message for list dependency files request arguments. -type ListDepFiles_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Working directory. - WorkDir string `protobuf:"bytes,1,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"` - // Flag to use absolute paths. - UseAbsPath bool `protobuf:"varint,2,opt,name=use_abs_path,json=useAbsPath,proto3" json:"use_abs_path,omitempty"` - // Flag to include all files. - IncludeAll bool `protobuf:"varint,3,opt,name=include_all,json=includeAll,proto3" json:"include_all,omitempty"` - // Flag to use fast parser. - UseFastParser bool `protobuf:"varint,4,opt,name=use_fast_parser,json=useFastParser,proto3" json:"use_fast_parser,omitempty"` -} - -func (x *ListDepFiles_Args) Reset() { - *x = ListDepFiles_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDepFiles_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDepFiles_Args) ProtoMessage() {} - -func (x *ListDepFiles_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDepFiles_Args.ProtoReflect.Descriptor instead. -func (*ListDepFiles_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{46} -} - -func (x *ListDepFiles_Args) GetWorkDir() string { - if x != nil { - return x.WorkDir - } - return "" -} - -func (x *ListDepFiles_Args) GetUseAbsPath() bool { - if x != nil { - return x.UseAbsPath - } - return false -} - -func (x *ListDepFiles_Args) GetIncludeAll() bool { - if x != nil { - return x.IncludeAll - } - return false -} - -func (x *ListDepFiles_Args) GetUseFastParser() bool { - if x != nil { - return x.UseFastParser - } - return false -} - -// Message for list dependency files response. -type ListDepFiles_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Root package path. - Pkgroot string `protobuf:"bytes,1,opt,name=pkgroot,proto3" json:"pkgroot,omitempty"` - // Package path. - Pkgpath string `protobuf:"bytes,2,opt,name=pkgpath,proto3" json:"pkgpath,omitempty"` - // List of file paths in the package. - Files []string `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` -} - -func (x *ListDepFiles_Result) Reset() { - *x = ListDepFiles_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDepFiles_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDepFiles_Result) ProtoMessage() {} - -func (x *ListDepFiles_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDepFiles_Result.ProtoReflect.Descriptor instead. -func (*ListDepFiles_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{47} -} - -func (x *ListDepFiles_Result) GetPkgroot() string { - if x != nil { - return x.Pkgroot - } - return "" -} - -func (x *ListDepFiles_Result) GetPkgpath() string { - if x != nil { - return x.Pkgpath - } - return "" -} - -func (x *ListDepFiles_Result) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -// Message for load settings files request arguments. -type LoadSettingsFiles_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Working directory. - WorkDir string `protobuf:"bytes,1,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"` - // Setting files to load. - Files []string `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"` -} - -func (x *LoadSettingsFiles_Args) Reset() { - *x = LoadSettingsFiles_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadSettingsFiles_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadSettingsFiles_Args) ProtoMessage() {} - -func (x *LoadSettingsFiles_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadSettingsFiles_Args.ProtoReflect.Descriptor instead. -func (*LoadSettingsFiles_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{48} -} - -func (x *LoadSettingsFiles_Args) GetWorkDir() string { - if x != nil { - return x.WorkDir - } - return "" -} - -func (x *LoadSettingsFiles_Args) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -// Message for load settings files response. -type LoadSettingsFiles_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // KCL CLI configuration. - KclCliConfigs *CliConfig `protobuf:"bytes,1,opt,name=kcl_cli_configs,json=kclCliConfigs,proto3" json:"kcl_cli_configs,omitempty"` - // List of KCL options as key-value pairs. - KclOptions []*KeyValuePair `protobuf:"bytes,2,rep,name=kcl_options,json=kclOptions,proto3" json:"kcl_options,omitempty"` -} - -func (x *LoadSettingsFiles_Result) Reset() { - *x = LoadSettingsFiles_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadSettingsFiles_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadSettingsFiles_Result) ProtoMessage() {} - -func (x *LoadSettingsFiles_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadSettingsFiles_Result.ProtoReflect.Descriptor instead. -func (*LoadSettingsFiles_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{49} -} - -func (x *LoadSettingsFiles_Result) GetKclCliConfigs() *CliConfig { - if x != nil { - return x.KclCliConfigs - } - return nil -} - -func (x *LoadSettingsFiles_Result) GetKclOptions() []*KeyValuePair { - if x != nil { - return x.KclOptions - } - return nil -} - -// Message representing KCL CLI configuration. -type CliConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of files. - Files []string `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` - // Output path. - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - // List of overrides. - Overrides []string `protobuf:"bytes,3,rep,name=overrides,proto3" json:"overrides,omitempty"` - // Path selectors. - PathSelector []string `protobuf:"bytes,4,rep,name=path_selector,json=pathSelector,proto3" json:"path_selector,omitempty"` - // Flag for strict range check. - StrictRangeCheck bool `protobuf:"varint,5,opt,name=strict_range_check,json=strictRangeCheck,proto3" json:"strict_range_check,omitempty"` - // Flag to disable none values. - DisableNone bool `protobuf:"varint,6,opt,name=disable_none,json=disableNone,proto3" json:"disable_none,omitempty"` - // Verbose level. - Verbose int64 `protobuf:"varint,7,opt,name=verbose,proto3" json:"verbose,omitempty"` - // Debug flag. - Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"` - // Flag to sort keys in YAML/JSON results. - SortKeys bool `protobuf:"varint,9,opt,name=sort_keys,json=sortKeys,proto3" json:"sort_keys,omitempty"` - // Flag to show hidden attributes. - ShowHidden bool `protobuf:"varint,10,opt,name=show_hidden,json=showHidden,proto3" json:"show_hidden,omitempty"` - // Flag to include schema type path in results. - IncludeSchemaTypePath bool `protobuf:"varint,11,opt,name=include_schema_type_path,json=includeSchemaTypePath,proto3" json:"include_schema_type_path,omitempty"` - // Flag for fast evaluation. - FastEval bool `protobuf:"varint,12,opt,name=fast_eval,json=fastEval,proto3" json:"fast_eval,omitempty"` -} - -func (x *CliConfig) Reset() { - *x = CliConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CliConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CliConfig) ProtoMessage() {} - -func (x *CliConfig) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CliConfig.ProtoReflect.Descriptor instead. -func (*CliConfig) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{50} -} - -func (x *CliConfig) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -func (x *CliConfig) GetOutput() string { - if x != nil { - return x.Output - } - return "" -} - -func (x *CliConfig) GetOverrides() []string { - if x != nil { - return x.Overrides - } - return nil -} - -func (x *CliConfig) GetPathSelector() []string { - if x != nil { - return x.PathSelector - } - return nil -} - -func (x *CliConfig) GetStrictRangeCheck() bool { - if x != nil { - return x.StrictRangeCheck - } - return false -} - -func (x *CliConfig) GetDisableNone() bool { - if x != nil { - return x.DisableNone - } - return false -} - -func (x *CliConfig) GetVerbose() int64 { - if x != nil { - return x.Verbose - } - return 0 -} - -func (x *CliConfig) GetDebug() bool { - if x != nil { - return x.Debug - } - return false -} - -func (x *CliConfig) GetSortKeys() bool { - if x != nil { - return x.SortKeys - } - return false -} - -func (x *CliConfig) GetShowHidden() bool { - if x != nil { - return x.ShowHidden - } - return false -} - -func (x *CliConfig) GetIncludeSchemaTypePath() bool { - if x != nil { - return x.IncludeSchemaTypePath - } - return false -} - -func (x *CliConfig) GetFastEval() bool { - if x != nil { - return x.FastEval - } - return false -} - -// Message representing a key-value pair. -type KeyValuePair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key of the pair. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Value of the pair. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *KeyValuePair) Reset() { - *x = KeyValuePair{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyValuePair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyValuePair) ProtoMessage() {} - -func (x *KeyValuePair) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyValuePair.ProtoReflect.Descriptor instead. -func (*KeyValuePair) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{51} -} - -func (x *KeyValuePair) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *KeyValuePair) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Message for rename request arguments. -type Rename_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // File path to the package root. - PackageRoot string `protobuf:"bytes,1,opt,name=package_root,json=packageRoot,proto3" json:"package_root,omitempty"` - // Path to the target symbol to be renamed. - SymbolPath string `protobuf:"bytes,2,opt,name=symbol_path,json=symbolPath,proto3" json:"symbol_path,omitempty"` - // Paths to the source code files. - FilePaths []string `protobuf:"bytes,3,rep,name=file_paths,json=filePaths,proto3" json:"file_paths,omitempty"` - // New name of the symbol. - NewName string `protobuf:"bytes,4,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"` -} - -func (x *Rename_Args) Reset() { - *x = Rename_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Rename_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rename_Args) ProtoMessage() {} - -func (x *Rename_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rename_Args.ProtoReflect.Descriptor instead. -func (*Rename_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{52} -} - -func (x *Rename_Args) GetPackageRoot() string { - if x != nil { - return x.PackageRoot - } - return "" -} - -func (x *Rename_Args) GetSymbolPath() string { - if x != nil { - return x.SymbolPath - } - return "" -} - -func (x *Rename_Args) GetFilePaths() []string { - if x != nil { - return x.FilePaths - } - return nil -} - -func (x *Rename_Args) GetNewName() string { - if x != nil { - return x.NewName - } - return "" -} - -// Message for rename response. -type Rename_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of file paths that got changed. - ChangedFiles []string `protobuf:"bytes,1,rep,name=changed_files,json=changedFiles,proto3" json:"changed_files,omitempty"` -} - -func (x *Rename_Result) Reset() { - *x = Rename_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Rename_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rename_Result) ProtoMessage() {} - -func (x *Rename_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rename_Result.ProtoReflect.Descriptor instead. -func (*Rename_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{53} -} - -func (x *Rename_Result) GetChangedFiles() []string { - if x != nil { - return x.ChangedFiles - } - return nil -} - -// Message for rename code request arguments. -type RenameCode_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // File path to the package root. - PackageRoot string `protobuf:"bytes,1,opt,name=package_root,json=packageRoot,proto3" json:"package_root,omitempty"` - // Path to the target symbol to be renamed. - SymbolPath string `protobuf:"bytes,2,opt,name=symbol_path,json=symbolPath,proto3" json:"symbol_path,omitempty"` - // Map of source code with filename as key and code as value. - SourceCodes map[string]string `protobuf:"bytes,3,rep,name=source_codes,json=sourceCodes,proto3" json:"source_codes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // New name of the symbol. - NewName string `protobuf:"bytes,4,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"` -} - -func (x *RenameCode_Args) Reset() { - *x = RenameCode_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RenameCode_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RenameCode_Args) ProtoMessage() {} - -func (x *RenameCode_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RenameCode_Args.ProtoReflect.Descriptor instead. -func (*RenameCode_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{54} -} - -func (x *RenameCode_Args) GetPackageRoot() string { - if x != nil { - return x.PackageRoot - } - return "" -} - -func (x *RenameCode_Args) GetSymbolPath() string { - if x != nil { - return x.SymbolPath - } - return "" -} - -func (x *RenameCode_Args) GetSourceCodes() map[string]string { - if x != nil { - return x.SourceCodes - } - return nil -} - -func (x *RenameCode_Args) GetNewName() string { - if x != nil { - return x.NewName - } - return "" -} - -// Message for rename code response. -type RenameCode_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Map of changed code with filename as key and modified code as value. - ChangedCodes map[string]string `protobuf:"bytes,1,rep,name=changed_codes,json=changedCodes,proto3" json:"changed_codes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *RenameCode_Result) Reset() { - *x = RenameCode_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RenameCode_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RenameCode_Result) ProtoMessage() {} - -func (x *RenameCode_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RenameCode_Result.ProtoReflect.Descriptor instead. -func (*RenameCode_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{55} -} - -func (x *RenameCode_Result) GetChangedCodes() map[string]string { - if x != nil { - return x.ChangedCodes - } - return nil -} - -// Message for test request arguments. -type Test_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Execution program arguments. - ExecArgs *ExecProgram_Args `protobuf:"bytes,1,opt,name=exec_args,json=execArgs,proto3" json:"exec_args,omitempty"` - // List of KCL package paths to be tested. - PkgList []string `protobuf:"bytes,2,rep,name=pkg_list,json=pkgList,proto3" json:"pkg_list,omitempty"` - // Regular expression for filtering tests to run. - RunRegexp string `protobuf:"bytes,3,opt,name=run_regexp,json=runRegexp,proto3" json:"run_regexp,omitempty"` - // Flag to stop the test run on the first failure. - FailFast bool `protobuf:"varint,4,opt,name=fail_fast,json=failFast,proto3" json:"fail_fast,omitempty"` -} - -func (x *Test_Args) Reset() { - *x = Test_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Test_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Test_Args) ProtoMessage() {} - -func (x *Test_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Test_Args.ProtoReflect.Descriptor instead. -func (*Test_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{56} -} - -func (x *Test_Args) GetExecArgs() *ExecProgram_Args { - if x != nil { - return x.ExecArgs - } - return nil -} - -func (x *Test_Args) GetPkgList() []string { - if x != nil { - return x.PkgList - } - return nil -} - -func (x *Test_Args) GetRunRegexp() string { - if x != nil { - return x.RunRegexp - } - return "" -} - -func (x *Test_Args) GetFailFast() bool { - if x != nil { - return x.FailFast - } - return false -} - -// Message for test response. -type Test_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of test case information. - Info []*TestCaseInfo `protobuf:"bytes,2,rep,name=info,proto3" json:"info,omitempty"` -} - -func (x *Test_Result) Reset() { - *x = Test_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Test_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Test_Result) ProtoMessage() {} - -func (x *Test_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Test_Result.ProtoReflect.Descriptor instead. -func (*Test_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{57} -} - -func (x *Test_Result) GetInfo() []*TestCaseInfo { - if x != nil { - return x.Info - } - return nil -} - -// Message representing information about a single test case. -type TestCaseInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the test case. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Error message if any. - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - // Duration of the test case in microseconds. - Duration uint64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` - // Log message from the test case. - LogMessage string `protobuf:"bytes,4,opt,name=log_message,json=logMessage,proto3" json:"log_message,omitempty"` -} - -func (x *TestCaseInfo) Reset() { - *x = TestCaseInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestCaseInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestCaseInfo) ProtoMessage() {} - -func (x *TestCaseInfo) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestCaseInfo.ProtoReflect.Descriptor instead. -func (*TestCaseInfo) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{58} -} - -func (x *TestCaseInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TestCaseInfo) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -func (x *TestCaseInfo) GetDuration() uint64 { - if x != nil { - return x.Duration - } - return 0 -} - -func (x *TestCaseInfo) GetLogMessage() string { - if x != nil { - return x.LogMessage - } - return "" -} - -// Message for update dependencies request arguments. -type UpdateDependencies_Args struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the manifest file. - ManifestPath string `protobuf:"bytes,1,opt,name=manifest_path,json=manifestPath,proto3" json:"manifest_path,omitempty"` - // Flag to vendor dependencies locally. - Vendor bool `protobuf:"varint,2,opt,name=vendor,proto3" json:"vendor,omitempty"` -} - -func (x *UpdateDependencies_Args) Reset() { - *x = UpdateDependencies_Args{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDependencies_Args) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDependencies_Args) ProtoMessage() {} - -func (x *UpdateDependencies_Args) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDependencies_Args.ProtoReflect.Descriptor instead. -func (*UpdateDependencies_Args) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{59} -} - -func (x *UpdateDependencies_Args) GetManifestPath() string { - if x != nil { - return x.ManifestPath - } - return "" -} - -func (x *UpdateDependencies_Args) GetVendor() bool { - if x != nil { - return x.Vendor - } - return false -} - -// Message for update dependencies response. -type UpdateDependencies_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of external packages updated. - ExternalPkgs []*ExternalPkg `protobuf:"bytes,3,rep,name=external_pkgs,json=externalPkgs,proto3" json:"external_pkgs,omitempty"` -} - -func (x *UpdateDependencies_Result) Reset() { - *x = UpdateDependencies_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDependencies_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDependencies_Result) ProtoMessage() {} - -func (x *UpdateDependencies_Result) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDependencies_Result.ProtoReflect.Descriptor instead. -func (*UpdateDependencies_Result) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{60} -} - -func (x *UpdateDependencies_Result) GetExternalPkgs() []*ExternalPkg { - if x != nil { - return x.ExternalPkgs - } - return nil -} - -// Message representing a KCL type. -type KclType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Union types if applicable. - UnionTypes []*KclType `protobuf:"bytes,2,rep,name=union_types,json=unionTypes,proto3" json:"union_types,omitempty"` - // Default value of the type. - Default string `protobuf:"bytes,3,opt,name=default,proto3" json:"default,omitempty"` - // Name of the schema if applicable. - SchemaName string `protobuf:"bytes,4,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` - // Documentation for the schema. - SchemaDoc string `protobuf:"bytes,5,opt,name=schema_doc,json=schemaDoc,proto3" json:"schema_doc,omitempty"` - // Properties of the schema as a map with property name as key. - Properties map[string]*KclType `protobuf:"bytes,6,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // List of required schema properties. - Required []string `protobuf:"bytes,7,rep,name=required,proto3" json:"required,omitempty"` - // Key type if the KclType is a dictionary. - Key *KclType `protobuf:"bytes,8,opt,name=key,proto3" json:"key,omitempty"` - // Item type if the KclType is a list or dictionary. - Item *KclType `protobuf:"bytes,9,opt,name=item,proto3" json:"item,omitempty"` - // Line number where the type is defined. - Line int32 `protobuf:"varint,10,opt,name=line,proto3" json:"line,omitempty"` - // List of decorators for the schema. - Decorators []*Decorator `protobuf:"bytes,11,rep,name=decorators,proto3" json:"decorators,omitempty"` - // Absolute path of the file where the attribute is located. - Filename string `protobuf:"bytes,12,opt,name=filename,proto3" json:"filename,omitempty"` - // Path of the package where the attribute is located. - PkgPath string `protobuf:"bytes,13,opt,name=pkg_path,json=pkgPath,proto3" json:"pkg_path,omitempty"` - // Documentation for the attribute. - Description string `protobuf:"bytes,14,opt,name=description,proto3" json:"description,omitempty"` - // Map of examples with example name as key. - Examples map[string]*Example `protobuf:"bytes,15,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Base schema if applicable. - BaseSchema *KclType `protobuf:"bytes,16,opt,name=base_schema,json=baseSchema,proto3" json:"base_schema,omitempty"` -} - -func (x *KclType) Reset() { - *x = KclType{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KclType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KclType) ProtoMessage() {} - -func (x *KclType) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KclType.ProtoReflect.Descriptor instead. -func (*KclType) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{61} -} - -func (x *KclType) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *KclType) GetUnionTypes() []*KclType { - if x != nil { - return x.UnionTypes - } - return nil -} - -func (x *KclType) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *KclType) GetSchemaName() string { - if x != nil { - return x.SchemaName - } - return "" -} - -func (x *KclType) GetSchemaDoc() string { - if x != nil { - return x.SchemaDoc - } - return "" -} - -func (x *KclType) GetProperties() map[string]*KclType { - if x != nil { - return x.Properties - } - return nil -} - -func (x *KclType) GetRequired() []string { - if x != nil { - return x.Required - } - return nil -} - -func (x *KclType) GetKey() *KclType { - if x != nil { - return x.Key - } - return nil -} - -func (x *KclType) GetItem() *KclType { - if x != nil { - return x.Item - } - return nil -} - -func (x *KclType) GetLine() int32 { - if x != nil { - return x.Line - } - return 0 -} - -func (x *KclType) GetDecorators() []*Decorator { - if x != nil { - return x.Decorators - } - return nil -} - -func (x *KclType) GetFilename() string { - if x != nil { - return x.Filename - } - return "" -} - -func (x *KclType) GetPkgPath() string { - if x != nil { - return x.PkgPath - } - return "" -} - -func (x *KclType) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *KclType) GetExamples() map[string]*Example { - if x != nil { - return x.Examples - } - return nil -} - -func (x *KclType) GetBaseSchema() *KclType { - if x != nil { - return x.BaseSchema - } - return nil -} - -// Message representing a decorator in KCL. -type Decorator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the decorator. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Arguments for the decorator. - Arguments []string `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` - // Keyword arguments for the decorator as a map with keyword name as key. - Keywords map[string]string `protobuf:"bytes,3,rep,name=keywords,proto3" json:"keywords,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Decorator) Reset() { - *x = Decorator{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decorator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decorator) ProtoMessage() {} - -func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decorator.ProtoReflect.Descriptor instead. -func (*Decorator) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{62} -} - -func (x *Decorator) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Decorator) GetArguments() []string { - if x != nil { - return x.Arguments - } - return nil -} - -func (x *Decorator) GetKeywords() map[string]string { - if x != nil { - return x.Keywords - } - return nil -} +// Message representing a decorator in KCL. +type Decorator = api.Decorator // Message representing an example in KCL. -type Example struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Short description for the example. - Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` - // Long description for the example. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Embedded literal example. - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Example) Reset() { - *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_gpyrpc_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Example) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Example) ProtoMessage() {} - -func (x *Example) ProtoReflect() protoreflect.Message { - mi := &file_gpyrpc_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Example.ProtoReflect.Descriptor instead. -func (*Example) Descriptor() ([]byte, []int) { - return file_gpyrpc_proto_rawDescGZIP(), []int{63} -} - -func (x *Example) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -func (x *Example) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Example) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_gpyrpc_proto protoreflect.FileDescriptor - -var file_gpyrpc_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x22, 0x43, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x50, 0x61, 0x74, 0x68, 0x22, 0x34, 0x0a, 0x08, 0x41, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x5e, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x22, 0x3f, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x22, - 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x70, - 0x6f, 0x73, 0x22, 0x21, 0x0a, 0x09, 0x50, 0x69, 0x6e, 0x67, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x22, 0x85, 0x01, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x69, 0x74, - 0x5f, 0x73, 0x68, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, 0x74, 0x53, - 0x68, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x22, 0x3d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x28, 0x0a, - 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x46, 0x69, 0x6c, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x70, 0x6b, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6b, - 0x67, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x73, 0x22, - 0x68, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x5f, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x74, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x74, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, - 0x70, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x7d, 0x0a, 0x11, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x61, 0x74, 0x68, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38, - 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6b, 0x67, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x73, 0x22, 0x6d, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x73, 0x74, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x73, 0x74, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, - 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, - 0x12, 0x25, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x61, 0x64, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x52, 0x09, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x5f, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x41, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x77, 0x69, - 0x74, 0x68, 0x5f, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x41, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x22, 0xfa, 0x08, 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x70, 0x61, - 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x74, - 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x79, 0x6d, - 0x62, 0x6f, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x12, 0x55, 0x0a, 0x0f, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x70, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x4d, 0x61, 0x70, 0x12, 0x55, 0x0a, 0x0f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4e, - 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x73, 0x79, 0x6d, - 0x62, 0x6f, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x6e, 0x0a, 0x18, 0x66, 0x75, - 0x6c, 0x6c, 0x79, 0x5f, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, - 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x15, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0d, 0x70, 0x6b, - 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x50, 0x6b, - 0x67, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, - 0x70, 0x6b, 0x67, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x1a, 0x48, 0x0a, 0x0b, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x0c, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x55, 0x0a, 0x12, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4d, - 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x53, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5d, 0x0a, 0x1a, 0x46, 0x75, - 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x52, 0x0a, 0x10, 0x50, 0x6b, 0x67, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x42, 0x0a, - 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x6c, 0x70, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x22, 0xd7, 0x01, - 0x0a, 0x06, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x02, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x63, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x02, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, - 0x29, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, - 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, - 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x22, 0xcb, 0x01, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x12, 0x29, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x27, 0x0a, 0x04, - 0x64, 0x65, 0x66, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x04, 0x64, 0x65, 0x66, 0x73, 0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x01, 0x69, 0x12, 0x0c, 0x0a, 0x01, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x01, 0x67, - 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x3c, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x01, 0x69, - 0x12, 0x0c, 0x0a, 0x01, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x01, 0x67, 0x12, 0x12, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x22, 0xae, 0x05, 0x0a, 0x10, 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x5f, - 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x44, - 0x69, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x46, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x6b, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x61, 0x72, - 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x2e, - 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x5f, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x59, 0x61, 0x6d, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2c, - 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x5f, 0x61, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x41, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, - 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x1b, 0x0a, - 0x09, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6b, 0x67, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x50, 0x6b, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x4f, 0x6e, 0x6c, 0x79, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x48, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x65, - 0x76, 0x61, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x73, 0x74, 0x45, - 0x76, 0x61, 0x6c, 0x22, 0x98, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x79, - 0x61, 0x6d, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x6c, 0x6f, 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x62, - 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, - 0x72, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x61, 0x72, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, - 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x41, 0x72, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x5e, 0x0a, - 0x11, 0x45, 0x78, 0x65, 0x63, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x41, 0x72, - 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x61, - 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, - 0x72, 0x67, 0x73, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x41, 0x72, 0x67, 0x73, 0x22, 0x29, 0x0a, - 0x0f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x22, 0x25, 0x0a, 0x0f, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x22, 0x38, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x50, 0x61, 0x74, 0x68, - 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x25, 0x0a, 0x0d, - 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, - 0x74, 0x68, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x22, 0x60, 0x0a, 0x11, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x65, - 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, - 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x74, - 0x68, 0x73, 0x22, 0x5f, 0x0a, 0x13, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x46, 0x69, - 0x6c, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x22, 0x3e, 0x0a, 0x0c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x2e, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x22, 0x79, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x70, - 0x65, 0x63, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x94, 0x02, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x75, 0x6e, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x30, 0x0a, - 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, - 0x52, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70, 0x5f, 0x73, 0x79, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x70, 0x53, 0x79, 0x6d, 0x12, 0x2f, 0x0a, 0x0a, 0x6c, 0x69, - 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x64, - 0x69, 0x63, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0b, 0x64, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x22, 0x44, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x73, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x41, - 0x72, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x61, 0x72, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, - 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6a, 0x0a, 0x13, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x55, 0x0a, 0x16, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x63, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, - 0x01, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, - 0x41, 0x72, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x66, 0x69, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x66, 0x69, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x22, 0x50, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x11, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x65, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, - 0x65, 0x5f, 0x61, 0x62, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x75, 0x73, 0x65, 0x41, 0x62, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x26, 0x0a, - 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x46, 0x61, 0x73, 0x74, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x72, 0x22, 0x5f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x6b, 0x67, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x6b, 0x67, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6b, 0x67, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x49, 0x0a, 0x16, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x19, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, - 0x0a, 0x0f, 0x6b, 0x63, 0x6c, 0x5f, 0x63, 0x6c, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x6c, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6b, 0x63, 0x6c, 0x43, - 0x6c, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x6b, 0x63, 0x6c, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x50, 0x61, 0x69, 0x72, 0x52, 0x0a, 0x6b, 0x63, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x91, 0x03, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x14, - 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, - 0x74, 0x68, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x72, - 0x69, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, - 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x37, - 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x61, 0x73, 0x74, 0x5f, - 0x65, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x73, 0x74, - 0x45, 0x76, 0x61, 0x6c, 0x22, 0x36, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, - 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x0d, 0x52, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x22, 0xfd, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, - 0x41, 0x72, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, - 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, - 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xa6, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x43, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x54, 0x65, - 0x73, 0x74, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, - 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, - 0x41, 0x72, 0x67, 0x73, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x41, 0x72, 0x67, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x6b, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x75, 0x6e, - 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x75, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x61, 0x69, 0x6c, - 0x5f, 0x66, 0x61, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x69, - 0x6c, 0x46, 0x61, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x5f, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x43, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x75, - 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x56, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x55, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, - 0x69, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0d, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6b, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x50, 0x6b, 0x67, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x50, 0x6b, 0x67, 0x73, 0x22, 0xf9, 0x05, 0x0a, 0x07, 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, 0x6e, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x6f, 0x63, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x6f, 0x63, - 0x12, 0x3f, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x63, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x23, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x63, - 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x0a, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, - 0x2e, 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, - 0x12, 0x30, 0x0a, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4b, - 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x1a, 0x4e, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x4b, 0x63, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xb7, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x3b, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0x3b, 0x0a, - 0x0d, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x07, 0x45, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x82, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x69, 0x6c, - 0x74, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x50, 0x69, - 0x6e, 0x67, 0x12, 0x11, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x69, 0x6e, 0x67, - 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x17, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x41, 0x72, 0x67, - 0x73, 0x1a, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0x82, 0x0c, 0x0a, - 0x0c, 0x4b, 0x63, 0x6c, 0x76, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, - 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x11, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x46, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, - 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1b, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, - 0x72, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x18, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x5f, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x1a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, - 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x49, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1c, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x0b, - 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x46, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1b, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x45, 0x78, 0x65, - 0x63, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1a, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x46, 0x0a, 0x0c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x65, - 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1b, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x46, 0x69, 0x6c, - 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x12, 0x21, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x23, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, 0x41, 0x72, 0x67, - 0x73, 0x1a, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3a, 0x0a, 0x08, - 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x17, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x74, - 0x68, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, - 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x1b, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x46, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x12, 0x19, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, - 0x70, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1b, 0x2e, 0x67, 0x70, - 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x55, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x20, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x34, 0x0a, 0x06, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, - 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x15, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x67, - 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x64, 0x65, - 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, - 0x11, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x5f, 0x41, 0x72, - 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, - 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x21, - 0x2e, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x42, 0x2b, 0x5a, 0x29, 0x6b, 0x63, 0x6c, 0x2d, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x69, 0x6f, - 0x2f, 0x6b, 0x63, 0x6c, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x70, 0x65, 0x63, - 0x2f, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x3b, 0x67, 0x70, 0x79, 0x72, 0x70, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_gpyrpc_proto_rawDescOnce sync.Once - file_gpyrpc_proto_rawDescData = file_gpyrpc_proto_rawDesc -) - -func file_gpyrpc_proto_rawDescGZIP() []byte { - file_gpyrpc_proto_rawDescOnce.Do(func() { - file_gpyrpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_gpyrpc_proto_rawDescData) - }) - return file_gpyrpc_proto_rawDescData -} - -var file_gpyrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 77) -var file_gpyrpc_proto_goTypes = []any{ - (*ExternalPkg)(nil), // 0: gpyrpc.ExternalPkg - (*Argument)(nil), // 1: gpyrpc.Argument - (*Error)(nil), // 2: gpyrpc.Error - (*Message)(nil), // 3: gpyrpc.Message - (*Ping_Args)(nil), // 4: gpyrpc.Ping_Args - (*Ping_Result)(nil), // 5: gpyrpc.Ping_Result - (*GetVersion_Args)(nil), // 6: gpyrpc.GetVersion_Args - (*GetVersion_Result)(nil), // 7: gpyrpc.GetVersion_Result - (*ListMethod_Args)(nil), // 8: gpyrpc.ListMethod_Args - (*ListMethod_Result)(nil), // 9: gpyrpc.ListMethod_Result - (*ParseFile_Args)(nil), // 10: gpyrpc.ParseFile_Args - (*ParseFile_Result)(nil), // 11: gpyrpc.ParseFile_Result - (*ParseProgram_Args)(nil), // 12: gpyrpc.ParseProgram_Args - (*ParseProgram_Result)(nil), // 13: gpyrpc.ParseProgram_Result - (*LoadPackage_Args)(nil), // 14: gpyrpc.LoadPackage_Args - (*LoadPackage_Result)(nil), // 15: gpyrpc.LoadPackage_Result - (*ListOptions_Result)(nil), // 16: gpyrpc.ListOptions_Result - (*OptionHelp)(nil), // 17: gpyrpc.OptionHelp - (*Symbol)(nil), // 18: gpyrpc.Symbol - (*Scope)(nil), // 19: gpyrpc.Scope - (*SymbolIndex)(nil), // 20: gpyrpc.SymbolIndex - (*ScopeIndex)(nil), // 21: gpyrpc.ScopeIndex - (*ExecProgram_Args)(nil), // 22: gpyrpc.ExecProgram_Args - (*ExecProgram_Result)(nil), // 23: gpyrpc.ExecProgram_Result - (*BuildProgram_Args)(nil), // 24: gpyrpc.BuildProgram_Args - (*BuildProgram_Result)(nil), // 25: gpyrpc.BuildProgram_Result - (*ExecArtifact_Args)(nil), // 26: gpyrpc.ExecArtifact_Args - (*FormatCode_Args)(nil), // 27: gpyrpc.FormatCode_Args - (*FormatCode_Result)(nil), // 28: gpyrpc.FormatCode_Result - (*FormatPath_Args)(nil), // 29: gpyrpc.FormatPath_Args - (*FormatPath_Result)(nil), // 30: gpyrpc.FormatPath_Result - (*LintPath_Args)(nil), // 31: gpyrpc.LintPath_Args - (*LintPath_Result)(nil), // 32: gpyrpc.LintPath_Result - (*OverrideFile_Args)(nil), // 33: gpyrpc.OverrideFile_Args - (*OverrideFile_Result)(nil), // 34: gpyrpc.OverrideFile_Result - (*ListVariables_Options)(nil), // 35: gpyrpc.ListVariables_Options - (*VariableList)(nil), // 36: gpyrpc.VariableList - (*ListVariables_Args)(nil), // 37: gpyrpc.ListVariables_Args - (*ListVariables_Result)(nil), // 38: gpyrpc.ListVariables_Result - (*Variable)(nil), // 39: gpyrpc.Variable - (*MapEntry)(nil), // 40: gpyrpc.MapEntry - (*GetSchemaTypeMapping_Args)(nil), // 41: gpyrpc.GetSchemaTypeMapping_Args - (*GetSchemaTypeMapping_Result)(nil), // 42: gpyrpc.GetSchemaTypeMapping_Result - (*ValidateCode_Args)(nil), // 43: gpyrpc.ValidateCode_Args - (*ValidateCode_Result)(nil), // 44: gpyrpc.ValidateCode_Result - (*Position)(nil), // 45: gpyrpc.Position - (*ListDepFiles_Args)(nil), // 46: gpyrpc.ListDepFiles_Args - (*ListDepFiles_Result)(nil), // 47: gpyrpc.ListDepFiles_Result - (*LoadSettingsFiles_Args)(nil), // 48: gpyrpc.LoadSettingsFiles_Args - (*LoadSettingsFiles_Result)(nil), // 49: gpyrpc.LoadSettingsFiles_Result - (*CliConfig)(nil), // 50: gpyrpc.CliConfig - (*KeyValuePair)(nil), // 51: gpyrpc.KeyValuePair - (*Rename_Args)(nil), // 52: gpyrpc.Rename_Args - (*Rename_Result)(nil), // 53: gpyrpc.Rename_Result - (*RenameCode_Args)(nil), // 54: gpyrpc.RenameCode_Args - (*RenameCode_Result)(nil), // 55: gpyrpc.RenameCode_Result - (*Test_Args)(nil), // 56: gpyrpc.Test_Args - (*Test_Result)(nil), // 57: gpyrpc.Test_Result - (*TestCaseInfo)(nil), // 58: gpyrpc.TestCaseInfo - (*UpdateDependencies_Args)(nil), // 59: gpyrpc.UpdateDependencies_Args - (*UpdateDependencies_Result)(nil), // 60: gpyrpc.UpdateDependencies_Result - (*KclType)(nil), // 61: gpyrpc.KclType - (*Decorator)(nil), // 62: gpyrpc.Decorator - (*Example)(nil), // 63: gpyrpc.Example - nil, // 64: gpyrpc.LoadPackage_Result.ScopesEntry - nil, // 65: gpyrpc.LoadPackage_Result.SymbolsEntry - nil, // 66: gpyrpc.LoadPackage_Result.NodeSymbolMapEntry - nil, // 67: gpyrpc.LoadPackage_Result.SymbolNodeMapEntry - nil, // 68: gpyrpc.LoadPackage_Result.FullyQualifiedNameMapEntry - nil, // 69: gpyrpc.LoadPackage_Result.PkgScopeMapEntry - nil, // 70: gpyrpc.ListVariables_Result.VariablesEntry - nil, // 71: gpyrpc.GetSchemaTypeMapping_Result.SchemaTypeMappingEntry - nil, // 72: gpyrpc.RenameCode_Args.SourceCodesEntry - nil, // 73: gpyrpc.RenameCode_Result.ChangedCodesEntry - nil, // 74: gpyrpc.KclType.PropertiesEntry - nil, // 75: gpyrpc.KclType.ExamplesEntry - nil, // 76: gpyrpc.Decorator.KeywordsEntry -} -var file_gpyrpc_proto_depIdxs = []int32{ - 3, // 0: gpyrpc.Error.messages:type_name -> gpyrpc.Message - 45, // 1: gpyrpc.Message.pos:type_name -> gpyrpc.Position - 0, // 2: gpyrpc.ParseFile_Args.external_pkgs:type_name -> gpyrpc.ExternalPkg - 2, // 3: gpyrpc.ParseFile_Result.errors:type_name -> gpyrpc.Error - 0, // 4: gpyrpc.ParseProgram_Args.external_pkgs:type_name -> gpyrpc.ExternalPkg - 2, // 5: gpyrpc.ParseProgram_Result.errors:type_name -> gpyrpc.Error - 12, // 6: gpyrpc.LoadPackage_Args.parse_args:type_name -> gpyrpc.ParseProgram_Args - 2, // 7: gpyrpc.LoadPackage_Result.parse_errors:type_name -> gpyrpc.Error - 2, // 8: gpyrpc.LoadPackage_Result.type_errors:type_name -> gpyrpc.Error - 64, // 9: gpyrpc.LoadPackage_Result.scopes:type_name -> gpyrpc.LoadPackage_Result.ScopesEntry - 65, // 10: gpyrpc.LoadPackage_Result.symbols:type_name -> gpyrpc.LoadPackage_Result.SymbolsEntry - 66, // 11: gpyrpc.LoadPackage_Result.node_symbol_map:type_name -> gpyrpc.LoadPackage_Result.NodeSymbolMapEntry - 67, // 12: gpyrpc.LoadPackage_Result.symbol_node_map:type_name -> gpyrpc.LoadPackage_Result.SymbolNodeMapEntry - 68, // 13: gpyrpc.LoadPackage_Result.fully_qualified_name_map:type_name -> gpyrpc.LoadPackage_Result.FullyQualifiedNameMapEntry - 69, // 14: gpyrpc.LoadPackage_Result.pkg_scope_map:type_name -> gpyrpc.LoadPackage_Result.PkgScopeMapEntry - 17, // 15: gpyrpc.ListOptions_Result.options:type_name -> gpyrpc.OptionHelp - 61, // 16: gpyrpc.Symbol.ty:type_name -> gpyrpc.KclType - 20, // 17: gpyrpc.Symbol.owner:type_name -> gpyrpc.SymbolIndex - 20, // 18: gpyrpc.Symbol.def:type_name -> gpyrpc.SymbolIndex - 20, // 19: gpyrpc.Symbol.attrs:type_name -> gpyrpc.SymbolIndex - 21, // 20: gpyrpc.Scope.parent:type_name -> gpyrpc.ScopeIndex - 20, // 21: gpyrpc.Scope.owner:type_name -> gpyrpc.SymbolIndex - 21, // 22: gpyrpc.Scope.children:type_name -> gpyrpc.ScopeIndex - 20, // 23: gpyrpc.Scope.defs:type_name -> gpyrpc.SymbolIndex - 1, // 24: gpyrpc.ExecProgram_Args.args:type_name -> gpyrpc.Argument - 0, // 25: gpyrpc.ExecProgram_Args.external_pkgs:type_name -> gpyrpc.ExternalPkg - 22, // 26: gpyrpc.BuildProgram_Args.exec_args:type_name -> gpyrpc.ExecProgram_Args - 22, // 27: gpyrpc.ExecArtifact_Args.exec_args:type_name -> gpyrpc.ExecProgram_Args - 2, // 28: gpyrpc.OverrideFile_Result.parse_errors:type_name -> gpyrpc.Error - 39, // 29: gpyrpc.VariableList.variables:type_name -> gpyrpc.Variable - 35, // 30: gpyrpc.ListVariables_Args.options:type_name -> gpyrpc.ListVariables_Options - 70, // 31: gpyrpc.ListVariables_Result.variables:type_name -> gpyrpc.ListVariables_Result.VariablesEntry - 2, // 32: gpyrpc.ListVariables_Result.parse_errors:type_name -> gpyrpc.Error - 39, // 33: gpyrpc.Variable.list_items:type_name -> gpyrpc.Variable - 40, // 34: gpyrpc.Variable.dict_entries:type_name -> gpyrpc.MapEntry - 39, // 35: gpyrpc.MapEntry.value:type_name -> gpyrpc.Variable - 22, // 36: gpyrpc.GetSchemaTypeMapping_Args.exec_args:type_name -> gpyrpc.ExecProgram_Args - 71, // 37: gpyrpc.GetSchemaTypeMapping_Result.schema_type_mapping:type_name -> gpyrpc.GetSchemaTypeMapping_Result.SchemaTypeMappingEntry - 50, // 38: gpyrpc.LoadSettingsFiles_Result.kcl_cli_configs:type_name -> gpyrpc.CliConfig - 51, // 39: gpyrpc.LoadSettingsFiles_Result.kcl_options:type_name -> gpyrpc.KeyValuePair - 72, // 40: gpyrpc.RenameCode_Args.source_codes:type_name -> gpyrpc.RenameCode_Args.SourceCodesEntry - 73, // 41: gpyrpc.RenameCode_Result.changed_codes:type_name -> gpyrpc.RenameCode_Result.ChangedCodesEntry - 22, // 42: gpyrpc.Test_Args.exec_args:type_name -> gpyrpc.ExecProgram_Args - 58, // 43: gpyrpc.Test_Result.info:type_name -> gpyrpc.TestCaseInfo - 0, // 44: gpyrpc.UpdateDependencies_Result.external_pkgs:type_name -> gpyrpc.ExternalPkg - 61, // 45: gpyrpc.KclType.union_types:type_name -> gpyrpc.KclType - 74, // 46: gpyrpc.KclType.properties:type_name -> gpyrpc.KclType.PropertiesEntry - 61, // 47: gpyrpc.KclType.key:type_name -> gpyrpc.KclType - 61, // 48: gpyrpc.KclType.item:type_name -> gpyrpc.KclType - 62, // 49: gpyrpc.KclType.decorators:type_name -> gpyrpc.Decorator - 75, // 50: gpyrpc.KclType.examples:type_name -> gpyrpc.KclType.ExamplesEntry - 61, // 51: gpyrpc.KclType.base_schema:type_name -> gpyrpc.KclType - 76, // 52: gpyrpc.Decorator.keywords:type_name -> gpyrpc.Decorator.KeywordsEntry - 19, // 53: gpyrpc.LoadPackage_Result.ScopesEntry.value:type_name -> gpyrpc.Scope - 18, // 54: gpyrpc.LoadPackage_Result.SymbolsEntry.value:type_name -> gpyrpc.Symbol - 20, // 55: gpyrpc.LoadPackage_Result.NodeSymbolMapEntry.value:type_name -> gpyrpc.SymbolIndex - 20, // 56: gpyrpc.LoadPackage_Result.FullyQualifiedNameMapEntry.value:type_name -> gpyrpc.SymbolIndex - 21, // 57: gpyrpc.LoadPackage_Result.PkgScopeMapEntry.value:type_name -> gpyrpc.ScopeIndex - 36, // 58: gpyrpc.ListVariables_Result.VariablesEntry.value:type_name -> gpyrpc.VariableList - 61, // 59: gpyrpc.GetSchemaTypeMapping_Result.SchemaTypeMappingEntry.value:type_name -> gpyrpc.KclType - 61, // 60: gpyrpc.KclType.PropertiesEntry.value:type_name -> gpyrpc.KclType - 63, // 61: gpyrpc.KclType.ExamplesEntry.value:type_name -> gpyrpc.Example - 4, // 62: gpyrpc.BuiltinService.Ping:input_type -> gpyrpc.Ping_Args - 8, // 63: gpyrpc.BuiltinService.ListMethod:input_type -> gpyrpc.ListMethod_Args - 4, // 64: gpyrpc.KclvmService.Ping:input_type -> gpyrpc.Ping_Args - 6, // 65: gpyrpc.KclvmService.GetVersion:input_type -> gpyrpc.GetVersion_Args - 12, // 66: gpyrpc.KclvmService.ParseProgram:input_type -> gpyrpc.ParseProgram_Args - 10, // 67: gpyrpc.KclvmService.ParseFile:input_type -> gpyrpc.ParseFile_Args - 14, // 68: gpyrpc.KclvmService.LoadPackage:input_type -> gpyrpc.LoadPackage_Args - 12, // 69: gpyrpc.KclvmService.ListOptions:input_type -> gpyrpc.ParseProgram_Args - 37, // 70: gpyrpc.KclvmService.ListVariables:input_type -> gpyrpc.ListVariables_Args - 22, // 71: gpyrpc.KclvmService.ExecProgram:input_type -> gpyrpc.ExecProgram_Args - 24, // 72: gpyrpc.KclvmService.BuildProgram:input_type -> gpyrpc.BuildProgram_Args - 26, // 73: gpyrpc.KclvmService.ExecArtifact:input_type -> gpyrpc.ExecArtifact_Args - 33, // 74: gpyrpc.KclvmService.OverrideFile:input_type -> gpyrpc.OverrideFile_Args - 41, // 75: gpyrpc.KclvmService.GetSchemaTypeMapping:input_type -> gpyrpc.GetSchemaTypeMapping_Args - 27, // 76: gpyrpc.KclvmService.FormatCode:input_type -> gpyrpc.FormatCode_Args - 29, // 77: gpyrpc.KclvmService.FormatPath:input_type -> gpyrpc.FormatPath_Args - 31, // 78: gpyrpc.KclvmService.LintPath:input_type -> gpyrpc.LintPath_Args - 43, // 79: gpyrpc.KclvmService.ValidateCode:input_type -> gpyrpc.ValidateCode_Args - 46, // 80: gpyrpc.KclvmService.ListDepFiles:input_type -> gpyrpc.ListDepFiles_Args - 48, // 81: gpyrpc.KclvmService.LoadSettingsFiles:input_type -> gpyrpc.LoadSettingsFiles_Args - 52, // 82: gpyrpc.KclvmService.Rename:input_type -> gpyrpc.Rename_Args - 54, // 83: gpyrpc.KclvmService.RenameCode:input_type -> gpyrpc.RenameCode_Args - 56, // 84: gpyrpc.KclvmService.Test:input_type -> gpyrpc.Test_Args - 59, // 85: gpyrpc.KclvmService.UpdateDependencies:input_type -> gpyrpc.UpdateDependencies_Args - 5, // 86: gpyrpc.BuiltinService.Ping:output_type -> gpyrpc.Ping_Result - 9, // 87: gpyrpc.BuiltinService.ListMethod:output_type -> gpyrpc.ListMethod_Result - 5, // 88: gpyrpc.KclvmService.Ping:output_type -> gpyrpc.Ping_Result - 7, // 89: gpyrpc.KclvmService.GetVersion:output_type -> gpyrpc.GetVersion_Result - 13, // 90: gpyrpc.KclvmService.ParseProgram:output_type -> gpyrpc.ParseProgram_Result - 11, // 91: gpyrpc.KclvmService.ParseFile:output_type -> gpyrpc.ParseFile_Result - 15, // 92: gpyrpc.KclvmService.LoadPackage:output_type -> gpyrpc.LoadPackage_Result - 16, // 93: gpyrpc.KclvmService.ListOptions:output_type -> gpyrpc.ListOptions_Result - 38, // 94: gpyrpc.KclvmService.ListVariables:output_type -> gpyrpc.ListVariables_Result - 23, // 95: gpyrpc.KclvmService.ExecProgram:output_type -> gpyrpc.ExecProgram_Result - 25, // 96: gpyrpc.KclvmService.BuildProgram:output_type -> gpyrpc.BuildProgram_Result - 23, // 97: gpyrpc.KclvmService.ExecArtifact:output_type -> gpyrpc.ExecProgram_Result - 34, // 98: gpyrpc.KclvmService.OverrideFile:output_type -> gpyrpc.OverrideFile_Result - 42, // 99: gpyrpc.KclvmService.GetSchemaTypeMapping:output_type -> gpyrpc.GetSchemaTypeMapping_Result - 28, // 100: gpyrpc.KclvmService.FormatCode:output_type -> gpyrpc.FormatCode_Result - 30, // 101: gpyrpc.KclvmService.FormatPath:output_type -> gpyrpc.FormatPath_Result - 32, // 102: gpyrpc.KclvmService.LintPath:output_type -> gpyrpc.LintPath_Result - 44, // 103: gpyrpc.KclvmService.ValidateCode:output_type -> gpyrpc.ValidateCode_Result - 47, // 104: gpyrpc.KclvmService.ListDepFiles:output_type -> gpyrpc.ListDepFiles_Result - 49, // 105: gpyrpc.KclvmService.LoadSettingsFiles:output_type -> gpyrpc.LoadSettingsFiles_Result - 53, // 106: gpyrpc.KclvmService.Rename:output_type -> gpyrpc.Rename_Result - 55, // 107: gpyrpc.KclvmService.RenameCode:output_type -> gpyrpc.RenameCode_Result - 57, // 108: gpyrpc.KclvmService.Test:output_type -> gpyrpc.Test_Result - 60, // 109: gpyrpc.KclvmService.UpdateDependencies:output_type -> gpyrpc.UpdateDependencies_Result - 86, // [86:110] is the sub-list for method output_type - 62, // [62:86] is the sub-list for method input_type - 62, // [62:62] is the sub-list for extension type_name - 62, // [62:62] is the sub-list for extension extendee - 0, // [0:62] is the sub-list for field type_name -} - -func init() { file_gpyrpc_proto_init() } -func file_gpyrpc_proto_init() { - if File_gpyrpc_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_gpyrpc_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExternalPkg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Argument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Ping_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Ping_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetVersion_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetVersion_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListMethod_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListMethod_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ParseFile_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ParseFile_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ParseProgram_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ParseProgram_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*LoadPackage_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LoadPackage_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListOptions_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*OptionHelp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Symbol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Scope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SymbolIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ScopeIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ExecProgram_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ExecProgram_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BuildProgram_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BuildProgram_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ExecArtifact_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*FormatCode_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*FormatCode_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*FormatPath_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*FormatPath_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*LintPath_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*LintPath_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*OverrideFile_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*OverrideFile_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListVariables_Options); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*VariableList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListVariables_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListVariables_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Variable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*MapEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaTypeMapping_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaTypeMapping_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ValidateCode_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ValidateCode_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListDepFiles_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListDepFiles_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*LoadSettingsFiles_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*LoadSettingsFiles_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*CliConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*KeyValuePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*Rename_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*Rename_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*RenameCode_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*RenameCode_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*Test_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*Test_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*TestCaseInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDependencies_Args); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDependencies_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*KclType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*Decorator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gpyrpc_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gpyrpc_proto_rawDesc, - NumEnums: 0, - NumMessages: 77, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_gpyrpc_proto_goTypes, - DependencyIndexes: file_gpyrpc_proto_depIdxs, - MessageInfos: file_gpyrpc_proto_msgTypes, - }.Build() - File_gpyrpc_proto = out.File - file_gpyrpc_proto_rawDesc = nil - file_gpyrpc_proto_goTypes = nil - file_gpyrpc_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// BuiltinServiceClient is the client API for BuiltinService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type BuiltinServiceClient interface { - // Sends a ping request. - Ping(ctx context.Context, in *Ping_Args, opts ...grpc.CallOption) (*Ping_Result, error) - // Lists available methods. - ListMethod(ctx context.Context, in *ListMethod_Args, opts ...grpc.CallOption) (*ListMethod_Result, error) -} - -type builtinServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewBuiltinServiceClient(cc grpc.ClientConnInterface) BuiltinServiceClient { - return &builtinServiceClient{cc} -} - -func (c *builtinServiceClient) Ping(ctx context.Context, in *Ping_Args, opts ...grpc.CallOption) (*Ping_Result, error) { - out := new(Ping_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.BuiltinService/Ping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *builtinServiceClient) ListMethod(ctx context.Context, in *ListMethod_Args, opts ...grpc.CallOption) (*ListMethod_Result, error) { - out := new(ListMethod_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.BuiltinService/ListMethod", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BuiltinServiceServer is the server API for BuiltinService service. -type BuiltinServiceServer interface { - // Sends a ping request. - Ping(context.Context, *Ping_Args) (*Ping_Result, error) - // Lists available methods. - ListMethod(context.Context, *ListMethod_Args) (*ListMethod_Result, error) -} - -// UnimplementedBuiltinServiceServer can be embedded to have forward compatible implementations. -type UnimplementedBuiltinServiceServer struct { -} - -func (*UnimplementedBuiltinServiceServer) Ping(context.Context, *Ping_Args) (*Ping_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (*UnimplementedBuiltinServiceServer) ListMethod(context.Context, *ListMethod_Args) (*ListMethod_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListMethod not implemented") -} - -func RegisterBuiltinServiceServer(s *grpc.Server, srv BuiltinServiceServer) { - s.RegisterService(&_BuiltinService_serviceDesc, srv) -} - -func _BuiltinService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Ping_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BuiltinServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.BuiltinService/Ping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BuiltinServiceServer).Ping(ctx, req.(*Ping_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _BuiltinService_ListMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMethod_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BuiltinServiceServer).ListMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.BuiltinService/ListMethod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BuiltinServiceServer).ListMethod(ctx, req.(*ListMethod_Args)) - } - return interceptor(ctx, in, info, handler) -} - -var _BuiltinService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "gpyrpc.BuiltinService", - HandlerType: (*BuiltinServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _BuiltinService_Ping_Handler, - }, - { - MethodName: "ListMethod", - Handler: _BuiltinService_ListMethod_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "gpyrpc.proto", -} - -// KclvmServiceClient is the client API for KclvmService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KclvmServiceClient interface { - // / Ping KclvmService, return the same value as the parameter - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Ping", - // / "params": { - // / "value": "hello" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "value": "hello" - // / }, - // / "id": 1 - // / } - // / ``` - Ping(ctx context.Context, in *Ping_Args, opts ...grpc.CallOption) (*Ping_Result, error) - // / GetVersion KclvmService, return the kclvm service version information - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "GetVersion", - // / "params": {}, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "version": "0.9.1", - // / "checksum": "c020ab3eb4b9179219d6837a57f5d323", - // / "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", - // / "version_info": "Version: 0.9.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" - // / }, - // / "id": 1 - // / } - // / ``` - GetVersion(ctx context.Context, in *GetVersion_Args, opts ...grpc.CallOption) (*GetVersion_Result, error) - // / Parse KCL program with entry files. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ParseProgram", - // / "params": { - // / "paths": ["./src/testdata/test.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "ast_json": "{...}", - // / "paths": ["./src/testdata/test.k"], - // / "errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ParseProgram(ctx context.Context, in *ParseProgram_Args, opts ...grpc.CallOption) (*ParseProgram_Result, error) - // / Parse KCL single file to Module AST JSON string with import dependencies - // / and parse errors. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ParseFile", - // / "params": { - // / "path": "./src/testdata/parse/main.k" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "ast_json": "{...}", - // / "deps": ["./dep1", "./dep2"], - // / "errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ParseFile(ctx context.Context, in *ParseFile_Args, opts ...grpc.CallOption) (*ParseFile_Result, error) - // / load_package provides users with the ability to parse kcl program and semantic model - // / information including symbols, types, definitions, etc. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LoadPackage", - // / "params": { - // / "parse_args": { - // / "paths": ["./src/testdata/parse/main.k"] - // / }, - // / "resolve_ast": true - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "program": "{...}", - // / "paths": ["./src/testdata/parse/main.k"], - // / "parse_errors": [], - // / "type_errors": [], - // / "symbols": { ... }, - // / "scopes": { ... }, - // / "node_symbol_map": { ... }, - // / "symbol_node_map": { ... }, - // / "fully_qualified_name_map": { ... }, - // / "pkg_scope_map": { ... } - // / }, - // / "id": 1 - // / } - // / ``` - LoadPackage(ctx context.Context, in *LoadPackage_Args, opts ...grpc.CallOption) (*LoadPackage_Result, error) - // / list_options provides users with the ability to parse kcl program and get all option information. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ListOptions", - // / "params": { - // / "paths": ["./src/testdata/option/main.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "options": [ - // / { "name": "option1", "type": "str", "required": true, "default_value": "", "help": "option 1 help" }, - // / { "name": "option2", "type": "int", "required": false, "default_value": "0", "help": "option 2 help" }, - // / { "name": "option3", "type": "bool", "required": false, "default_value": "false", "help": "option 3 help" } - // / ] - // / }, - // / "id": 1 - // / } - // / ``` - ListOptions(ctx context.Context, in *ParseProgram_Args, opts ...grpc.CallOption) (*ListOptions_Result, error) - // / list_variables provides users with the ability to parse kcl program and get all variables by specs. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ListVariables", - // / "params": { - // / "files": ["./src/testdata/variables/main.k"], - // / "specs": ["a"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "variables": { - // / "a": { - // / "variables": [ - // / { "value": "1", "type_name": "int", "op_sym": "", "list_items": [], "dict_entries": [] } - // / ] - // / } - // / }, - // / "unsupported_codes": [], - // / "parse_errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ListVariables(ctx context.Context, in *ListVariables_Args, opts ...grpc.CallOption) (*ListVariables_Result, error) - // / Execute KCL file with args. **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / - // / // Request with code - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": ["file.k"], - // / "k_code_list": ["alice = {age = 18}"] - // / }, - // / "id": 2 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 2 - // / } - // / - // / // Error case - cannot find file - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": ["invalid_file.k"] - // / }, - // / "id": 3 - // / } - // / - // / // Error Response - // / { - // / "jsonrpc": "2.0", - // / "error": { - // / "code": -32602, - // / "message": "Cannot find the kcl file" - // / }, - // / "id": 3 - // / } - // / - // / // Error case - no input files - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": [] - // / }, - // / "id": 4 - // / } - // / - // / // Error Response - // / { - // / "jsonrpc": "2.0", - // / "error": { - // / "code": -32602, - // / "message": "No input KCL files or paths" - // / }, - // / "id": 4 - // / } - // / ``` - ExecProgram(ctx context.Context, in *ExecProgram_Args, opts ...grpc.CallOption) (*ExecProgram_Result, error) - // / Build the KCL program to an artifact. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "BuildProgram", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / }, - // / "output": "./build" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "path": "./build/test.k" - // / }, - // / "id": 1 - // / } - // / ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - BuildProgram(ctx context.Context, in *BuildProgram_Args, opts ...grpc.CallOption) (*BuildProgram_Result, error) - // / Execute the KCL artifact with args. **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecArtifact", - // / "params": { - // / "path": "./artifact_path", - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / } - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - ExecArtifact(ctx context.Context, in *ExecArtifact_Args, opts ...grpc.CallOption) (*ExecProgram_Result, error) - // / Override KCL file with args. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "OverrideFile", - // / "params": { - // / "file": "./src/testdata/test.k", - // / "specs": ["alice.age=18"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "result": true, - // / "parse_errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - OverrideFile(ctx context.Context, in *OverrideFile_Args, opts ...grpc.CallOption) (*OverrideFile_Result, error) - // / Get schema type mapping. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "GetSchemaTypeMapping", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["main.k"], - // / "external_pkgs": [ - // / { - // / "pkg_name":"pkg", - // / "pkg_path": "./src/testdata/pkg" - // / } - // / ] - // / }, - // / "schema_name": "Person" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "schema_type_mapping": { - // / "Person": { - // / "type": "schema", - // / "schema_name": "Person", - // / "properties": { - // / "name": { "type": "str" }, - // / "age": { "type": "int" } - // / }, - // / "required": ["name", "age"], - // / "decorators": [] - // / } - // / } - // / }, - // / "id": 1 - // / } - // / ``` - GetSchemaTypeMapping(ctx context.Context, in *GetSchemaTypeMapping_Args, opts ...grpc.CallOption) (*GetSchemaTypeMapping_Result, error) - // / Format code source. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "FormatCode", - // / "params": { - // / "source": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "formatted": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - // / }, - // / "id": 1 - // / } - // / ``` - FormatCode(ctx context.Context, in *FormatCode_Args, opts ...grpc.CallOption) (*FormatCode_Result, error) - // / Format KCL file or directory path contains KCL files and returns the changed file paths. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "FormatPath", - // / "params": { - // / "path": "./src/testdata/test.k" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_paths": [] - // / }, - // / "id": 1 - // / } - // / ``` - FormatPath(ctx context.Context, in *FormatPath_Args, opts ...grpc.CallOption) (*FormatPath_Result, error) - // / Lint files and return error messages including errors and warnings. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LintPath", - // / "params": { - // / "paths": ["./src/testdata/test-lint.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "results": ["Module 'math' imported but unused"] - // / }, - // / "id": 1 - // / } - // / ``` - LintPath(ctx context.Context, in *LintPath_Args, opts ...grpc.CallOption) (*LintPath_Result, error) - // / Validate code using schema and data strings. - // / - // / **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ValidateCode", - // / "params": { - // / "code": "schema Person {\n name: str\n age: int\n check: 0 < age < 120\n}", - // / "data": "{\"name\": \"Alice\", \"age\": 10}" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "success": true, - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / ``` - ValidateCode(ctx context.Context, in *ValidateCode_Args, opts ...grpc.CallOption) (*ValidateCode_Result, error) - ListDepFiles(ctx context.Context, in *ListDepFiles_Args, opts ...grpc.CallOption) (*ListDepFiles_Result, error) - // / Build setting file config from args. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LoadSettingsFiles", - // / "params": { - // / "work_dir": "./src/testdata/settings", - // / "files": ["./src/testdata/settings/kcl.yaml"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "kcl_cli_configs": { - // / "files": ["./src/testdata/settings/kcl.yaml"], - // / "output": "", - // / "overrides": [], - // / "path_selector": [], - // / "strict_range_check": false, - // / "disable_none": false, - // / "verbose": 0, - // / "debug": false, - // / "sort_keys": false, - // / "show_hidden": false, - // / "include_schema_type_path": false, - // / "fast_eval": false - // / }, - // / "kcl_options": [] - // / }, - // / "id": 1 - // / } - // / ``` - LoadSettingsFiles(ctx context.Context, in *LoadSettingsFiles_Args, opts ...grpc.CallOption) (*LoadSettingsFiles_Result, error) - // / Rename all the occurrences of the target symbol in the files. This API will rewrite files if they contain symbols to be renamed. - // / Return the file paths that got changed. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Rename", - // / "params": { - // / "package_root": "./src/testdata/rename_doc", - // / "symbol_path": "a", - // / "file_paths": ["./src/testdata/rename_doc/main.k"], - // / "new_name": "a2" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_files": ["./src/testdata/rename_doc/main.k"] - // / }, - // / "id": 1 - // / } - // / ``` - Rename(ctx context.Context, in *Rename_Args, opts ...grpc.CallOption) (*Rename_Result, error) - // / Rename all the occurrences of the target symbol and return the modified code if any code has been changed. This API won't rewrite files but return the changed code. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "RenameCode", - // / "params": { - // / "package_root": "/mock/path", - // / "symbol_path": "a", - // / "source_codes": { - // / "/mock/path/main.k": "a = 1\nb = a" - // / }, - // / "new_name": "a2" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_codes": { - // / "/mock/path/main.k": "a2 = 1\nb = a2" - // / } - // / }, - // / "id": 1 - // / } - // / ``` - RenameCode(ctx context.Context, in *RenameCode_Args, opts ...grpc.CallOption) (*RenameCode_Result, error) - // / Test KCL packages with test arguments. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Test", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata/testing/module", - // / "k_filename_list": ["main.k"] - // / }, - // / "pkg_list": ["./src/testdata/testing/module/..."] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "info": [ - // / {"name": "test_case_1", "error": "", "duration": 1000, "log_message": ""}, - // / {"name": "test_case_2", "error": "some error", "duration": 2000, "log_message": ""} - // / ] - // / }, - // / "id": 1 - // / } - // / ``` - Test(ctx context.Context, in *Test_Args, opts ...grpc.CallOption) (*Test_Result, error) - // / Download and update dependencies defined in the kcl.mod file. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "UpdateDependencies", - // / "params": { - // / "manifest_path": "./src/testdata/update_dependencies" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "external_pkgs": [ - // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - // / ] - // / }, - // / "id": 1 - // / } - // / - // / // Request with vendor flag - // / { - // / "jsonrpc": "2.0", - // / "method": "UpdateDependencies", - // / "params": { - // / "manifest_path": "./src/testdata/update_dependencies", - // / "vendor": true - // / }, - // / "id": 2 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "external_pkgs": [ - // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - // / ] - // / }, - // / "id": 2 - // / } - // / ``` - UpdateDependencies(ctx context.Context, in *UpdateDependencies_Args, opts ...grpc.CallOption) (*UpdateDependencies_Result, error) -} - -type kclvmServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewKclvmServiceClient(cc grpc.ClientConnInterface) KclvmServiceClient { - return &kclvmServiceClient{cc} -} - -func (c *kclvmServiceClient) Ping(ctx context.Context, in *Ping_Args, opts ...grpc.CallOption) (*Ping_Result, error) { - out := new(Ping_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/Ping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) GetVersion(ctx context.Context, in *GetVersion_Args, opts ...grpc.CallOption) (*GetVersion_Result, error) { - out := new(GetVersion_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/GetVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ParseProgram(ctx context.Context, in *ParseProgram_Args, opts ...grpc.CallOption) (*ParseProgram_Result, error) { - out := new(ParseProgram_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ParseProgram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ParseFile(ctx context.Context, in *ParseFile_Args, opts ...grpc.CallOption) (*ParseFile_Result, error) { - out := new(ParseFile_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ParseFile", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) LoadPackage(ctx context.Context, in *LoadPackage_Args, opts ...grpc.CallOption) (*LoadPackage_Result, error) { - out := new(LoadPackage_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/LoadPackage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ListOptions(ctx context.Context, in *ParseProgram_Args, opts ...grpc.CallOption) (*ListOptions_Result, error) { - out := new(ListOptions_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ListOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ListVariables(ctx context.Context, in *ListVariables_Args, opts ...grpc.CallOption) (*ListVariables_Result, error) { - out := new(ListVariables_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ListVariables", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ExecProgram(ctx context.Context, in *ExecProgram_Args, opts ...grpc.CallOption) (*ExecProgram_Result, error) { - out := new(ExecProgram_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ExecProgram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (c *kclvmServiceClient) BuildProgram(ctx context.Context, in *BuildProgram_Args, opts ...grpc.CallOption) (*BuildProgram_Result, error) { - out := new(BuildProgram_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/BuildProgram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (c *kclvmServiceClient) ExecArtifact(ctx context.Context, in *ExecArtifact_Args, opts ...grpc.CallOption) (*ExecProgram_Result, error) { - out := new(ExecProgram_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ExecArtifact", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) OverrideFile(ctx context.Context, in *OverrideFile_Args, opts ...grpc.CallOption) (*OverrideFile_Result, error) { - out := new(OverrideFile_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/OverrideFile", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) GetSchemaTypeMapping(ctx context.Context, in *GetSchemaTypeMapping_Args, opts ...grpc.CallOption) (*GetSchemaTypeMapping_Result, error) { - out := new(GetSchemaTypeMapping_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/GetSchemaTypeMapping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) FormatCode(ctx context.Context, in *FormatCode_Args, opts ...grpc.CallOption) (*FormatCode_Result, error) { - out := new(FormatCode_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/FormatCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) FormatPath(ctx context.Context, in *FormatPath_Args, opts ...grpc.CallOption) (*FormatPath_Result, error) { - out := new(FormatPath_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/FormatPath", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) LintPath(ctx context.Context, in *LintPath_Args, opts ...grpc.CallOption) (*LintPath_Result, error) { - out := new(LintPath_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/LintPath", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ValidateCode(ctx context.Context, in *ValidateCode_Args, opts ...grpc.CallOption) (*ValidateCode_Result, error) { - out := new(ValidateCode_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ValidateCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) ListDepFiles(ctx context.Context, in *ListDepFiles_Args, opts ...grpc.CallOption) (*ListDepFiles_Result, error) { - out := new(ListDepFiles_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/ListDepFiles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) LoadSettingsFiles(ctx context.Context, in *LoadSettingsFiles_Args, opts ...grpc.CallOption) (*LoadSettingsFiles_Result, error) { - out := new(LoadSettingsFiles_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/LoadSettingsFiles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) Rename(ctx context.Context, in *Rename_Args, opts ...grpc.CallOption) (*Rename_Result, error) { - out := new(Rename_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/Rename", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) RenameCode(ctx context.Context, in *RenameCode_Args, opts ...grpc.CallOption) (*RenameCode_Result, error) { - out := new(RenameCode_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/RenameCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) Test(ctx context.Context, in *Test_Args, opts ...grpc.CallOption) (*Test_Result, error) { - out := new(Test_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/Test", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kclvmServiceClient) UpdateDependencies(ctx context.Context, in *UpdateDependencies_Args, opts ...grpc.CallOption) (*UpdateDependencies_Result, error) { - out := new(UpdateDependencies_Result) - err := c.cc.Invoke(ctx, "/gpyrpc.KclvmService/UpdateDependencies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KclvmServiceServer is the server API for KclvmService service. -type KclvmServiceServer interface { - // / Ping KclvmService, return the same value as the parameter - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Ping", - // / "params": { - // / "value": "hello" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "value": "hello" - // / }, - // / "id": 1 - // / } - // / ``` - Ping(context.Context, *Ping_Args) (*Ping_Result, error) - // / GetVersion KclvmService, return the kclvm service version information - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "GetVersion", - // / "params": {}, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "version": "0.9.1", - // / "checksum": "c020ab3eb4b9179219d6837a57f5d323", - // / "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", - // / "version_info": "Version: 0.9.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" - // / }, - // / "id": 1 - // / } - // / ``` - GetVersion(context.Context, *GetVersion_Args) (*GetVersion_Result, error) - // / Parse KCL program with entry files. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ParseProgram", - // / "params": { - // / "paths": ["./src/testdata/test.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "ast_json": "{...}", - // / "paths": ["./src/testdata/test.k"], - // / "errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ParseProgram(context.Context, *ParseProgram_Args) (*ParseProgram_Result, error) - // / Parse KCL single file to Module AST JSON string with import dependencies - // / and parse errors. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ParseFile", - // / "params": { - // / "path": "./src/testdata/parse/main.k" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "ast_json": "{...}", - // / "deps": ["./dep1", "./dep2"], - // / "errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ParseFile(context.Context, *ParseFile_Args) (*ParseFile_Result, error) - // / load_package provides users with the ability to parse kcl program and semantic model - // / information including symbols, types, definitions, etc. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LoadPackage", - // / "params": { - // / "parse_args": { - // / "paths": ["./src/testdata/parse/main.k"] - // / }, - // / "resolve_ast": true - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "program": "{...}", - // / "paths": ["./src/testdata/parse/main.k"], - // / "parse_errors": [], - // / "type_errors": [], - // / "symbols": { ... }, - // / "scopes": { ... }, - // / "node_symbol_map": { ... }, - // / "symbol_node_map": { ... }, - // / "fully_qualified_name_map": { ... }, - // / "pkg_scope_map": { ... } - // / }, - // / "id": 1 - // / } - // / ``` - LoadPackage(context.Context, *LoadPackage_Args) (*LoadPackage_Result, error) - // / list_options provides users with the ability to parse kcl program and get all option information. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ListOptions", - // / "params": { - // / "paths": ["./src/testdata/option/main.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "options": [ - // / { "name": "option1", "type": "str", "required": true, "default_value": "", "help": "option 1 help" }, - // / { "name": "option2", "type": "int", "required": false, "default_value": "0", "help": "option 2 help" }, - // / { "name": "option3", "type": "bool", "required": false, "default_value": "false", "help": "option 3 help" } - // / ] - // / }, - // / "id": 1 - // / } - // / ``` - ListOptions(context.Context, *ParseProgram_Args) (*ListOptions_Result, error) - // / list_variables provides users with the ability to parse kcl program and get all variables by specs. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ListVariables", - // / "params": { - // / "files": ["./src/testdata/variables/main.k"], - // / "specs": ["a"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "variables": { - // / "a": { - // / "variables": [ - // / { "value": "1", "type_name": "int", "op_sym": "", "list_items": [], "dict_entries": [] } - // / ] - // / } - // / }, - // / "unsupported_codes": [], - // / "parse_errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - ListVariables(context.Context, *ListVariables_Args) (*ListVariables_Result, error) - // / Execute KCL file with args. **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / - // / // Request with code - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": ["file.k"], - // / "k_code_list": ["alice = {age = 18}"] - // / }, - // / "id": 2 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 2 - // / } - // / - // / // Error case - cannot find file - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": ["invalid_file.k"] - // / }, - // / "id": 3 - // / } - // / - // / // Error Response - // / { - // / "jsonrpc": "2.0", - // / "error": { - // / "code": -32602, - // / "message": "Cannot find the kcl file" - // / }, - // / "id": 3 - // / } - // / - // / // Error case - no input files - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecProgram", - // / "params": { - // / "k_filename_list": [] - // / }, - // / "id": 4 - // / } - // / - // / // Error Response - // / { - // / "jsonrpc": "2.0", - // / "error": { - // / "code": -32602, - // / "message": "No input KCL files or paths" - // / }, - // / "id": 4 - // / } - // / ``` - ExecProgram(context.Context, *ExecProgram_Args) (*ExecProgram_Result, error) - // / Build the KCL program to an artifact. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "BuildProgram", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / }, - // / "output": "./build" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "path": "./build/test.k" - // / }, - // / "id": 1 - // / } - // / ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - BuildProgram(context.Context, *BuildProgram_Args) (*BuildProgram_Result, error) - // / Execute the KCL artifact with args. **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ExecArtifact", - // / "params": { - // / "path": "./artifact_path", - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["test.k"] - // / } - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "json_result": "{\"alice\": {\"age\": 18}}", - // / "yaml_result": "alice:\n age: 18", - // / "log_message": "", - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - ExecArtifact(context.Context, *ExecArtifact_Args) (*ExecProgram_Result, error) - // / Override KCL file with args. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "OverrideFile", - // / "params": { - // / "file": "./src/testdata/test.k", - // / "specs": ["alice.age=18"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "result": true, - // / "parse_errors": [] - // / }, - // / "id": 1 - // / } - // / ``` - OverrideFile(context.Context, *OverrideFile_Args) (*OverrideFile_Result, error) - // / Get schema type mapping. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "GetSchemaTypeMapping", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata", - // / "k_filename_list": ["main.k"], - // / "external_pkgs": [ - // / { - // / "pkg_name":"pkg", - // / "pkg_path": "./src/testdata/pkg" - // / } - // / ] - // / }, - // / "schema_name": "Person" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "schema_type_mapping": { - // / "Person": { - // / "type": "schema", - // / "schema_name": "Person", - // / "properties": { - // / "name": { "type": "str" }, - // / "age": { "type": "int" } - // / }, - // / "required": ["name", "age"], - // / "decorators": [] - // / } - // / } - // / }, - // / "id": 1 - // / } - // / ``` - GetSchemaTypeMapping(context.Context, *GetSchemaTypeMapping_Args) (*GetSchemaTypeMapping_Result, error) - // / Format code source. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "FormatCode", - // / "params": { - // / "source": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "formatted": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - // / }, - // / "id": 1 - // / } - // / ``` - FormatCode(context.Context, *FormatCode_Args) (*FormatCode_Result, error) - // / Format KCL file or directory path contains KCL files and returns the changed file paths. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "FormatPath", - // / "params": { - // / "path": "./src/testdata/test.k" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_paths": [] - // / }, - // / "id": 1 - // / } - // / ``` - FormatPath(context.Context, *FormatPath_Args) (*FormatPath_Result, error) - // / Lint files and return error messages including errors and warnings. - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LintPath", - // / "params": { - // / "paths": ["./src/testdata/test-lint.k"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "results": ["Module 'math' imported but unused"] - // / }, - // / "id": 1 - // / } - // / ``` - LintPath(context.Context, *LintPath_Args) (*LintPath_Result, error) - // / Validate code using schema and data strings. - // / - // / **Note that it is not thread safe.** - // / - // / # Examples - // / - // / ```jsonrpc - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "ValidateCode", - // / "params": { - // / "code": "schema Person {\n name: str\n age: int\n check: 0 < age < 120\n}", - // / "data": "{\"name\": \"Alice\", \"age\": 10}" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "success": true, - // / "err_message": "" - // / }, - // / "id": 1 - // / } - // / ``` - ValidateCode(context.Context, *ValidateCode_Args) (*ValidateCode_Result, error) - ListDepFiles(context.Context, *ListDepFiles_Args) (*ListDepFiles_Result, error) - // / Build setting file config from args. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "LoadSettingsFiles", - // / "params": { - // / "work_dir": "./src/testdata/settings", - // / "files": ["./src/testdata/settings/kcl.yaml"] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "kcl_cli_configs": { - // / "files": ["./src/testdata/settings/kcl.yaml"], - // / "output": "", - // / "overrides": [], - // / "path_selector": [], - // / "strict_range_check": false, - // / "disable_none": false, - // / "verbose": 0, - // / "debug": false, - // / "sort_keys": false, - // / "show_hidden": false, - // / "include_schema_type_path": false, - // / "fast_eval": false - // / }, - // / "kcl_options": [] - // / }, - // / "id": 1 - // / } - // / ``` - LoadSettingsFiles(context.Context, *LoadSettingsFiles_Args) (*LoadSettingsFiles_Result, error) - // / Rename all the occurrences of the target symbol in the files. This API will rewrite files if they contain symbols to be renamed. - // / Return the file paths that got changed. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Rename", - // / "params": { - // / "package_root": "./src/testdata/rename_doc", - // / "symbol_path": "a", - // / "file_paths": ["./src/testdata/rename_doc/main.k"], - // / "new_name": "a2" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_files": ["./src/testdata/rename_doc/main.k"] - // / }, - // / "id": 1 - // / } - // / ``` - Rename(context.Context, *Rename_Args) (*Rename_Result, error) - // / Rename all the occurrences of the target symbol and return the modified code if any code has been changed. This API won't rewrite files but return the changed code. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "RenameCode", - // / "params": { - // / "package_root": "/mock/path", - // / "symbol_path": "a", - // / "source_codes": { - // / "/mock/path/main.k": "a = 1\nb = a" - // / }, - // / "new_name": "a2" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "changed_codes": { - // / "/mock/path/main.k": "a2 = 1\nb = a2" - // / } - // / }, - // / "id": 1 - // / } - // / ``` - RenameCode(context.Context, *RenameCode_Args) (*RenameCode_Result, error) - // / Test KCL packages with test arguments. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "Test", - // / "params": { - // / "exec_args": { - // / "work_dir": "./src/testdata/testing/module", - // / "k_filename_list": ["main.k"] - // / }, - // / "pkg_list": ["./src/testdata/testing/module/..."] - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "info": [ - // / {"name": "test_case_1", "error": "", "duration": 1000, "log_message": ""}, - // / {"name": "test_case_2", "error": "some error", "duration": 2000, "log_message": ""} - // / ] - // / }, - // / "id": 1 - // / } - // / ``` - Test(context.Context, *Test_Args) (*Test_Result, error) - // / Download and update dependencies defined in the kcl.mod file. - // / - // / # Examples - // / - // / - // / // Request - // / { - // / "jsonrpc": "2.0", - // / "method": "UpdateDependencies", - // / "params": { - // / "manifest_path": "./src/testdata/update_dependencies" - // / }, - // / "id": 1 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "external_pkgs": [ - // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - // / ] - // / }, - // / "id": 1 - // / } - // / - // / // Request with vendor flag - // / { - // / "jsonrpc": "2.0", - // / "method": "UpdateDependencies", - // / "params": { - // / "manifest_path": "./src/testdata/update_dependencies", - // / "vendor": true - // / }, - // / "id": 2 - // / } - // / - // / // Response - // / { - // / "jsonrpc": "2.0", - // / "result": { - // / "external_pkgs": [ - // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - // / ] - // / }, - // / "id": 2 - // / } - // / ``` - UpdateDependencies(context.Context, *UpdateDependencies_Args) (*UpdateDependencies_Result, error) -} - -// UnimplementedKclvmServiceServer can be embedded to have forward compatible implementations. -type UnimplementedKclvmServiceServer struct { -} - -func (*UnimplementedKclvmServiceServer) Ping(context.Context, *Ping_Args) (*Ping_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (*UnimplementedKclvmServiceServer) GetVersion(context.Context, *GetVersion_Args) (*GetVersion_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") -} -func (*UnimplementedKclvmServiceServer) ParseProgram(context.Context, *ParseProgram_Args) (*ParseProgram_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParseProgram not implemented") -} -func (*UnimplementedKclvmServiceServer) ParseFile(context.Context, *ParseFile_Args) (*ParseFile_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParseFile not implemented") -} -func (*UnimplementedKclvmServiceServer) LoadPackage(context.Context, *LoadPackage_Args) (*LoadPackage_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadPackage not implemented") -} -func (*UnimplementedKclvmServiceServer) ListOptions(context.Context, *ParseProgram_Args) (*ListOptions_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListOptions not implemented") -} -func (*UnimplementedKclvmServiceServer) ListVariables(context.Context, *ListVariables_Args) (*ListVariables_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListVariables not implemented") -} -func (*UnimplementedKclvmServiceServer) ExecProgram(context.Context, *ExecProgram_Args) (*ExecProgram_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecProgram not implemented") -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (*UnimplementedKclvmServiceServer) BuildProgram(context.Context, *BuildProgram_Args) (*BuildProgram_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuildProgram not implemented") -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func (*UnimplementedKclvmServiceServer) ExecArtifact(context.Context, *ExecArtifact_Args) (*ExecProgram_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecArtifact not implemented") -} -func (*UnimplementedKclvmServiceServer) OverrideFile(context.Context, *OverrideFile_Args) (*OverrideFile_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method OverrideFile not implemented") -} -func (*UnimplementedKclvmServiceServer) GetSchemaTypeMapping(context.Context, *GetSchemaTypeMapping_Args) (*GetSchemaTypeMapping_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSchemaTypeMapping not implemented") -} -func (*UnimplementedKclvmServiceServer) FormatCode(context.Context, *FormatCode_Args) (*FormatCode_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method FormatCode not implemented") -} -func (*UnimplementedKclvmServiceServer) FormatPath(context.Context, *FormatPath_Args) (*FormatPath_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method FormatPath not implemented") -} -func (*UnimplementedKclvmServiceServer) LintPath(context.Context, *LintPath_Args) (*LintPath_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method LintPath not implemented") -} -func (*UnimplementedKclvmServiceServer) ValidateCode(context.Context, *ValidateCode_Args) (*ValidateCode_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateCode not implemented") -} -func (*UnimplementedKclvmServiceServer) ListDepFiles(context.Context, *ListDepFiles_Args) (*ListDepFiles_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDepFiles not implemented") -} -func (*UnimplementedKclvmServiceServer) LoadSettingsFiles(context.Context, *LoadSettingsFiles_Args) (*LoadSettingsFiles_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadSettingsFiles not implemented") -} -func (*UnimplementedKclvmServiceServer) Rename(context.Context, *Rename_Args) (*Rename_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rename not implemented") -} -func (*UnimplementedKclvmServiceServer) RenameCode(context.Context, *RenameCode_Args) (*RenameCode_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method RenameCode not implemented") -} -func (*UnimplementedKclvmServiceServer) Test(context.Context, *Test_Args) (*Test_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method Test not implemented") -} -func (*UnimplementedKclvmServiceServer) UpdateDependencies(context.Context, *UpdateDependencies_Args) (*UpdateDependencies_Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDependencies not implemented") -} - -func RegisterKclvmServiceServer(s *grpc.Server, srv KclvmServiceServer) { - s.RegisterService(&_KclvmService_serviceDesc, srv) -} - -func _KclvmService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Ping_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/Ping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).Ping(ctx, req.(*Ping_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetVersion_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).GetVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/GetVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).GetVersion(ctx, req.(*GetVersion_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ParseProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseProgram_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ParseProgram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ParseProgram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ParseProgram(ctx, req.(*ParseProgram_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ParseFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseFile_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ParseFile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ParseFile", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ParseFile(ctx, req.(*ParseFile_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_LoadPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadPackage_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).LoadPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/LoadPackage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).LoadPackage(ctx, req.(*LoadPackage_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ListOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseProgram_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ListOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ListOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ListOptions(ctx, req.(*ParseProgram_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ListVariables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListVariables_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ListVariables(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ListVariables", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ListVariables(ctx, req.(*ListVariables_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ExecProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExecProgram_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ExecProgram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ExecProgram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ExecProgram(ctx, req.(*ExecProgram_Args)) - } - return interceptor(ctx, in, info, handler) -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func _KclvmService_BuildProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BuildProgram_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).BuildProgram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/BuildProgram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).BuildProgram(ctx, req.(*BuildProgram_Args)) - } - return interceptor(ctx, in, info, handler) -} - -// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. -func _KclvmService_ExecArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExecArtifact_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ExecArtifact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ExecArtifact", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ExecArtifact(ctx, req.(*ExecArtifact_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_OverrideFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OverrideFile_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).OverrideFile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/OverrideFile", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).OverrideFile(ctx, req.(*OverrideFile_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_GetSchemaTypeMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSchemaTypeMapping_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).GetSchemaTypeMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/GetSchemaTypeMapping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).GetSchemaTypeMapping(ctx, req.(*GetSchemaTypeMapping_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_FormatCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FormatCode_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).FormatCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/FormatCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).FormatCode(ctx, req.(*FormatCode_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_FormatPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FormatPath_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).FormatPath(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/FormatPath", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).FormatPath(ctx, req.(*FormatPath_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_LintPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LintPath_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).LintPath(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/LintPath", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).LintPath(ctx, req.(*LintPath_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ValidateCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateCode_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ValidateCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ValidateCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ValidateCode(ctx, req.(*ValidateCode_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_ListDepFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDepFiles_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).ListDepFiles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/ListDepFiles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).ListDepFiles(ctx, req.(*ListDepFiles_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_LoadSettingsFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadSettingsFiles_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).LoadSettingsFiles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/LoadSettingsFiles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).LoadSettingsFiles(ctx, req.(*LoadSettingsFiles_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_Rename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Rename_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).Rename(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/Rename", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).Rename(ctx, req.(*Rename_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_RenameCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RenameCode_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).RenameCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/RenameCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).RenameCode(ctx, req.(*RenameCode_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Test_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).Test(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/Test", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).Test(ctx, req.(*Test_Args)) - } - return interceptor(ctx, in, info, handler) -} - -func _KclvmService_UpdateDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateDependencies_Args) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KclvmServiceServer).UpdateDependencies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gpyrpc.KclvmService/UpdateDependencies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KclvmServiceServer).UpdateDependencies(ctx, req.(*UpdateDependencies_Args)) - } - return interceptor(ctx, in, info, handler) -} - -var _KclvmService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "gpyrpc.KclvmService", - HandlerType: (*KclvmServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _KclvmService_Ping_Handler, - }, - { - MethodName: "GetVersion", - Handler: _KclvmService_GetVersion_Handler, - }, - { - MethodName: "ParseProgram", - Handler: _KclvmService_ParseProgram_Handler, - }, - { - MethodName: "ParseFile", - Handler: _KclvmService_ParseFile_Handler, - }, - { - MethodName: "LoadPackage", - Handler: _KclvmService_LoadPackage_Handler, - }, - { - MethodName: "ListOptions", - Handler: _KclvmService_ListOptions_Handler, - }, - { - MethodName: "ListVariables", - Handler: _KclvmService_ListVariables_Handler, - }, - { - MethodName: "ExecProgram", - Handler: _KclvmService_ExecProgram_Handler, - }, - { - MethodName: "BuildProgram", - Handler: _KclvmService_BuildProgram_Handler, - }, - { - MethodName: "ExecArtifact", - Handler: _KclvmService_ExecArtifact_Handler, - }, - { - MethodName: "OverrideFile", - Handler: _KclvmService_OverrideFile_Handler, - }, - { - MethodName: "GetSchemaTypeMapping", - Handler: _KclvmService_GetSchemaTypeMapping_Handler, - }, - { - MethodName: "FormatCode", - Handler: _KclvmService_FormatCode_Handler, - }, - { - MethodName: "FormatPath", - Handler: _KclvmService_FormatPath_Handler, - }, - { - MethodName: "LintPath", - Handler: _KclvmService_LintPath_Handler, - }, - { - MethodName: "ValidateCode", - Handler: _KclvmService_ValidateCode_Handler, - }, - { - MethodName: "ListDepFiles", - Handler: _KclvmService_ListDepFiles_Handler, - }, - { - MethodName: "LoadSettingsFiles", - Handler: _KclvmService_LoadSettingsFiles_Handler, - }, - { - MethodName: "Rename", - Handler: _KclvmService_Rename_Handler, - }, - { - MethodName: "RenameCode", - Handler: _KclvmService_RenameCode_Handler, - }, - { - MethodName: "Test", - Handler: _KclvmService_Test_Handler, - }, - { - MethodName: "UpdateDependencies", - Handler: _KclvmService_UpdateDependencies_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "gpyrpc.proto", -} +type Example = api.Example diff --git a/pkg/spec/gpyrpc/gpyrpc.pb.protorpc.go b/pkg/spec/gpyrpc/gpyrpc.pb.protorpc.go index c22c699c..736b242c 100644 --- a/pkg/spec/gpyrpc/gpyrpc.pb.protorpc.go +++ b/pkg/spec/gpyrpc/gpyrpc.pb.protorpc.go @@ -16,7 +16,7 @@ import ( "time" "github.com/chai2010/protorpc" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var ( diff --git a/pkg/spec/gpyrpc/gpyrpc.proto b/pkg/spec/gpyrpc/gpyrpc.proto deleted file mode 100644 index fa7c1342..00000000 --- a/pkg/spec/gpyrpc/gpyrpc.proto +++ /dev/null @@ -1,1470 +0,0 @@ -// Copyright The KCL Authors. All rights reserved. -// -// This file defines the request parameters and return structure of the KCL RPC server. - -syntax = "proto3"; - -package gpyrpc; - -option go_package = "kcl-lang.io/kcl-go/pkg/spec/gpyrpc;gpyrpc"; - -// Message representing an external package for KCL. -// kcl main.k -E pkg_name=pkg_path -message ExternalPkg { - // Name of the package. - string pkg_name = 1; - // Path of the package. - string pkg_path = 2; -} - -// Message representing a key-value argument for KCL. -// kcl main.k -D name=value -message Argument { - // Name of the argument. - string name = 1; - // Value of the argument. - string value = 2; -} - -// ---------------------------------------------------------------------------- -// Error types -// ---------------------------------------------------------------------------- - -// Message representing an error. -message Error { - // Level of the error (e.g., "Error", "Warning"). - string level = 1; - // Error code. (e.g., "E1001") - string code = 2; - // List of error messages. - repeated Message messages = 3; -} - -// Message representing a detailed error message with a position. -message Message { - // The error message text. - string msg = 1; - // The position in the source code where the error occurred. - Position pos = 2; -} - -// ---------------------------------------------------------------------------- -// service request/response -// ---------------------------------------------------------------------------- - -// Service for built-in functionality. -service BuiltinService { - // Sends a ping request. - rpc Ping(Ping_Args) returns (Ping_Result); - // Lists available methods. - rpc ListMethod(ListMethod_Args) returns (ListMethod_Result); -} - -// Service for KCL VM interactions. -service KclvmService { - /// Ping KclvmService, return the same value as the parameter - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "Ping", - /// "params": { - /// "value": "hello" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "value": "hello" - /// }, - /// "id": 1 - /// } - /// ``` - rpc Ping(Ping_Args) returns (Ping_Result); - - /// GetVersion KclvmService, return the kclvm service version information - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "GetVersion", - /// "params": {}, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "version": "0.9.1", - /// "checksum": "c020ab3eb4b9179219d6837a57f5d323", - /// "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", - /// "version_info": "Version: 0.9.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" - /// }, - /// "id": 1 - /// } - /// ``` - rpc GetVersion(GetVersion_Args) returns (GetVersion_Result); - - /// Parse KCL program with entry files. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ParseProgram", - /// "params": { - /// "paths": ["./src/testdata/test.k"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "ast_json": "{...}", - /// "paths": ["./src/testdata/test.k"], - /// "errors": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc ParseProgram(ParseProgram_Args) returns (ParseProgram_Result); - - /// Parse KCL single file to Module AST JSON string with import dependencies - /// and parse errors. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ParseFile", - /// "params": { - /// "path": "./src/testdata/parse/main.k" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "ast_json": "{...}", - /// "deps": ["./dep1", "./dep2"], - /// "errors": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc ParseFile(ParseFile_Args) returns (ParseFile_Result); - - /// load_package provides users with the ability to parse kcl program and semantic model - /// information including symbols, types, definitions, etc. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "LoadPackage", - /// "params": { - /// "parse_args": { - /// "paths": ["./src/testdata/parse/main.k"] - /// }, - /// "resolve_ast": true - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "program": "{...}", - /// "paths": ["./src/testdata/parse/main.k"], - /// "parse_errors": [], - /// "type_errors": [], - /// "symbols": { ... }, - /// "scopes": { ... }, - /// "node_symbol_map": { ... }, - /// "symbol_node_map": { ... }, - /// "fully_qualified_name_map": { ... }, - /// "pkg_scope_map": { ... } - /// }, - /// "id": 1 - /// } - /// ``` - rpc LoadPackage(LoadPackage_Args) returns (LoadPackage_Result); - - /// list_options provides users with the ability to parse kcl program and get all option information. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ListOptions", - /// "params": { - /// "paths": ["./src/testdata/option/main.k"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "options": [ - /// { "name": "option1", "type": "str", "required": true, "default_value": "", "help": "option 1 help" }, - /// { "name": "option2", "type": "int", "required": false, "default_value": "0", "help": "option 2 help" }, - /// { "name": "option3", "type": "bool", "required": false, "default_value": "false", "help": "option 3 help" } - /// ] - /// }, - /// "id": 1 - /// } - /// ``` - rpc ListOptions(ParseProgram_Args) returns (ListOptions_Result); - - /// list_variables provides users with the ability to parse kcl program and get all variables by specs. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ListVariables", - /// "params": { - /// "files": ["./src/testdata/variables/main.k"], - /// "specs": ["a"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "variables": { - /// "a": { - /// "variables": [ - /// { "value": "1", "type_name": "int", "op_sym": "", "list_items": [], "dict_entries": [] } - /// ] - /// } - /// }, - /// "unsupported_codes": [], - /// "parse_errors": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc ListVariables(ListVariables_Args) returns (ListVariables_Result); - - /// Execute KCL file with args. **Note that it is not thread safe.** - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ExecProgram", - /// "params": { - /// "work_dir": "./src/testdata", - /// "k_filename_list": ["test.k"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "json_result": "{\"alice\": {\"age\": 18}}", - /// "yaml_result": "alice:\n age: 18", - /// "log_message": "", - /// "err_message": "" - /// }, - /// "id": 1 - /// } - /// - /// // Request with code - /// { - /// "jsonrpc": "2.0", - /// "method": "ExecProgram", - /// "params": { - /// "k_filename_list": ["file.k"], - /// "k_code_list": ["alice = {age = 18}"] - /// }, - /// "id": 2 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "json_result": "{\"alice\": {\"age\": 18}}", - /// "yaml_result": "alice:\n age: 18", - /// "log_message": "", - /// "err_message": "" - /// }, - /// "id": 2 - /// } - /// - /// // Error case - cannot find file - /// { - /// "jsonrpc": "2.0", - /// "method": "ExecProgram", - /// "params": { - /// "k_filename_list": ["invalid_file.k"] - /// }, - /// "id": 3 - /// } - /// - /// // Error Response - /// { - /// "jsonrpc": "2.0", - /// "error": { - /// "code": -32602, - /// "message": "Cannot find the kcl file" - /// }, - /// "id": 3 - /// } - /// - /// // Error case - no input files - /// { - /// "jsonrpc": "2.0", - /// "method": "ExecProgram", - /// "params": { - /// "k_filename_list": [] - /// }, - /// "id": 4 - /// } - /// - /// // Error Response - /// { - /// "jsonrpc": "2.0", - /// "error": { - /// "code": -32602, - /// "message": "No input KCL files or paths" - /// }, - /// "id": 4 - /// } - /// ``` - rpc ExecProgram(ExecProgram_Args) returns (ExecProgram_Result); - - /// Build the KCL program to an artifact. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "BuildProgram", - /// "params": { - /// "exec_args": { - /// "work_dir": "./src/testdata", - /// "k_filename_list": ["test.k"] - /// }, - /// "output": "./build" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "path": "./build/test.k" - /// }, - /// "id": 1 - /// } - /// ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - rpc BuildProgram(BuildProgram_Args) returns (BuildProgram_Result); - - /// Execute the KCL artifact with args. **Note that it is not thread safe.** - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ExecArtifact", - /// "params": { - /// "path": "./artifact_path", - /// "exec_args": { - /// "work_dir": "./src/testdata", - /// "k_filename_list": ["test.k"] - /// } - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "json_result": "{\"alice\": {\"age\": 18}}", - /// "yaml_result": "alice:\n age: 18", - /// "log_message": "", - /// "err_message": "" - /// }, - /// "id": 1 - /// } - /// ``` - // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. - rpc ExecArtifact(ExecArtifact_Args) returns (ExecProgram_Result); - - /// Override KCL file with args. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "OverrideFile", - /// "params": { - /// "file": "./src/testdata/test.k", - /// "specs": ["alice.age=18"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "result": true, - /// "parse_errors": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc OverrideFile(OverrideFile_Args) returns (OverrideFile_Result); - - /// Get schema type mapping. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "GetSchemaTypeMapping", - /// "params": { - /// "exec_args": { - /// "work_dir": "./src/testdata", - /// "k_filename_list": ["main.k"], - /// "external_pkgs": [ - /// { - /// "pkg_name":"pkg", - /// "pkg_path": "./src/testdata/pkg" - /// } - /// ] - /// }, - /// "schema_name": "Person" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "schema_type_mapping": { - /// "Person": { - /// "type": "schema", - /// "schema_name": "Person", - /// "properties": { - /// "name": { "type": "str" }, - /// "age": { "type": "int" } - /// }, - /// "required": ["name", "age"], - /// "decorators": [] - /// } - /// } - /// }, - /// "id": 1 - /// } - /// ``` - rpc GetSchemaTypeMapping(GetSchemaTypeMapping_Args) returns (GetSchemaTypeMapping_Result); - - /// Format code source. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "FormatCode", - /// "params": { - /// "source": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "formatted": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" - /// }, - /// "id": 1 - /// } - /// ``` - rpc FormatCode(FormatCode_Args) returns (FormatCode_Result); - - /// Format KCL file or directory path contains KCL files and returns the changed file paths. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "FormatPath", - /// "params": { - /// "path": "./src/testdata/test.k" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "changed_paths": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc FormatPath(FormatPath_Args) returns (FormatPath_Result); - - /// Lint files and return error messages including errors and warnings. - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "LintPath", - /// "params": { - /// "paths": ["./src/testdata/test-lint.k"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "results": ["Module 'math' imported but unused"] - /// }, - /// "id": 1 - /// } - /// ``` - rpc LintPath(LintPath_Args) returns (LintPath_Result); - - /// Validate code using schema and data strings. - /// - /// **Note that it is not thread safe.** - /// - /// # Examples - /// - /// ```jsonrpc - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "ValidateCode", - /// "params": { - /// "code": "schema Person {\n name: str\n age: int\n check: 0 < age < 120\n}", - /// "data": "{\"name\": \"Alice\", \"age\": 10}" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "success": true, - /// "err_message": "" - /// }, - /// "id": 1 - /// } - /// ``` - rpc ValidateCode(ValidateCode_Args) returns (ValidateCode_Result); - - rpc ListDepFiles(ListDepFiles_Args) returns (ListDepFiles_Result); - /// Build setting file config from args. - /// - /// # Examples - /// - /// - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "LoadSettingsFiles", - /// "params": { - /// "work_dir": "./src/testdata/settings", - /// "files": ["./src/testdata/settings/kcl.yaml"] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "kcl_cli_configs": { - /// "files": ["./src/testdata/settings/kcl.yaml"], - /// "output": "", - /// "overrides": [], - /// "path_selector": [], - /// "strict_range_check": false, - /// "disable_none": false, - /// "verbose": 0, - /// "debug": false, - /// "sort_keys": false, - /// "show_hidden": false, - /// "include_schema_type_path": false, - /// "fast_eval": false - /// }, - /// "kcl_options": [] - /// }, - /// "id": 1 - /// } - /// ``` - rpc LoadSettingsFiles(LoadSettingsFiles_Args) returns (LoadSettingsFiles_Result); - - /// Rename all the occurrences of the target symbol in the files. This API will rewrite files if they contain symbols to be renamed. - /// Return the file paths that got changed. - /// - /// # Examples - /// - /// - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "Rename", - /// "params": { - /// "package_root": "./src/testdata/rename_doc", - /// "symbol_path": "a", - /// "file_paths": ["./src/testdata/rename_doc/main.k"], - /// "new_name": "a2" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "changed_files": ["./src/testdata/rename_doc/main.k"] - /// }, - /// "id": 1 - /// } - /// ``` - rpc Rename(Rename_Args) returns (Rename_Result); - - /// Rename all the occurrences of the target symbol and return the modified code if any code has been changed. This API won't rewrite files but return the changed code. - /// - /// # Examples - /// - /// - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "RenameCode", - /// "params": { - /// "package_root": "/mock/path", - /// "symbol_path": "a", - /// "source_codes": { - /// "/mock/path/main.k": "a = 1\nb = a" - /// }, - /// "new_name": "a2" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "changed_codes": { - /// "/mock/path/main.k": "a2 = 1\nb = a2" - /// } - /// }, - /// "id": 1 - /// } - /// ``` - rpc RenameCode(RenameCode_Args) returns (RenameCode_Result); - - /// Test KCL packages with test arguments. - /// - /// # Examples - /// - /// - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "Test", - /// "params": { - /// "exec_args": { - /// "work_dir": "./src/testdata/testing/module", - /// "k_filename_list": ["main.k"] - /// }, - /// "pkg_list": ["./src/testdata/testing/module/..."] - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "info": [ - /// {"name": "test_case_1", "error": "", "duration": 1000, "log_message": ""}, - /// {"name": "test_case_2", "error": "some error", "duration": 2000, "log_message": ""} - /// ] - /// }, - /// "id": 1 - /// } - /// ``` - rpc Test(Test_Args) returns (Test_Result); - - /// Download and update dependencies defined in the kcl.mod file. - /// - /// # Examples - /// - /// - /// // Request - /// { - /// "jsonrpc": "2.0", - /// "method": "UpdateDependencies", - /// "params": { - /// "manifest_path": "./src/testdata/update_dependencies" - /// }, - /// "id": 1 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "external_pkgs": [ - /// {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - /// ] - /// }, - /// "id": 1 - /// } - /// - /// // Request with vendor flag - /// { - /// "jsonrpc": "2.0", - /// "method": "UpdateDependencies", - /// "params": { - /// "manifest_path": "./src/testdata/update_dependencies", - /// "vendor": true - /// }, - /// "id": 2 - /// } - /// - /// // Response - /// { - /// "jsonrpc": "2.0", - /// "result": { - /// "external_pkgs": [ - /// {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} - /// ] - /// }, - /// "id": 2 - /// } - /// ``` - rpc UpdateDependencies(UpdateDependencies_Args) returns (UpdateDependencies_Result); -} - -// Message for ping request arguments. -message Ping_Args { - // Value to be sent in the ping request. - string value = 1; -} - -// Message for ping response. -message Ping_Result { - // Value received in the ping response. - string value = 1; -} - -// Message for version request arguments. Empty message. -message GetVersion_Args { - // empty -} - -// Message for version response. -message GetVersion_Result { - // KCL version. - string version = 1; - // Checksum of the KCL version. - string checksum = 2; - // Git Git SHA of the KCL code repo. - string git_sha = 3; - // Detailed version information as a string. - string version_info = 4; -} - -// Message for list method request arguments. Empty message. -message ListMethod_Args { - // empty -} - -// Message for list method response. -message ListMethod_Result { - // List of available method names. - repeated string method_name_list = 1; -} - -// Message for parse file request arguments. -message ParseFile_Args { - // Path of the file to be parsed. - string path = 1; - // Source code to be parsed. - string source = 2; - // External packages path. - repeated ExternalPkg external_pkgs = 3; -} - -// Message for parse file response. -message ParseFile_Result { - // Abstract Syntax Tree (AST) in JSON format. - string ast_json = 1; - // File dependency paths. - repeated string deps = 2; - // List of parse errors. - repeated Error errors = 3; -} - -// Message for parse program request arguments. -message ParseProgram_Args { - // Paths of the program files to be parsed. - repeated string paths = 1; - // Source codes to be parsed. - repeated string sources = 2; - // External packages path. - repeated ExternalPkg external_pkgs = 3; -} - -// Message for parse program response. -message ParseProgram_Result { - // Abstract Syntax Tree (AST) in JSON format. - string ast_json = 1; - // Returns the files in the order they should be compiled. - repeated string paths = 2; - // List of parse errors. - repeated Error errors = 3; -} - -// Message for load package request arguments. -message LoadPackage_Args { - // Arguments for parsing the program. - ParseProgram_Args parse_args = 1; - // Flag indicating whether to resolve AST. - bool resolve_ast = 2; - // Flag indicating whether to load built-in modules. - bool load_builtin = 3; - // Flag indicating whether to include AST index. - bool with_ast_index = 4; -} - -// Message for load package response. -message LoadPackage_Result { - // Program Abstract Syntax Tree (AST) in JSON format. - string program = 1; - // Returns the files in the order they should be compiled. - repeated string paths = 2; - // List of parse errors. - repeated Error parse_errors = 3; - // List of type errors. - repeated Error type_errors = 4; - // Map of scopes with scope index as key. - map scopes = 5; - // Map of symbols with symbol index as key. - map symbols = 6; - // Map of node-symbol associations with AST index UUID as key. - map node_symbol_map = 7; - // Map of symbol-node associations with symbol index as key. - map symbol_node_map = 8; - // Map of fully qualified names with symbol index as key. - map fully_qualified_name_map = 9; - // Map of package scope with package path as key. - map pkg_scope_map = 10; -} - -// Message for list options response. -message ListOptions_Result { - // List of available options. - repeated OptionHelp options = 2; -} - -// Message representing a help option. -message OptionHelp { - // Name of the option. - string name = 1; - // Type of the option. - string type = 2; - // Flag indicating if the option is required. - bool required = 3; - // Default value of the option. - string default_value = 4; - // Help text for the option. - string help = 5; -} - -// Message representing a symbol in KCL. -message Symbol { - // Type of the symbol. - KclType ty = 1; - // Name of the symbol. - string name = 2; - // Owner of the symbol. - SymbolIndex owner = 3; - // Definition of the symbol. - SymbolIndex def = 4; - // Attributes of the symbol. - repeated SymbolIndex attrs = 5; - // Flag indicating if the symbol is global. - bool is_global = 6; -} - -// Message representing a scope in KCL. -message Scope { - // Type of the scope. - string kind = 1; - // Parent scope. - ScopeIndex parent = 2; - // Owner of the scope. - SymbolIndex owner = 3; - // Children of the scope. - repeated ScopeIndex children = 4; - // Definitions in the scope. - repeated SymbolIndex defs = 5; -} - -// Message representing a symbol index. -message SymbolIndex { - // Index identifier. - uint64 i = 1; - // Global identifier. - uint64 g = 2; - // Type of the symbol or scope. - string kind = 3; -} - -// Message representing a scope index. -message ScopeIndex { - // Index identifier. - uint64 i = 1; - // Global identifier. - uint64 g = 2; - // Type of the scope. - string kind = 3; -} - -// Message for execute program request arguments. -message ExecProgram_Args { - // Working directory. - string work_dir = 1; - // List of KCL filenames. - repeated string k_filename_list = 2; - // List of KCL codes. - repeated string k_code_list = 3; - // Arguments for the program. - repeated Argument args = 4; - // Override configurations. - repeated string overrides = 5; - // Flag to disable YAML result. - bool disable_yaml_result = 6; - // Flag to print override AST. - bool print_override_ast = 7; - // Flag for strict range check. - bool strict_range_check = 8; - // Flag to disable none values. - bool disable_none = 9; - // Verbose level. - int32 verbose = 10; - // Debug level. - int32 debug = 11; - // Flag to sort keys in YAML/JSON results. - bool sort_keys = 12; - // External packages path. - repeated ExternalPkg external_pkgs = 13; - // Flag to include schema type path in results. - bool include_schema_type_path = 14; - // Flag to compile only without execution. - bool compile_only = 15; - // Flag to show hidden attributes. - bool show_hidden = 16; - // Path selectors for results. - repeated string path_selector = 17; - // Flag for fast evaluation. - bool fast_eval = 18; -} - -// Message for execute program response. -message ExecProgram_Result { - // Result in JSON format. - string json_result = 1; - // Result in YAML format. - string yaml_result = 2; - // Log message from execution. - string log_message = 3; - // Error message from execution. - string err_message = 4; -} - -// Message for build program request arguments. -message BuildProgram_Args { - // Arguments for executing the program. - ExecProgram_Args exec_args = 1; - // Output path. - string output = 2; -} - -// Message for build program response. -message BuildProgram_Result { - // Path of the built program. - string path = 1; -} - -// Message for execute artifact request arguments. -message ExecArtifact_Args { - // Path of the artifact. - string path = 1; - // Arguments for executing the program. - ExecProgram_Args exec_args = 2; -} - -// Message for format code request arguments. -message FormatCode_Args { - // Source code to be formatted. - string source = 1; -} - -// Message for format code response. -message FormatCode_Result { - // Formatted code as bytes. - bytes formatted = 1; -} - -// Message for format file path request arguments. -message FormatPath_Args { - // Path of the file to format. - string path = 1; -} - -// Message for format file path response. -message FormatPath_Result { - // List of changed file paths. - repeated string changed_paths = 1; -} - -// Message for lint file path request arguments. -message LintPath_Args { - // Paths of the files to lint. - repeated string paths = 1; -} - -// Message for lint file path response. -message LintPath_Result { - // List of lint results. - repeated string results = 1; -} - -// Message for override file request arguments. -message OverrideFile_Args { - // Path of the file to override. - string file = 1; - // List of override specifications. - repeated string specs = 2; - // List of import paths. - repeated string import_paths = 3; -} - -// Message for override file response. -message OverrideFile_Result { - // Result of the override operation. - bool result = 1; - // List of parse errors encountered. - repeated Error parse_errors = 2; -} - -// Message for list variables options. -message ListVariables_Options { - // Flag to merge program configuration. - bool merge_program = 1; -} - -// Message representing a list of variables. -message VariableList { - // List of variables. - repeated Variable variables = 1; -} - -// Message for list variables request arguments. -message ListVariables_Args { - // Files to be processed. - repeated string files = 1; - // Specifications for variables. - repeated string specs = 2; - // Options for listing variables. - ListVariables_Options options = 3; -} - -// Message for list variables response. -message ListVariables_Result { - // Map of variable lists by file. - map variables = 1; - // List of unsupported codes. - repeated string unsupported_codes = 2; - // List of parse errors encountered. - repeated Error parse_errors = 3; -} - -// Message representing a variable. -message Variable { - // Value of the variable. - string value = 1; - // Type name of the variable. - string type_name = 2; - // Operation symbol associated with the variable. - string op_sym = 3; - // List items if the variable is a list. - repeated Variable list_items = 4; - // Dictionary entries if the variable is a dictionary. - repeated MapEntry dict_entries = 5; -} - -// Message representing a map entry. -message MapEntry { - // Key of the map entry. - string key = 1; - // Value of the map entry. - Variable value = 2; -} - -// Message for get schema type mapping request arguments. -message GetSchemaTypeMapping_Args { - // Arguments for executing the program. - ExecProgram_Args exec_args = 1; - // Name of the schema. - string schema_name = 2; -} - -// Message for get schema type mapping response. -message GetSchemaTypeMapping_Result { - // Map of schema type mappings. - map schema_type_mapping = 1; -} - -// Message for validate code request arguments. -message ValidateCode_Args { - // Path to the data file. - string datafile = 1; - // Data content. - string data = 2; - // Path to the code file. - string file = 3; - // Source code content. - string code = 4; - // Name of the schema. - string schema = 5; - // Name of the attribute. - string attribute_name = 6; - // Format of the validation (e.g., "json", "yaml"). - string format = 7; -} - -// Message for validate code response. -message ValidateCode_Result { - // Flag indicating if validation was successful. - bool success = 1; - // Error message from validation. - string err_message = 2; -} - -// Message representing a position in the source code. -message Position { - // Line number. - int64 line = 1; - // Column number. - int64 column = 2; - // Filename the position refers to. - string filename = 3; -} - -// Message for list dependency files request arguments. -message ListDepFiles_Args { - // Working directory. - string work_dir = 1; - // Flag to use absolute paths. - bool use_abs_path = 2; - // Flag to include all files. - bool include_all = 3; - // Flag to use fast parser. - bool use_fast_parser = 4; -} - -// Message for list dependency files response. -message ListDepFiles_Result { - // Root package path. - string pkgroot = 1; - // Package path. - string pkgpath = 2; - // List of file paths in the package. - repeated string files = 3; -} - -// --------------------------------------------------------------------------------- -// LoadSettingsFiles API -// Input work dir and setting files and return the merged kcl singleton config. -// --------------------------------------------------------------------------------- - -// Message for load settings files request arguments. -message LoadSettingsFiles_Args { - // Working directory. - string work_dir = 1; - // Setting files to load. - repeated string files = 2; -} - -// Message for load settings files response. -message LoadSettingsFiles_Result { - // KCL CLI configuration. - CliConfig kcl_cli_configs = 1; - // List of KCL options as key-value pairs. - repeated KeyValuePair kcl_options = 2; -} - -// Message representing KCL CLI configuration. -message CliConfig { - // List of files. - repeated string files = 1; - // Output path. - string output = 2; - // List of overrides. - repeated string overrides = 3; - // Path selectors. - repeated string path_selector = 4; - // Flag for strict range check. - bool strict_range_check = 5; - // Flag to disable none values. - bool disable_none = 6; - // Verbose level. - int64 verbose = 7; - // Debug flag. - bool debug = 8; - // Flag to sort keys in YAML/JSON results. - bool sort_keys = 9; - // Flag to show hidden attributes. - bool show_hidden = 10; - // Flag to include schema type path in results. - bool include_schema_type_path = 11; - // Flag for fast evaluation. - bool fast_eval = 12; -} - -// Message representing a key-value pair. -message KeyValuePair { - // Key of the pair. - string key = 1; - // Value of the pair. - string value = 2; -} - -// --------------------------------------------------------------------------------- -// Rename API -// Find all the occurrences of the target symbol and rename them. -// This API will rewrite files if they contain symbols to be renamed. -// --------------------------------------------------------------------------------- - -// Message for rename request arguments. -message Rename_Args { - // File path to the package root. - string package_root = 1; - // Path to the target symbol to be renamed. - string symbol_path = 2; - // Paths to the source code files. - repeated string file_paths = 3; - // New name of the symbol. - string new_name = 4; -} - -// Message for rename response. -message Rename_Result { - // List of file paths that got changed. - repeated string changed_files = 1; -} - -// --------------------------------------------------------------------------------- -// RenameCode API -// Find all the occurrences of the target symbol and rename them. -// This API won't rewrite files but return the modified code if any code has been changed. -// --------------------------------------------------------------------------------- - -// Message for rename code request arguments. -message RenameCode_Args { - // File path to the package root. - string package_root = 1; - // Path to the target symbol to be renamed. - string symbol_path = 2; - // Map of source code with filename as key and code as value. - map source_codes = 3; - // New name of the symbol. - string new_name = 4; -} - -// Message for rename code response. -message RenameCode_Result { - // Map of changed code with filename as key and modified code as value. - map changed_codes = 1; -} - -// --------------------------------------------------------------------------------- -// Test API -// Test KCL packages with test arguments. -// --------------------------------------------------------------------------------- - -// Message for test request arguments. -message Test_Args { - // Execution program arguments. - ExecProgram_Args exec_args = 1; - // List of KCL package paths to be tested. - repeated string pkg_list = 2; - // Regular expression for filtering tests to run. - string run_regexp = 3; - // Flag to stop the test run on the first failure. - bool fail_fast = 4; -} - -// Message for test response. -message Test_Result { - // List of test case information. - repeated TestCaseInfo info = 2; -} - -// Message representing information about a single test case. -message TestCaseInfo { - // Name of the test case. - string name = 1; - // Error message if any. - string error = 2; - // Duration of the test case in microseconds. - uint64 duration = 3; - // Log message from the test case. - string log_message = 4; -} - -// --------------------------------------------------------------------------------- -// UpdateDependencies API -// Download and update dependencies defined in the kcl.mod file. -// --------------------------------------------------------------------------------- - -// Message for update dependencies request arguments. -message UpdateDependencies_Args { - // Path to the manifest file. - string manifest_path = 1; - // Flag to vendor dependencies locally. - bool vendor = 2; -} - -// Message for update dependencies response. -message UpdateDependencies_Result { - // List of external packages updated. - repeated ExternalPkg external_pkgs = 3; -} - -// ---------------------------------------------------------------------------- -// KCL Type Structure -// ---------------------------------------------------------------------------- - -// Message representing a KCL type. -message KclType { - // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). - string type = 1; - // Union types if applicable. - repeated KclType union_types = 2; - // Default value of the type. - string default = 3; - // Name of the schema if applicable. - string schema_name = 4; - // Documentation for the schema. - string schema_doc = 5; - // Properties of the schema as a map with property name as key. - map properties = 6; - // List of required schema properties. - repeated string required = 7; - // Key type if the KclType is a dictionary. - KclType key = 8; - // Item type if the KclType is a list or dictionary. - KclType item = 9; - // Line number where the type is defined. - int32 line = 10; - // List of decorators for the schema. - repeated Decorator decorators = 11; - // Absolute path of the file where the attribute is located. - string filename = 12; - // Path of the package where the attribute is located. - string pkg_path = 13; - // Documentation for the attribute. - string description = 14; - // Map of examples with example name as key. - map examples = 15; - // Base schema if applicable. - KclType base_schema = 16; -} - -// Message representing a decorator in KCL. -message Decorator { - // Name of the decorator. - string name = 1; - // Arguments for the decorator. - repeated string arguments = 2; - // Keyword arguments for the decorator as a map with keyword name as key. - map keywords = 3; -} - -// Message representing an example in KCL. -message Example { - // Short description for the example. - string summary = 1; - // Long description for the example. - string description = 2; - // Embedded literal example. - string value = 3; -} - -// ---------------------------------------------------------------------------- -// END -// ---------------------------------------------------------------------------- diff --git a/pkg/spec/gpyrpc/service.go b/pkg/spec/gpyrpc/service.go new file mode 100644 index 00000000..1921696e --- /dev/null +++ b/pkg/spec/gpyrpc/service.go @@ -0,0 +1,1309 @@ +package gpyrpc + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// KclvmServiceServer is the server API for KclvmService service. +type KclvmServiceServer interface { + // / Ping KclvmService, return the same value as the parameter + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "Ping", + // / "params": { + // / "value": "hello" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "value": "hello" + // / }, + // / "id": 1 + // / } + // / ``` + Ping(context.Context, *Ping_Args) (*Ping_Result, error) + // / GetVersion KclvmService, return the kclvm service version information + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "GetVersion", + // / "params": {}, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "version": "0.9.1", + // / "checksum": "c020ab3eb4b9179219d6837a57f5d323", + // / "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", + // / "version_info": "Version: 0.9.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" + // / }, + // / "id": 1 + // / } + // / ``` + GetVersion(context.Context, *GetVersion_Args) (*GetVersion_Result, error) + // / Parse KCL program with entry files. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ParseProgram", + // / "params": { + // / "paths": ["./src/testdata/test.k"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "ast_json": "{...}", + // / "paths": ["./src/testdata/test.k"], + // / "errors": [] + // / }, + // / "id": 1 + // / } + // / ``` + ParseProgram(context.Context, *ParseProgram_Args) (*ParseProgram_Result, error) + // / Parse KCL single file to Module AST JSON string with import dependencies + // / and parse errors. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ParseFile", + // / "params": { + // / "path": "./src/testdata/parse/main.k" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "ast_json": "{...}", + // / "deps": ["./dep1", "./dep2"], + // / "errors": [] + // / }, + // / "id": 1 + // / } + // / ``` + ParseFile(context.Context, *ParseFile_Args) (*ParseFile_Result, error) + // / load_package provides users with the ability to parse kcl program and semantic model + // / information including symbols, types, definitions, etc. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "LoadPackage", + // / "params": { + // / "parse_args": { + // / "paths": ["./src/testdata/parse/main.k"] + // / }, + // / "resolve_ast": true + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "program": "{...}", + // / "paths": ["./src/testdata/parse/main.k"], + // / "parse_errors": [], + // / "type_errors": [], + // / "symbols": { ... }, + // / "scopes": { ... }, + // / "node_symbol_map": { ... }, + // / "symbol_node_map": { ... }, + // / "fully_qualified_name_map": { ... }, + // / "pkg_scope_map": { ... } + // / }, + // / "id": 1 + // / } + // / ``` + LoadPackage(context.Context, *LoadPackage_Args) (*LoadPackage_Result, error) + // / list_options provides users with the ability to parse kcl program and get all option information. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ListOptions", + // / "params": { + // / "paths": ["./src/testdata/option/main.k"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "options": [ + // / { "name": "option1", "type": "str", "required": true, "default_value": "", "help": "option 1 help" }, + // / { "name": "option2", "type": "int", "required": false, "default_value": "0", "help": "option 2 help" }, + // / { "name": "option3", "type": "bool", "required": false, "default_value": "false", "help": "option 3 help" } + // / ] + // / }, + // / "id": 1 + // / } + // / ``` + ListOptions(context.Context, *ParseProgram_Args) (*ListOptions_Result, error) + // / list_variables provides users with the ability to parse kcl program and get all variables by specs. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ListVariables", + // / "params": { + // / "files": ["./src/testdata/variables/main.k"], + // / "specs": ["a"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "variables": { + // / "a": { + // / "variables": [ + // / { "value": "1", "type_name": "int", "op_sym": "", "list_items": [], "dict_entries": [] } + // / ] + // / } + // / }, + // / "unsupported_codes": [], + // / "parse_errors": [] + // / }, + // / "id": 1 + // / } + // / ``` + ListVariables(context.Context, *ListVariables_Args) (*ListVariables_Result, error) + // / Execute KCL file with args. **Note that it is not thread safe.** + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ExecProgram", + // / "params": { + // / "work_dir": "./src/testdata", + // / "k_filename_list": ["test.k"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "json_result": "{\"alice\": {\"age\": 18}}", + // / "yaml_result": "alice:\n age: 18", + // / "log_message": "", + // / "err_message": "" + // / }, + // / "id": 1 + // / } + // / + // / // Request with code + // / { + // / "jsonrpc": "2.0", + // / "method": "ExecProgram", + // / "params": { + // / "k_filename_list": ["file.k"], + // / "k_code_list": ["alice = {age = 18}"] + // / }, + // / "id": 2 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "json_result": "{\"alice\": {\"age\": 18}}", + // / "yaml_result": "alice:\n age: 18", + // / "log_message": "", + // / "err_message": "" + // / }, + // / "id": 2 + // / } + // / + // / // Error case - cannot find file + // / { + // / "jsonrpc": "2.0", + // / "method": "ExecProgram", + // / "params": { + // / "k_filename_list": ["invalid_file.k"] + // / }, + // / "id": 3 + // / } + // / + // / // Error Response + // / { + // / "jsonrpc": "2.0", + // / "error": { + // / "code": -32602, + // / "message": "Cannot find the kcl file" + // / }, + // / "id": 3 + // / } + // / + // / // Error case - no input files + // / { + // / "jsonrpc": "2.0", + // / "method": "ExecProgram", + // / "params": { + // / "k_filename_list": [] + // / }, + // / "id": 4 + // / } + // / + // / // Error Response + // / { + // / "jsonrpc": "2.0", + // / "error": { + // / "code": -32602, + // / "message": "No input KCL files or paths" + // / }, + // / "id": 4 + // / } + // / ``` + ExecProgram(context.Context, *ExecProgram_Args) (*ExecProgram_Result, error) + // / Build the KCL program to an artifact. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "BuildProgram", + // / "params": { + // / "exec_args": { + // / "work_dir": "./src/testdata", + // / "k_filename_list": ["test.k"] + // / }, + // / "output": "./build" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "path": "./build/test.k" + // / }, + // / "id": 1 + // / } + // / ``` + // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. + BuildProgram(context.Context, *BuildProgram_Args) (*BuildProgram_Result, error) + // / Execute the KCL artifact with args. **Note that it is not thread safe.** + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ExecArtifact", + // / "params": { + // / "path": "./artifact_path", + // / "exec_args": { + // / "work_dir": "./src/testdata", + // / "k_filename_list": ["test.k"] + // / } + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "json_result": "{\"alice\": {\"age\": 18}}", + // / "yaml_result": "alice:\n age: 18", + // / "log_message": "", + // / "err_message": "" + // / }, + // / "id": 1 + // / } + // / ``` + // Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. + ExecArtifact(context.Context, *ExecArtifact_Args) (*ExecProgram_Result, error) + // / Override KCL file with args. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "OverrideFile", + // / "params": { + // / "file": "./src/testdata/test.k", + // / "specs": ["alice.age=18"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "result": true, + // / "parse_errors": [] + // / }, + // / "id": 1 + // / } + // / ``` + OverrideFile(context.Context, *OverrideFile_Args) (*OverrideFile_Result, error) + // / Get schema type mapping. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "GetSchemaTypeMapping", + // / "params": { + // / "exec_args": { + // / "work_dir": "./src/testdata", + // / "k_filename_list": ["main.k"], + // / "external_pkgs": [ + // / { + // / "pkg_name":"pkg", + // / "pkg_path": "./src/testdata/pkg" + // / } + // / ] + // / }, + // / "schema_name": "Person" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "schema_type_mapping": { + // / "Person": { + // / "type": "schema", + // / "schema_name": "Person", + // / "properties": { + // / "name": { "type": "str" }, + // / "age": { "type": "int" } + // / }, + // / "required": ["name", "age"], + // / "decorators": [] + // / } + // / } + // / }, + // / "id": 1 + // / } + // / ``` + GetSchemaTypeMapping(context.Context, *GetSchemaTypeMapping_Args) (*GetSchemaTypeMapping_Result, error) + // / Format code source. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "FormatCode", + // / "params": { + // / "source": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "formatted": "schema Person {\n name: str\n age: int\n}\nperson = Person {\n name = \"Alice\"\n age = 18\n}\n" + // / }, + // / "id": 1 + // / } + // / ``` + FormatCode(context.Context, *FormatCode_Args) (*FormatCode_Result, error) + // / Format KCL file or directory path contains KCL files and returns the changed file paths. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "FormatPath", + // / "params": { + // / "path": "./src/testdata/test.k" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "changed_paths": [] + // / }, + // / "id": 1 + // / } + // / ``` + FormatPath(context.Context, *FormatPath_Args) (*FormatPath_Result, error) + // / Lint files and return error messages including errors and warnings. + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "LintPath", + // / "params": { + // / "paths": ["./src/testdata/test-lint.k"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "results": ["Module 'math' imported but unused"] + // / }, + // / "id": 1 + // / } + // / ``` + LintPath(context.Context, *LintPath_Args) (*LintPath_Result, error) + // / Validate code using schema and data strings. + // / + // / **Note that it is not thread safe.** + // / + // / # Examples + // / + // / ```jsonrpc + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "ValidateCode", + // / "params": { + // / "code": "schema Person {\n name: str\n age: int\n check: 0 < age < 120\n}", + // / "data": "{\"name\": \"Alice\", \"age\": 10}" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "success": true, + // / "err_message": "" + // / }, + // / "id": 1 + // / } + // / ``` + ValidateCode(context.Context, *ValidateCode_Args) (*ValidateCode_Result, error) + ListDepFiles(context.Context, *ListDepFiles_Args) (*ListDepFiles_Result, error) + // / Build setting file config from args. + // / + // / # Examples + // / + // / + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "LoadSettingsFiles", + // / "params": { + // / "work_dir": "./src/testdata/settings", + // / "files": ["./src/testdata/settings/kcl.yaml"] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "kcl_cli_configs": { + // / "files": ["./src/testdata/settings/kcl.yaml"], + // / "output": "", + // / "overrides": [], + // / "path_selector": [], + // / "strict_range_check": false, + // / "disable_none": false, + // / "verbose": 0, + // / "debug": false, + // / "sort_keys": false, + // / "show_hidden": false, + // / "include_schema_type_path": false, + // / "fast_eval": false + // / }, + // / "kcl_options": [] + // / }, + // / "id": 1 + // / } + // / ``` + LoadSettingsFiles(context.Context, *LoadSettingsFiles_Args) (*LoadSettingsFiles_Result, error) + // / Rename all the occurrences of the target symbol in the files. This API will rewrite files if they contain symbols to be renamed. + // / Return the file paths that got changed. + // / + // / # Examples + // / + // / + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "Rename", + // / "params": { + // / "package_root": "./src/testdata/rename_doc", + // / "symbol_path": "a", + // / "file_paths": ["./src/testdata/rename_doc/main.k"], + // / "new_name": "a2" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "changed_files": ["./src/testdata/rename_doc/main.k"] + // / }, + // / "id": 1 + // / } + // / ``` + Rename(context.Context, *Rename_Args) (*Rename_Result, error) + // / Rename all the occurrences of the target symbol and return the modified code if any code has been changed. This API won't rewrite files but return the changed code. + // / + // / # Examples + // / + // / + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "RenameCode", + // / "params": { + // / "package_root": "/mock/path", + // / "symbol_path": "a", + // / "source_codes": { + // / "/mock/path/main.k": "a = 1\nb = a" + // / }, + // / "new_name": "a2" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "changed_codes": { + // / "/mock/path/main.k": "a2 = 1\nb = a2" + // / } + // / }, + // / "id": 1 + // / } + // / ``` + RenameCode(context.Context, *RenameCode_Args) (*RenameCode_Result, error) + // / Test KCL packages with test arguments. + // / + // / # Examples + // / + // / + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "Test", + // / "params": { + // / "exec_args": { + // / "work_dir": "./src/testdata/testing/module", + // / "k_filename_list": ["main.k"] + // / }, + // / "pkg_list": ["./src/testdata/testing/module/..."] + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "info": [ + // / {"name": "test_case_1", "error": "", "duration": 1000, "log_message": ""}, + // / {"name": "test_case_2", "error": "some error", "duration": 2000, "log_message": ""} + // / ] + // / }, + // / "id": 1 + // / } + // / ``` + Test(context.Context, *Test_Args) (*Test_Result, error) + // / Download and update dependencies defined in the kcl.mod file. + // / + // / # Examples + // / + // / + // / // Request + // / { + // / "jsonrpc": "2.0", + // / "method": "UpdateDependencies", + // / "params": { + // / "manifest_path": "./src/testdata/update_dependencies" + // / }, + // / "id": 1 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "external_pkgs": [ + // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} + // / ] + // / }, + // / "id": 1 + // / } + // / + // / // Request with vendor flag + // / { + // / "jsonrpc": "2.0", + // / "method": "UpdateDependencies", + // / "params": { + // / "manifest_path": "./src/testdata/update_dependencies", + // / "vendor": true + // / }, + // / "id": 2 + // / } + // / + // / // Response + // / { + // / "jsonrpc": "2.0", + // / "result": { + // / "external_pkgs": [ + // / {"pkg_name": "pkg1", "pkg_path": "./src/testdata/update_dependencies/pkg1"} + // / ] + // / }, + // / "id": 2 + // / } + // / ``` + UpdateDependencies(context.Context, *UpdateDependencies_Args) (*UpdateDependencies_Result, error) +} + +// UnimplementedKclvmServiceServer can be embedded to have forward compatible implementations. +type UnimplementedKclvmServiceServer struct { +} + +func (*UnimplementedKclvmServiceServer) Ping(context.Context, *Ping_Args) (*Ping_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (*UnimplementedKclvmServiceServer) GetVersion(context.Context, *GetVersion_Args) (*GetVersion_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") +} +func (*UnimplementedKclvmServiceServer) ParseProgram(context.Context, *ParseProgram_Args) (*ParseProgram_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ParseProgram not implemented") +} +func (*UnimplementedKclvmServiceServer) ParseFile(context.Context, *ParseFile_Args) (*ParseFile_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ParseFile not implemented") +} +func (*UnimplementedKclvmServiceServer) LoadPackage(context.Context, *LoadPackage_Args) (*LoadPackage_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadPackage not implemented") +} +func (*UnimplementedKclvmServiceServer) ListOptions(context.Context, *ParseProgram_Args) (*ListOptions_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOptions not implemented") +} +func (*UnimplementedKclvmServiceServer) ListVariables(context.Context, *ListVariables_Args) (*ListVariables_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVariables not implemented") +} +func (*UnimplementedKclvmServiceServer) ExecProgram(context.Context, *ExecProgram_Args) (*ExecProgram_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecProgram not implemented") +} + +// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. +func (*UnimplementedKclvmServiceServer) BuildProgram(context.Context, *BuildProgram_Args) (*BuildProgram_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuildProgram not implemented") +} + +// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. +func (*UnimplementedKclvmServiceServer) ExecArtifact(context.Context, *ExecArtifact_Args) (*ExecProgram_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecArtifact not implemented") +} +func (*UnimplementedKclvmServiceServer) OverrideFile(context.Context, *OverrideFile_Args) (*OverrideFile_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method OverrideFile not implemented") +} +func (*UnimplementedKclvmServiceServer) GetSchemaTypeMapping(context.Context, *GetSchemaTypeMapping_Args) (*GetSchemaTypeMapping_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSchemaTypeMapping not implemented") +} +func (*UnimplementedKclvmServiceServer) FormatCode(context.Context, *FormatCode_Args) (*FormatCode_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormatCode not implemented") +} +func (*UnimplementedKclvmServiceServer) FormatPath(context.Context, *FormatPath_Args) (*FormatPath_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormatPath not implemented") +} +func (*UnimplementedKclvmServiceServer) LintPath(context.Context, *LintPath_Args) (*LintPath_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method LintPath not implemented") +} +func (*UnimplementedKclvmServiceServer) ValidateCode(context.Context, *ValidateCode_Args) (*ValidateCode_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateCode not implemented") +} +func (*UnimplementedKclvmServiceServer) ListDepFiles(context.Context, *ListDepFiles_Args) (*ListDepFiles_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDepFiles not implemented") +} +func (*UnimplementedKclvmServiceServer) LoadSettingsFiles(context.Context, *LoadSettingsFiles_Args) (*LoadSettingsFiles_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadSettingsFiles not implemented") +} +func (*UnimplementedKclvmServiceServer) Rename(context.Context, *Rename_Args) (*Rename_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rename not implemented") +} +func (*UnimplementedKclvmServiceServer) RenameCode(context.Context, *RenameCode_Args) (*RenameCode_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method RenameCode not implemented") +} +func (*UnimplementedKclvmServiceServer) Test(context.Context, *Test_Args) (*Test_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method Test not implemented") +} +func (*UnimplementedKclvmServiceServer) UpdateDependencies(context.Context, *UpdateDependencies_Args) (*UpdateDependencies_Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDependencies not implemented") +} + +func RegisterKclvmServiceServer(s *grpc.Server, srv KclvmServiceServer) { + s.RegisterService(&_KclvmService_serviceDesc, srv) +} + +func _KclvmService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Ping_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/Ping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).Ping(ctx, req.(*Ping_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVersion_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).GetVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/GetVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).GetVersion(ctx, req.(*GetVersion_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ParseProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseProgram_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ParseProgram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ParseProgram", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ParseProgram(ctx, req.(*ParseProgram_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ParseFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseFile_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ParseFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ParseFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ParseFile(ctx, req.(*ParseFile_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_LoadPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadPackage_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).LoadPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/LoadPackage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).LoadPackage(ctx, req.(*LoadPackage_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ListOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseProgram_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ListOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ListOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ListOptions(ctx, req.(*ParseProgram_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ListVariables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVariables_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ListVariables(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ListVariables", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ListVariables(ctx, req.(*ListVariables_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ExecProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecProgram_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ExecProgram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ExecProgram", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ExecProgram(ctx, req.(*ExecProgram_Args)) + } + return interceptor(ctx, in, info, handler) +} + +// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. +func _KclvmService_BuildProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BuildProgram_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).BuildProgram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/BuildProgram", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).BuildProgram(ctx, req.(*BuildProgram_Args)) + } + return interceptor(ctx, in, info, handler) +} + +// Depreciated: Please use the env.EnableFastEvalMode() and c.ExecutProgram method and will be removed in v0.11.0. +func _KclvmService_ExecArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecArtifact_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ExecArtifact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ExecArtifact", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ExecArtifact(ctx, req.(*ExecArtifact_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_OverrideFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OverrideFile_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).OverrideFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/OverrideFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).OverrideFile(ctx, req.(*OverrideFile_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_GetSchemaTypeMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSchemaTypeMapping_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).GetSchemaTypeMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/GetSchemaTypeMapping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).GetSchemaTypeMapping(ctx, req.(*GetSchemaTypeMapping_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_FormatCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FormatCode_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).FormatCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/FormatCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).FormatCode(ctx, req.(*FormatCode_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_FormatPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FormatPath_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).FormatPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/FormatPath", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).FormatPath(ctx, req.(*FormatPath_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_LintPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LintPath_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).LintPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/LintPath", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).LintPath(ctx, req.(*LintPath_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ValidateCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateCode_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ValidateCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ValidateCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ValidateCode(ctx, req.(*ValidateCode_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_ListDepFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDepFiles_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).ListDepFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/ListDepFiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).ListDepFiles(ctx, req.(*ListDepFiles_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_LoadSettingsFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadSettingsFiles_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).LoadSettingsFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/LoadSettingsFiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).LoadSettingsFiles(ctx, req.(*LoadSettingsFiles_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_Rename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Rename_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).Rename(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/Rename", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).Rename(ctx, req.(*Rename_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_RenameCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenameCode_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).RenameCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/RenameCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).RenameCode(ctx, req.(*RenameCode_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Test_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).Test(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/Test", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).Test(ctx, req.(*Test_Args)) + } + return interceptor(ctx, in, info, handler) +} + +func _KclvmService_UpdateDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDependencies_Args) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KclvmServiceServer).UpdateDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gpyrpc.KclvmService/UpdateDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KclvmServiceServer).UpdateDependencies(ctx, req.(*UpdateDependencies_Args)) + } + return interceptor(ctx, in, info, handler) +} + +var _KclvmService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gpyrpc.KclvmService", + HandlerType: (*KclvmServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _KclvmService_Ping_Handler, + }, + { + MethodName: "GetVersion", + Handler: _KclvmService_GetVersion_Handler, + }, + { + MethodName: "ParseProgram", + Handler: _KclvmService_ParseProgram_Handler, + }, + { + MethodName: "ParseFile", + Handler: _KclvmService_ParseFile_Handler, + }, + { + MethodName: "LoadPackage", + Handler: _KclvmService_LoadPackage_Handler, + }, + { + MethodName: "ListOptions", + Handler: _KclvmService_ListOptions_Handler, + }, + { + MethodName: "ListVariables", + Handler: _KclvmService_ListVariables_Handler, + }, + { + MethodName: "ExecProgram", + Handler: _KclvmService_ExecProgram_Handler, + }, + { + MethodName: "BuildProgram", + Handler: _KclvmService_BuildProgram_Handler, + }, + { + MethodName: "ExecArtifact", + Handler: _KclvmService_ExecArtifact_Handler, + }, + { + MethodName: "OverrideFile", + Handler: _KclvmService_OverrideFile_Handler, + }, + { + MethodName: "GetSchemaTypeMapping", + Handler: _KclvmService_GetSchemaTypeMapping_Handler, + }, + { + MethodName: "FormatCode", + Handler: _KclvmService_FormatCode_Handler, + }, + { + MethodName: "FormatPath", + Handler: _KclvmService_FormatPath_Handler, + }, + { + MethodName: "LintPath", + Handler: _KclvmService_LintPath_Handler, + }, + { + MethodName: "ValidateCode", + Handler: _KclvmService_ValidateCode_Handler, + }, + { + MethodName: "ListDepFiles", + Handler: _KclvmService_ListDepFiles_Handler, + }, + { + MethodName: "LoadSettingsFiles", + Handler: _KclvmService_LoadSettingsFiles_Handler, + }, + { + MethodName: "Rename", + Handler: _KclvmService_Rename_Handler, + }, + { + MethodName: "RenameCode", + Handler: _KclvmService_RenameCode_Handler, + }, + { + MethodName: "Test", + Handler: _KclvmService_Test_Handler, + }, + { + MethodName: "UpdateDependencies", + Handler: _KclvmService_UpdateDependencies_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gpyrpc.proto", +} diff --git a/pkg/tools/gen/genkcl_gostruct_test.go b/pkg/tools/gen/genkcl_gostruct_test.go deleted file mode 100644 index dc79b6c8..00000000 --- a/pkg/tools/gen/genkcl_gostruct_test.go +++ /dev/null @@ -1,2381 +0,0 @@ -package gen - -import ( - "bytes" - "log" - "strings" - "testing" - - assert2 "github.com/stretchr/testify/assert" -) - -func TestGenKclFromLibGoStruct(t *testing.T) { - var buf bytes.Buffer - opts := &GenKclOptions{} - err := GenKcl(&buf, "../../spec/gpyrpc/gpyrpc.pb.go", nil, opts) - if err != nil { - log.Fatal(err) - } - kclCode := buf.String() - expectedKclCodeFromField := `""" -This file was generated by the KCL auto-gen tool. DO NOT EDIT. -Editing this file might prove futile when you re-run the KCL auto-gen generate command. -""" - -schema Argument: - r""" - Message representing a key-value argument for KCL. - kcl main.k -D name=value - - - Attributes - ---------- - name : str, optional - Name of the argument. - - value : str, optional - Value of the argument. - - """ - - name?: str - value?: str - -schema BuildProgram_Args: - r""" - Message for build program request arguments. - - - Attributes - ---------- - exec_args : ExecProgram_Args, optional - Arguments for executing the program. - - output : str, optional - Output path. - - """ - - exec_args?: ExecProgram_Args - output?: str - -schema BuildProgram_Result: - r""" - Message for build program response. - - - Attributes - ---------- - path : str, optional - Path of the built program. - - """ - - path?: str - -schema CliConfig: - r""" - Message representing KCL CLI configuration. - - - Attributes - ---------- - files : [str], optional - List of files. - - output : str, optional - Output path. - - overrides : [str], optional - List of overrides. - - path_selector : [str], optional - Path selectors. - - strict_range_check : bool, optional - Flag for strict range check. - - disable_none : bool, optional - Flag to disable none values. - - verbose : int, optional - Verbose level. - - debug : bool, optional - Debug flag. - - sort_keys : bool, optional - Flag to sort keys in YAML/JSON results. - - show_hidden : bool, optional - Flag to show hidden attributes. - - include_schema_type_path : bool, optional - Flag to include schema type path in results. - - fast_eval : bool, optional - Flag for fast evaluation. - - """ - - files?: [str] - output?: str - overrides?: [str] - path_selector?: [str] - strict_range_check?: bool - disable_none?: bool - verbose?: int - debug?: bool - sort_keys?: bool - show_hidden?: bool - include_schema_type_path?: bool - fast_eval?: bool - -schema Decorator: - r""" - Message representing a decorator in KCL. - - - Attributes - ---------- - name : str, optional - Name of the decorator. - - arguments : [str], optional - Arguments for the decorator. - - keywords : {str:str}, optional - Keyword arguments for the decorator as a map with keyword name as key. - - """ - - name?: str - arguments?: [str] - keywords?: {str:str} - -schema Error: - r""" - Message representing an error. - - - Attributes - ---------- - level : str, optional - Level of the error (e.g., "Error", "Warning"). - - code : str, optional - Error code. (e.g., "E1001") - - messages : [Message], optional - List of error messages. - - """ - - level?: str - code?: str - messages?: [Message] - -schema Example: - r""" - Message representing an example in KCL. - - - Attributes - ---------- - summary : str, optional - Short description for the example. - - description : str, optional - Long description for the example. - - value : str, optional - Embedded literal example. - - """ - - summary?: str - description?: str - value?: str - -schema ExecArtifact_Args: - r""" - Message for execute artifact request arguments. - - - Attributes - ---------- - path : str, optional - Path of the artifact. - - exec_args : ExecProgram_Args, optional - Arguments for executing the program. - - """ - - path?: str - exec_args?: ExecProgram_Args - -schema ExecProgram_Args: - r""" - Message for execute program request arguments. - - - Attributes - ---------- - work_dir : str, optional - Working directory. - - k_filename_list : [str], optional - List of KCL filenames. - - k_code_list : [str], optional - List of KCL codes. - - args : [Argument], optional - Arguments for the program. - - overrides : [str], optional - Override configurations. - - disable_yaml_result : bool, optional - Flag to disable YAML result. - - print_override_ast : bool, optional - Flag to print override AST. - - strict_range_check : bool, optional - Flag for strict range check. - - disable_none : bool, optional - Flag to disable none values. - - verbose : int, optional - Verbose level. - - debug : int, optional - Debug level. - - sort_keys : bool, optional - Flag to sort keys in YAML/JSON results. - - external_pkgs : [ExternalPkg], optional - External packages path. - - include_schema_type_path : bool, optional - Flag to include schema type path in results. - - compile_only : bool, optional - Flag to compile only without execution. - - show_hidden : bool, optional - Flag to show hidden attributes. - - path_selector : [str], optional - Path selectors for results. - - fast_eval : bool, optional - Flag for fast evaluation. - - """ - - work_dir?: str - k_filename_list?: [str] - k_code_list?: [str] - args?: [Argument] - overrides?: [str] - disable_yaml_result?: bool - print_override_ast?: bool - strict_range_check?: bool - disable_none?: bool - verbose?: int - debug?: int - sort_keys?: bool - external_pkgs?: [ExternalPkg] - include_schema_type_path?: bool - compile_only?: bool - show_hidden?: bool - path_selector?: [str] - fast_eval?: bool - -schema ExecProgram_Result: - r""" - Message for execute program response. - - - Attributes - ---------- - json_result : str, optional - Result in JSON format. - - yaml_result : str, optional - Result in YAML format. - - log_message : str, optional - Log message from execution. - - err_message : str, optional - Error message from execution. - - """ - - json_result?: str - yaml_result?: str - log_message?: str - err_message?: str - -schema ExternalPkg: - r""" - Message representing an external package for KCL. - kcl main.k -E pkg_name=pkg_path - - - Attributes - ---------- - pkg_name : str, optional - Name of the package. - - pkg_path : str, optional - Path of the package. - - """ - - pkg_name?: str - pkg_path?: str - -schema FormatCode_Args: - r""" - Message for format code request arguments. - - - Attributes - ---------- - source : str, optional - Source code to be formatted. - - """ - - source?: str - -schema FormatCode_Result: - r""" - Message for format code response. - - - Attributes - ---------- - formatted : [int], optional - Formatted code as bytes. - - """ - - formatted?: [int] - -schema FormatPath_Args: - r""" - Message for format file path request arguments. - - - Attributes - ---------- - path : str, optional - Path of the file to format. - - """ - - path?: str - -schema FormatPath_Result: - r""" - Message for format file path response. - - - Attributes - ---------- - changed_paths : [str], optional - List of changed file paths. - - """ - - changed_paths?: [str] - -schema GetSchemaTypeMapping_Args: - r""" - Message for get schema type mapping request arguments. - - - Attributes - ---------- - exec_args : ExecProgram_Args, optional - Arguments for executing the program. - - schema_name : str, optional - Name of the schema. - - """ - - exec_args?: ExecProgram_Args - schema_name?: str - -schema GetSchemaTypeMapping_Result: - r""" - Message for get schema type mapping response. - - - Attributes - ---------- - schema_type_mapping : {str:KclType}, optional - Map of schema type mappings. - - """ - - schema_type_mapping?: {str:KclType} - -schema GetVersion_Args: - r""" - Message for version request arguments. Empty message. - - """ - - -schema GetVersion_Result: - r""" - Message for version response. - - - Attributes - ---------- - version : str, optional - KCL version. - - checksum : str, optional - Checksum of the KCL version. - - git_sha : str, optional - Git Git SHA of the KCL code repo. - - version_info : str, optional - Detailed version information as a string. - - """ - - version?: str - checksum?: str - git_sha?: str - version_info?: str - -schema KclType: - r""" - Message representing a KCL type. - - - Attributes - ---------- - $type : str, optional - Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). - - union_types : [KclType], optional - Union types if applicable. - - default : str, optional - Default value of the type. - - schema_name : str, optional - Name of the schema if applicable. - - schema_doc : str, optional - Documentation for the schema. - - properties : {str:KclType}, optional - Properties of the schema as a map with property name as key. - - required : [str], optional - List of required schema properties. - - key : KclType, optional - Key type if the KclType is a dictionary. - - item : KclType, optional - Item type if the KclType is a list or dictionary. - - line : int, optional - Line number where the type is defined. - - decorators : [Decorator], optional - List of decorators for the schema. - - filename : str, optional - Absolute path of the file where the attribute is located. - - pkg_path : str, optional - Path of the package where the attribute is located. - - description : str, optional - Documentation for the attribute. - - examples : {str:Example}, optional - Map of examples with example name as key. - - base_schema : KclType, optional - Base schema if applicable. - - """ - - $type?: str - union_types?: [KclType] - default?: str - schema_name?: str - schema_doc?: str - properties?: {str:KclType} - required?: [str] - key?: KclType - item?: KclType - line?: int - decorators?: [Decorator] - filename?: str - pkg_path?: str - description?: str - examples?: {str:Example} - base_schema?: KclType - -schema KeyValuePair: - r""" - Message representing a key-value pair. - - - Attributes - ---------- - key : str, optional - Key of the pair. - - value : str, optional - Value of the pair. - - """ - - key?: str - value?: str - -schema LintPath_Args: - r""" - Message for lint file path request arguments. - - - Attributes - ---------- - paths : [str], optional - Paths of the files to lint. - - """ - - paths?: [str] - -schema LintPath_Result: - r""" - Message for lint file path response. - - - Attributes - ---------- - results : [str], optional - List of lint results. - - """ - - results?: [str] - -schema ListDepFiles_Args: - r""" - Message for list dependency files request arguments. - - - Attributes - ---------- - work_dir : str, optional - Working directory. - - use_abs_path : bool, optional - Flag to use absolute paths. - - include_all : bool, optional - Flag to include all files. - - use_fast_parser : bool, optional - Flag to use fast parser. - - """ - - work_dir?: str - use_abs_path?: bool - include_all?: bool - use_fast_parser?: bool - -schema ListDepFiles_Result: - r""" - Message for list dependency files response. - - - Attributes - ---------- - pkgroot : str, optional - Root package path. - - pkgpath : str, optional - Package path. - - files : [str], optional - List of file paths in the package. - - """ - - pkgroot?: str - pkgpath?: str - files?: [str] - -schema ListMethod_Args: - r""" - Message for list method request arguments. Empty message. - - """ - - -schema ListMethod_Result: - r""" - Message for list method response. - - - Attributes - ---------- - method_name_list : [str], optional - List of available method names. - - """ - - method_name_list?: [str] - -schema ListOptions_Result: - r""" - Message for list options response. - - - Attributes - ---------- - options : [OptionHelp], optional - List of available options. - - """ - - options?: [OptionHelp] - -schema ListVariables_Args: - r""" - Message for list variables request arguments. - - - Attributes - ---------- - files : [str], optional - Files to be processed. - - specs : [str], optional - Specifications for variables. - - options : ListVariables_Options, optional - Options for listing variables. - - """ - - files?: [str] - specs?: [str] - options?: ListVariables_Options - -schema ListVariables_Options: - r""" - Message for list variables options. - - - Attributes - ---------- - merge_program : bool, optional - Flag to merge program configuration. - - """ - - merge_program?: bool - -schema ListVariables_Result: - r""" - Message for list variables response. - - - Attributes - ---------- - variables : {str:VariableList}, optional - Map of variable lists by file. - - unsupported_codes : [str], optional - List of unsupported codes. - - parse_errors : [Error], optional - List of parse errors encountered. - - """ - - variables?: {str:VariableList} - unsupported_codes?: [str] - parse_errors?: [Error] - -schema LoadPackage_Args: - r""" - Message for load package request arguments. - - - Attributes - ---------- - parse_args : ParseProgram_Args, optional - Arguments for parsing the program. - - resolve_ast : bool, optional - Flag indicating whether to resolve AST. - - load_builtin : bool, optional - Flag indicating whether to load built-in modules. - - with_ast_index : bool, optional - Flag indicating whether to include AST index. - - """ - - parse_args?: ParseProgram_Args - resolve_ast?: bool - load_builtin?: bool - with_ast_index?: bool - -schema LoadPackage_Result: - r""" - Message for load package response. - - - Attributes - ---------- - program : str, optional - Program Abstract Syntax Tree (AST) in JSON format. - - paths : [str], optional - Returns the files in the order they should be compiled. - - parse_errors : [Error], optional - List of parse errors. - - type_errors : [Error], optional - List of type errors. - - scopes : {str:Scope}, optional - Map of scopes with scope index as key. - - symbols : {str:Symbol}, optional - Map of symbols with symbol index as key. - - node_symbol_map : {str:SymbolIndex}, optional - Map of node-symbol associations with AST index UUID as key. - - symbol_node_map : {str:str}, optional - Map of symbol-node associations with symbol index as key. - - fully_qualified_name_map : {str:SymbolIndex}, optional - Map of fully qualified names with symbol index as key. - - pkg_scope_map : {str:ScopeIndex}, optional - Map of package scope with package path as key. - - """ - - program?: str - paths?: [str] - parse_errors?: [Error] - type_errors?: [Error] - scopes?: {str:Scope} - symbols?: {str:Symbol} - node_symbol_map?: {str:SymbolIndex} - symbol_node_map?: {str:str} - fully_qualified_name_map?: {str:SymbolIndex} - pkg_scope_map?: {str:ScopeIndex} - -schema LoadSettingsFiles_Args: - r""" - Message for load settings files request arguments. - - - Attributes - ---------- - work_dir : str, optional - Working directory. - - files : [str], optional - Setting files to load. - - """ - - work_dir?: str - files?: [str] - -schema LoadSettingsFiles_Result: - r""" - Message for load settings files response. - - - Attributes - ---------- - kcl_cli_configs : CliConfig, optional - KCL CLI configuration. - - kcl_options : [KeyValuePair], optional - List of KCL options as key-value pairs. - - """ - - kcl_cli_configs?: CliConfig - kcl_options?: [KeyValuePair] - -schema MapEntry: - r""" - Message representing a map entry. - - - Attributes - ---------- - key : str, optional - Key of the map entry. - - value : Variable, optional - Value of the map entry. - - """ - - key?: str - value?: Variable - -schema Message: - r""" - Message representing a detailed error message with a position. - - - Attributes - ---------- - msg : str, optional - The error message text. - - pos : Position, optional - The position in the source code where the error occurred. - - """ - - msg?: str - pos?: Position - -schema OptionHelp: - r""" - Message representing a help option. - - - Attributes - ---------- - name : str, optional - Name of the option. - - $type : str, optional - Type of the option. - - required : bool, optional - Flag indicating if the option is required. - - default_value : str, optional - Default value of the option. - - help : str, optional - Help text for the option. - - """ - - name?: str - $type?: str - required?: bool - default_value?: str - help?: str - -schema OverrideFile_Args: - r""" - Message for override file request arguments. - - - Attributes - ---------- - file : str, optional - Path of the file to override. - - specs : [str], optional - List of override specifications. - - import_paths : [str], optional - List of import paths. - - """ - - file?: str - specs?: [str] - import_paths?: [str] - -schema OverrideFile_Result: - r""" - Message for override file response. - - - Attributes - ---------- - result : bool, optional - Result of the override operation. - - parse_errors : [Error], optional - List of parse errors encountered. - - """ - - result?: bool - parse_errors?: [Error] - -schema ParseFile_Args: - r""" - Message for parse file request arguments. - - - Attributes - ---------- - path : str, optional - Path of the file to be parsed. - - source : str, optional - Source code to be parsed. - - external_pkgs : [ExternalPkg], optional - External packages path. - - """ - - path?: str - source?: str - external_pkgs?: [ExternalPkg] - -schema ParseFile_Result: - r""" - Message for parse file response. - - - Attributes - ---------- - ast_json : str, optional - Abstract Syntax Tree (AST) in JSON format. - - deps : [str], optional - File dependency paths. - - errors : [Error], optional - List of parse errors. - - """ - - ast_json?: str - deps?: [str] - errors?: [Error] - -schema ParseProgram_Args: - r""" - Message for parse program request arguments. - - - Attributes - ---------- - paths : [str], optional - Paths of the program files to be parsed. - - sources : [str], optional - Source codes to be parsed. - - external_pkgs : [ExternalPkg], optional - External packages path. - - """ - - paths?: [str] - sources?: [str] - external_pkgs?: [ExternalPkg] - -schema ParseProgram_Result: - r""" - Message for parse program response. - - - Attributes - ---------- - ast_json : str, optional - Abstract Syntax Tree (AST) in JSON format. - - paths : [str], optional - Returns the files in the order they should be compiled. - - errors : [Error], optional - List of parse errors. - - """ - - ast_json?: str - paths?: [str] - errors?: [Error] - -schema Ping_Args: - r""" - Message for ping request arguments. - - - Attributes - ---------- - value : str, optional - Value to be sent in the ping request. - - """ - - value?: str - -schema Ping_Result: - r""" - Message for ping response. - - - Attributes - ---------- - value : str, optional - Value received in the ping response. - - """ - - value?: str - -schema Position: - r""" - Message representing a position in the source code. - - - Attributes - ---------- - line : int, optional - Line number. - - column : int, optional - Column number. - - filename : str, optional - Filename the position refers to. - - """ - - line?: int - column?: int - filename?: str - -schema RenameCode_Args: - r""" - Message for rename code request arguments. - - - Attributes - ---------- - package_root : str, optional - File path to the package root. - - symbol_path : str, optional - Path to the target symbol to be renamed. - - source_codes : {str:str}, optional - Map of source code with filename as key and code as value. - - new_name : str, optional - New name of the symbol. - - """ - - package_root?: str - symbol_path?: str - source_codes?: {str:str} - new_name?: str - -schema RenameCode_Result: - r""" - Message for rename code response. - - - Attributes - ---------- - changed_codes : {str:str}, optional - Map of changed code with filename as key and modified code as value. - - """ - - changed_codes?: {str:str} - -schema Rename_Args: - r""" - Message for rename request arguments. - - - Attributes - ---------- - package_root : str, optional - File path to the package root. - - symbol_path : str, optional - Path to the target symbol to be renamed. - - file_paths : [str], optional - Paths to the source code files. - - new_name : str, optional - New name of the symbol. - - """ - - package_root?: str - symbol_path?: str - file_paths?: [str] - new_name?: str - -schema Rename_Result: - r""" - Message for rename response. - - - Attributes - ---------- - changed_files : [str], optional - List of file paths that got changed. - - """ - - changed_files?: [str] - -schema Scope: - r""" - Message representing a scope in KCL. - - - Attributes - ---------- - kind : str, optional - Type of the scope. - - parent : ScopeIndex, optional - Parent scope. - - owner : SymbolIndex, optional - Owner of the scope. - - children : [ScopeIndex], optional - Children of the scope. - - defs : [SymbolIndex], optional - Definitions in the scope. - - """ - - kind?: str - parent?: ScopeIndex - owner?: SymbolIndex - children?: [ScopeIndex] - defs?: [SymbolIndex] - -schema ScopeIndex: - r""" - Message representing a scope index. - - - Attributes - ---------- - i : int, optional - Index identifier. - - g : int, optional - Global identifier. - - kind : str, optional - Type of the scope. - - """ - - i?: int - g?: int - kind?: str - -schema Symbol: - r""" - Message representing a symbol in KCL. - - - Attributes - ---------- - ty : KclType, optional - Type of the symbol. - - name : str, optional - Name of the symbol. - - owner : SymbolIndex, optional - Owner of the symbol. - - def : SymbolIndex, optional - Definition of the symbol. - - attrs : [SymbolIndex], optional - Attributes of the symbol. - - is_global : bool, optional - Flag indicating if the symbol is global. - - """ - - ty?: KclType - name?: str - owner?: SymbolIndex - def?: SymbolIndex - attrs?: [SymbolIndex] - is_global?: bool - -schema SymbolIndex: - r""" - Message representing a symbol index. - - - Attributes - ---------- - i : int, optional - Index identifier. - - g : int, optional - Global identifier. - - kind : str, optional - Type of the symbol or scope. - - """ - - i?: int - g?: int - kind?: str - -schema TestCaseInfo: - r""" - Message representing information about a single test case. - - - Attributes - ---------- - name : str, optional - Name of the test case. - - error : str, optional - Error message if any. - - duration : int, optional - Duration of the test case in microseconds. - - log_message : str, optional - Log message from the test case. - - """ - - name?: str - error?: str - duration?: int - log_message?: str - -schema Test_Args: - r""" - Message for test request arguments. - - - Attributes - ---------- - exec_args : ExecProgram_Args, optional - Execution program arguments. - - pkg_list : [str], optional - List of KCL package paths to be tested. - - run_regexp : str, optional - Regular expression for filtering tests to run. - - fail_fast : bool, optional - Flag to stop the test run on the first failure. - - """ - - exec_args?: ExecProgram_Args - pkg_list?: [str] - run_regexp?: str - fail_fast?: bool - -schema Test_Result: - r""" - Message for test response. - - - Attributes - ---------- - info : [TestCaseInfo], optional - List of test case information. - - """ - - info?: [TestCaseInfo] - -schema UnimplementedBuiltinServiceServer: - r""" - UnimplementedBuiltinServiceServer can be embedded to have forward compatible implementations. - - """ - - -schema UnimplementedKclvmServiceServer: - r""" - UnimplementedKclvmServiceServer can be embedded to have forward compatible implementations. - - """ - - -schema UpdateDependencies_Args: - r""" - Message for update dependencies request arguments. - - - Attributes - ---------- - manifest_path : str, optional - Path to the manifest file. - - vendor : bool, optional - Flag to vendor dependencies locally. - - """ - - manifest_path?: str - vendor?: bool - -schema UpdateDependencies_Result: - r""" - Message for update dependencies response. - - - Attributes - ---------- - external_pkgs : [ExternalPkg], optional - List of external packages updated. - - """ - - external_pkgs?: [ExternalPkg] - -schema ValidateCode_Args: - r""" - Message for validate code request arguments. - - - Attributes - ---------- - datafile : str, optional - Path to the data file. - - data : str, optional - Data content. - - file : str, optional - Path to the code file. - - code : str, optional - Source code content. - - $schema : str, optional - Name of the schema. - - attribute_name : str, optional - Name of the attribute. - - format : str, optional - Format of the validation (e.g., "json", "yaml"). - - """ - - datafile?: str - data?: str - file?: str - code?: str - $schema?: str - attribute_name?: str - format?: str - -schema ValidateCode_Result: - r""" - Message for validate code response. - - - Attributes - ---------- - success : bool, optional - Flag indicating if validation was successful. - - err_message : str, optional - Error message from validation. - - """ - - success?: bool - err_message?: str - -schema Variable: - r""" - Message representing a variable. - - - Attributes - ---------- - value : str, optional - Value of the variable. - - type_name : str, optional - Type name of the variable. - - op_sym : str, optional - Operation symbol associated with the variable. - - list_items : [Variable], optional - List items if the variable is a list. - - dict_entries : [MapEntry], optional - Dictionary entries if the variable is a dictionary. - - """ - - value?: str - type_name?: str - op_sym?: str - list_items?: [Variable] - dict_entries?: [MapEntry] - -schema VariableList: - r""" - Message representing a list of variables. - - - Attributes - ---------- - variables : [Variable], optional - List of variables. - - """ - - variables?: [Variable] - -schema builtinServiceClient: - r""" - builtinServiceClient - """ - - -schema kclvmServiceClient: - r""" - kclvmServiceClient - """ - - -` - assert2.Equal(t, strings.ReplaceAll(kclCode, "\r\n", "\n"), strings.ReplaceAll(expectedKclCodeFromField, "\r\n", "\n")) -} - -func TestGenKclFromKclGoPackage(t *testing.T) { - var buf bytes.Buffer - opts := &GenKclOptions{ - Mode: ModeGoStruct, - } - err := GenKcl(&buf, "../../kcl", nil, opts) - if err != nil { - log.Fatal(err) - } - kclCode := buf.String() - expectedKclCodeFromField := `""" -This file was generated by the KCL auto-gen tool. DO NOT EDIT. -Editing this file might prove futile when you re-run the KCL auto-gen generate command. -""" - -schema GpyrpcArgument: - r""" - Message representing a key-value argument for KCL. - kcl main.k -D name=value - - - Attributes - ---------- - name : str, optional - Name of the argument. - - value : str, optional - Value of the argument. - - """ - - name?: str - value?: str - -schema GpyrpcDecorator: - r""" - Message representing a decorator in KCL. - - - Attributes - ---------- - name : str, optional - Name of the decorator. - - arguments : [str], optional - Arguments for the decorator. - - keywords : {str:str}, optional - Keyword arguments for the decorator as a map with keyword name as key. - - """ - - name?: str - arguments?: [str] - keywords?: {str:str} - -schema GpyrpcExample: - r""" - Message representing an example in KCL. - - - Attributes - ---------- - summary : str, optional - Short description for the example. - - description : str, optional - Long description for the example. - - value : str, optional - Embedded literal example. - - """ - - summary?: str - description?: str - value?: str - -schema GpyrpcExternalPkg: - r""" - Message representing an external package for KCL. - kcl main.k -E pkg_name=pkg_path - - - Attributes - ---------- - pkg_name : str, optional - Name of the package. - - pkg_path : str, optional - Path of the package. - - """ - - pkg_name?: str - pkg_path?: str - -schema KCLResult: - r""" - KCLResult denotes the result for the Run API. - - """ - - -schema KCLResultList: - r""" - KCLResultList - """ - - -schema KclType: - r""" - Message representing a KCL type. - - - Attributes - ---------- - $type : str, optional - Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). - - union_types : [KclType], optional - Union types if applicable. - - default : str, optional - Default value of the type. - - schema_name : str, optional - Name of the schema if applicable. - - schema_doc : str, optional - Documentation for the schema. - - properties : {str:KclType}, optional - Properties of the schema as a map with property name as key. - - required : [str], optional - List of required schema properties. - - key : KclType, optional - Key type if the KclType is a dictionary. - - item : KclType, optional - Item type if the KclType is a list or dictionary. - - line : int, optional - Line number where the type is defined. - - decorators : [GpyrpcDecorator], optional - List of decorators for the schema. - - filename : str, optional - Absolute path of the file where the attribute is located. - - pkg_path : str, optional - Path of the package where the attribute is located. - - description : str, optional - Documentation for the attribute. - - examples : {str:GpyrpcExample}, optional - Map of examples with example name as key. - - base_schema : KclType, optional - Base schema if applicable. - - """ - - $type?: str - union_types?: [KclType] - default?: str - schema_name?: str - schema_doc?: str - properties?: {str:KclType} - required?: [str] - key?: KclType - item?: KclType - line?: int - decorators?: [GpyrpcDecorator] - filename?: str - pkg_path?: str - description?: str - examples?: {str:GpyrpcExample} - base_schema?: KclType - -schema Option: - r""" - Option - - Attributes - ---------- - work_dir : str, optional - Working directory. - - k_filename_list : [str], optional - List of KCL filenames. - - k_code_list : [str], optional - List of KCL codes. - - args : [GpyrpcArgument], optional - Arguments for the program. - - overrides : [str], optional - Override configurations. - - disable_yaml_result : bool, optional - Flag to disable YAML result. - - print_override_ast : bool, optional - Flag to print override AST. - - strict_range_check : bool, optional - Flag for strict range check. - - disable_none : bool, optional - Flag to disable none values. - - verbose : int, optional - Verbose level. - - debug : int, optional - Debug level. - - sort_keys : bool, optional - Flag to sort keys in YAML/JSON results. - - external_pkgs : [GpyrpcExternalPkg], optional - External packages path. - - include_schema_type_path : bool, optional - Flag to include schema type path in results. - - compile_only : bool, optional - Flag to compile only without execution. - - show_hidden : bool, optional - Flag to show hidden attributes. - - path_selector : [str], optional - Path selectors for results. - - fast_eval : bool, optional - Flag for fast evaluation. - - Err : any, optional - """ - - work_dir?: str - k_filename_list?: [str] - k_code_list?: [str] - args?: [GpyrpcArgument] - overrides?: [str] - disable_yaml_result?: bool - print_override_ast?: bool - strict_range_check?: bool - disable_none?: bool - verbose?: int - debug?: int - sort_keys?: bool - external_pkgs?: [GpyrpcExternalPkg] - include_schema_type_path?: bool - compile_only?: bool - show_hidden?: bool - path_selector?: [str] - fast_eval?: bool - Err?: any - -schema VersionResult: - r""" - VersionResult - - Attributes - ---------- - version : str, optional - KCL version. - - checksum : str, optional - Checksum of the KCL version. - - git_sha : str, optional - Git Git SHA of the KCL code repo. - - version_info : str, optional - Detailed version information as a string. - - """ - - version?: str - checksum?: str - git_sha?: str - version_info?: str - -schema typeAttributeHook: - r""" - typeAttributeHook - """ - - -` - assert2.Equal(t, strings.ReplaceAll(kclCode, "\r\n", "\n"), strings.ReplaceAll(expectedKclCodeFromField, "\r\n", "\n")) -} - -func TestGenKclFromKclGoLoaderPackage(t *testing.T) { - var buf bytes.Buffer - opts := &GenKclOptions{ - Mode: ModeGoStruct, - } - err := GenKcl(&buf, "../../loader", nil, opts) - if err != nil { - log.Fatal(err) - } - kclCode := buf.String() - expectedKclCodeFromField := `""" -This file was generated by the KCL auto-gen tool. DO NOT EDIT. -Editing this file might prove futile when you re-run the KCL auto-gen generate command. -""" - -schema GpyrpcDecorator: - r""" - Message representing a decorator in KCL. - - - Attributes - ---------- - name : str, optional - Name of the decorator. - - arguments : [str], optional - Arguments for the decorator. - - keywords : {str:str}, optional - Keyword arguments for the decorator as a map with keyword name as key. - - """ - - name?: str - arguments?: [str] - keywords?: {str:str} - -schema GpyrpcError: - r""" - Message representing an error. - - - Attributes - ---------- - level : str, optional - Level of the error (e.g., "Error", "Warning"). - - code : str, optional - Error code. (e.g., "E1001") - - messages : [GpyrpcMessage], optional - List of error messages. - - """ - - level?: str - code?: str - messages?: [GpyrpcMessage] - -schema GpyrpcExample: - r""" - Message representing an example in KCL. - - - Attributes - ---------- - summary : str, optional - Short description for the example. - - description : str, optional - Long description for the example. - - value : str, optional - Embedded literal example. - - """ - - summary?: str - description?: str - value?: str - -schema GpyrpcExternalPkg: - r""" - Message representing an external package for KCL. - kcl main.k -E pkg_name=pkg_path - - - Attributes - ---------- - pkg_name : str, optional - Name of the package. - - pkg_path : str, optional - Path of the package. - - """ - - pkg_name?: str - pkg_path?: str - -schema GpyrpcKclType: - r""" - Message representing a KCL type. - - - Attributes - ---------- - $type : str, optional - Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). - - union_types : [GpyrpcKclType], optional - Union types if applicable. - - default : str, optional - Default value of the type. - - schema_name : str, optional - Name of the schema if applicable. - - schema_doc : str, optional - Documentation for the schema. - - properties : {str:GpyrpcKclType}, optional - Properties of the schema as a map with property name as key. - - required : [str], optional - List of required schema properties. - - key : GpyrpcKclType, optional - Key type if the KclType is a dictionary. - - item : GpyrpcKclType, optional - Item type if the KclType is a list or dictionary. - - line : int, optional - Line number where the type is defined. - - decorators : [GpyrpcDecorator], optional - List of decorators for the schema. - - filename : str, optional - Absolute path of the file where the attribute is located. - - pkg_path : str, optional - Path of the package where the attribute is located. - - description : str, optional - Documentation for the attribute. - - examples : {str:GpyrpcExample}, optional - Map of examples with example name as key. - - base_schema : GpyrpcKclType, optional - Base schema if applicable. - - """ - - $type?: str - union_types?: [GpyrpcKclType] - default?: str - schema_name?: str - schema_doc?: str - properties?: {str:GpyrpcKclType} - required?: [str] - key?: GpyrpcKclType - item?: GpyrpcKclType - line?: int - decorators?: [GpyrpcDecorator] - filename?: str - pkg_path?: str - description?: str - examples?: {str:GpyrpcExample} - base_schema?: GpyrpcKclType - -schema GpyrpcListVariablesOptions: - r""" - Message for list variables options. - - - Attributes - ---------- - merge_program : bool, optional - Flag to merge program configuration. - - """ - - merge_program?: bool - -schema GpyrpcMapEntry: - r""" - Message representing a map entry. - - - Attributes - ---------- - key : str, optional - Key of the map entry. - - value : GpyrpcVariable, optional - Value of the map entry. - - """ - - key?: str - value?: GpyrpcVariable - -schema GpyrpcMessage: - r""" - Message representing a detailed error message with a position. - - - Attributes - ---------- - msg : str, optional - The error message text. - - pos : GpyrpcPosition, optional - The position in the source code where the error occurred. - - """ - - msg?: str - pos?: GpyrpcPosition - -schema GpyrpcOptionHelp: - r""" - Message representing a help option. - - - Attributes - ---------- - name : str, optional - Name of the option. - - $type : str, optional - Type of the option. - - required : bool, optional - Flag indicating if the option is required. - - default_value : str, optional - Default value of the option. - - help : str, optional - Help text for the option. - - """ - - name?: str - $type?: str - required?: bool - default_value?: str - help?: str - -schema GpyrpcPosition: - r""" - Message representing a position in the source code. - - - Attributes - ---------- - line : int, optional - Line number. - - column : int, optional - Column number. - - filename : str, optional - Filename the position refers to. - - """ - - line?: int - column?: int - filename?: str - -schema GpyrpcScope: - r""" - Message representing a scope in KCL. - - - Attributes - ---------- - kind : str, optional - Type of the scope. - - parent : GpyrpcScopeIndex, optional - Parent scope. - - owner : GpyrpcSymbolIndex, optional - Owner of the scope. - - children : [GpyrpcScopeIndex], optional - Children of the scope. - - defs : [GpyrpcSymbolIndex], optional - Definitions in the scope. - - """ - - kind?: str - parent?: GpyrpcScopeIndex - owner?: GpyrpcSymbolIndex - children?: [GpyrpcScopeIndex] - defs?: [GpyrpcSymbolIndex] - -schema GpyrpcScopeIndex: - r""" - Message representing a scope index. - - - Attributes - ---------- - i : int, optional - Index identifier. - - g : int, optional - Global identifier. - - kind : str, optional - Type of the scope. - - """ - - i?: int - g?: int - kind?: str - -schema GpyrpcSymbol: - r""" - Message representing a symbol in KCL. - - - Attributes - ---------- - ty : GpyrpcKclType, optional - Type of the symbol. - - name : str, optional - Name of the symbol. - - owner : GpyrpcSymbolIndex, optional - Owner of the symbol. - - def : GpyrpcSymbolIndex, optional - Definition of the symbol. - - attrs : [GpyrpcSymbolIndex], optional - Attributes of the symbol. - - is_global : bool, optional - Flag indicating if the symbol is global. - - """ - - ty?: GpyrpcKclType - name?: str - owner?: GpyrpcSymbolIndex - def?: GpyrpcSymbolIndex - attrs?: [GpyrpcSymbolIndex] - is_global?: bool - -schema GpyrpcSymbolIndex: - r""" - Message representing a symbol index. - - - Attributes - ---------- - i : int, optional - Index identifier. - - g : int, optional - Global identifier. - - kind : str, optional - Type of the symbol or scope. - - """ - - i?: int - g?: int - kind?: str - -schema GpyrpcVariable: - r""" - Message representing a variable. - - - Attributes - ---------- - value : str, optional - Value of the variable. - - type_name : str, optional - Type name of the variable. - - op_sym : str, optional - Operation symbol associated with the variable. - - list_items : [GpyrpcVariable], optional - List items if the variable is a list. - - dict_entries : [GpyrpcMapEntry], optional - Dictionary entries if the variable is a dictionary. - - """ - - value?: str - type_name?: str - op_sym?: str - list_items?: [GpyrpcVariable] - dict_entries?: [GpyrpcMapEntry] - -schema GpyrpcVariableList: - r""" - Message representing a list of variables. - - - Attributes - ---------- - variables : [GpyrpcVariable], optional - List of variables. - - """ - - variables?: [GpyrpcVariable] - -schema ListOptionsArgs: - r""" - ListOptionsArgs - - Attributes - ---------- - paths : [str], optional - Paths of the program files to be parsed. - - sources : [str], optional - Source codes to be parsed. - - external_pkgs : [GpyrpcExternalPkg], optional - External packages path. - - """ - - paths?: [str] - sources?: [str] - external_pkgs?: [GpyrpcExternalPkg] - -schema ListOptionsResult: - r""" - ListOptionsResult - - Attributes - ---------- - options : [GpyrpcOptionHelp], optional - List of available options. - - """ - - options?: [GpyrpcOptionHelp] - -schema ListVariablesArgs: - r""" - ListVariablesArgs - - Attributes - ---------- - files : [str], optional - Files to be processed. - - specs : [str], optional - Specifications for variables. - - options : GpyrpcListVariablesOptions, optional - Options for listing variables. - - """ - - files?: [str] - specs?: [str] - options?: GpyrpcListVariablesOptions - -schema ListVariablesResult: - r""" - ListVariablesResult - - Attributes - ---------- - variables : {str:GpyrpcVariableList}, optional - Map of variable lists by file. - - unsupported_codes : [str], optional - List of unsupported codes. - - parse_errors : [GpyrpcError], optional - List of parse errors encountered. - - """ - - variables?: {str:GpyrpcVariableList} - unsupported_codes?: [str] - parse_errors?: [GpyrpcError] - -schema LoadPackageArgs: - r""" - LoadPackageArgs - - Attributes - ---------- - parse_args : ParseProgram_Args, optional - Arguments for parsing the program. - - resolve_ast : bool, optional - Flag indicating whether to resolve AST. - - load_builtin : bool, optional - Flag indicating whether to load built-in modules. - - with_ast_index : bool, optional - Flag indicating whether to include AST index. - - """ - - parse_args?: ParseProgram_Args - resolve_ast?: bool - load_builtin?: bool - with_ast_index?: bool - -schema LoadPackageResult: - r""" - LoadPackageResult - - Attributes - ---------- - program : str, optional - Program Abstract Syntax Tree (AST) in JSON format. - - paths : [str], optional - Returns the files in the order they should be compiled. - - parse_errors : [GpyrpcError], optional - List of parse errors. - - type_errors : [GpyrpcError], optional - List of type errors. - - scopes : {str:GpyrpcScope}, optional - Map of scopes with scope index as key. - - symbols : {str:GpyrpcSymbol}, optional - Map of symbols with symbol index as key. - - node_symbol_map : {str:GpyrpcSymbolIndex}, optional - Map of node-symbol associations with AST index UUID as key. - - symbol_node_map : {str:str}, optional - Map of symbol-node associations with symbol index as key. - - fully_qualified_name_map : {str:GpyrpcSymbolIndex}, optional - Map of fully qualified names with symbol index as key. - - pkg_scope_map : {str:GpyrpcScopeIndex}, optional - Map of package scope with package path as key. - - """ - - program?: str - paths?: [str] - parse_errors?: [GpyrpcError] - type_errors?: [GpyrpcError] - scopes?: {str:GpyrpcScope} - symbols?: {str:GpyrpcSymbol} - node_symbol_map?: {str:GpyrpcSymbolIndex} - symbol_node_map?: {str:str} - fully_qualified_name_map?: {str:GpyrpcSymbolIndex} - pkg_scope_map?: {str:GpyrpcScopeIndex} - -` - assert2.Equal(t, strings.ReplaceAll(kclCode, "\r\n", "\n"), strings.ReplaceAll(expectedKclCodeFromField, "\r\n", "\n")) -} diff --git a/runtime.go b/runtime.go new file mode 100644 index 00000000..f498eef7 --- /dev/null +++ b/runtime.go @@ -0,0 +1,16 @@ +//go:build rpc || !cgo +// +build rpc !cgo + +package kcl + +import "kcl-lang.io/kcl-go/pkg/runtime" + +// InitKclvmPath init kclvm path. +func InitKclvmPath(kclvmRoot string) { + runtime.InitKclvmRoot(kclvmRoot) +} + +// InitKclvmRuntime init kclvm process. +func InitKclvmRuntime(n int) { + runtime.InitRuntime(n) +}