├── .fossa.yml ├── .github └── workflows │ ├── e2e.yaml │ ├── fossa.yml │ ├── release.yml │ └── sync.yaml ├── .gitignore ├── GO_VERSION ├── LICENSE ├── Makefile ├── Makefile.d ├── k3d.mk └── variables.mk ├── README.md ├── VALD_SHA ├── VALD_VERSION ├── go.mod ├── go.mod.default ├── go.sum ├── tests └── v1 │ └── e2e_test.go └── v1 ├── agent └── core │ ├── agent.go │ ├── agent.pb.go │ └── agent_vtproto.pb.go ├── filter ├── egress │ ├── egress_filter.pb.go │ └── egress_filter_vtproto.pb.go └── ingress │ ├── ingress_filter.pb.go │ └── ingress_filter_vtproto.pb.go ├── meta ├── meta.pb.go └── meta_vtproto.pb.go ├── mirror ├── mirror.go ├── mirror.pb.go └── mirror_vtproto.pb.go ├── payload ├── interface.go ├── payload.pb.go ├── payload.pb.json.go └── payload_vtproto.pb.go └── vald ├── filter.pb.go ├── filter_vtproto.pb.go ├── flush.pb.go ├── flush_vtproto.pb.go ├── index.pb.go ├── index_vtproto.pb.go ├── insert.pb.go ├── insert_vtproto.pb.go ├── object.pb.go ├── object_vtproto.pb.go ├── remove.pb.go ├── remove_vtproto.pb.go ├── search.pb.go ├── search_vtproto.pb.go ├── update.pb.go ├── update_vtproto.pb.go ├── upsert.pb.go ├── upsert_vtproto.pb.go └── vald.go /.fossa.yml: -------------------------------------------------------------------------------- 1 | # Generated by FOSSA CLI (https://github.com/fossas/fossa-cli) 2 | # Visit https://fossa.com to learn more 3 | 4 | version: 2 5 | cli: 6 | server: https://app.fossa.com 7 | fetcher: custom 8 | project: vald-client-go 9 | locator: git+github.com/vdaas/vald-client-go 10 | analyze: 11 | modules: 12 | - name: github.com/vdaas/vald-client-go/v1/agent/core 13 | type: go 14 | target: github.com/vdaas/vald-client-go/v1/agent/core 15 | path: v1/agent/core 16 | - name: github.com/vdaas/vald-client-go/v1/gateway/vald 17 | type: go 18 | target: github.com/vdaas/vald-client-go/v1/gateway/vald 19 | path: v1/gateway/vald 20 | - name: github.com/vdaas/vald-client-go/v1/payload 21 | type: go 22 | target: github.com/vdaas/vald-client-go/v1/payload 23 | path: v1/payload 24 | - name: github.com/vdaas/vald-client-go/v1/vald 25 | type: go 26 | target: github.com/vdaas/vald-client-go/v1/vald 27 | path: v1/vald 28 | -------------------------------------------------------------------------------- /.github/workflows/e2e.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2024 vdaas.org vald team 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # DO NOT EDIT 17 | name: "Run E2E test" 18 | on: 19 | push: 20 | branches: 21 | - main 22 | pull_request: 23 | 24 | jobs: 25 | e2e: 26 | runs-on: ubuntu-latest 27 | container: 28 | image: ghcr.io/vdaas/vald/vald-ci-container:nightly 29 | options: "--add-host host.docker.internal:host-gateway" 30 | steps: 31 | - uses: actions/checkout@v3 32 | - uses: vdaas/vald-client-ci/.github/actions/e2e@main 33 | with: 34 | client_type: go 35 | -------------------------------------------------------------------------------- /.github/workflows/fossa.yml: -------------------------------------------------------------------------------- 1 | name: "Run FOSSA scan" 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | types: 8 | - "labeled" 9 | jobs: 10 | fossa-scan: 11 | name: "trigger FOSSA scan" 12 | runs-on: ubuntu-latest 13 | container: 14 | image: ghcr.io/vdaas/vald/vald-ci-container:nightly 15 | if: github.ref == 'refs/heads/main' || github.event.action == 'labeled' && github.event.label.name == 'actions/fossa' 16 | steps: 17 | - uses: actions/checkout@v3 18 | with: 19 | fetch-depth: 1 20 | persist-credentials: false 21 | - name: Set Git config 22 | run: | 23 | git config --global --add safe.directory ${GITHUB_WORKSPACE} 24 | - name: "Install fossa-cli" 25 | run: | 26 | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash 27 | - name: "Run for main branch" 28 | if: github.ref == 'refs/heads/main' 29 | run: | 30 | fossa analyze --branch main --revision ${GITHUB_SHA} 31 | env: 32 | FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | GITHUB_SHA: ${{ github.sha }} 35 | - name: "Run for PRs" 36 | if: github.event_name == 'pull_request' 37 | run: | 38 | curl -s ${PR_INFO_URL} > /tmp/pr_info.json 39 | PR_RESP=`cat /tmp/pr_info.json` 40 | HEAD_BRANCH=$(cat /tmp/pr_info.json | jq -r .head.ref) 41 | if [ -z "$HEAD_BRANCH" ]; then 42 | echo "Cannot get head branch information for PR #${PR_NUM}!" 43 | echo "API response: $PR_RESP" 44 | fossa analyze --revision ${GITHUB_SHA} 45 | else 46 | echo "Head branch for PR #${PR_NUM} is ${HEAD_BRANCH}" 47 | 48 | fossa analyze --branch ${HEAD_BRANCH} --revision ${GITHUB_SHA} 49 | 50 | ESCAPED=`echo -n "${HEAD_BRANCH}" | python3 -c 'import urllib.parse; import sys; print(urllib.parse.quote(sys.stdin.read(), safe=""))'` 51 | 52 | curl --include --verbose --fail \ 53 | -H "Accept: application/json" \ 54 | -H "Content-Type:application/json" \ 55 | -H "Authorization: token ${GITHUB_TOKEN}" \ 56 | --request POST \ 57 | --data "{\"body\": \"**[FOSSA]** The scan result will be available at https://app.fossa.com/projects/custom%2B21465%2Fvald-client-go/refs/branch/${ESCAPED}/${GITHUB_SHA}\"}" \ 58 | $API_URL 59 | fi 60 | env: 61 | FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} 62 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 63 | GITHUB_SHA: ${{ github.sha }} 64 | PR_INFO_URL: ${{ github.event.pull_request.url }} 65 | API_URL: ${{ github.event.pull_request.comments_url }} 66 | PR_NUM: ${{ github.event.pull_request.number }} 67 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2024 vdaas.org vald team 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # DO NOT EDIT 17 | name: "Run release" 18 | on: 19 | push: 20 | tags: 21 | - '*.*.*' 22 | - 'v*.*.*' 23 | - '*.*.*-*' 24 | - 'v*.*.*-*' 25 | jobs: 26 | release: 27 | uses: vdaas/vald-client-ci/.github/workflows/release.yaml@main 28 | with: 29 | client_type: go 30 | secrets: inherit 31 | -------------------------------------------------------------------------------- /.github/workflows/sync.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2024 vdaas.org vald team 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # DO NOT EDIT 17 | name: "Sync Vald" 18 | on: 19 | workflow_dispatch: 20 | schedule: 21 | - cron: "0 */2 * * *" 22 | jobs: 23 | sync: 24 | uses: vdaas/vald-client-ci/.github/workflows/sync.yaml@main 25 | with: 26 | client_type: go 27 | secrets: 28 | CI_USER: ${{ secrets.CI_USER }} 29 | CI_TOKEN: ${{ secrets.CI_TOKEN }} 30 | GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vald-origin 2 | wordvecs1000.json 3 | -------------------------------------------------------------------------------- /GO_VERSION: -------------------------------------------------------------------------------- 1 | 1.24.2 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | https://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (C) 2019-2025 vdaas.org vald team 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | You may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | https://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019 Vdaas.org Vald team ( kpango, kou-m, rinx ) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | REPO ?= vdaas 18 | NAME = vald 19 | VALDREPO = github.com/$(REPO)/$(NAME) 20 | LANGUAGE = go 21 | PKGNAME = $(NAME)-client-$(LANGUAGE) 22 | PKGREPO = github.com/$(REPO)/$(PKGNAME) 23 | 24 | VALD_SHA = VALD_SHA 25 | VALD_VERSION = VALD_VERSION 26 | VALD_DIR = vald-origin 27 | VALD_CHECKOUT_REF ?= main 28 | 29 | K3D_MAKEFILE_URL=https://raw.githubusercontent.com/vdaas/vald/main/Makefile.d/k3d.mk 30 | K3D_MAKEFILE=Makefile.d/k3d.mk 31 | 32 | ROOTDIR = $(eval ROOTDIR := $(shell git rev-parse --show-toplevel))$(ROOTDIR) 33 | GO_VERSION := $(eval GO_VERSION := $(shell cat GO_VERSION))$(GO_VERSION) 34 | TEST_DATASET_PATH = wordvecs1000.json 35 | 36 | MAKELISTS = Makefile 37 | 38 | red = /bin/echo -e "\x1b[31m\#\# $1\x1b[0m" 39 | green = /bin/echo -e "\x1b[32m\#\# $1\x1b[0m" 40 | yellow = /bin/echo -e "\x1b[33m\#\# $1\x1b[0m" 41 | blue = /bin/echo -e "\x1b[34m\#\# $1\x1b[0m" 42 | pink = /bin/echo -e "\x1b[35m\#\# $1\x1b[0m" 43 | cyan = /bin/echo -e "\x1b[36m\#\# $1\x1b[0m" 44 | 45 | .PHONY: all 46 | ## execute clean and proto 47 | all: clean sync/v1 mod clean 48 | 49 | .PHONY: help 50 | ## print all available commands 51 | help: 52 | @awk '/^[a-zA-Z_0-9%:\\\/-]+:/ { \ 53 | helpMessage = match(lastLine, /^## (.*)/); \ 54 | if (helpMessage) { \ 55 | helpCommand = $$1; \ 56 | helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ 57 | gsub("\\\\", "", helpCommand); \ 58 | gsub(":+$$", "", helpCommand); \ 59 | printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \ 60 | } \ 61 | } \ 62 | { lastLine = $$0 }' $(MAKELISTS) | sort -u 63 | @printf "\n" 64 | 65 | .PHONY: clean 66 | ## clean 67 | clean: 68 | -@rm -rf $(VALD_DIR) 69 | 70 | .PHONY: sync/v1 71 | ## sync/v1 synchronize VALD_DIR's generated v1 pbgo to v1 dir and patch it 72 | sync/v1: $(VALD_DIR) 73 | rm -rf $(ROOTDIR)/v1 74 | cp -r $(VALD_DIR)/apis/grpc/v1 $(ROOTDIR)/v1 75 | rm -rf $(ROOTDIR)/v1/discoverer \ 76 | $(ROOTDIR)/v1/agent/sidecar \ 77 | $(ROOTDIR)/v1/manager \ 78 | $(ROOTDIR)/v1/rpc 79 | # $(ROOTDIR)/v1/mirror \ 80 | find $(ROOTDIR)/v1/* -name '*.go' | xargs sed -i -E "s%github.com/vdaas/vald/internal/net/grpc/codes%google.golang.org/grpc/codes%g" 81 | find $(ROOTDIR)/v1/* -name '*.go' | xargs sed -i -E "s%github.com/vdaas/vald/internal/net/grpc/status%google.golang.org/grpc/status%g" 82 | find $(ROOTDIR)/v1/* -name '*.go' | xargs sed -i -E "s%github.com/vdaas/vald/apis/grpc/v1%github.com/vdaas/vald-client-go/v1%g" 83 | find $(ROOTDIR)/v1/* -name '*.go' | xargs sed -i -E "s%github.com/vdaas/vald/internal/io%io%g" 84 | find $(ROOTDIR)/v1/* -name '*.go' | xargs sed -i -E "s%github.com/vdaas/vald/internal/sync%sync%g" 85 | 86 | .PHONY: proto 87 | ## build proto 88 | proto: sync/v1 89 | 90 | $(VALD_DIR): 91 | git clone https://$(VALDREPO) $(VALD_DIR) 92 | 93 | .PHONY: vald/checkout 94 | ## checkout vald repository 95 | vald/checkout: $(VALD_DIR) 96 | cd $(VALD_DIR) && git checkout $(VALD_CHECKOUT_REF) 97 | 98 | .PHONY: vald/origin/sha/print 99 | ## print origin VALD_SHA value 100 | vald/origin/sha/print: $(VALD_DIR) 101 | @cd $(VALD_DIR) && git rev-parse HEAD | tr -d '\n' 102 | 103 | .PHONY: vald/sha/print 104 | ## print VALD_SHA value 105 | vald/sha/print: 106 | @cat $(VALD_SHA) 107 | 108 | .PHONY: vald/sha/update 109 | ## update VALD_SHA value 110 | vald/sha/update: $(VALD_DIR) 111 | (cd $(VALD_DIR); git rev-parse HEAD | tr -d '\n' > ../$(VALD_SHA)) 112 | 113 | .PHONY: vald/version/print 114 | ## print VALD_VERSION value 115 | vald/version/print: 116 | @cat $(VALD_VERSION) 117 | 118 | .PHONY: vald/client/version/print 119 | ## print VALD_CLIENT_JAVA_VERSION value 120 | vald/client/version/print: vald/version/print 121 | 122 | .PHONY: vald/client/version/update 123 | ## update VALD_CLIENT_JAVA_VERSION value 124 | vald/client/version/update: $(VALD_DIR) 125 | cp $(VALD_DIR)/versions/VALD_VERSION $(VALD_VERSION) 126 | cp $(VALD_DIR)/versions/GO_VERSION $(ROOTDIR)/GO_VERSION 127 | 128 | .PHONY: test 129 | ## Execute test 130 | test: $(TEST_DATASET_PATH) 131 | go test -v ./tests/v1/e2e_test.go 132 | 133 | $(TEST_DATASET_PATH): 134 | curl -L https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json -o $(TEST_DATASET_PATH) 135 | 136 | .PHONY: ci/deps/install 137 | ## install deps for CI environment 138 | ci/deps/install: 139 | @echo "Nothing to do" 140 | 141 | .PHONY: ci/deps/update 142 | ## update deps for CI environment 143 | ci/deps/update: mod sync/k3d/mk 144 | 145 | .PHONY: ci/package/prepare 146 | ## prepare for publich 147 | ci/package/prepare: 148 | @echo "Nothing to do" 149 | 150 | .PHONY: ci/package/publish 151 | ## publich packages 152 | ci/package/publish: 153 | @echo "Nothing to do" 154 | 155 | .PHONY: mod 156 | ## update go.mod 157 | mod: 158 | rm -rf $(ROOTDIR)/go.mod $(ROOTDIR)/go.sum 159 | sed -i "3s/go [0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?/go $(GO_VERSION)/g" $(ROOTDIR)/go.mod.default 160 | cp $(ROOTDIR)/go.mod.default $(ROOTDIR)/go.mod 161 | GOPRIVATE=$(VALDREPO) go mod tidy 162 | 163 | .PHONY: version/go 164 | ## print go version 165 | version/go: 166 | @echo $(GO_VERSION) 167 | 168 | Makefile.d: 169 | mkdir -p Makefile.d 170 | 171 | sync/k3d/mk: Makefile.d 172 | rm -rf $(K3D_MAKEFILE) 173 | curl -fsSLo $(K3D_MAKEFILE) $(K3D_MAKEFILE_URL) 174 | 175 | include $(K3D_MAKEFILE) 176 | include Makefile.d/variables.mk 177 | -------------------------------------------------------------------------------- /Makefile.d/k3d.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2025 vdaas.org vald team 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | K3D_CLUSTER_NAME = "vald-cluster" 18 | K3D_COMMAND = k3d 19 | K3D_NODES = 5 20 | K3D_NETWORK = bridge 21 | K3D_PORT = 6550 22 | K3D_HOST = localhost 23 | K3D_INGRESS_PORT = 8081 24 | K3D_HOST_PID_MODE = true 25 | K3D_OPTIONS = --port $(K3D_INGRESS_PORT):80@loadbalancer 26 | 27 | .PHONY: k3d/install 28 | ## install K3D 29 | k3d/install: $(BINDIR)/k3d 30 | 31 | $(BINDIR)/k3d: update/k3d 32 | mkdir -p $(BINDIR) 33 | curl -fsSL https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v$(K3D_VERSION) K3D_INSTALL_DIR=$(BINDIR) bash 34 | chmod a+x $(BINDIR)/$(K3D_COMMAND) 35 | 36 | .PHONY: k3d/start 37 | ## start k3d (kubernetes in docker) cluster 38 | k3d/start: 39 | $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) \ 40 | --agents $(K3D_NODES) \ 41 | --image docker.io/rancher/k3s:$(K3S_VERSION) \ 42 | --host-pid-mode=$(K3D_HOST_PID_MODE) \ 43 | --api-port $(K3D_HOST):$(K3D_PORT) \ 44 | -v "/lib/modules:/lib/modules" \ 45 | --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \ 46 | --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \ 47 | $(K3D_OPTIONS) 48 | @make k3d/config 49 | 50 | .PHONY: k3d/storage 51 | ## storage k3d (kubernetes in docker) cluster 52 | k3d/storage: 53 | kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml 54 | kubectl get storageclass 55 | kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' 56 | 57 | .PHONY: k3d/config 58 | ## config k3d (kubernetes in docker) cluster 59 | k3d/config: 60 | export KUBECONFIG="$(shell $(K3D_COMMAND) kubeconfig merge -o $(TEMP_DIR)/k3d_$(K3D_CLUSTER_NAME)_kubeconfig.yaml $(K3D_CLUSTER_NAME) --kubeconfig-switch-context)" 61 | 62 | .PHONY: k3d/restart 63 | ## restart k3d (kubernetes in docker) cluster 64 | k3d/restart: \ 65 | k3d/delete \ 66 | k3d/start 67 | 68 | .PHONY: k3d/delete 69 | ## stop k3d (kubernetes in docker) cluster 70 | k3d/delete: 71 | -$(K3D_COMMAND) cluster delete $(K3D_CLUSTER_NAME) 72 | -------------------------------------------------------------------------------- /Makefile.d/variables.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2025 vdaas.org vald team 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | USR_LOCAL = /usr/local 18 | BINDIR = $(USR_LOCAL)/bin 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vald-client-go 2 | [![License: Apache 2.0](https://img.shields.io/github/license/vdaas/vald-client-go.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0) 3 | [![release](https://img.shields.io/github/release/vdaas/vald-client-go.svg?style=flat-square)](https://github.com/vdaas/vald-client-go/releases/latest) 4 | [![Go Reference](https://pkg.go.dev/badge/github.com/vdaas/vald-client-go.svg)](https://pkg.go.dev/github.com/vdaas/vald-client-go) 5 | [![Go Version](https://img.shields.io/github/go-mod/go-version/vdaas/vald-client-go?filename=go.mod)](https://github.com/vdaas/vald-client-go/blob/main/go.mod#L3) 6 | [![Codacy Badge](https://img.shields.io/codacy/grade/a6e544eee7bc49e08a000bb10ba3deed?style=flat-square)](https://www.codacy.com/app/i.can.feel.gravity/vald?utm_source=github.com&utm_medium=referral&utm_content=vdaas/vald&utm_campaign=Badge_Grade) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/vdaas/vald-client-go?style=flat-square)](https://goreportcard.com/report/github.com/vdaas/vald-client-go) 8 | [![DepShield Badge](https://depshield.sonatype.org/badges/vdaas/vald-client-go/depshield.svg?style=flat-square)](https://depshield.github.io) 9 | [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B21465%2Fvald-client-go.svg?type=small)](https://app.fossa.com/projects/custom%2B21465%2Fvald-client-go?ref=badge_small) 10 | [![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/vdaas/vald-client-go/?ref=repository-badge) 11 | [![CLA](https://cla-assistant.io/readme/badge/vdaas/vald-client-go?&style=flat-square)](https://cla-assistant.io/vdaas/vald-client-go) 12 | [![Slack](https://img.shields.io/badge/slack-join-brightgreen?logo=slack&style=flat-square)](https://join.slack.com/t/vald-community/shared_invite/zt-db2ky9o4-R_9p2sVp8xRwztVa8gfnPA) 13 | [![Twitter](https://img.shields.io/badge/twitter-follow-blue?logo=twitter&style=flat-square)](https://twitter.com/vdaas_vald) 14 | 15 | 16 | ### example code 17 | 18 | ```go 19 | // Create a Vald clien connection for Vald cluster. 20 | conn, err := grpc.DialContext(ctx, "addr to cluster", grpc.WithInsecure()) 21 | if err != nil { 22 | log.Fatal(err) 23 | } 24 | 25 | // Creates Vald client for gRPC. 26 | client := vald.NewValdClient(conn) 27 | 28 | // Insert sample vector. 29 | _, err := client.Insert(ctx, &payload.Insert_Request{ 30 | Vector: &payload.Object_Vector{ 31 | Id: "id of vector", 32 | Vector: []float32{0.1, 0.2, 0.3}, // some feature dense vector here. 33 | }}) 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | 38 | // WARN you may need to wait a minutes until index creation. 39 | 40 | // Search sample vector. 41 | res, err := client.Search(ctx, &payload.Search_Request{ 42 | Vector: vec, 43 | // Conditions for hitting the search. 44 | Config: &payload.Search_Config{ 45 | Num: 10, // the number of search results 46 | Radius: -1, // Radius is used to determine the space of search candidate radius for neighborhood vectors. -1 means infinite circle. 47 | Epsilon: 0.1, // Epsilon is used to determines how much to expand from search candidate radius. 48 | Timeout: 100000000, // Timeout is used for search time deadline. The unit is nano-seconds. 49 | }}) 50 | if err != nil { 51 | log.Fatal(err) 52 | } 53 | 54 | // Remove vector. 55 | _, err := client.Remove(ctx, &payload.Remove_Request{ 56 | Id: &payload.Object_ID{ 57 | Id: "id of vector", 58 | }}) 59 | if err != nil { 60 | log.Fatal(err) 61 | } 62 | ``` 63 | 64 | [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B21465%2Fvald-client-go.svg?type=large)](https://app.fossa.com/projects/custom%2B21465%2Fvald-client-go?ref=badge_large) 65 | -------------------------------------------------------------------------------- /VALD_SHA: -------------------------------------------------------------------------------- 1 | da467e274ee9e392d23afe110fa930b66d5ef1c8 -------------------------------------------------------------------------------- /VALD_VERSION: -------------------------------------------------------------------------------- 1 | v1.7.16 2 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/vdaas/vald-client-go 2 | 3 | go 1.24.2 4 | 5 | replace ( 6 | cloud.google.com/go => cloud.google.com/go v0.121.3-0.20250610161940-5259a3db180b 7 | cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.69.1-0.20250610161940-5259a3db180b 8 | github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.2.1 9 | github.com/golang/protobuf => github.com/golang/protobuf v1.5.4 10 | github.com/google/go-cmp => github.com/google/go-cmp v0.7.0 11 | golang.org/x/crypto => golang.org/x/crypto v0.39.0 12 | golang.org/x/lint => golang.org/x/lint v0.0.0-20241112194109-818c5a804067 13 | golang.org/x/mod => golang.org/x/mod v0.25.0 14 | golang.org/x/net => golang.org/x/net v0.41.0 15 | golang.org/x/oauth2 => golang.org/x/oauth2 v0.30.0 16 | golang.org/x/sync => golang.org/x/sync v0.15.0 17 | golang.org/x/sys => golang.org/x/sys v0.33.0 18 | golang.org/x/text => golang.org/x/text v0.26.0 19 | golang.org/x/tools => golang.org/x/tools v0.34.0 20 | golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da 21 | google.golang.org/appengine => google.golang.org/appengine v1.6.8 22 | google.golang.org/genproto => google.golang.org/genproto v0.0.0-20250603155806-513f23925822 23 | google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 24 | google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 25 | google.golang.org/grpc => google.golang.org/grpc v1.73.0 26 | google.golang.org/protobuf => google.golang.org/protobuf v1.36.6 27 | ) 28 | 29 | require ( 30 | buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250603165357-b52ab10f4468.1 31 | github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 32 | google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 33 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a 34 | google.golang.org/grpc v1.71.0 35 | google.golang.org/protobuf v1.36.6 36 | ) 37 | 38 | require ( 39 | golang.org/x/net v0.38.0 // indirect 40 | golang.org/x/sys v0.33.0 // indirect 41 | golang.org/x/text v0.26.0 // indirect 42 | ) 43 | -------------------------------------------------------------------------------- /go.mod.default: -------------------------------------------------------------------------------- 1 | module github.com/vdaas/vald-client-go 2 | 3 | go 1.24.2 4 | 5 | replace ( 6 | cloud.google.com/go => cloud.google.com/go main 7 | cloud.google.com/go/bigquery => cloud.google.com/go/bigquery main 8 | github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate upgrade 9 | github.com/golang/protobuf => github.com/golang/protobuf upgrade 10 | github.com/google/go-cmp => github.com/google/go-cmp upgrade 11 | golang.org/x/crypto => golang.org/x/crypto upgrade 12 | golang.org/x/lint => golang.org/x/lint upgrade 13 | golang.org/x/mod => golang.org/x/mod upgrade 14 | golang.org/x/net => golang.org/x/net upgrade 15 | golang.org/x/oauth2 => golang.org/x/oauth2 upgrade 16 | golang.org/x/sync => golang.org/x/sync upgrade 17 | golang.org/x/sys => golang.org/x/sys upgrade 18 | golang.org/x/text => golang.org/x/text upgrade 19 | golang.org/x/tools => golang.org/x/tools upgrade 20 | golang.org/x/xerrors => golang.org/x/xerrors upgrade 21 | google.golang.org/appengine => google.golang.org/appengine upgrade 22 | google.golang.org/genproto => google.golang.org/genproto upgrade 23 | google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api upgrade 24 | google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc upgrade 25 | google.golang.org/grpc => google.golang.org/grpc upgrade 26 | google.golang.org/protobuf => google.golang.org/protobuf upgrade 27 | ) 28 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250603165357-b52ab10f4468.1 h1:uwSqFkn8DDTzNlaV9TxgSXY5OCaNdb4rH+Axd2FujkE= 2 | buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250603165357-b52ab10f4468.1/go.mod h1:avRlCjnFzl98VPaeCtJ24RrV/wwHFzB8sWXhj26+n/U= 3 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 4 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 5 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 6 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 7 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 8 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 9 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 10 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 11 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 12 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 13 | github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= 14 | github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= 15 | go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= 16 | go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= 17 | go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= 18 | go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= 19 | go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= 20 | go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= 21 | go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= 22 | go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= 23 | go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= 24 | go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= 25 | go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= 26 | go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= 27 | golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= 28 | golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= 29 | golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= 30 | golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 31 | golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= 32 | golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= 33 | google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY= 34 | google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc= 35 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE= 36 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= 37 | google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= 38 | google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= 39 | google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= 40 | google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 41 | -------------------------------------------------------------------------------- /v1/agent/core/agent.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Package core provides core agent server interface 18 | package core 19 | 20 | const ( 21 | CreateIndexRPCName = "CreateIndex" 22 | SaveIndexRPCName = "SaveIndex" 23 | CreateAndSaveIndexRPCName = "CreateAndSaveIndex" 24 | ) 25 | -------------------------------------------------------------------------------- /v1/agent/core/agent.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/agent/core/agent.proto 22 | 23 | package core 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_agent_core_agent_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_agent_core_agent_proto_rawDesc = "" + 45 | "\n" + 46 | "\x19v1/agent/core/agent.proto\x12\acore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xb7\x02\n" + 47 | "\x05Agent\x12k\n" + 48 | "\vCreateIndex\x12&.payload.v1.Control.CreateIndexRequest\x1a\x11.payload.v1.Empty\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/index/create/{pool_size}\x12F\n" + 49 | "\tSaveIndex\x12\x11.payload.v1.Empty\x1a\x11.payload.v1.Empty\"\x13\x82\xd3\xe4\x93\x02\r\x12\v/index/save\x12y\n" + 50 | "\x12CreateAndSaveIndex\x12&.payload.v1.Control.CreateIndexRequest\x1a\x11.payload.v1.Empty\"(\x82\xd3\xe4\x93\x02\"\x12 /index/createandsave/{pool_size}Bc\n" + 51 | " org.vdaas.vald.api.v1.agent.coreB\tValdAgentP\x01Z2github.com/vdaas/vald-client-go/v1/agent/core;coreb\x06proto3" 52 | 53 | var file_v1_agent_core_agent_proto_goTypes = []any{ 54 | (*payload.Control_CreateIndexRequest)(nil), // 0: payload.v1.Control.CreateIndexRequest 55 | (*payload.Empty)(nil), // 1: payload.v1.Empty 56 | } 57 | 58 | var file_v1_agent_core_agent_proto_depIdxs = []int32{ 59 | 0, // 0: core.v1.Agent.CreateIndex:input_type -> payload.v1.Control.CreateIndexRequest 60 | 1, // 1: core.v1.Agent.SaveIndex:input_type -> payload.v1.Empty 61 | 0, // 2: core.v1.Agent.CreateAndSaveIndex:input_type -> payload.v1.Control.CreateIndexRequest 62 | 1, // 3: core.v1.Agent.CreateIndex:output_type -> payload.v1.Empty 63 | 1, // 4: core.v1.Agent.SaveIndex:output_type -> payload.v1.Empty 64 | 1, // 5: core.v1.Agent.CreateAndSaveIndex:output_type -> payload.v1.Empty 65 | 3, // [3:6] is the sub-list for method output_type 66 | 0, // [0:3] is the sub-list for method input_type 67 | 0, // [0:0] is the sub-list for extension type_name 68 | 0, // [0:0] is the sub-list for extension extendee 69 | 0, // [0:0] is the sub-list for field type_name 70 | } 71 | 72 | func init() { file_v1_agent_core_agent_proto_init() } 73 | func file_v1_agent_core_agent_proto_init() { 74 | if File_v1_agent_core_agent_proto != nil { 75 | return 76 | } 77 | type x struct{} 78 | out := protoimpl.TypeBuilder{ 79 | File: protoimpl.DescBuilder{ 80 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 81 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_agent_core_agent_proto_rawDesc), len(file_v1_agent_core_agent_proto_rawDesc)), 82 | NumEnums: 0, 83 | NumMessages: 0, 84 | NumExtensions: 0, 85 | NumServices: 1, 86 | }, 87 | GoTypes: file_v1_agent_core_agent_proto_goTypes, 88 | DependencyIndexes: file_v1_agent_core_agent_proto_depIdxs, 89 | }.Build() 90 | File_v1_agent_core_agent_proto = out.File 91 | file_v1_agent_core_agent_proto_goTypes = nil 92 | file_v1_agent_core_agent_proto_depIdxs = nil 93 | } 94 | -------------------------------------------------------------------------------- /v1/agent/core/agent_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package core 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // AgentClient is the client API for Agent service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type AgentClient interface { 45 | // Represent the creating index RPC. 46 | CreateIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error) 47 | // Represent the saving index RPC. 48 | SaveIndex(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Empty, error) 49 | // Represent the creating and saving index RPC. 50 | CreateAndSaveIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error) 51 | } 52 | 53 | type agentClient struct { 54 | cc grpc.ClientConnInterface 55 | } 56 | 57 | func NewAgentClient(cc grpc.ClientConnInterface) AgentClient { 58 | return &agentClient{cc} 59 | } 60 | 61 | func (c *agentClient) CreateIndex( 62 | ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption, 63 | ) (*payload.Empty, error) { 64 | out := new(payload.Empty) 65 | err := c.cc.Invoke(ctx, "/core.v1.Agent/CreateIndex", in, out, opts...) 66 | if err != nil { 67 | return nil, err 68 | } 69 | return out, nil 70 | } 71 | 72 | func (c *agentClient) SaveIndex( 73 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 74 | ) (*payload.Empty, error) { 75 | out := new(payload.Empty) 76 | err := c.cc.Invoke(ctx, "/core.v1.Agent/SaveIndex", in, out, opts...) 77 | if err != nil { 78 | return nil, err 79 | } 80 | return out, nil 81 | } 82 | 83 | func (c *agentClient) CreateAndSaveIndex( 84 | ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption, 85 | ) (*payload.Empty, error) { 86 | out := new(payload.Empty) 87 | err := c.cc.Invoke(ctx, "/core.v1.Agent/CreateAndSaveIndex", in, out, opts...) 88 | if err != nil { 89 | return nil, err 90 | } 91 | return out, nil 92 | } 93 | 94 | // AgentServer is the server API for Agent service. 95 | // All implementations must embed UnimplementedAgentServer 96 | // for forward compatibility 97 | type AgentServer interface { 98 | // Represent the creating index RPC. 99 | CreateIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error) 100 | // Represent the saving index RPC. 101 | SaveIndex(context.Context, *payload.Empty) (*payload.Empty, error) 102 | // Represent the creating and saving index RPC. 103 | CreateAndSaveIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error) 104 | mustEmbedUnimplementedAgentServer() 105 | } 106 | 107 | // UnimplementedAgentServer must be embedded to have forward compatible implementations. 108 | type UnimplementedAgentServer struct{} 109 | 110 | func (UnimplementedAgentServer) CreateIndex( 111 | context.Context, *payload.Control_CreateIndexRequest, 112 | ) (*payload.Empty, error) { 113 | return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") 114 | } 115 | 116 | func (UnimplementedAgentServer) SaveIndex(context.Context, *payload.Empty) (*payload.Empty, error) { 117 | return nil, status.Errorf(codes.Unimplemented, "method SaveIndex not implemented") 118 | } 119 | 120 | func (UnimplementedAgentServer) CreateAndSaveIndex( 121 | context.Context, *payload.Control_CreateIndexRequest, 122 | ) (*payload.Empty, error) { 123 | return nil, status.Errorf(codes.Unimplemented, "method CreateAndSaveIndex not implemented") 124 | } 125 | func (UnimplementedAgentServer) mustEmbedUnimplementedAgentServer() {} 126 | 127 | // UnsafeAgentServer may be embedded to opt out of forward compatibility for this service. 128 | // Use of this interface is not recommended, as added methods to AgentServer will 129 | // result in compilation errors. 130 | type UnsafeAgentServer interface { 131 | mustEmbedUnimplementedAgentServer() 132 | } 133 | 134 | func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer) { 135 | s.RegisterService(&Agent_ServiceDesc, srv) 136 | } 137 | 138 | func _Agent_CreateIndex_Handler( 139 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 140 | ) (any, error) { 141 | in := new(payload.Control_CreateIndexRequest) 142 | if err := dec(in); err != nil { 143 | return nil, err 144 | } 145 | if interceptor == nil { 146 | return srv.(AgentServer).CreateIndex(ctx, in) 147 | } 148 | info := &grpc.UnaryServerInfo{ 149 | Server: srv, 150 | FullMethod: "/core.v1.Agent/CreateIndex", 151 | } 152 | handler := func(ctx context.Context, req any) (any, error) { 153 | return srv.(AgentServer).CreateIndex(ctx, req.(*payload.Control_CreateIndexRequest)) 154 | } 155 | return interceptor(ctx, in, info, handler) 156 | } 157 | 158 | func _Agent_SaveIndex_Handler( 159 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 160 | ) (any, error) { 161 | in := new(payload.Empty) 162 | if err := dec(in); err != nil { 163 | return nil, err 164 | } 165 | if interceptor == nil { 166 | return srv.(AgentServer).SaveIndex(ctx, in) 167 | } 168 | info := &grpc.UnaryServerInfo{ 169 | Server: srv, 170 | FullMethod: "/core.v1.Agent/SaveIndex", 171 | } 172 | handler := func(ctx context.Context, req any) (any, error) { 173 | return srv.(AgentServer).SaveIndex(ctx, req.(*payload.Empty)) 174 | } 175 | return interceptor(ctx, in, info, handler) 176 | } 177 | 178 | func _Agent_CreateAndSaveIndex_Handler( 179 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 180 | ) (any, error) { 181 | in := new(payload.Control_CreateIndexRequest) 182 | if err := dec(in); err != nil { 183 | return nil, err 184 | } 185 | if interceptor == nil { 186 | return srv.(AgentServer).CreateAndSaveIndex(ctx, in) 187 | } 188 | info := &grpc.UnaryServerInfo{ 189 | Server: srv, 190 | FullMethod: "/core.v1.Agent/CreateAndSaveIndex", 191 | } 192 | handler := func(ctx context.Context, req any) (any, error) { 193 | return srv.(AgentServer).CreateAndSaveIndex(ctx, req.(*payload.Control_CreateIndexRequest)) 194 | } 195 | return interceptor(ctx, in, info, handler) 196 | } 197 | 198 | // Agent_ServiceDesc is the grpc.ServiceDesc for Agent service. 199 | // It's only intended for direct use with grpc.RegisterService, 200 | // and not to be introspected or modified (even as a copy) 201 | var Agent_ServiceDesc = grpc.ServiceDesc{ 202 | ServiceName: "core.v1.Agent", 203 | HandlerType: (*AgentServer)(nil), 204 | Methods: []grpc.MethodDesc{ 205 | { 206 | MethodName: "CreateIndex", 207 | Handler: _Agent_CreateIndex_Handler, 208 | }, 209 | { 210 | MethodName: "SaveIndex", 211 | Handler: _Agent_SaveIndex_Handler, 212 | }, 213 | { 214 | MethodName: "CreateAndSaveIndex", 215 | Handler: _Agent_CreateAndSaveIndex_Handler, 216 | }, 217 | }, 218 | Streams: []grpc.StreamDesc{}, 219 | Metadata: "v1/agent/core/agent.proto", 220 | } 221 | -------------------------------------------------------------------------------- /v1/filter/egress/egress_filter.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/filter/egress/egress_filter.proto 22 | 23 | package egress 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_filter_egress_egress_filter_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_filter_egress_egress_filter_proto_rawDesc = "" + 45 | "\n" + 46 | "$v1/filter/egress/egress_filter.proto\x12\x10filter.egress.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xe0\x01\n" + 47 | "\x06Filter\x12n\n" + 48 | "\x0eFilterDistance\x12\x1b.payload.v1.Object.Distance\x1a\x1b.payload.v1.Object.Distance\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/filter/egress/distance\x12f\n" + 49 | "\fFilterVector\x12\x19.payload.v1.Object.Vector\x1a\x19.payload.v1.Object.Vector\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/filter/egress/vectorBk\n" + 50 | "#org.vdaas.vald.api.v1.filter.egressB\x10ValdEgressFilterP\x01Z0github.com/vdaas/vald-client-go/v1/filter/egressb\x06proto3" 51 | 52 | var file_v1_filter_egress_egress_filter_proto_goTypes = []any{ 53 | (*payload.Object_Distance)(nil), // 0: payload.v1.Object.Distance 54 | (*payload.Object_Vector)(nil), // 1: payload.v1.Object.Vector 55 | } 56 | 57 | var file_v1_filter_egress_egress_filter_proto_depIdxs = []int32{ 58 | 0, // 0: filter.egress.v1.Filter.FilterDistance:input_type -> payload.v1.Object.Distance 59 | 1, // 1: filter.egress.v1.Filter.FilterVector:input_type -> payload.v1.Object.Vector 60 | 0, // 2: filter.egress.v1.Filter.FilterDistance:output_type -> payload.v1.Object.Distance 61 | 1, // 3: filter.egress.v1.Filter.FilterVector:output_type -> payload.v1.Object.Vector 62 | 2, // [2:4] is the sub-list for method output_type 63 | 0, // [0:2] is the sub-list for method input_type 64 | 0, // [0:0] is the sub-list for extension type_name 65 | 0, // [0:0] is the sub-list for extension extendee 66 | 0, // [0:0] is the sub-list for field type_name 67 | } 68 | 69 | func init() { file_v1_filter_egress_egress_filter_proto_init() } 70 | func file_v1_filter_egress_egress_filter_proto_init() { 71 | if File_v1_filter_egress_egress_filter_proto != nil { 72 | return 73 | } 74 | type x struct{} 75 | out := protoimpl.TypeBuilder{ 76 | File: protoimpl.DescBuilder{ 77 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 78 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_filter_egress_egress_filter_proto_rawDesc), len(file_v1_filter_egress_egress_filter_proto_rawDesc)), 79 | NumEnums: 0, 80 | NumMessages: 0, 81 | NumExtensions: 0, 82 | NumServices: 1, 83 | }, 84 | GoTypes: file_v1_filter_egress_egress_filter_proto_goTypes, 85 | DependencyIndexes: file_v1_filter_egress_egress_filter_proto_depIdxs, 86 | }.Build() 87 | File_v1_filter_egress_egress_filter_proto = out.File 88 | file_v1_filter_egress_egress_filter_proto_goTypes = nil 89 | file_v1_filter_egress_egress_filter_proto_depIdxs = nil 90 | } 91 | -------------------------------------------------------------------------------- /v1/filter/egress/egress_filter_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package egress 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // FilterClient is the client API for Filter service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type FilterClient interface { 45 | // Represent the RPC to filter the distance. 46 | FilterDistance(ctx context.Context, in *payload.Object_Distance, opts ...grpc.CallOption) (*payload.Object_Distance, error) 47 | // Represent the RPC to filter the vector. 48 | FilterVector(ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption) (*payload.Object_Vector, error) 49 | } 50 | 51 | type filterClient struct { 52 | cc grpc.ClientConnInterface 53 | } 54 | 55 | func NewFilterClient(cc grpc.ClientConnInterface) FilterClient { 56 | return &filterClient{cc} 57 | } 58 | 59 | func (c *filterClient) FilterDistance( 60 | ctx context.Context, in *payload.Object_Distance, opts ...grpc.CallOption, 61 | ) (*payload.Object_Distance, error) { 62 | out := new(payload.Object_Distance) 63 | err := c.cc.Invoke(ctx, "/filter.egress.v1.Filter/FilterDistance", in, out, opts...) 64 | if err != nil { 65 | return nil, err 66 | } 67 | return out, nil 68 | } 69 | 70 | func (c *filterClient) FilterVector( 71 | ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption, 72 | ) (*payload.Object_Vector, error) { 73 | out := new(payload.Object_Vector) 74 | err := c.cc.Invoke(ctx, "/filter.egress.v1.Filter/FilterVector", in, out, opts...) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return out, nil 79 | } 80 | 81 | // FilterServer is the server API for Filter service. 82 | // All implementations must embed UnimplementedFilterServer 83 | // for forward compatibility 84 | type FilterServer interface { 85 | // Represent the RPC to filter the distance. 86 | FilterDistance(context.Context, *payload.Object_Distance) (*payload.Object_Distance, error) 87 | // Represent the RPC to filter the vector. 88 | FilterVector(context.Context, *payload.Object_Vector) (*payload.Object_Vector, error) 89 | mustEmbedUnimplementedFilterServer() 90 | } 91 | 92 | // UnimplementedFilterServer must be embedded to have forward compatible implementations. 93 | type UnimplementedFilterServer struct{} 94 | 95 | func (UnimplementedFilterServer) FilterDistance( 96 | context.Context, *payload.Object_Distance, 97 | ) (*payload.Object_Distance, error) { 98 | return nil, status.Errorf(codes.Unimplemented, "method FilterDistance not implemented") 99 | } 100 | 101 | func (UnimplementedFilterServer) FilterVector( 102 | context.Context, *payload.Object_Vector, 103 | ) (*payload.Object_Vector, error) { 104 | return nil, status.Errorf(codes.Unimplemented, "method FilterVector not implemented") 105 | } 106 | func (UnimplementedFilterServer) mustEmbedUnimplementedFilterServer() {} 107 | 108 | // UnsafeFilterServer may be embedded to opt out of forward compatibility for this service. 109 | // Use of this interface is not recommended, as added methods to FilterServer will 110 | // result in compilation errors. 111 | type UnsafeFilterServer interface { 112 | mustEmbedUnimplementedFilterServer() 113 | } 114 | 115 | func RegisterFilterServer(s grpc.ServiceRegistrar, srv FilterServer) { 116 | s.RegisterService(&Filter_ServiceDesc, srv) 117 | } 118 | 119 | func _Filter_FilterDistance_Handler( 120 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 121 | ) (any, error) { 122 | in := new(payload.Object_Distance) 123 | if err := dec(in); err != nil { 124 | return nil, err 125 | } 126 | if interceptor == nil { 127 | return srv.(FilterServer).FilterDistance(ctx, in) 128 | } 129 | info := &grpc.UnaryServerInfo{ 130 | Server: srv, 131 | FullMethod: "/filter.egress.v1.Filter/FilterDistance", 132 | } 133 | handler := func(ctx context.Context, req any) (any, error) { 134 | return srv.(FilterServer).FilterDistance(ctx, req.(*payload.Object_Distance)) 135 | } 136 | return interceptor(ctx, in, info, handler) 137 | } 138 | 139 | func _Filter_FilterVector_Handler( 140 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 141 | ) (any, error) { 142 | in := new(payload.Object_Vector) 143 | if err := dec(in); err != nil { 144 | return nil, err 145 | } 146 | if interceptor == nil { 147 | return srv.(FilterServer).FilterVector(ctx, in) 148 | } 149 | info := &grpc.UnaryServerInfo{ 150 | Server: srv, 151 | FullMethod: "/filter.egress.v1.Filter/FilterVector", 152 | } 153 | handler := func(ctx context.Context, req any) (any, error) { 154 | return srv.(FilterServer).FilterVector(ctx, req.(*payload.Object_Vector)) 155 | } 156 | return interceptor(ctx, in, info, handler) 157 | } 158 | 159 | // Filter_ServiceDesc is the grpc.ServiceDesc for Filter service. 160 | // It's only intended for direct use with grpc.RegisterService, 161 | // and not to be introspected or modified (even as a copy) 162 | var Filter_ServiceDesc = grpc.ServiceDesc{ 163 | ServiceName: "filter.egress.v1.Filter", 164 | HandlerType: (*FilterServer)(nil), 165 | Methods: []grpc.MethodDesc{ 166 | { 167 | MethodName: "FilterDistance", 168 | Handler: _Filter_FilterDistance_Handler, 169 | }, 170 | { 171 | MethodName: "FilterVector", 172 | Handler: _Filter_FilterVector_Handler, 173 | }, 174 | }, 175 | Streams: []grpc.StreamDesc{}, 176 | Metadata: "v1/filter/egress/egress_filter.proto", 177 | } 178 | -------------------------------------------------------------------------------- /v1/filter/ingress/ingress_filter.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/filter/ingress/ingress_filter.proto 22 | 23 | package ingress 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_filter_ingress_ingress_filter_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_filter_ingress_ingress_filter_proto_rawDesc = "" + 45 | "\n" + 46 | "&v1/filter/ingress/ingress_filter.proto\x12\x11filter.ingress.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xd5\x01\n" + 47 | "\x06Filter\x12b\n" + 48 | "\tGenVector\x12\x17.payload.v1.Object.Blob\x1a\x19.payload.v1.Object.Vector\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/filter/ingress/object\x12g\n" + 49 | "\fFilterVector\x12\x19.payload.v1.Object.Vector\x1a\x19.payload.v1.Object.Vector\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/filter/ingress/vectorBn\n" + 50 | "$org.vdaas.vald.api.v1.filter.ingressB\x11ValdIngressFilterP\x01Z1github.com/vdaas/vald-client-go/v1/filter/ingressb\x06proto3" 51 | 52 | var file_v1_filter_ingress_ingress_filter_proto_goTypes = []any{ 53 | (*payload.Object_Blob)(nil), // 0: payload.v1.Object.Blob 54 | (*payload.Object_Vector)(nil), // 1: payload.v1.Object.Vector 55 | } 56 | 57 | var file_v1_filter_ingress_ingress_filter_proto_depIdxs = []int32{ 58 | 0, // 0: filter.ingress.v1.Filter.GenVector:input_type -> payload.v1.Object.Blob 59 | 1, // 1: filter.ingress.v1.Filter.FilterVector:input_type -> payload.v1.Object.Vector 60 | 1, // 2: filter.ingress.v1.Filter.GenVector:output_type -> payload.v1.Object.Vector 61 | 1, // 3: filter.ingress.v1.Filter.FilterVector:output_type -> payload.v1.Object.Vector 62 | 2, // [2:4] is the sub-list for method output_type 63 | 0, // [0:2] is the sub-list for method input_type 64 | 0, // [0:0] is the sub-list for extension type_name 65 | 0, // [0:0] is the sub-list for extension extendee 66 | 0, // [0:0] is the sub-list for field type_name 67 | } 68 | 69 | func init() { file_v1_filter_ingress_ingress_filter_proto_init() } 70 | func file_v1_filter_ingress_ingress_filter_proto_init() { 71 | if File_v1_filter_ingress_ingress_filter_proto != nil { 72 | return 73 | } 74 | type x struct{} 75 | out := protoimpl.TypeBuilder{ 76 | File: protoimpl.DescBuilder{ 77 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 78 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_filter_ingress_ingress_filter_proto_rawDesc), len(file_v1_filter_ingress_ingress_filter_proto_rawDesc)), 79 | NumEnums: 0, 80 | NumMessages: 0, 81 | NumExtensions: 0, 82 | NumServices: 1, 83 | }, 84 | GoTypes: file_v1_filter_ingress_ingress_filter_proto_goTypes, 85 | DependencyIndexes: file_v1_filter_ingress_ingress_filter_proto_depIdxs, 86 | }.Build() 87 | File_v1_filter_ingress_ingress_filter_proto = out.File 88 | file_v1_filter_ingress_ingress_filter_proto_goTypes = nil 89 | file_v1_filter_ingress_ingress_filter_proto_depIdxs = nil 90 | } 91 | -------------------------------------------------------------------------------- /v1/filter/ingress/ingress_filter_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package ingress 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // FilterClient is the client API for Filter service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type FilterClient interface { 45 | // Represent the RPC to generate the vector. 46 | GenVector(ctx context.Context, in *payload.Object_Blob, opts ...grpc.CallOption) (*payload.Object_Vector, error) 47 | // Represent the RPC to filter the vector. 48 | FilterVector(ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption) (*payload.Object_Vector, error) 49 | } 50 | 51 | type filterClient struct { 52 | cc grpc.ClientConnInterface 53 | } 54 | 55 | func NewFilterClient(cc grpc.ClientConnInterface) FilterClient { 56 | return &filterClient{cc} 57 | } 58 | 59 | func (c *filterClient) GenVector( 60 | ctx context.Context, in *payload.Object_Blob, opts ...grpc.CallOption, 61 | ) (*payload.Object_Vector, error) { 62 | out := new(payload.Object_Vector) 63 | err := c.cc.Invoke(ctx, "/filter.ingress.v1.Filter/GenVector", in, out, opts...) 64 | if err != nil { 65 | return nil, err 66 | } 67 | return out, nil 68 | } 69 | 70 | func (c *filterClient) FilterVector( 71 | ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption, 72 | ) (*payload.Object_Vector, error) { 73 | out := new(payload.Object_Vector) 74 | err := c.cc.Invoke(ctx, "/filter.ingress.v1.Filter/FilterVector", in, out, opts...) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return out, nil 79 | } 80 | 81 | // FilterServer is the server API for Filter service. 82 | // All implementations must embed UnimplementedFilterServer 83 | // for forward compatibility 84 | type FilterServer interface { 85 | // Represent the RPC to generate the vector. 86 | GenVector(context.Context, *payload.Object_Blob) (*payload.Object_Vector, error) 87 | // Represent the RPC to filter the vector. 88 | FilterVector(context.Context, *payload.Object_Vector) (*payload.Object_Vector, error) 89 | mustEmbedUnimplementedFilterServer() 90 | } 91 | 92 | // UnimplementedFilterServer must be embedded to have forward compatible implementations. 93 | type UnimplementedFilterServer struct{} 94 | 95 | func (UnimplementedFilterServer) GenVector( 96 | context.Context, *payload.Object_Blob, 97 | ) (*payload.Object_Vector, error) { 98 | return nil, status.Errorf(codes.Unimplemented, "method GenVector not implemented") 99 | } 100 | 101 | func (UnimplementedFilterServer) FilterVector( 102 | context.Context, *payload.Object_Vector, 103 | ) (*payload.Object_Vector, error) { 104 | return nil, status.Errorf(codes.Unimplemented, "method FilterVector not implemented") 105 | } 106 | func (UnimplementedFilterServer) mustEmbedUnimplementedFilterServer() {} 107 | 108 | // UnsafeFilterServer may be embedded to opt out of forward compatibility for this service. 109 | // Use of this interface is not recommended, as added methods to FilterServer will 110 | // result in compilation errors. 111 | type UnsafeFilterServer interface { 112 | mustEmbedUnimplementedFilterServer() 113 | } 114 | 115 | func RegisterFilterServer(s grpc.ServiceRegistrar, srv FilterServer) { 116 | s.RegisterService(&Filter_ServiceDesc, srv) 117 | } 118 | 119 | func _Filter_GenVector_Handler( 120 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 121 | ) (any, error) { 122 | in := new(payload.Object_Blob) 123 | if err := dec(in); err != nil { 124 | return nil, err 125 | } 126 | if interceptor == nil { 127 | return srv.(FilterServer).GenVector(ctx, in) 128 | } 129 | info := &grpc.UnaryServerInfo{ 130 | Server: srv, 131 | FullMethod: "/filter.ingress.v1.Filter/GenVector", 132 | } 133 | handler := func(ctx context.Context, req any) (any, error) { 134 | return srv.(FilterServer).GenVector(ctx, req.(*payload.Object_Blob)) 135 | } 136 | return interceptor(ctx, in, info, handler) 137 | } 138 | 139 | func _Filter_FilterVector_Handler( 140 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 141 | ) (any, error) { 142 | in := new(payload.Object_Vector) 143 | if err := dec(in); err != nil { 144 | return nil, err 145 | } 146 | if interceptor == nil { 147 | return srv.(FilterServer).FilterVector(ctx, in) 148 | } 149 | info := &grpc.UnaryServerInfo{ 150 | Server: srv, 151 | FullMethod: "/filter.ingress.v1.Filter/FilterVector", 152 | } 153 | handler := func(ctx context.Context, req any) (any, error) { 154 | return srv.(FilterServer).FilterVector(ctx, req.(*payload.Object_Vector)) 155 | } 156 | return interceptor(ctx, in, info, handler) 157 | } 158 | 159 | // Filter_ServiceDesc is the grpc.ServiceDesc for Filter service. 160 | // It's only intended for direct use with grpc.RegisterService, 161 | // and not to be introspected or modified (even as a copy) 162 | var Filter_ServiceDesc = grpc.ServiceDesc{ 163 | ServiceName: "filter.ingress.v1.Filter", 164 | HandlerType: (*FilterServer)(nil), 165 | Methods: []grpc.MethodDesc{ 166 | { 167 | MethodName: "GenVector", 168 | Handler: _Filter_GenVector_Handler, 169 | }, 170 | { 171 | MethodName: "FilterVector", 172 | Handler: _Filter_FilterVector_Handler, 173 | }, 174 | }, 175 | Streams: []grpc.StreamDesc{}, 176 | Metadata: "v1/filter/ingress/ingress_filter.proto", 177 | } 178 | -------------------------------------------------------------------------------- /v1/meta/meta.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/meta/meta.proto 22 | 23 | package meta 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_meta_meta_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_meta_meta_proto_rawDesc = "" + 45 | "\n" + 46 | "\x12v1/meta/meta.proto\x12\ameta.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xdf\x01\n" + 47 | "\x04Meta\x12H\n" + 48 | "\x03Get\x12\x14.payload.v1.Meta.Key\x1a\x16.payload.v1.Meta.Value\"\x13\x82\xd3\xe4\x93\x02\r\x12\v/meta/{key}\x12E\n" + 49 | "\x03Set\x12\x19.payload.v1.Meta.KeyValue\x1a\x11.payload.v1.Empty\"\x10\x82\xd3\xe4\x93\x02\n" + 50 | ":\x01*\"\x05/meta\x12F\n" + 51 | "\x06Delete\x12\x14.payload.v1.Meta.Key\x1a\x11.payload.v1.Empty\"\x13\x82\xd3\xe4\x93\x02\r*\v/meta/{key}BX\n" + 52 | "\x1aorg.vdaas.vald.api.v1.metaB\bValdMetaP\x01Z'github.com/vdaas/vald-client-go/v1/meta\xa2\x02\x04Metab\x06proto3" 53 | 54 | var file_v1_meta_meta_proto_goTypes = []any{ 55 | (*payload.Meta_Key)(nil), // 0: payload.v1.Meta.Key 56 | (*payload.Meta_KeyValue)(nil), // 1: payload.v1.Meta.KeyValue 57 | (*payload.Meta_Value)(nil), // 2: payload.v1.Meta.Value 58 | (*payload.Empty)(nil), // 3: payload.v1.Empty 59 | } 60 | 61 | var file_v1_meta_meta_proto_depIdxs = []int32{ 62 | 0, // 0: meta.v1.Meta.Get:input_type -> payload.v1.Meta.Key 63 | 1, // 1: meta.v1.Meta.Set:input_type -> payload.v1.Meta.KeyValue 64 | 0, // 2: meta.v1.Meta.Delete:input_type -> payload.v1.Meta.Key 65 | 2, // 3: meta.v1.Meta.Get:output_type -> payload.v1.Meta.Value 66 | 3, // 4: meta.v1.Meta.Set:output_type -> payload.v1.Empty 67 | 3, // 5: meta.v1.Meta.Delete:output_type -> payload.v1.Empty 68 | 3, // [3:6] is the sub-list for method output_type 69 | 0, // [0:3] is the sub-list for method input_type 70 | 0, // [0:0] is the sub-list for extension type_name 71 | 0, // [0:0] is the sub-list for extension extendee 72 | 0, // [0:0] is the sub-list for field type_name 73 | } 74 | 75 | func init() { file_v1_meta_meta_proto_init() } 76 | func file_v1_meta_meta_proto_init() { 77 | if File_v1_meta_meta_proto != nil { 78 | return 79 | } 80 | type x struct{} 81 | out := protoimpl.TypeBuilder{ 82 | File: protoimpl.DescBuilder{ 83 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 84 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_meta_meta_proto_rawDesc), len(file_v1_meta_meta_proto_rawDesc)), 85 | NumEnums: 0, 86 | NumMessages: 0, 87 | NumExtensions: 0, 88 | NumServices: 1, 89 | }, 90 | GoTypes: file_v1_meta_meta_proto_goTypes, 91 | DependencyIndexes: file_v1_meta_meta_proto_depIdxs, 92 | }.Build() 93 | File_v1_meta_meta_proto = out.File 94 | file_v1_meta_meta_proto_goTypes = nil 95 | file_v1_meta_meta_proto_depIdxs = nil 96 | } 97 | -------------------------------------------------------------------------------- /v1/meta/meta_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package meta 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // MetaClient is the client API for Meta service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type MetaClient interface { 45 | Get(ctx context.Context, in *payload.Meta_Key, opts ...grpc.CallOption) (*payload.Meta_Value, error) 46 | Set(ctx context.Context, in *payload.Meta_KeyValue, opts ...grpc.CallOption) (*payload.Empty, error) 47 | Delete(ctx context.Context, in *payload.Meta_Key, opts ...grpc.CallOption) (*payload.Empty, error) 48 | } 49 | 50 | type metaClient struct { 51 | cc grpc.ClientConnInterface 52 | } 53 | 54 | func NewMetaClient(cc grpc.ClientConnInterface) MetaClient { 55 | return &metaClient{cc} 56 | } 57 | 58 | func (c *metaClient) Get( 59 | ctx context.Context, in *payload.Meta_Key, opts ...grpc.CallOption, 60 | ) (*payload.Meta_Value, error) { 61 | out := new(payload.Meta_Value) 62 | err := c.cc.Invoke(ctx, "/meta.v1.Meta/Get", in, out, opts...) 63 | if err != nil { 64 | return nil, err 65 | } 66 | return out, nil 67 | } 68 | 69 | func (c *metaClient) Set( 70 | ctx context.Context, in *payload.Meta_KeyValue, opts ...grpc.CallOption, 71 | ) (*payload.Empty, error) { 72 | out := new(payload.Empty) 73 | err := c.cc.Invoke(ctx, "/meta.v1.Meta/Set", in, out, opts...) 74 | if err != nil { 75 | return nil, err 76 | } 77 | return out, nil 78 | } 79 | 80 | func (c *metaClient) Delete( 81 | ctx context.Context, in *payload.Meta_Key, opts ...grpc.CallOption, 82 | ) (*payload.Empty, error) { 83 | out := new(payload.Empty) 84 | err := c.cc.Invoke(ctx, "/meta.v1.Meta/Delete", in, out, opts...) 85 | if err != nil { 86 | return nil, err 87 | } 88 | return out, nil 89 | } 90 | 91 | // MetaServer is the server API for Meta service. 92 | // All implementations must embed UnimplementedMetaServer 93 | // for forward compatibility 94 | type MetaServer interface { 95 | Get(context.Context, *payload.Meta_Key) (*payload.Meta_Value, error) 96 | Set(context.Context, *payload.Meta_KeyValue) (*payload.Empty, error) 97 | Delete(context.Context, *payload.Meta_Key) (*payload.Empty, error) 98 | mustEmbedUnimplementedMetaServer() 99 | } 100 | 101 | // UnimplementedMetaServer must be embedded to have forward compatible implementations. 102 | type UnimplementedMetaServer struct{} 103 | 104 | func (UnimplementedMetaServer) Get( 105 | context.Context, *payload.Meta_Key, 106 | ) (*payload.Meta_Value, error) { 107 | return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") 108 | } 109 | 110 | func (UnimplementedMetaServer) Set( 111 | context.Context, *payload.Meta_KeyValue, 112 | ) (*payload.Empty, error) { 113 | return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") 114 | } 115 | 116 | func (UnimplementedMetaServer) Delete(context.Context, *payload.Meta_Key) (*payload.Empty, error) { 117 | return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") 118 | } 119 | func (UnimplementedMetaServer) mustEmbedUnimplementedMetaServer() {} 120 | 121 | // UnsafeMetaServer may be embedded to opt out of forward compatibility for this service. 122 | // Use of this interface is not recommended, as added methods to MetaServer will 123 | // result in compilation errors. 124 | type UnsafeMetaServer interface { 125 | mustEmbedUnimplementedMetaServer() 126 | } 127 | 128 | func RegisterMetaServer(s grpc.ServiceRegistrar, srv MetaServer) { 129 | s.RegisterService(&Meta_ServiceDesc, srv) 130 | } 131 | 132 | func _Meta_Get_Handler( 133 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 134 | ) (any, error) { 135 | in := new(payload.Meta_Key) 136 | if err := dec(in); err != nil { 137 | return nil, err 138 | } 139 | if interceptor == nil { 140 | return srv.(MetaServer).Get(ctx, in) 141 | } 142 | info := &grpc.UnaryServerInfo{ 143 | Server: srv, 144 | FullMethod: "/meta.v1.Meta/Get", 145 | } 146 | handler := func(ctx context.Context, req any) (any, error) { 147 | return srv.(MetaServer).Get(ctx, req.(*payload.Meta_Key)) 148 | } 149 | return interceptor(ctx, in, info, handler) 150 | } 151 | 152 | func _Meta_Set_Handler( 153 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 154 | ) (any, error) { 155 | in := new(payload.Meta_KeyValue) 156 | if err := dec(in); err != nil { 157 | return nil, err 158 | } 159 | if interceptor == nil { 160 | return srv.(MetaServer).Set(ctx, in) 161 | } 162 | info := &grpc.UnaryServerInfo{ 163 | Server: srv, 164 | FullMethod: "/meta.v1.Meta/Set", 165 | } 166 | handler := func(ctx context.Context, req any) (any, error) { 167 | return srv.(MetaServer).Set(ctx, req.(*payload.Meta_KeyValue)) 168 | } 169 | return interceptor(ctx, in, info, handler) 170 | } 171 | 172 | func _Meta_Delete_Handler( 173 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 174 | ) (any, error) { 175 | in := new(payload.Meta_Key) 176 | if err := dec(in); err != nil { 177 | return nil, err 178 | } 179 | if interceptor == nil { 180 | return srv.(MetaServer).Delete(ctx, in) 181 | } 182 | info := &grpc.UnaryServerInfo{ 183 | Server: srv, 184 | FullMethod: "/meta.v1.Meta/Delete", 185 | } 186 | handler := func(ctx context.Context, req any) (any, error) { 187 | return srv.(MetaServer).Delete(ctx, req.(*payload.Meta_Key)) 188 | } 189 | return interceptor(ctx, in, info, handler) 190 | } 191 | 192 | // Meta_ServiceDesc is the grpc.ServiceDesc for Meta service. 193 | // It's only intended for direct use with grpc.RegisterService, 194 | // and not to be introspected or modified (even as a copy) 195 | var Meta_ServiceDesc = grpc.ServiceDesc{ 196 | ServiceName: "meta.v1.Meta", 197 | HandlerType: (*MetaServer)(nil), 198 | Methods: []grpc.MethodDesc{ 199 | { 200 | MethodName: "Get", 201 | Handler: _Meta_Get_Handler, 202 | }, 203 | { 204 | MethodName: "Set", 205 | Handler: _Meta_Set_Handler, 206 | }, 207 | { 208 | MethodName: "Delete", 209 | Handler: _Meta_Delete_Handler, 210 | }, 211 | }, 212 | Streams: []grpc.StreamDesc{}, 213 | Metadata: "v1/meta/meta.proto", 214 | } 215 | -------------------------------------------------------------------------------- /v1/mirror/mirror.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Package mirror provides vald server interface 18 | package mirror 19 | 20 | const ( 21 | RPCServiceName = "Mirror" 22 | RegisterRPCName = "Register" 23 | ) 24 | -------------------------------------------------------------------------------- /v1/mirror/mirror.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/mirror/mirror.proto 22 | 23 | package mirror 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_mirror_mirror_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_mirror_mirror_proto_rawDesc = "" + 45 | "\n" + 46 | "\x16v1/mirror/mirror.proto\x12\tmirror.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2i\n" + 47 | "\x06Mirror\x12_\n" + 48 | "\bRegister\x12\x1a.payload.v1.Mirror.Targets\x1a\x1a.payload.v1.Mirror.Targets\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/mirror/registerBW\n" + 49 | "\x1corg.vdaas.vald.api.v1.mirrorB\n" + 50 | "ValdMirrorP\x01Z)github.com/vdaas/vald-client-go/v1/mirrorb\x06proto3" 51 | 52 | var file_v1_mirror_mirror_proto_goTypes = []any{ 53 | (*payload.Mirror_Targets)(nil), // 0: payload.v1.Mirror.Targets 54 | } 55 | 56 | var file_v1_mirror_mirror_proto_depIdxs = []int32{ 57 | 0, // 0: mirror.v1.Mirror.Register:input_type -> payload.v1.Mirror.Targets 58 | 0, // 1: mirror.v1.Mirror.Register:output_type -> payload.v1.Mirror.Targets 59 | 1, // [1:2] is the sub-list for method output_type 60 | 0, // [0:1] is the sub-list for method input_type 61 | 0, // [0:0] is the sub-list for extension type_name 62 | 0, // [0:0] is the sub-list for extension extendee 63 | 0, // [0:0] is the sub-list for field type_name 64 | } 65 | 66 | func init() { file_v1_mirror_mirror_proto_init() } 67 | func file_v1_mirror_mirror_proto_init() { 68 | if File_v1_mirror_mirror_proto != nil { 69 | return 70 | } 71 | type x struct{} 72 | out := protoimpl.TypeBuilder{ 73 | File: protoimpl.DescBuilder{ 74 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 75 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_mirror_mirror_proto_rawDesc), len(file_v1_mirror_mirror_proto_rawDesc)), 76 | NumEnums: 0, 77 | NumMessages: 0, 78 | NumExtensions: 0, 79 | NumServices: 1, 80 | }, 81 | GoTypes: file_v1_mirror_mirror_proto_goTypes, 82 | DependencyIndexes: file_v1_mirror_mirror_proto_depIdxs, 83 | }.Build() 84 | File_v1_mirror_mirror_proto = out.File 85 | file_v1_mirror_mirror_proto_goTypes = nil 86 | file_v1_mirror_mirror_proto_depIdxs = nil 87 | } 88 | -------------------------------------------------------------------------------- /v1/mirror/mirror_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package mirror 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // MirrorClient is the client API for Mirror service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type MirrorClient interface { 45 | // Overview 46 | // Register RPC is the method to register other Vald Mirror Gateway targets. 47 | // --- 48 | // Status Code 49 | // | 0 | OK | 50 | // | 1 | CANCELLED | 51 | // | 3 | INVALID_ARGUMENT | 52 | // | 4 | DEADLINE_EXCEEDED | 53 | // | 13 | INTERNAL | 54 | Register(ctx context.Context, in *payload.Mirror_Targets, opts ...grpc.CallOption) (*payload.Mirror_Targets, error) 55 | } 56 | 57 | type mirrorClient struct { 58 | cc grpc.ClientConnInterface 59 | } 60 | 61 | func NewMirrorClient(cc grpc.ClientConnInterface) MirrorClient { 62 | return &mirrorClient{cc} 63 | } 64 | 65 | func (c *mirrorClient) Register( 66 | ctx context.Context, in *payload.Mirror_Targets, opts ...grpc.CallOption, 67 | ) (*payload.Mirror_Targets, error) { 68 | out := new(payload.Mirror_Targets) 69 | err := c.cc.Invoke(ctx, "/mirror.v1.Mirror/Register", in, out, opts...) 70 | if err != nil { 71 | return nil, err 72 | } 73 | return out, nil 74 | } 75 | 76 | // MirrorServer is the server API for Mirror service. 77 | // All implementations must embed UnimplementedMirrorServer 78 | // for forward compatibility 79 | type MirrorServer interface { 80 | // Overview 81 | // Register RPC is the method to register other Vald Mirror Gateway targets. 82 | // --- 83 | // Status Code 84 | // | 0 | OK | 85 | // | 1 | CANCELLED | 86 | // | 3 | INVALID_ARGUMENT | 87 | // | 4 | DEADLINE_EXCEEDED | 88 | // | 13 | INTERNAL | 89 | Register(context.Context, *payload.Mirror_Targets) (*payload.Mirror_Targets, error) 90 | mustEmbedUnimplementedMirrorServer() 91 | } 92 | 93 | // UnimplementedMirrorServer must be embedded to have forward compatible implementations. 94 | type UnimplementedMirrorServer struct{} 95 | 96 | func (UnimplementedMirrorServer) Register( 97 | context.Context, *payload.Mirror_Targets, 98 | ) (*payload.Mirror_Targets, error) { 99 | return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") 100 | } 101 | func (UnimplementedMirrorServer) mustEmbedUnimplementedMirrorServer() {} 102 | 103 | // UnsafeMirrorServer may be embedded to opt out of forward compatibility for this service. 104 | // Use of this interface is not recommended, as added methods to MirrorServer will 105 | // result in compilation errors. 106 | type UnsafeMirrorServer interface { 107 | mustEmbedUnimplementedMirrorServer() 108 | } 109 | 110 | func RegisterMirrorServer(s grpc.ServiceRegistrar, srv MirrorServer) { 111 | s.RegisterService(&Mirror_ServiceDesc, srv) 112 | } 113 | 114 | func _Mirror_Register_Handler( 115 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 116 | ) (any, error) { 117 | in := new(payload.Mirror_Targets) 118 | if err := dec(in); err != nil { 119 | return nil, err 120 | } 121 | if interceptor == nil { 122 | return srv.(MirrorServer).Register(ctx, in) 123 | } 124 | info := &grpc.UnaryServerInfo{ 125 | Server: srv, 126 | FullMethod: "/mirror.v1.Mirror/Register", 127 | } 128 | handler := func(ctx context.Context, req any) (any, error) { 129 | return srv.(MirrorServer).Register(ctx, req.(*payload.Mirror_Targets)) 130 | } 131 | return interceptor(ctx, in, info, handler) 132 | } 133 | 134 | // Mirror_ServiceDesc is the grpc.ServiceDesc for Mirror service. 135 | // It's only intended for direct use with grpc.RegisterService, 136 | // and not to be introspected or modified (even as a copy) 137 | var Mirror_ServiceDesc = grpc.ServiceDesc{ 138 | ServiceName: "mirror.v1.Mirror", 139 | HandlerType: (*MirrorServer)(nil), 140 | Methods: []grpc.MethodDesc{ 141 | { 142 | MethodName: "Register", 143 | Handler: _Mirror_Register_Handler, 144 | }, 145 | }, 146 | Streams: []grpc.StreamDesc{}, 147 | Metadata: "v1/mirror/mirror.proto", 148 | } 149 | -------------------------------------------------------------------------------- /v1/payload/interface.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019-2025 vdaas.org vald team 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // You may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | package payload 15 | 16 | import "google.golang.org/protobuf/reflect/protoreflect" 17 | 18 | type Payload interface { 19 | Reset() 20 | String() string 21 | ProtoMessage() 22 | ProtoReflect() protoreflect.Message 23 | Descriptor() ([]byte, []int) 24 | MarshalToSizedBufferVT(dAtA []byte) (int, error) 25 | MarshalToVT(dAtA []byte) (int, error) 26 | MarshalVT() (dAtA []byte, err error) 27 | SizeVT() (n int) 28 | UnmarshalVT(dAtA []byte) error 29 | } 30 | -------------------------------------------------------------------------------- /v1/vald/filter.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/filter.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_filter_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_filter_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/filter.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xac\n" + 47 | "\n" + 48 | "\x06Filter\x12h\n" + 49 | "\fSearchObject\x12 .payload.v1.Search.ObjectRequest\x1a\x1b.payload.v1.Search.Response\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/search/object\x12|\n" + 50 | "\x11MultiSearchObject\x12%.payload.v1.Search.MultiObjectRequest\x1a\x1c.payload.v1.Search.Responses\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/search/object/multiple\x12_\n" + 51 | "\x12StreamSearchObject\x12 .payload.v1.Search.ObjectRequest\x1a!.payload.v1.Search.StreamResponse\"\x00(\x010\x01\x12h\n" + 52 | "\fInsertObject\x12 .payload.v1.Insert.ObjectRequest\x1a\x1b.payload.v1.Object.Location\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/insert/object\x12_\n" + 53 | "\x12StreamInsertObject\x12 .payload.v1.Insert.ObjectRequest\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12|\n" + 54 | "\x11MultiInsertObject\x12%.payload.v1.Insert.MultiObjectRequest\x1a\x1c.payload.v1.Object.Locations\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/insert/object/multiple\x12h\n" + 55 | "\fUpdateObject\x12 .payload.v1.Update.ObjectRequest\x1a\x1b.payload.v1.Object.Location\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/update/object\x12_\n" + 56 | "\x12StreamUpdateObject\x12 .payload.v1.Update.ObjectRequest\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12|\n" + 57 | "\x11MultiUpdateObject\x12%.payload.v1.Update.MultiObjectRequest\x1a\x1c.payload.v1.Object.Locations\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/update/object/multiple\x12h\n" + 58 | "\fUpsertObject\x12 .payload.v1.Upsert.ObjectRequest\x1a\x1b.payload.v1.Object.Location\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/upsert/object\x12_\n" + 59 | "\x12StreamUpsertObject\x12 .payload.v1.Upsert.ObjectRequest\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12|\n" + 60 | "\x11MultiUpsertObject\x12%.payload.v1.Upsert.MultiObjectRequest\x1a\x1c.payload.v1.Object.Locations\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/upsert/object/multipleBS\n" + 61 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 62 | "ValdFilterP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 63 | 64 | var file_v1_vald_filter_proto_goTypes = []any{ 65 | (*payload.Search_ObjectRequest)(nil), // 0: payload.v1.Search.ObjectRequest 66 | (*payload.Search_MultiObjectRequest)(nil), // 1: payload.v1.Search.MultiObjectRequest 67 | (*payload.Insert_ObjectRequest)(nil), // 2: payload.v1.Insert.ObjectRequest 68 | (*payload.Insert_MultiObjectRequest)(nil), // 3: payload.v1.Insert.MultiObjectRequest 69 | (*payload.Update_ObjectRequest)(nil), // 4: payload.v1.Update.ObjectRequest 70 | (*payload.Update_MultiObjectRequest)(nil), // 5: payload.v1.Update.MultiObjectRequest 71 | (*payload.Upsert_ObjectRequest)(nil), // 6: payload.v1.Upsert.ObjectRequest 72 | (*payload.Upsert_MultiObjectRequest)(nil), // 7: payload.v1.Upsert.MultiObjectRequest 73 | (*payload.Search_Response)(nil), // 8: payload.v1.Search.Response 74 | (*payload.Search_Responses)(nil), // 9: payload.v1.Search.Responses 75 | (*payload.Search_StreamResponse)(nil), // 10: payload.v1.Search.StreamResponse 76 | (*payload.Object_Location)(nil), // 11: payload.v1.Object.Location 77 | (*payload.Object_StreamLocation)(nil), // 12: payload.v1.Object.StreamLocation 78 | (*payload.Object_Locations)(nil), // 13: payload.v1.Object.Locations 79 | } 80 | 81 | var file_v1_vald_filter_proto_depIdxs = []int32{ 82 | 0, // 0: vald.v1.Filter.SearchObject:input_type -> payload.v1.Search.ObjectRequest 83 | 1, // 1: vald.v1.Filter.MultiSearchObject:input_type -> payload.v1.Search.MultiObjectRequest 84 | 0, // 2: vald.v1.Filter.StreamSearchObject:input_type -> payload.v1.Search.ObjectRequest 85 | 2, // 3: vald.v1.Filter.InsertObject:input_type -> payload.v1.Insert.ObjectRequest 86 | 2, // 4: vald.v1.Filter.StreamInsertObject:input_type -> payload.v1.Insert.ObjectRequest 87 | 3, // 5: vald.v1.Filter.MultiInsertObject:input_type -> payload.v1.Insert.MultiObjectRequest 88 | 4, // 6: vald.v1.Filter.UpdateObject:input_type -> payload.v1.Update.ObjectRequest 89 | 4, // 7: vald.v1.Filter.StreamUpdateObject:input_type -> payload.v1.Update.ObjectRequest 90 | 5, // 8: vald.v1.Filter.MultiUpdateObject:input_type -> payload.v1.Update.MultiObjectRequest 91 | 6, // 9: vald.v1.Filter.UpsertObject:input_type -> payload.v1.Upsert.ObjectRequest 92 | 6, // 10: vald.v1.Filter.StreamUpsertObject:input_type -> payload.v1.Upsert.ObjectRequest 93 | 7, // 11: vald.v1.Filter.MultiUpsertObject:input_type -> payload.v1.Upsert.MultiObjectRequest 94 | 8, // 12: vald.v1.Filter.SearchObject:output_type -> payload.v1.Search.Response 95 | 9, // 13: vald.v1.Filter.MultiSearchObject:output_type -> payload.v1.Search.Responses 96 | 10, // 14: vald.v1.Filter.StreamSearchObject:output_type -> payload.v1.Search.StreamResponse 97 | 11, // 15: vald.v1.Filter.InsertObject:output_type -> payload.v1.Object.Location 98 | 12, // 16: vald.v1.Filter.StreamInsertObject:output_type -> payload.v1.Object.StreamLocation 99 | 13, // 17: vald.v1.Filter.MultiInsertObject:output_type -> payload.v1.Object.Locations 100 | 11, // 18: vald.v1.Filter.UpdateObject:output_type -> payload.v1.Object.Location 101 | 12, // 19: vald.v1.Filter.StreamUpdateObject:output_type -> payload.v1.Object.StreamLocation 102 | 13, // 20: vald.v1.Filter.MultiUpdateObject:output_type -> payload.v1.Object.Locations 103 | 11, // 21: vald.v1.Filter.UpsertObject:output_type -> payload.v1.Object.Location 104 | 12, // 22: vald.v1.Filter.StreamUpsertObject:output_type -> payload.v1.Object.StreamLocation 105 | 13, // 23: vald.v1.Filter.MultiUpsertObject:output_type -> payload.v1.Object.Locations 106 | 12, // [12:24] is the sub-list for method output_type 107 | 0, // [0:12] is the sub-list for method input_type 108 | 0, // [0:0] is the sub-list for extension type_name 109 | 0, // [0:0] is the sub-list for extension extendee 110 | 0, // [0:0] is the sub-list for field type_name 111 | } 112 | 113 | func init() { file_v1_vald_filter_proto_init() } 114 | func file_v1_vald_filter_proto_init() { 115 | if File_v1_vald_filter_proto != nil { 116 | return 117 | } 118 | type x struct{} 119 | out := protoimpl.TypeBuilder{ 120 | File: protoimpl.DescBuilder{ 121 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 122 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_filter_proto_rawDesc), len(file_v1_vald_filter_proto_rawDesc)), 123 | NumEnums: 0, 124 | NumMessages: 0, 125 | NumExtensions: 0, 126 | NumServices: 1, 127 | }, 128 | GoTypes: file_v1_vald_filter_proto_goTypes, 129 | DependencyIndexes: file_v1_vald_filter_proto_depIdxs, 130 | }.Build() 131 | File_v1_vald_filter_proto = out.File 132 | file_v1_vald_filter_proto_goTypes = nil 133 | file_v1_vald_filter_proto_depIdxs = nil 134 | } 135 | -------------------------------------------------------------------------------- /v1/vald/flush.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/flush.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_flush_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_flush_proto_rawDesc = "" + 45 | "\n" + 46 | "\x13v1/vald/flush.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2Y\n" + 47 | "\x05Flush\x12P\n" + 48 | "\x05Flush\x12\x19.payload.v1.Flush.Request\x1a\x1c.payload.v1.Info.Index.Count\"\x0e\x82\xd3\xe4\x93\x02\b*\x06/flushBR\n" + 49 | "\x1aorg.vdaas.vald.api.v1.valdB\tValdFlushP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 50 | 51 | var file_v1_vald_flush_proto_goTypes = []any{ 52 | (*payload.Flush_Request)(nil), // 0: payload.v1.Flush.Request 53 | (*payload.Info_Index_Count)(nil), // 1: payload.v1.Info.Index.Count 54 | } 55 | 56 | var file_v1_vald_flush_proto_depIdxs = []int32{ 57 | 0, // 0: vald.v1.Flush.Flush:input_type -> payload.v1.Flush.Request 58 | 1, // 1: vald.v1.Flush.Flush:output_type -> payload.v1.Info.Index.Count 59 | 1, // [1:2] is the sub-list for method output_type 60 | 0, // [0:1] is the sub-list for method input_type 61 | 0, // [0:0] is the sub-list for extension type_name 62 | 0, // [0:0] is the sub-list for extension extendee 63 | 0, // [0:0] is the sub-list for field type_name 64 | } 65 | 66 | func init() { file_v1_vald_flush_proto_init() } 67 | func file_v1_vald_flush_proto_init() { 68 | if File_v1_vald_flush_proto != nil { 69 | return 70 | } 71 | type x struct{} 72 | out := protoimpl.TypeBuilder{ 73 | File: protoimpl.DescBuilder{ 74 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 75 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_flush_proto_rawDesc), len(file_v1_vald_flush_proto_rawDesc)), 76 | NumEnums: 0, 77 | NumMessages: 0, 78 | NumExtensions: 0, 79 | NumServices: 1, 80 | }, 81 | GoTypes: file_v1_vald_flush_proto_goTypes, 82 | DependencyIndexes: file_v1_vald_flush_proto_depIdxs, 83 | }.Build() 84 | File_v1_vald_flush_proto = out.File 85 | file_v1_vald_flush_proto_goTypes = nil 86 | file_v1_vald_flush_proto_depIdxs = nil 87 | } 88 | -------------------------------------------------------------------------------- /v1/vald/flush_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package vald 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // FlushClient is the client API for Flush service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type FlushClient interface { 45 | // Overview 46 | // Flush RPC is the method to remove all vectors. 47 | // --- 48 | // Status Code 49 | // | 0 | OK | 50 | // | 1 | CANCELLED | 51 | // | 3 | INVALID_ARGUMENT | 52 | // | 4 | DEADLINE_EXCEEDED | 53 | // | 5 | NOT_FOUND | 54 | // | 13 | INTERNAL | 55 | Flush(ctx context.Context, in *payload.Flush_Request, opts ...grpc.CallOption) (*payload.Info_Index_Count, error) 56 | } 57 | 58 | type flushClient struct { 59 | cc grpc.ClientConnInterface 60 | } 61 | 62 | func NewFlushClient(cc grpc.ClientConnInterface) FlushClient { 63 | return &flushClient{cc} 64 | } 65 | 66 | func (c *flushClient) Flush( 67 | ctx context.Context, in *payload.Flush_Request, opts ...grpc.CallOption, 68 | ) (*payload.Info_Index_Count, error) { 69 | out := new(payload.Info_Index_Count) 70 | err := c.cc.Invoke(ctx, "/vald.v1.Flush/Flush", in, out, opts...) 71 | if err != nil { 72 | return nil, err 73 | } 74 | return out, nil 75 | } 76 | 77 | // FlushServer is the server API for Flush service. 78 | // All implementations must embed UnimplementedFlushServer 79 | // for forward compatibility 80 | type FlushServer interface { 81 | // Overview 82 | // Flush RPC is the method to remove all vectors. 83 | // --- 84 | // Status Code 85 | // | 0 | OK | 86 | // | 1 | CANCELLED | 87 | // | 3 | INVALID_ARGUMENT | 88 | // | 4 | DEADLINE_EXCEEDED | 89 | // | 5 | NOT_FOUND | 90 | // | 13 | INTERNAL | 91 | Flush(context.Context, *payload.Flush_Request) (*payload.Info_Index_Count, error) 92 | mustEmbedUnimplementedFlushServer() 93 | } 94 | 95 | // UnimplementedFlushServer must be embedded to have forward compatible implementations. 96 | type UnimplementedFlushServer struct{} 97 | 98 | func (UnimplementedFlushServer) Flush( 99 | context.Context, *payload.Flush_Request, 100 | ) (*payload.Info_Index_Count, error) { 101 | return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") 102 | } 103 | func (UnimplementedFlushServer) mustEmbedUnimplementedFlushServer() {} 104 | 105 | // UnsafeFlushServer may be embedded to opt out of forward compatibility for this service. 106 | // Use of this interface is not recommended, as added methods to FlushServer will 107 | // result in compilation errors. 108 | type UnsafeFlushServer interface { 109 | mustEmbedUnimplementedFlushServer() 110 | } 111 | 112 | func RegisterFlushServer(s grpc.ServiceRegistrar, srv FlushServer) { 113 | s.RegisterService(&Flush_ServiceDesc, srv) 114 | } 115 | 116 | func _Flush_Flush_Handler( 117 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 118 | ) (any, error) { 119 | in := new(payload.Flush_Request) 120 | if err := dec(in); err != nil { 121 | return nil, err 122 | } 123 | if interceptor == nil { 124 | return srv.(FlushServer).Flush(ctx, in) 125 | } 126 | info := &grpc.UnaryServerInfo{ 127 | Server: srv, 128 | FullMethod: "/vald.v1.Flush/Flush", 129 | } 130 | handler := func(ctx context.Context, req any) (any, error) { 131 | return srv.(FlushServer).Flush(ctx, req.(*payload.Flush_Request)) 132 | } 133 | return interceptor(ctx, in, info, handler) 134 | } 135 | 136 | // Flush_ServiceDesc is the grpc.ServiceDesc for Flush service. 137 | // It's only intended for direct use with grpc.RegisterService, 138 | // and not to be introspected or modified (even as a copy) 139 | var Flush_ServiceDesc = grpc.ServiceDesc{ 140 | ServiceName: "vald.v1.Flush", 141 | HandlerType: (*FlushServer)(nil), 142 | Methods: []grpc.MethodDesc{ 143 | { 144 | MethodName: "Flush", 145 | Handler: _Flush_Flush_Handler, 146 | }, 147 | }, 148 | Streams: []grpc.StreamDesc{}, 149 | Metadata: "v1/vald/flush.proto", 150 | } 151 | -------------------------------------------------------------------------------- /v1/vald/index.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/index.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_index_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_index_proto_rawDesc = "" + 45 | "\n" + 46 | "\x13v1/vald/index.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xf1\x03\n" + 47 | "\x05Index\x12Q\n" + 48 | "\tIndexInfo\x12\x11.payload.v1.Empty\x1a\x1c.payload.v1.Info.Index.Count\"\x13\x82\xd3\xe4\x93\x02\r\x12\v/index/info\x12V\n" + 49 | "\vIndexDetail\x12\x11.payload.v1.Empty\x1a\x1d.payload.v1.Info.Index.Detail\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/index/detail\x12b\n" + 50 | "\x0fIndexStatistics\x12\x11.payload.v1.Empty\x1a!.payload.v1.Info.Index.Statistics\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/index/statistics\x12u\n" + 51 | "\x15IndexStatisticsDetail\x12\x11.payload.v1.Empty\x1a'.payload.v1.Info.Index.StatisticsDetail\" \x82\xd3\xe4\x93\x02\x1a\x12\x18/index/statistics/detail\x12b\n" + 52 | "\rIndexProperty\x12\x11.payload.v1.Empty\x1a%.payload.v1.Info.Index.PropertyDetail\"\x17\x82\xd3\xe4\x93\x02\x11\x12\x0f/index/propertyBR\n" + 53 | "\x1aorg.vdaas.vald.api.v1.valdB\tValdIndexP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 54 | 55 | var file_v1_vald_index_proto_goTypes = []any{ 56 | (*payload.Empty)(nil), // 0: payload.v1.Empty 57 | (*payload.Info_Index_Count)(nil), // 1: payload.v1.Info.Index.Count 58 | (*payload.Info_Index_Detail)(nil), // 2: payload.v1.Info.Index.Detail 59 | (*payload.Info_Index_Statistics)(nil), // 3: payload.v1.Info.Index.Statistics 60 | (*payload.Info_Index_StatisticsDetail)(nil), // 4: payload.v1.Info.Index.StatisticsDetail 61 | (*payload.Info_Index_PropertyDetail)(nil), // 5: payload.v1.Info.Index.PropertyDetail 62 | } 63 | 64 | var file_v1_vald_index_proto_depIdxs = []int32{ 65 | 0, // 0: vald.v1.Index.IndexInfo:input_type -> payload.v1.Empty 66 | 0, // 1: vald.v1.Index.IndexDetail:input_type -> payload.v1.Empty 67 | 0, // 2: vald.v1.Index.IndexStatistics:input_type -> payload.v1.Empty 68 | 0, // 3: vald.v1.Index.IndexStatisticsDetail:input_type -> payload.v1.Empty 69 | 0, // 4: vald.v1.Index.IndexProperty:input_type -> payload.v1.Empty 70 | 1, // 5: vald.v1.Index.IndexInfo:output_type -> payload.v1.Info.Index.Count 71 | 2, // 6: vald.v1.Index.IndexDetail:output_type -> payload.v1.Info.Index.Detail 72 | 3, // 7: vald.v1.Index.IndexStatistics:output_type -> payload.v1.Info.Index.Statistics 73 | 4, // 8: vald.v1.Index.IndexStatisticsDetail:output_type -> payload.v1.Info.Index.StatisticsDetail 74 | 5, // 9: vald.v1.Index.IndexProperty:output_type -> payload.v1.Info.Index.PropertyDetail 75 | 5, // [5:10] is the sub-list for method output_type 76 | 0, // [0:5] is the sub-list for method input_type 77 | 0, // [0:0] is the sub-list for extension type_name 78 | 0, // [0:0] is the sub-list for extension extendee 79 | 0, // [0:0] is the sub-list for field type_name 80 | } 81 | 82 | func init() { file_v1_vald_index_proto_init() } 83 | func file_v1_vald_index_proto_init() { 84 | if File_v1_vald_index_proto != nil { 85 | return 86 | } 87 | type x struct{} 88 | out := protoimpl.TypeBuilder{ 89 | File: protoimpl.DescBuilder{ 90 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 91 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_index_proto_rawDesc), len(file_v1_vald_index_proto_rawDesc)), 92 | NumEnums: 0, 93 | NumMessages: 0, 94 | NumExtensions: 0, 95 | NumServices: 1, 96 | }, 97 | GoTypes: file_v1_vald_index_proto_goTypes, 98 | DependencyIndexes: file_v1_vald_index_proto_depIdxs, 99 | }.Build() 100 | File_v1_vald_index_proto = out.File 101 | file_v1_vald_index_proto_goTypes = nil 102 | file_v1_vald_index_proto_depIdxs = nil 103 | } 104 | -------------------------------------------------------------------------------- /v1/vald/index_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package vald 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // IndexClient is the client API for Index service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type IndexClient interface { 45 | // Overview 46 | // Represent the RPC to get the index information. 47 | IndexInfo(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Count, error) 48 | // Overview 49 | // Represent the RPC to get the index information for each agents. 50 | IndexDetail(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Detail, error) 51 | // Overview 52 | // Represent the RPC to get the index statistics. 53 | IndexStatistics(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Statistics, error) 54 | // Overview 55 | // Represent the RPC to get the index statistics for each agents. 56 | IndexStatisticsDetail(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_StatisticsDetail, error) 57 | // Overview 58 | // Represent the RPC to get the index property. 59 | IndexProperty(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_PropertyDetail, error) 60 | } 61 | 62 | type indexClient struct { 63 | cc grpc.ClientConnInterface 64 | } 65 | 66 | func NewIndexClient(cc grpc.ClientConnInterface) IndexClient { 67 | return &indexClient{cc} 68 | } 69 | 70 | func (c *indexClient) IndexInfo( 71 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 72 | ) (*payload.Info_Index_Count, error) { 73 | out := new(payload.Info_Index_Count) 74 | err := c.cc.Invoke(ctx, "/vald.v1.Index/IndexInfo", in, out, opts...) 75 | if err != nil { 76 | return nil, err 77 | } 78 | return out, nil 79 | } 80 | 81 | func (c *indexClient) IndexDetail( 82 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 83 | ) (*payload.Info_Index_Detail, error) { 84 | out := new(payload.Info_Index_Detail) 85 | err := c.cc.Invoke(ctx, "/vald.v1.Index/IndexDetail", in, out, opts...) 86 | if err != nil { 87 | return nil, err 88 | } 89 | return out, nil 90 | } 91 | 92 | func (c *indexClient) IndexStatistics( 93 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 94 | ) (*payload.Info_Index_Statistics, error) { 95 | out := new(payload.Info_Index_Statistics) 96 | err := c.cc.Invoke(ctx, "/vald.v1.Index/IndexStatistics", in, out, opts...) 97 | if err != nil { 98 | return nil, err 99 | } 100 | return out, nil 101 | } 102 | 103 | func (c *indexClient) IndexStatisticsDetail( 104 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 105 | ) (*payload.Info_Index_StatisticsDetail, error) { 106 | out := new(payload.Info_Index_StatisticsDetail) 107 | err := c.cc.Invoke(ctx, "/vald.v1.Index/IndexStatisticsDetail", in, out, opts...) 108 | if err != nil { 109 | return nil, err 110 | } 111 | return out, nil 112 | } 113 | 114 | func (c *indexClient) IndexProperty( 115 | ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, 116 | ) (*payload.Info_Index_PropertyDetail, error) { 117 | out := new(payload.Info_Index_PropertyDetail) 118 | err := c.cc.Invoke(ctx, "/vald.v1.Index/IndexProperty", in, out, opts...) 119 | if err != nil { 120 | return nil, err 121 | } 122 | return out, nil 123 | } 124 | 125 | // IndexServer is the server API for Index service. 126 | // All implementations must embed UnimplementedIndexServer 127 | // for forward compatibility 128 | type IndexServer interface { 129 | // Overview 130 | // Represent the RPC to get the index information. 131 | IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error) 132 | // Overview 133 | // Represent the RPC to get the index information for each agents. 134 | IndexDetail(context.Context, *payload.Empty) (*payload.Info_Index_Detail, error) 135 | // Overview 136 | // Represent the RPC to get the index statistics. 137 | IndexStatistics(context.Context, *payload.Empty) (*payload.Info_Index_Statistics, error) 138 | // Overview 139 | // Represent the RPC to get the index statistics for each agents. 140 | IndexStatisticsDetail(context.Context, *payload.Empty) (*payload.Info_Index_StatisticsDetail, error) 141 | // Overview 142 | // Represent the RPC to get the index property. 143 | IndexProperty(context.Context, *payload.Empty) (*payload.Info_Index_PropertyDetail, error) 144 | mustEmbedUnimplementedIndexServer() 145 | } 146 | 147 | // UnimplementedIndexServer must be embedded to have forward compatible implementations. 148 | type UnimplementedIndexServer struct{} 149 | 150 | func (UnimplementedIndexServer) IndexInfo( 151 | context.Context, *payload.Empty, 152 | ) (*payload.Info_Index_Count, error) { 153 | return nil, status.Errorf(codes.Unimplemented, "method IndexInfo not implemented") 154 | } 155 | 156 | func (UnimplementedIndexServer) IndexDetail( 157 | context.Context, *payload.Empty, 158 | ) (*payload.Info_Index_Detail, error) { 159 | return nil, status.Errorf(codes.Unimplemented, "method IndexDetail not implemented") 160 | } 161 | 162 | func (UnimplementedIndexServer) IndexStatistics( 163 | context.Context, *payload.Empty, 164 | ) (*payload.Info_Index_Statistics, error) { 165 | return nil, status.Errorf(codes.Unimplemented, "method IndexStatistics not implemented") 166 | } 167 | 168 | func (UnimplementedIndexServer) IndexStatisticsDetail( 169 | context.Context, *payload.Empty, 170 | ) (*payload.Info_Index_StatisticsDetail, error) { 171 | return nil, status.Errorf(codes.Unimplemented, "method IndexStatisticsDetail not implemented") 172 | } 173 | 174 | func (UnimplementedIndexServer) IndexProperty( 175 | context.Context, *payload.Empty, 176 | ) (*payload.Info_Index_PropertyDetail, error) { 177 | return nil, status.Errorf(codes.Unimplemented, "method IndexProperty not implemented") 178 | } 179 | func (UnimplementedIndexServer) mustEmbedUnimplementedIndexServer() {} 180 | 181 | // UnsafeIndexServer may be embedded to opt out of forward compatibility for this service. 182 | // Use of this interface is not recommended, as added methods to IndexServer will 183 | // result in compilation errors. 184 | type UnsafeIndexServer interface { 185 | mustEmbedUnimplementedIndexServer() 186 | } 187 | 188 | func RegisterIndexServer(s grpc.ServiceRegistrar, srv IndexServer) { 189 | s.RegisterService(&Index_ServiceDesc, srv) 190 | } 191 | 192 | func _Index_IndexInfo_Handler( 193 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 194 | ) (any, error) { 195 | in := new(payload.Empty) 196 | if err := dec(in); err != nil { 197 | return nil, err 198 | } 199 | if interceptor == nil { 200 | return srv.(IndexServer).IndexInfo(ctx, in) 201 | } 202 | info := &grpc.UnaryServerInfo{ 203 | Server: srv, 204 | FullMethod: "/vald.v1.Index/IndexInfo", 205 | } 206 | handler := func(ctx context.Context, req any) (any, error) { 207 | return srv.(IndexServer).IndexInfo(ctx, req.(*payload.Empty)) 208 | } 209 | return interceptor(ctx, in, info, handler) 210 | } 211 | 212 | func _Index_IndexDetail_Handler( 213 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 214 | ) (any, error) { 215 | in := new(payload.Empty) 216 | if err := dec(in); err != nil { 217 | return nil, err 218 | } 219 | if interceptor == nil { 220 | return srv.(IndexServer).IndexDetail(ctx, in) 221 | } 222 | info := &grpc.UnaryServerInfo{ 223 | Server: srv, 224 | FullMethod: "/vald.v1.Index/IndexDetail", 225 | } 226 | handler := func(ctx context.Context, req any) (any, error) { 227 | return srv.(IndexServer).IndexDetail(ctx, req.(*payload.Empty)) 228 | } 229 | return interceptor(ctx, in, info, handler) 230 | } 231 | 232 | func _Index_IndexStatistics_Handler( 233 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 234 | ) (any, error) { 235 | in := new(payload.Empty) 236 | if err := dec(in); err != nil { 237 | return nil, err 238 | } 239 | if interceptor == nil { 240 | return srv.(IndexServer).IndexStatistics(ctx, in) 241 | } 242 | info := &grpc.UnaryServerInfo{ 243 | Server: srv, 244 | FullMethod: "/vald.v1.Index/IndexStatistics", 245 | } 246 | handler := func(ctx context.Context, req any) (any, error) { 247 | return srv.(IndexServer).IndexStatistics(ctx, req.(*payload.Empty)) 248 | } 249 | return interceptor(ctx, in, info, handler) 250 | } 251 | 252 | func _Index_IndexStatisticsDetail_Handler( 253 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 254 | ) (any, error) { 255 | in := new(payload.Empty) 256 | if err := dec(in); err != nil { 257 | return nil, err 258 | } 259 | if interceptor == nil { 260 | return srv.(IndexServer).IndexStatisticsDetail(ctx, in) 261 | } 262 | info := &grpc.UnaryServerInfo{ 263 | Server: srv, 264 | FullMethod: "/vald.v1.Index/IndexStatisticsDetail", 265 | } 266 | handler := func(ctx context.Context, req any) (any, error) { 267 | return srv.(IndexServer).IndexStatisticsDetail(ctx, req.(*payload.Empty)) 268 | } 269 | return interceptor(ctx, in, info, handler) 270 | } 271 | 272 | func _Index_IndexProperty_Handler( 273 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 274 | ) (any, error) { 275 | in := new(payload.Empty) 276 | if err := dec(in); err != nil { 277 | return nil, err 278 | } 279 | if interceptor == nil { 280 | return srv.(IndexServer).IndexProperty(ctx, in) 281 | } 282 | info := &grpc.UnaryServerInfo{ 283 | Server: srv, 284 | FullMethod: "/vald.v1.Index/IndexProperty", 285 | } 286 | handler := func(ctx context.Context, req any) (any, error) { 287 | return srv.(IndexServer).IndexProperty(ctx, req.(*payload.Empty)) 288 | } 289 | return interceptor(ctx, in, info, handler) 290 | } 291 | 292 | // Index_ServiceDesc is the grpc.ServiceDesc for Index service. 293 | // It's only intended for direct use with grpc.RegisterService, 294 | // and not to be introspected or modified (even as a copy) 295 | var Index_ServiceDesc = grpc.ServiceDesc{ 296 | ServiceName: "vald.v1.Index", 297 | HandlerType: (*IndexServer)(nil), 298 | Methods: []grpc.MethodDesc{ 299 | { 300 | MethodName: "IndexInfo", 301 | Handler: _Index_IndexInfo_Handler, 302 | }, 303 | { 304 | MethodName: "IndexDetail", 305 | Handler: _Index_IndexDetail_Handler, 306 | }, 307 | { 308 | MethodName: "IndexStatistics", 309 | Handler: _Index_IndexStatistics_Handler, 310 | }, 311 | { 312 | MethodName: "IndexStatisticsDetail", 313 | Handler: _Index_IndexStatisticsDetail_Handler, 314 | }, 315 | { 316 | MethodName: "IndexProperty", 317 | Handler: _Index_IndexProperty_Handler, 318 | }, 319 | }, 320 | Streams: []grpc.StreamDesc{}, 321 | Metadata: "v1/vald/index.proto", 322 | } 323 | -------------------------------------------------------------------------------- /v1/vald/insert.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/insert.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_insert_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_insert_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/insert.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\x9f\x02\n" + 47 | "\x06Insert\x12U\n" + 48 | "\x06Insert\x12\x1a.payload.v1.Insert.Request\x1a\x1b.payload.v1.Object.Location\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/insert\x12S\n" + 49 | "\fStreamInsert\x12\x1a.payload.v1.Insert.Request\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12i\n" + 50 | "\vMultiInsert\x12\x1f.payload.v1.Insert.MultiRequest\x1a\x1c.payload.v1.Object.Locations\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/insert/multipleBS\n" + 51 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 52 | "ValdInsertP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 53 | 54 | var file_v1_vald_insert_proto_goTypes = []any{ 55 | (*payload.Insert_Request)(nil), // 0: payload.v1.Insert.Request 56 | (*payload.Insert_MultiRequest)(nil), // 1: payload.v1.Insert.MultiRequest 57 | (*payload.Object_Location)(nil), // 2: payload.v1.Object.Location 58 | (*payload.Object_StreamLocation)(nil), // 3: payload.v1.Object.StreamLocation 59 | (*payload.Object_Locations)(nil), // 4: payload.v1.Object.Locations 60 | } 61 | 62 | var file_v1_vald_insert_proto_depIdxs = []int32{ 63 | 0, // 0: vald.v1.Insert.Insert:input_type -> payload.v1.Insert.Request 64 | 0, // 1: vald.v1.Insert.StreamInsert:input_type -> payload.v1.Insert.Request 65 | 1, // 2: vald.v1.Insert.MultiInsert:input_type -> payload.v1.Insert.MultiRequest 66 | 2, // 3: vald.v1.Insert.Insert:output_type -> payload.v1.Object.Location 67 | 3, // 4: vald.v1.Insert.StreamInsert:output_type -> payload.v1.Object.StreamLocation 68 | 4, // 5: vald.v1.Insert.MultiInsert:output_type -> payload.v1.Object.Locations 69 | 3, // [3:6] is the sub-list for method output_type 70 | 0, // [0:3] is the sub-list for method input_type 71 | 0, // [0:0] is the sub-list for extension type_name 72 | 0, // [0:0] is the sub-list for extension extendee 73 | 0, // [0:0] is the sub-list for field type_name 74 | } 75 | 76 | func init() { file_v1_vald_insert_proto_init() } 77 | func file_v1_vald_insert_proto_init() { 78 | if File_v1_vald_insert_proto != nil { 79 | return 80 | } 81 | type x struct{} 82 | out := protoimpl.TypeBuilder{ 83 | File: protoimpl.DescBuilder{ 84 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 85 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_insert_proto_rawDesc), len(file_v1_vald_insert_proto_rawDesc)), 86 | NumEnums: 0, 87 | NumMessages: 0, 88 | NumExtensions: 0, 89 | NumServices: 1, 90 | }, 91 | GoTypes: file_v1_vald_insert_proto_goTypes, 92 | DependencyIndexes: file_v1_vald_insert_proto_depIdxs, 93 | }.Build() 94 | File_v1_vald_insert_proto = out.File 95 | file_v1_vald_insert_proto_goTypes = nil 96 | file_v1_vald_insert_proto_depIdxs = nil 97 | } 98 | -------------------------------------------------------------------------------- /v1/vald/insert_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package vald 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // InsertClient is the client API for Insert service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type InsertClient interface { 45 | // Overview 46 | // Insert RPC is the method to add a new single vector. 47 | // --- 48 | // Status Code 49 | // | 0 | OK | 50 | // | 1 | CANCELLED | 51 | // | 3 | INVALID_ARGUMENT | 52 | // | 4 | DEADLINE_EXCEEDED | 53 | // | 5 | NOT_FOUND | 54 | // | 13 | INTERNAL | 55 | // --- 56 | // Troubleshooting 57 | // The request process may not be completed when the response code is NOT `0 (OK)`. 58 | // 59 | // Here are some common reasons and how to resolve each error. 60 | // 61 | // | name | common reason | how to resolve | 62 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 63 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 64 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 65 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 66 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 67 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 68 | Insert(ctx context.Context, in *payload.Insert_Request, opts ...grpc.CallOption) (*payload.Object_Location, error) 69 | // Overview 70 | // StreamInsert RPC is the method to add new multiple vectors using the [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc).
71 | // Using the bidirectional streaming RPC, the insert request can be communicated in any order between client and server. 72 | // Each Insert request and response are independent. 73 | // It's the recommended method to insert a large number of vectors. 74 | // --- 75 | // Status Code 76 | // | 0 | OK | 77 | // | 1 | CANCELLED | 78 | // | 3 | INVALID_ARGUMENT | 79 | // | 4 | DEADLINE_EXCEEDED | 80 | // | 6 | ALREADY_EXISTS | 81 | // | 10 | ABORTED | 82 | // | 13 | INTERNAL | 83 | // --- 84 | // Troubleshooting 85 | // The request process may not be completed when the response code is NOT `0 (OK)`. 86 | // 87 | // Here are some common reasons and how to resolve each error. 88 | // 89 | // | name | common reason | how to resolve | 90 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 91 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 92 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 93 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 94 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 95 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 96 | StreamInsert(ctx context.Context, opts ...grpc.CallOption) (Insert_StreamInsertClient, error) 97 | // Overview 98 | // MultiInsert RPC is the method to add multiple new vectors in **1** request. 99 | // 100 | //
101 | // gRPC has a message size limitation.
102 | // Please be careful that the size of the request exceeds the limit. 103 | //
104 | // --- 105 | // Status Code 106 | // | 0 | OK | 107 | // | 1 | CANCELLED | 108 | // | 3 | INVALID_ARGUMENT | 109 | // | 4 | DEADLINE_EXCEEDED | 110 | // | 6 | ALREADY_EXISTS | 111 | // | 10 | ABORTED | 112 | // | 13 | INTERNAL | 113 | // --- 114 | // Troubleshooting 115 | // The request process may not be completed when the response code is NOT `0 (OK)`. 116 | // 117 | // Here are some common reasons and how to resolve each error. 118 | // 119 | // | name | common reason | how to resolve | 120 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 121 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 122 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 123 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 124 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 125 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 126 | MultiInsert(ctx context.Context, in *payload.Insert_MultiRequest, opts ...grpc.CallOption) (*payload.Object_Locations, error) 127 | } 128 | 129 | type insertClient struct { 130 | cc grpc.ClientConnInterface 131 | } 132 | 133 | func NewInsertClient(cc grpc.ClientConnInterface) InsertClient { 134 | return &insertClient{cc} 135 | } 136 | 137 | func (c *insertClient) Insert( 138 | ctx context.Context, in *payload.Insert_Request, opts ...grpc.CallOption, 139 | ) (*payload.Object_Location, error) { 140 | out := new(payload.Object_Location) 141 | err := c.cc.Invoke(ctx, "/vald.v1.Insert/Insert", in, out, opts...) 142 | if err != nil { 143 | return nil, err 144 | } 145 | return out, nil 146 | } 147 | 148 | func (c *insertClient) StreamInsert( 149 | ctx context.Context, opts ...grpc.CallOption, 150 | ) (Insert_StreamInsertClient, error) { 151 | stream, err := c.cc.NewStream(ctx, &Insert_ServiceDesc.Streams[0], "/vald.v1.Insert/StreamInsert", opts...) 152 | if err != nil { 153 | return nil, err 154 | } 155 | x := &insertStreamInsertClient{stream} 156 | return x, nil 157 | } 158 | 159 | type Insert_StreamInsertClient interface { 160 | Send(*payload.Insert_Request) error 161 | Recv() (*payload.Object_StreamLocation, error) 162 | grpc.ClientStream 163 | } 164 | 165 | type insertStreamInsertClient struct { 166 | grpc.ClientStream 167 | } 168 | 169 | func (x *insertStreamInsertClient) Send(m *payload.Insert_Request) error { 170 | return x.ClientStream.SendMsg(m) 171 | } 172 | 173 | func (x *insertStreamInsertClient) Recv() (*payload.Object_StreamLocation, error) { 174 | m := new(payload.Object_StreamLocation) 175 | if err := x.ClientStream.RecvMsg(m); err != nil { 176 | return nil, err 177 | } 178 | return m, nil 179 | } 180 | 181 | func (c *insertClient) MultiInsert( 182 | ctx context.Context, in *payload.Insert_MultiRequest, opts ...grpc.CallOption, 183 | ) (*payload.Object_Locations, error) { 184 | out := new(payload.Object_Locations) 185 | err := c.cc.Invoke(ctx, "/vald.v1.Insert/MultiInsert", in, out, opts...) 186 | if err != nil { 187 | return nil, err 188 | } 189 | return out, nil 190 | } 191 | 192 | // InsertServer is the server API for Insert service. 193 | // All implementations must embed UnimplementedInsertServer 194 | // for forward compatibility 195 | type InsertServer interface { 196 | // Overview 197 | // Insert RPC is the method to add a new single vector. 198 | // --- 199 | // Status Code 200 | // | 0 | OK | 201 | // | 1 | CANCELLED | 202 | // | 3 | INVALID_ARGUMENT | 203 | // | 4 | DEADLINE_EXCEEDED | 204 | // | 5 | NOT_FOUND | 205 | // | 13 | INTERNAL | 206 | // --- 207 | // Troubleshooting 208 | // The request process may not be completed when the response code is NOT `0 (OK)`. 209 | // 210 | // Here are some common reasons and how to resolve each error. 211 | // 212 | // | name | common reason | how to resolve | 213 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 214 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 215 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 216 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 217 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 218 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 219 | Insert(context.Context, *payload.Insert_Request) (*payload.Object_Location, error) 220 | // Overview 221 | // StreamInsert RPC is the method to add new multiple vectors using the [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc).
222 | // Using the bidirectional streaming RPC, the insert request can be communicated in any order between client and server. 223 | // Each Insert request and response are independent. 224 | // It's the recommended method to insert a large number of vectors. 225 | // --- 226 | // Status Code 227 | // | 0 | OK | 228 | // | 1 | CANCELLED | 229 | // | 3 | INVALID_ARGUMENT | 230 | // | 4 | DEADLINE_EXCEEDED | 231 | // | 6 | ALREADY_EXISTS | 232 | // | 10 | ABORTED | 233 | // | 13 | INTERNAL | 234 | // --- 235 | // Troubleshooting 236 | // The request process may not be completed when the response code is NOT `0 (OK)`. 237 | // 238 | // Here are some common reasons and how to resolve each error. 239 | // 240 | // | name | common reason | how to resolve | 241 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 242 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 243 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 244 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 245 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 246 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 247 | StreamInsert(Insert_StreamInsertServer) error 248 | // Overview 249 | // MultiInsert RPC is the method to add multiple new vectors in **1** request. 250 | // 251 | //
252 | // gRPC has a message size limitation.
253 | // Please be careful that the size of the request exceeds the limit. 254 | //
255 | // --- 256 | // Status Code 257 | // | 0 | OK | 258 | // | 1 | CANCELLED | 259 | // | 3 | INVALID_ARGUMENT | 260 | // | 4 | DEADLINE_EXCEEDED | 261 | // | 6 | ALREADY_EXISTS | 262 | // | 10 | ABORTED | 263 | // | 13 | INTERNAL | 264 | // --- 265 | // Troubleshooting 266 | // The request process may not be completed when the response code is NOT `0 (OK)`. 267 | // 268 | // Here are some common reasons and how to resolve each error. 269 | // 270 | // | name | common reason | how to resolve | 271 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 272 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 273 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 274 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 275 | // | ALREADY_EXISTS | Request ID is already inserted. | Change request ID. | 276 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 277 | MultiInsert(context.Context, *payload.Insert_MultiRequest) (*payload.Object_Locations, error) 278 | mustEmbedUnimplementedInsertServer() 279 | } 280 | 281 | // UnimplementedInsertServer must be embedded to have forward compatible implementations. 282 | type UnimplementedInsertServer struct{} 283 | 284 | func (UnimplementedInsertServer) Insert( 285 | context.Context, *payload.Insert_Request, 286 | ) (*payload.Object_Location, error) { 287 | return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented") 288 | } 289 | 290 | func (UnimplementedInsertServer) StreamInsert(Insert_StreamInsertServer) error { 291 | return status.Errorf(codes.Unimplemented, "method StreamInsert not implemented") 292 | } 293 | 294 | func (UnimplementedInsertServer) MultiInsert( 295 | context.Context, *payload.Insert_MultiRequest, 296 | ) (*payload.Object_Locations, error) { 297 | return nil, status.Errorf(codes.Unimplemented, "method MultiInsert not implemented") 298 | } 299 | func (UnimplementedInsertServer) mustEmbedUnimplementedInsertServer() {} 300 | 301 | // UnsafeInsertServer may be embedded to opt out of forward compatibility for this service. 302 | // Use of this interface is not recommended, as added methods to InsertServer will 303 | // result in compilation errors. 304 | type UnsafeInsertServer interface { 305 | mustEmbedUnimplementedInsertServer() 306 | } 307 | 308 | func RegisterInsertServer(s grpc.ServiceRegistrar, srv InsertServer) { 309 | s.RegisterService(&Insert_ServiceDesc, srv) 310 | } 311 | 312 | func _Insert_Insert_Handler( 313 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 314 | ) (any, error) { 315 | in := new(payload.Insert_Request) 316 | if err := dec(in); err != nil { 317 | return nil, err 318 | } 319 | if interceptor == nil { 320 | return srv.(InsertServer).Insert(ctx, in) 321 | } 322 | info := &grpc.UnaryServerInfo{ 323 | Server: srv, 324 | FullMethod: "/vald.v1.Insert/Insert", 325 | } 326 | handler := func(ctx context.Context, req any) (any, error) { 327 | return srv.(InsertServer).Insert(ctx, req.(*payload.Insert_Request)) 328 | } 329 | return interceptor(ctx, in, info, handler) 330 | } 331 | 332 | func _Insert_StreamInsert_Handler(srv any, stream grpc.ServerStream) error { 333 | return srv.(InsertServer).StreamInsert(&insertStreamInsertServer{stream}) 334 | } 335 | 336 | type Insert_StreamInsertServer interface { 337 | Send(*payload.Object_StreamLocation) error 338 | Recv() (*payload.Insert_Request, error) 339 | grpc.ServerStream 340 | } 341 | 342 | type insertStreamInsertServer struct { 343 | grpc.ServerStream 344 | } 345 | 346 | func (x *insertStreamInsertServer) Send(m *payload.Object_StreamLocation) error { 347 | return x.ServerStream.SendMsg(m) 348 | } 349 | 350 | func (x *insertStreamInsertServer) Recv() (*payload.Insert_Request, error) { 351 | m := new(payload.Insert_Request) 352 | if err := x.ServerStream.RecvMsg(m); err != nil { 353 | return nil, err 354 | } 355 | return m, nil 356 | } 357 | 358 | func _Insert_MultiInsert_Handler( 359 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 360 | ) (any, error) { 361 | in := new(payload.Insert_MultiRequest) 362 | if err := dec(in); err != nil { 363 | return nil, err 364 | } 365 | if interceptor == nil { 366 | return srv.(InsertServer).MultiInsert(ctx, in) 367 | } 368 | info := &grpc.UnaryServerInfo{ 369 | Server: srv, 370 | FullMethod: "/vald.v1.Insert/MultiInsert", 371 | } 372 | handler := func(ctx context.Context, req any) (any, error) { 373 | return srv.(InsertServer).MultiInsert(ctx, req.(*payload.Insert_MultiRequest)) 374 | } 375 | return interceptor(ctx, in, info, handler) 376 | } 377 | 378 | // Insert_ServiceDesc is the grpc.ServiceDesc for Insert service. 379 | // It's only intended for direct use with grpc.RegisterService, 380 | // and not to be introspected or modified (even as a copy) 381 | var Insert_ServiceDesc = grpc.ServiceDesc{ 382 | ServiceName: "vald.v1.Insert", 383 | HandlerType: (*InsertServer)(nil), 384 | Methods: []grpc.MethodDesc{ 385 | { 386 | MethodName: "Insert", 387 | Handler: _Insert_Insert_Handler, 388 | }, 389 | { 390 | MethodName: "MultiInsert", 391 | Handler: _Insert_MultiInsert_Handler, 392 | }, 393 | }, 394 | Streams: []grpc.StreamDesc{ 395 | { 396 | StreamName: "StreamInsert", 397 | Handler: _Insert_StreamInsert_Handler, 398 | ServerStreams: true, 399 | ClientStreams: true, 400 | }, 401 | }, 402 | Metadata: "v1/vald/insert.proto", 403 | } 404 | -------------------------------------------------------------------------------- /v1/vald/object.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/object.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_object_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_object_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/object.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xf5\x03\n" + 47 | "\x06Object\x12L\n" + 48 | "\x06Exists\x12\x15.payload.v1.Object.ID\x1a\x15.payload.v1.Object.ID\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\f/exists/{id}\x12a\n" + 49 | "\tGetObject\x12 .payload.v1.Object.VectorRequest\x1a\x19.payload.v1.Object.Vector\"\x17\x82\xd3\xe4\x93\x02\x11\x12\x0f/object/{id.id}\x12Z\n" + 50 | "\x0fStreamGetObject\x12 .payload.v1.Object.VectorRequest\x1a\x1f.payload.v1.Object.StreamVector\"\x00(\x010\x01\x12m\n" + 51 | "\x10StreamListObject\x12\x1f.payload.v1.Object.List.Request\x1a .payload.v1.Object.List.Response\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\f/object/list0\x01\x12o\n" + 52 | "\fGetTimestamp\x12#.payload.v1.Object.TimestampRequest\x1a\x1c.payload.v1.Object.Timestamp\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/object/meta/{id.id}BS\n" + 53 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 54 | "ValdObjectP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 55 | 56 | var file_v1_vald_object_proto_goTypes = []any{ 57 | (*payload.Object_ID)(nil), // 0: payload.v1.Object.ID 58 | (*payload.Object_VectorRequest)(nil), // 1: payload.v1.Object.VectorRequest 59 | (*payload.Object_List_Request)(nil), // 2: payload.v1.Object.List.Request 60 | (*payload.Object_TimestampRequest)(nil), // 3: payload.v1.Object.TimestampRequest 61 | (*payload.Object_Vector)(nil), // 4: payload.v1.Object.Vector 62 | (*payload.Object_StreamVector)(nil), // 5: payload.v1.Object.StreamVector 63 | (*payload.Object_List_Response)(nil), // 6: payload.v1.Object.List.Response 64 | (*payload.Object_Timestamp)(nil), // 7: payload.v1.Object.Timestamp 65 | } 66 | 67 | var file_v1_vald_object_proto_depIdxs = []int32{ 68 | 0, // 0: vald.v1.Object.Exists:input_type -> payload.v1.Object.ID 69 | 1, // 1: vald.v1.Object.GetObject:input_type -> payload.v1.Object.VectorRequest 70 | 1, // 2: vald.v1.Object.StreamGetObject:input_type -> payload.v1.Object.VectorRequest 71 | 2, // 3: vald.v1.Object.StreamListObject:input_type -> payload.v1.Object.List.Request 72 | 3, // 4: vald.v1.Object.GetTimestamp:input_type -> payload.v1.Object.TimestampRequest 73 | 0, // 5: vald.v1.Object.Exists:output_type -> payload.v1.Object.ID 74 | 4, // 6: vald.v1.Object.GetObject:output_type -> payload.v1.Object.Vector 75 | 5, // 7: vald.v1.Object.StreamGetObject:output_type -> payload.v1.Object.StreamVector 76 | 6, // 8: vald.v1.Object.StreamListObject:output_type -> payload.v1.Object.List.Response 77 | 7, // 9: vald.v1.Object.GetTimestamp:output_type -> payload.v1.Object.Timestamp 78 | 5, // [5:10] is the sub-list for method output_type 79 | 0, // [0:5] is the sub-list for method input_type 80 | 0, // [0:0] is the sub-list for extension type_name 81 | 0, // [0:0] is the sub-list for extension extendee 82 | 0, // [0:0] is the sub-list for field type_name 83 | } 84 | 85 | func init() { file_v1_vald_object_proto_init() } 86 | func file_v1_vald_object_proto_init() { 87 | if File_v1_vald_object_proto != nil { 88 | return 89 | } 90 | type x struct{} 91 | out := protoimpl.TypeBuilder{ 92 | File: protoimpl.DescBuilder{ 93 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 94 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_object_proto_rawDesc), len(file_v1_vald_object_proto_rawDesc)), 95 | NumEnums: 0, 96 | NumMessages: 0, 97 | NumExtensions: 0, 98 | NumServices: 1, 99 | }, 100 | GoTypes: file_v1_vald_object_proto_goTypes, 101 | DependencyIndexes: file_v1_vald_object_proto_depIdxs, 102 | }.Build() 103 | File_v1_vald_object_proto = out.File 104 | file_v1_vald_object_proto_goTypes = nil 105 | file_v1_vald_object_proto_depIdxs = nil 106 | } 107 | -------------------------------------------------------------------------------- /v1/vald/remove.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/remove.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_remove_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_remove_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/remove.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\x95\x03\n" + 47 | "\x06Remove\x12U\n" + 48 | "\x06Remove\x12\x1a.payload.v1.Remove.Request\x1a\x1b.payload.v1.Object.Location\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/remove\x12t\n" + 49 | "\x11RemoveByTimestamp\x12#.payload.v1.Remove.TimestampRequest\x1a\x1c.payload.v1.Object.Locations\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/remove/timestamp\x12S\n" + 50 | "\fStreamRemove\x12\x1a.payload.v1.Remove.Request\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12i\n" + 51 | "\vMultiRemove\x12\x1f.payload.v1.Remove.MultiRequest\x1a\x1c.payload.v1.Object.Locations\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/remove/multipleBS\n" + 52 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 53 | "ValdRemoveP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 54 | 55 | var file_v1_vald_remove_proto_goTypes = []any{ 56 | (*payload.Remove_Request)(nil), // 0: payload.v1.Remove.Request 57 | (*payload.Remove_TimestampRequest)(nil), // 1: payload.v1.Remove.TimestampRequest 58 | (*payload.Remove_MultiRequest)(nil), // 2: payload.v1.Remove.MultiRequest 59 | (*payload.Object_Location)(nil), // 3: payload.v1.Object.Location 60 | (*payload.Object_Locations)(nil), // 4: payload.v1.Object.Locations 61 | (*payload.Object_StreamLocation)(nil), // 5: payload.v1.Object.StreamLocation 62 | } 63 | 64 | var file_v1_vald_remove_proto_depIdxs = []int32{ 65 | 0, // 0: vald.v1.Remove.Remove:input_type -> payload.v1.Remove.Request 66 | 1, // 1: vald.v1.Remove.RemoveByTimestamp:input_type -> payload.v1.Remove.TimestampRequest 67 | 0, // 2: vald.v1.Remove.StreamRemove:input_type -> payload.v1.Remove.Request 68 | 2, // 3: vald.v1.Remove.MultiRemove:input_type -> payload.v1.Remove.MultiRequest 69 | 3, // 4: vald.v1.Remove.Remove:output_type -> payload.v1.Object.Location 70 | 4, // 5: vald.v1.Remove.RemoveByTimestamp:output_type -> payload.v1.Object.Locations 71 | 5, // 6: vald.v1.Remove.StreamRemove:output_type -> payload.v1.Object.StreamLocation 72 | 4, // 7: vald.v1.Remove.MultiRemove:output_type -> payload.v1.Object.Locations 73 | 4, // [4:8] is the sub-list for method output_type 74 | 0, // [0:4] is the sub-list for method input_type 75 | 0, // [0:0] is the sub-list for extension type_name 76 | 0, // [0:0] is the sub-list for extension extendee 77 | 0, // [0:0] is the sub-list for field type_name 78 | } 79 | 80 | func init() { file_v1_vald_remove_proto_init() } 81 | func file_v1_vald_remove_proto_init() { 82 | if File_v1_vald_remove_proto != nil { 83 | return 84 | } 85 | type x struct{} 86 | out := protoimpl.TypeBuilder{ 87 | File: protoimpl.DescBuilder{ 88 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 89 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_remove_proto_rawDesc), len(file_v1_vald_remove_proto_rawDesc)), 90 | NumEnums: 0, 91 | NumMessages: 0, 92 | NumExtensions: 0, 93 | NumServices: 1, 94 | }, 95 | GoTypes: file_v1_vald_remove_proto_goTypes, 96 | DependencyIndexes: file_v1_vald_remove_proto_depIdxs, 97 | }.Build() 98 | File_v1_vald_remove_proto = out.File 99 | file_v1_vald_remove_proto_goTypes = nil 100 | file_v1_vald_remove_proto_depIdxs = nil 101 | } 102 | -------------------------------------------------------------------------------- /v1/vald/search.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/search.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_search_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_search_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/search.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\xd0\t\n" + 47 | "\x06Search\x12U\n" + 48 | "\x06Search\x12\x1a.payload.v1.Search.Request\x1a\x1b.payload.v1.Search.Response\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/search\x12^\n" + 49 | "\n" + 50 | "SearchByID\x12\x1c.payload.v1.Search.IDRequest\x1a\x1b.payload.v1.Search.Response\"\x15\x82\xd3\xe4\x93\x02\x0f:\x01*\"\n" + 51 | "/search/id\x12S\n" + 52 | "\fStreamSearch\x12\x1a.payload.v1.Search.Request\x1a!.payload.v1.Search.StreamResponse\"\x00(\x010\x01\x12Y\n" + 53 | "\x10StreamSearchByID\x12\x1c.payload.v1.Search.IDRequest\x1a!.payload.v1.Search.StreamResponse\"\x00(\x010\x01\x12i\n" + 54 | "\vMultiSearch\x12\x1f.payload.v1.Search.MultiRequest\x1a\x1c.payload.v1.Search.Responses\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/search/multiple\x12r\n" + 55 | "\x0fMultiSearchByID\x12!.payload.v1.Search.MultiIDRequest\x1a\x1c.payload.v1.Search.Responses\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/search/id/multiple\x12a\n" + 56 | "\fLinearSearch\x12\x1a.payload.v1.Search.Request\x1a\x1b.payload.v1.Search.Response\"\x18\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/linearsearch\x12j\n" + 57 | "\x10LinearSearchByID\x12\x1c.payload.v1.Search.IDRequest\x1a\x1b.payload.v1.Search.Response\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/linearsearch/id\x12Y\n" + 58 | "\x12StreamLinearSearch\x12\x1a.payload.v1.Search.Request\x1a!.payload.v1.Search.StreamResponse\"\x00(\x010\x01\x12_\n" + 59 | "\x16StreamLinearSearchByID\x12\x1c.payload.v1.Search.IDRequest\x1a!.payload.v1.Search.StreamResponse\"\x00(\x010\x01\x12u\n" + 60 | "\x11MultiLinearSearch\x12\x1f.payload.v1.Search.MultiRequest\x1a\x1c.payload.v1.Search.Responses\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/linearsearch/multiple\x12~\n" + 61 | "\x15MultiLinearSearchByID\x12!.payload.v1.Search.MultiIDRequest\x1a\x1c.payload.v1.Search.Responses\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/linearsearch/id/multipleBS\n" + 62 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 63 | "ValdSearchP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 64 | 65 | var file_v1_vald_search_proto_goTypes = []any{ 66 | (*payload.Search_Request)(nil), // 0: payload.v1.Search.Request 67 | (*payload.Search_IDRequest)(nil), // 1: payload.v1.Search.IDRequest 68 | (*payload.Search_MultiRequest)(nil), // 2: payload.v1.Search.MultiRequest 69 | (*payload.Search_MultiIDRequest)(nil), // 3: payload.v1.Search.MultiIDRequest 70 | (*payload.Search_Response)(nil), // 4: payload.v1.Search.Response 71 | (*payload.Search_StreamResponse)(nil), // 5: payload.v1.Search.StreamResponse 72 | (*payload.Search_Responses)(nil), // 6: payload.v1.Search.Responses 73 | } 74 | 75 | var file_v1_vald_search_proto_depIdxs = []int32{ 76 | 0, // 0: vald.v1.Search.Search:input_type -> payload.v1.Search.Request 77 | 1, // 1: vald.v1.Search.SearchByID:input_type -> payload.v1.Search.IDRequest 78 | 0, // 2: vald.v1.Search.StreamSearch:input_type -> payload.v1.Search.Request 79 | 1, // 3: vald.v1.Search.StreamSearchByID:input_type -> payload.v1.Search.IDRequest 80 | 2, // 4: vald.v1.Search.MultiSearch:input_type -> payload.v1.Search.MultiRequest 81 | 3, // 5: vald.v1.Search.MultiSearchByID:input_type -> payload.v1.Search.MultiIDRequest 82 | 0, // 6: vald.v1.Search.LinearSearch:input_type -> payload.v1.Search.Request 83 | 1, // 7: vald.v1.Search.LinearSearchByID:input_type -> payload.v1.Search.IDRequest 84 | 0, // 8: vald.v1.Search.StreamLinearSearch:input_type -> payload.v1.Search.Request 85 | 1, // 9: vald.v1.Search.StreamLinearSearchByID:input_type -> payload.v1.Search.IDRequest 86 | 2, // 10: vald.v1.Search.MultiLinearSearch:input_type -> payload.v1.Search.MultiRequest 87 | 3, // 11: vald.v1.Search.MultiLinearSearchByID:input_type -> payload.v1.Search.MultiIDRequest 88 | 4, // 12: vald.v1.Search.Search:output_type -> payload.v1.Search.Response 89 | 4, // 13: vald.v1.Search.SearchByID:output_type -> payload.v1.Search.Response 90 | 5, // 14: vald.v1.Search.StreamSearch:output_type -> payload.v1.Search.StreamResponse 91 | 5, // 15: vald.v1.Search.StreamSearchByID:output_type -> payload.v1.Search.StreamResponse 92 | 6, // 16: vald.v1.Search.MultiSearch:output_type -> payload.v1.Search.Responses 93 | 6, // 17: vald.v1.Search.MultiSearchByID:output_type -> payload.v1.Search.Responses 94 | 4, // 18: vald.v1.Search.LinearSearch:output_type -> payload.v1.Search.Response 95 | 4, // 19: vald.v1.Search.LinearSearchByID:output_type -> payload.v1.Search.Response 96 | 5, // 20: vald.v1.Search.StreamLinearSearch:output_type -> payload.v1.Search.StreamResponse 97 | 5, // 21: vald.v1.Search.StreamLinearSearchByID:output_type -> payload.v1.Search.StreamResponse 98 | 6, // 22: vald.v1.Search.MultiLinearSearch:output_type -> payload.v1.Search.Responses 99 | 6, // 23: vald.v1.Search.MultiLinearSearchByID:output_type -> payload.v1.Search.Responses 100 | 12, // [12:24] is the sub-list for method output_type 101 | 0, // [0:12] is the sub-list for method input_type 102 | 0, // [0:0] is the sub-list for extension type_name 103 | 0, // [0:0] is the sub-list for extension extendee 104 | 0, // [0:0] is the sub-list for field type_name 105 | } 106 | 107 | func init() { file_v1_vald_search_proto_init() } 108 | func file_v1_vald_search_proto_init() { 109 | if File_v1_vald_search_proto != nil { 110 | return 111 | } 112 | type x struct{} 113 | out := protoimpl.TypeBuilder{ 114 | File: protoimpl.DescBuilder{ 115 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 116 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_search_proto_rawDesc), len(file_v1_vald_search_proto_rawDesc)), 117 | NumEnums: 0, 118 | NumMessages: 0, 119 | NumExtensions: 0, 120 | NumServices: 1, 121 | }, 122 | GoTypes: file_v1_vald_search_proto_goTypes, 123 | DependencyIndexes: file_v1_vald_search_proto_depIdxs, 124 | }.Build() 125 | File_v1_vald_search_proto = out.File 126 | file_v1_vald_search_proto_goTypes = nil 127 | file_v1_vald_search_proto_depIdxs = nil 128 | } 129 | -------------------------------------------------------------------------------- /v1/vald/update.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/update.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_update_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_update_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/update.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\x92\x03\n" + 47 | "\x06Update\x12U\n" + 48 | "\x06Update\x12\x1a.payload.v1.Update.Request\x1a\x1b.payload.v1.Object.Location\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/update\x12S\n" + 49 | "\fStreamUpdate\x12\x1a.payload.v1.Update.Request\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12i\n" + 50 | "\vMultiUpdate\x12\x1f.payload.v1.Update.MultiRequest\x1a\x1c.payload.v1.Object.Locations\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/update/multiple\x12q\n" + 51 | "\x0fUpdateTimestamp\x12#.payload.v1.Update.TimestampRequest\x1a\x1b.payload.v1.Object.Location\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/update/timestampBS\n" + 52 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 53 | "ValdUpdateP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 54 | 55 | var file_v1_vald_update_proto_goTypes = []any{ 56 | (*payload.Update_Request)(nil), // 0: payload.v1.Update.Request 57 | (*payload.Update_MultiRequest)(nil), // 1: payload.v1.Update.MultiRequest 58 | (*payload.Update_TimestampRequest)(nil), // 2: payload.v1.Update.TimestampRequest 59 | (*payload.Object_Location)(nil), // 3: payload.v1.Object.Location 60 | (*payload.Object_StreamLocation)(nil), // 4: payload.v1.Object.StreamLocation 61 | (*payload.Object_Locations)(nil), // 5: payload.v1.Object.Locations 62 | } 63 | 64 | var file_v1_vald_update_proto_depIdxs = []int32{ 65 | 0, // 0: vald.v1.Update.Update:input_type -> payload.v1.Update.Request 66 | 0, // 1: vald.v1.Update.StreamUpdate:input_type -> payload.v1.Update.Request 67 | 1, // 2: vald.v1.Update.MultiUpdate:input_type -> payload.v1.Update.MultiRequest 68 | 2, // 3: vald.v1.Update.UpdateTimestamp:input_type -> payload.v1.Update.TimestampRequest 69 | 3, // 4: vald.v1.Update.Update:output_type -> payload.v1.Object.Location 70 | 4, // 5: vald.v1.Update.StreamUpdate:output_type -> payload.v1.Object.StreamLocation 71 | 5, // 6: vald.v1.Update.MultiUpdate:output_type -> payload.v1.Object.Locations 72 | 3, // 7: vald.v1.Update.UpdateTimestamp:output_type -> payload.v1.Object.Location 73 | 4, // [4:8] is the sub-list for method output_type 74 | 0, // [0:4] is the sub-list for method input_type 75 | 0, // [0:0] is the sub-list for extension type_name 76 | 0, // [0:0] is the sub-list for extension extendee 77 | 0, // [0:0] is the sub-list for field type_name 78 | } 79 | 80 | func init() { file_v1_vald_update_proto_init() } 81 | func file_v1_vald_update_proto_init() { 82 | if File_v1_vald_update_proto != nil { 83 | return 84 | } 85 | type x struct{} 86 | out := protoimpl.TypeBuilder{ 87 | File: protoimpl.DescBuilder{ 88 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 89 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_update_proto_rawDesc), len(file_v1_vald_update_proto_rawDesc)), 90 | NumEnums: 0, 91 | NumMessages: 0, 92 | NumExtensions: 0, 93 | NumServices: 1, 94 | }, 95 | GoTypes: file_v1_vald_update_proto_goTypes, 96 | DependencyIndexes: file_v1_vald_update_proto_depIdxs, 97 | }.Build() 98 | File_v1_vald_update_proto = out.File 99 | file_v1_vald_update_proto_goTypes = nil 100 | file_v1_vald_update_proto_depIdxs = nil 101 | } 102 | -------------------------------------------------------------------------------- /v1/vald/upsert.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Code generated by protoc-gen-go. DO NOT EDIT. 18 | // versions: 19 | // protoc-gen-go v1.36.6 20 | // protoc (unknown) 21 | // source: v1/vald/upsert.proto 22 | 23 | package vald 24 | 25 | import ( 26 | reflect "reflect" 27 | unsafe "unsafe" 28 | 29 | payload "github.com/vdaas/vald-client-go/v1/payload" 30 | _ "google.golang.org/genproto/googleapis/api/annotations" 31 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 | ) 34 | 35 | const ( 36 | // Verify that this generated code is sufficiently up-to-date. 37 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 | // Verify that runtime/protoimpl is sufficiently up-to-date. 39 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 | ) 41 | 42 | var File_v1_vald_upsert_proto protoreflect.FileDescriptor 43 | 44 | const file_v1_vald_upsert_proto_rawDesc = "" + 45 | "\n" + 46 | "\x14v1/vald/upsert.proto\x12\avald.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x18v1/payload/payload.proto2\x9f\x02\n" + 47 | "\x06Upsert\x12U\n" + 48 | "\x06Upsert\x12\x1a.payload.v1.Upsert.Request\x1a\x1b.payload.v1.Object.Location\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/upsert\x12S\n" + 49 | "\fStreamUpsert\x12\x1a.payload.v1.Upsert.Request\x1a!.payload.v1.Object.StreamLocation\"\x00(\x010\x01\x12i\n" + 50 | "\vMultiUpsert\x12\x1f.payload.v1.Upsert.MultiRequest\x1a\x1c.payload.v1.Object.Locations\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/upsert/multipleBS\n" + 51 | "\x1aorg.vdaas.vald.api.v1.valdB\n" + 52 | "ValdUpsertP\x01Z'github.com/vdaas/vald-client-go/v1/valdb\x06proto3" 53 | 54 | var file_v1_vald_upsert_proto_goTypes = []any{ 55 | (*payload.Upsert_Request)(nil), // 0: payload.v1.Upsert.Request 56 | (*payload.Upsert_MultiRequest)(nil), // 1: payload.v1.Upsert.MultiRequest 57 | (*payload.Object_Location)(nil), // 2: payload.v1.Object.Location 58 | (*payload.Object_StreamLocation)(nil), // 3: payload.v1.Object.StreamLocation 59 | (*payload.Object_Locations)(nil), // 4: payload.v1.Object.Locations 60 | } 61 | 62 | var file_v1_vald_upsert_proto_depIdxs = []int32{ 63 | 0, // 0: vald.v1.Upsert.Upsert:input_type -> payload.v1.Upsert.Request 64 | 0, // 1: vald.v1.Upsert.StreamUpsert:input_type -> payload.v1.Upsert.Request 65 | 1, // 2: vald.v1.Upsert.MultiUpsert:input_type -> payload.v1.Upsert.MultiRequest 66 | 2, // 3: vald.v1.Upsert.Upsert:output_type -> payload.v1.Object.Location 67 | 3, // 4: vald.v1.Upsert.StreamUpsert:output_type -> payload.v1.Object.StreamLocation 68 | 4, // 5: vald.v1.Upsert.MultiUpsert:output_type -> payload.v1.Object.Locations 69 | 3, // [3:6] is the sub-list for method output_type 70 | 0, // [0:3] is the sub-list for method input_type 71 | 0, // [0:0] is the sub-list for extension type_name 72 | 0, // [0:0] is the sub-list for extension extendee 73 | 0, // [0:0] is the sub-list for field type_name 74 | } 75 | 76 | func init() { file_v1_vald_upsert_proto_init() } 77 | func file_v1_vald_upsert_proto_init() { 78 | if File_v1_vald_upsert_proto != nil { 79 | return 80 | } 81 | type x struct{} 82 | out := protoimpl.TypeBuilder{ 83 | File: protoimpl.DescBuilder{ 84 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 85 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_vald_upsert_proto_rawDesc), len(file_v1_vald_upsert_proto_rawDesc)), 86 | NumEnums: 0, 87 | NumMessages: 0, 88 | NumExtensions: 0, 89 | NumServices: 1, 90 | }, 91 | GoTypes: file_v1_vald_upsert_proto_goTypes, 92 | DependencyIndexes: file_v1_vald_upsert_proto_depIdxs, 93 | }.Build() 94 | File_v1_vald_upsert_proto = out.File 95 | file_v1_vald_upsert_proto_goTypes = nil 96 | file_v1_vald_upsert_proto_depIdxs = nil 97 | } 98 | -------------------------------------------------------------------------------- /v1/vald/upsert_vtproto.pb.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | package vald 18 | 19 | import ( 20 | context "context" 21 | 22 | payload "github.com/vdaas/vald-client-go/v1/payload" 23 | codes "google.golang.org/grpc/codes" 24 | status "google.golang.org/grpc/status" 25 | grpc "google.golang.org/grpc" 26 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 27 | ) 28 | 29 | const ( 30 | // Verify that this generated code is sufficiently up-to-date. 31 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 32 | // Verify that runtime/protoimpl is sufficiently up-to-date. 33 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 34 | ) 35 | 36 | // This is a compile-time assertion to ensure that this generated file 37 | // is compatible with the grpc package it is being compiled against. 38 | // Requires gRPC-Go v1.32.0 or later. 39 | const _ = grpc.SupportPackageIsVersion7 40 | 41 | // UpsertClient is the client API for Upsert service. 42 | // 43 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 44 | type UpsertClient interface { 45 | // Overview 46 | // Upsert RPC is the method to update the inserted vector to a new single vector or add a new single vector if not inserted before. 47 | // --- 48 | // Status Code 49 | // | 0 | OK | 50 | // | 1 | CANCELLED | 51 | // | 3 | INVALID_ARGUMENT | 52 | // | 4 | DEADLINE_EXCEEDED | 53 | // | 5 | NOT_FOUND | 54 | // | 6 | ALREADY_EXISTS | 55 | // | 10 | ABORTED | 56 | // | 13 | INTERNAL | 57 | // --- 58 | // Troubleshooting 59 | // The request process may not be completed when the response code is NOT `0 (OK)`. 60 | // 61 | // Here are some common reasons and how to resolve each error. 62 | // 63 | // | name | common reason | how to resolve | 64 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 65 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 66 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 67 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 68 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 69 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 70 | Upsert(ctx context.Context, in *payload.Upsert_Request, opts ...grpc.CallOption) (*payload.Object_Location, error) 71 | // Overview 72 | // StreamUpsert RPC is the method to update multiple existing vectors or add new multiple vectors using the [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc).
73 | // Using the bidirectional streaming RPC, the upsert request can be communicated in any order between the client and server. 74 | // Each Upsert request and response are independent. 75 | // It’s the recommended method to upsert a large number of vectors. 76 | // --- 77 | // Status Code 78 | // | 0 | OK | 79 | // | 1 | CANCELLED | 80 | // | 3 | INVALID_ARGUMENT | 81 | // | 4 | DEADLINE_EXCEEDED | 82 | // | 5 | NOT_FOUND | 83 | // | 6 | ALREADY_EXISTS | 84 | // | 10 | ABORTED | 85 | // | 13 | INTERNAL | 86 | // --- 87 | // Troubleshooting 88 | // The request process may not be completed when the response code is NOT `0 (OK)`. 89 | // 90 | // Here are some common reasons and how to resolve each error. 91 | // 92 | // | name | common reason | how to resolve | 93 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 94 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 95 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 96 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 97 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 98 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 99 | StreamUpsert(ctx context.Context, opts ...grpc.CallOption) (Upsert_StreamUpsertClient, error) 100 | // Overview 101 | // MultiUpsert is the method to update existing multiple vectors and add new multiple vectors in **1** request. 102 | // 103 | //
104 | // gRPC has a message size limitation.
105 | // Please be careful that the size of the request exceeds the limit. 106 | //
107 | // --- 108 | // Status Code 109 | // | 0 | OK | 110 | // | 1 | CANCELLED | 111 | // | 3 | INVALID_ARGUMENT | 112 | // | 4 | DEADLINE_EXCEEDED | 113 | // | 5 | NOT_FOUND | 114 | // | 6 | ALREADY_EXISTS | 115 | // | 10 | ABORTED | 116 | // | 13 | INTERNAL | 117 | // --- 118 | // Troubleshooting 119 | // The request process may not be completed when the response code is NOT `0 (OK)`. 120 | // 121 | // Here are some common reasons and how to resolve each error. 122 | // 123 | // | name | common reason | how to resolve | 124 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 125 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 126 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 127 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 128 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 129 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 130 | MultiUpsert(ctx context.Context, in *payload.Upsert_MultiRequest, opts ...grpc.CallOption) (*payload.Object_Locations, error) 131 | } 132 | 133 | type upsertClient struct { 134 | cc grpc.ClientConnInterface 135 | } 136 | 137 | func NewUpsertClient(cc grpc.ClientConnInterface) UpsertClient { 138 | return &upsertClient{cc} 139 | } 140 | 141 | func (c *upsertClient) Upsert( 142 | ctx context.Context, in *payload.Upsert_Request, opts ...grpc.CallOption, 143 | ) (*payload.Object_Location, error) { 144 | out := new(payload.Object_Location) 145 | err := c.cc.Invoke(ctx, "/vald.v1.Upsert/Upsert", in, out, opts...) 146 | if err != nil { 147 | return nil, err 148 | } 149 | return out, nil 150 | } 151 | 152 | func (c *upsertClient) StreamUpsert( 153 | ctx context.Context, opts ...grpc.CallOption, 154 | ) (Upsert_StreamUpsertClient, error) { 155 | stream, err := c.cc.NewStream(ctx, &Upsert_ServiceDesc.Streams[0], "/vald.v1.Upsert/StreamUpsert", opts...) 156 | if err != nil { 157 | return nil, err 158 | } 159 | x := &upsertStreamUpsertClient{stream} 160 | return x, nil 161 | } 162 | 163 | type Upsert_StreamUpsertClient interface { 164 | Send(*payload.Upsert_Request) error 165 | Recv() (*payload.Object_StreamLocation, error) 166 | grpc.ClientStream 167 | } 168 | 169 | type upsertStreamUpsertClient struct { 170 | grpc.ClientStream 171 | } 172 | 173 | func (x *upsertStreamUpsertClient) Send(m *payload.Upsert_Request) error { 174 | return x.ClientStream.SendMsg(m) 175 | } 176 | 177 | func (x *upsertStreamUpsertClient) Recv() (*payload.Object_StreamLocation, error) { 178 | m := new(payload.Object_StreamLocation) 179 | if err := x.ClientStream.RecvMsg(m); err != nil { 180 | return nil, err 181 | } 182 | return m, nil 183 | } 184 | 185 | func (c *upsertClient) MultiUpsert( 186 | ctx context.Context, in *payload.Upsert_MultiRequest, opts ...grpc.CallOption, 187 | ) (*payload.Object_Locations, error) { 188 | out := new(payload.Object_Locations) 189 | err := c.cc.Invoke(ctx, "/vald.v1.Upsert/MultiUpsert", in, out, opts...) 190 | if err != nil { 191 | return nil, err 192 | } 193 | return out, nil 194 | } 195 | 196 | // UpsertServer is the server API for Upsert service. 197 | // All implementations must embed UnimplementedUpsertServer 198 | // for forward compatibility 199 | type UpsertServer interface { 200 | // Overview 201 | // Upsert RPC is the method to update the inserted vector to a new single vector or add a new single vector if not inserted before. 202 | // --- 203 | // Status Code 204 | // | 0 | OK | 205 | // | 1 | CANCELLED | 206 | // | 3 | INVALID_ARGUMENT | 207 | // | 4 | DEADLINE_EXCEEDED | 208 | // | 5 | NOT_FOUND | 209 | // | 6 | ALREADY_EXISTS | 210 | // | 10 | ABORTED | 211 | // | 13 | INTERNAL | 212 | // --- 213 | // Troubleshooting 214 | // The request process may not be completed when the response code is NOT `0 (OK)`. 215 | // 216 | // Here are some common reasons and how to resolve each error. 217 | // 218 | // | name | common reason | how to resolve | 219 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 220 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 221 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 222 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 223 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 224 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 225 | Upsert(context.Context, *payload.Upsert_Request) (*payload.Object_Location, error) 226 | // Overview 227 | // StreamUpsert RPC is the method to update multiple existing vectors or add new multiple vectors using the [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc).
228 | // Using the bidirectional streaming RPC, the upsert request can be communicated in any order between the client and server. 229 | // Each Upsert request and response are independent. 230 | // It’s the recommended method to upsert a large number of vectors. 231 | // --- 232 | // Status Code 233 | // | 0 | OK | 234 | // | 1 | CANCELLED | 235 | // | 3 | INVALID_ARGUMENT | 236 | // | 4 | DEADLINE_EXCEEDED | 237 | // | 5 | NOT_FOUND | 238 | // | 6 | ALREADY_EXISTS | 239 | // | 10 | ABORTED | 240 | // | 13 | INTERNAL | 241 | // --- 242 | // Troubleshooting 243 | // The request process may not be completed when the response code is NOT `0 (OK)`. 244 | // 245 | // Here are some common reasons and how to resolve each error. 246 | // 247 | // | name | common reason | how to resolve | 248 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 249 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 250 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 251 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 252 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 253 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 254 | StreamUpsert(Upsert_StreamUpsertServer) error 255 | // Overview 256 | // MultiUpsert is the method to update existing multiple vectors and add new multiple vectors in **1** request. 257 | // 258 | //
259 | // gRPC has a message size limitation.
260 | // Please be careful that the size of the request exceeds the limit. 261 | //
262 | // --- 263 | // Status Code 264 | // | 0 | OK | 265 | // | 1 | CANCELLED | 266 | // | 3 | INVALID_ARGUMENT | 267 | // | 4 | DEADLINE_EXCEEDED | 268 | // | 5 | NOT_FOUND | 269 | // | 6 | ALREADY_EXISTS | 270 | // | 10 | ABORTED | 271 | // | 13 | INTERNAL | 272 | // --- 273 | // Troubleshooting 274 | // The request process may not be completed when the response code is NOT `0 (OK)`. 275 | // 276 | // Here are some common reasons and how to resolve each error. 277 | // 278 | // | name | common reason | how to resolve | 279 | // | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- | 280 | // | CANCELLED | Executed cancel() of rpc from client/server-side or network problems between client and server. | Check the code, especially around timeout and connection management, and fix if needed. | 281 | // | INVALID_ARGUMENT | The Dimension of the request vector is NOT the same as Vald Agent's config, the requested vector's ID is empty, or some request payload is invalid. | Check Agent config, request payload, and fix request payload or Agent config. | 282 | // | DEADLINE_EXCEEDED | The RPC timeout setting is too short on the client/server side. | Check the gRPC timeout setting on both the client and server sides and fix it if needed. | 283 | // | ALREADY_EXISTS | Requested pair of ID and vector is already inserted | Change request payload or nothing to do if update is unnecessary. | 284 | // | INTERNAL | Target Vald cluster or network route has some critical error. | Check target Vald cluster first and check network route including ingress as second. | 285 | MultiUpsert(context.Context, *payload.Upsert_MultiRequest) (*payload.Object_Locations, error) 286 | mustEmbedUnimplementedUpsertServer() 287 | } 288 | 289 | // UnimplementedUpsertServer must be embedded to have forward compatible implementations. 290 | type UnimplementedUpsertServer struct{} 291 | 292 | func (UnimplementedUpsertServer) Upsert( 293 | context.Context, *payload.Upsert_Request, 294 | ) (*payload.Object_Location, error) { 295 | return nil, status.Errorf(codes.Unimplemented, "method Upsert not implemented") 296 | } 297 | 298 | func (UnimplementedUpsertServer) StreamUpsert(Upsert_StreamUpsertServer) error { 299 | return status.Errorf(codes.Unimplemented, "method StreamUpsert not implemented") 300 | } 301 | 302 | func (UnimplementedUpsertServer) MultiUpsert( 303 | context.Context, *payload.Upsert_MultiRequest, 304 | ) (*payload.Object_Locations, error) { 305 | return nil, status.Errorf(codes.Unimplemented, "method MultiUpsert not implemented") 306 | } 307 | func (UnimplementedUpsertServer) mustEmbedUnimplementedUpsertServer() {} 308 | 309 | // UnsafeUpsertServer may be embedded to opt out of forward compatibility for this service. 310 | // Use of this interface is not recommended, as added methods to UpsertServer will 311 | // result in compilation errors. 312 | type UnsafeUpsertServer interface { 313 | mustEmbedUnimplementedUpsertServer() 314 | } 315 | 316 | func RegisterUpsertServer(s grpc.ServiceRegistrar, srv UpsertServer) { 317 | s.RegisterService(&Upsert_ServiceDesc, srv) 318 | } 319 | 320 | func _Upsert_Upsert_Handler( 321 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 322 | ) (any, error) { 323 | in := new(payload.Upsert_Request) 324 | if err := dec(in); err != nil { 325 | return nil, err 326 | } 327 | if interceptor == nil { 328 | return srv.(UpsertServer).Upsert(ctx, in) 329 | } 330 | info := &grpc.UnaryServerInfo{ 331 | Server: srv, 332 | FullMethod: "/vald.v1.Upsert/Upsert", 333 | } 334 | handler := func(ctx context.Context, req any) (any, error) { 335 | return srv.(UpsertServer).Upsert(ctx, req.(*payload.Upsert_Request)) 336 | } 337 | return interceptor(ctx, in, info, handler) 338 | } 339 | 340 | func _Upsert_StreamUpsert_Handler(srv any, stream grpc.ServerStream) error { 341 | return srv.(UpsertServer).StreamUpsert(&upsertStreamUpsertServer{stream}) 342 | } 343 | 344 | type Upsert_StreamUpsertServer interface { 345 | Send(*payload.Object_StreamLocation) error 346 | Recv() (*payload.Upsert_Request, error) 347 | grpc.ServerStream 348 | } 349 | 350 | type upsertStreamUpsertServer struct { 351 | grpc.ServerStream 352 | } 353 | 354 | func (x *upsertStreamUpsertServer) Send(m *payload.Object_StreamLocation) error { 355 | return x.ServerStream.SendMsg(m) 356 | } 357 | 358 | func (x *upsertStreamUpsertServer) Recv() (*payload.Upsert_Request, error) { 359 | m := new(payload.Upsert_Request) 360 | if err := x.ServerStream.RecvMsg(m); err != nil { 361 | return nil, err 362 | } 363 | return m, nil 364 | } 365 | 366 | func _Upsert_MultiUpsert_Handler( 367 | srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, 368 | ) (any, error) { 369 | in := new(payload.Upsert_MultiRequest) 370 | if err := dec(in); err != nil { 371 | return nil, err 372 | } 373 | if interceptor == nil { 374 | return srv.(UpsertServer).MultiUpsert(ctx, in) 375 | } 376 | info := &grpc.UnaryServerInfo{ 377 | Server: srv, 378 | FullMethod: "/vald.v1.Upsert/MultiUpsert", 379 | } 380 | handler := func(ctx context.Context, req any) (any, error) { 381 | return srv.(UpsertServer).MultiUpsert(ctx, req.(*payload.Upsert_MultiRequest)) 382 | } 383 | return interceptor(ctx, in, info, handler) 384 | } 385 | 386 | // Upsert_ServiceDesc is the grpc.ServiceDesc for Upsert service. 387 | // It's only intended for direct use with grpc.RegisterService, 388 | // and not to be introspected or modified (even as a copy) 389 | var Upsert_ServiceDesc = grpc.ServiceDesc{ 390 | ServiceName: "vald.v1.Upsert", 391 | HandlerType: (*UpsertServer)(nil), 392 | Methods: []grpc.MethodDesc{ 393 | { 394 | MethodName: "Upsert", 395 | Handler: _Upsert_Upsert_Handler, 396 | }, 397 | { 398 | MethodName: "MultiUpsert", 399 | Handler: _Upsert_MultiUpsert_Handler, 400 | }, 401 | }, 402 | Streams: []grpc.StreamDesc{ 403 | { 404 | StreamName: "StreamUpsert", 405 | Handler: _Upsert_StreamUpsert_Handler, 406 | ServerStreams: true, 407 | ClientStreams: true, 408 | }, 409 | }, 410 | Metadata: "v1/vald/upsert.proto", 411 | } 412 | -------------------------------------------------------------------------------- /v1/vald/vald.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2025 vdaas.org vald team 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // You may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Package vald provides vald server interface 18 | package vald 19 | 20 | import grpc "google.golang.org/grpc" 21 | 22 | type Server interface { 23 | FlushServer 24 | IndexServer 25 | InsertServer 26 | ObjectServer 27 | RemoveServer 28 | SearchServer 29 | UpdateServer 30 | UpsertServer 31 | } 32 | 33 | type ServerWithFilter interface { 34 | Server 35 | FilterServer 36 | } 37 | 38 | type UnimplementedValdServer struct { 39 | UnimplementedFlushServer 40 | UnimplementedIndexServer 41 | UnimplementedInsertServer 42 | UnimplementedObjectServer 43 | UnimplementedRemoveServer 44 | UnimplementedSearchServer 45 | UnimplementedUpdateServer 46 | UnimplementedUpsertServer 47 | } 48 | 49 | type UnimplementedValdServerWithFilter struct { 50 | UnimplementedValdServer 51 | UnimplementedFilterServer 52 | } 53 | 54 | type Client interface { 55 | FlushClient 56 | IndexClient 57 | InsertClient 58 | ObjectClient 59 | RemoveClient 60 | SearchClient 61 | UpdateClient 62 | UpsertClient 63 | } 64 | 65 | type ClientWithFilter interface { 66 | Client 67 | FilterClient 68 | } 69 | 70 | const PackageName = "vald.v1" 71 | 72 | const ( 73 | FilterRPCServiceName = "Filter" 74 | FlushRPCServiceName = "Flush" 75 | IndexRPCServiceName = "Index" 76 | InsertRPCServiceName = "Insert" 77 | ObjectRPCServiceName = "Object" 78 | RemoveRPCServiceName = "Remove" 79 | SearchRPCServiceName = "Search" 80 | UpdateRPCServiceName = "Update" 81 | UpsertRPCServiceName = "Upsert" 82 | ) 83 | 84 | const ( 85 | InsertRPCName = "Insert" 86 | StreamInsertRPCName = "StreamInsert" 87 | MultiInsertRPCName = "MultiInsert" 88 | InsertObjectRPCName = "InsertObject" 89 | StreamInsertObjectRPCName = "StreamInsertObject" 90 | MultiInsertObjectRPCName = "MultiInsertObject" 91 | 92 | UpdateRPCName = "Update" 93 | StreamUpdateRPCName = "StreamUpdate" 94 | MultiUpdateRPCName = "MultiUpdate" 95 | UpdateObjectRPCName = "UpdateObject" 96 | StreamUpdateObjectRPCName = "StreamUpdateObject" 97 | MultiUpdateObjectRPCName = "MultiUpdateObject" 98 | UpdateTimestampRPCName = "UpdateTimestamp" 99 | 100 | UpsertRPCName = "Upsert" 101 | StreamUpsertRPCName = "StreamUpsert" 102 | MultiUpsertRPCName = "MultiUpsert" 103 | UpsertObjectRPCName = "UpsertObject" 104 | StreamUpsertObjectRPCName = "StreamUpsertObject" 105 | MultiUpsertObjectRPCName = "MultiUpsertObject" 106 | 107 | SearchRPCName = "Search" 108 | SearchByIDRPCName = "SearchByID" 109 | StreamSearchRPCName = "StreamSearch" 110 | StreamSearchByIDRPCName = "StreamSearchByID" 111 | MultiSearchRPCName = "MultiSearch" 112 | MultiSearchByIDRPCName = "MultiSearchByID" 113 | LinearSearchRPCName = "LinearSearch" 114 | LinearSearchByIDRPCName = "LinearSearchByID" 115 | StreamLinearSearchRPCName = "StreamLinearSearch" 116 | StreamLinearSearchByIDRPCName = "StreamLinearSearchByID" 117 | MultiLinearSearchRPCName = "MultiLinearSearch" 118 | MultiLinearSearchByIDRPCName = "MultiLinearSearchByID" 119 | SearchObjectRPCName = "SearchObject" 120 | MultiSearchObjectRPCName = "MultiSearchObject" 121 | LinearSearchObjectRPCName = "LinearSearchObject" 122 | MultiLinearSearchObjectRPCName = "MultiLinearSearchObject" 123 | StreamLinearSearchObjectRPCName = "StreamLinearSearchObject" 124 | StreamSearchObjectRPCName = "StreamSearchObject" 125 | 126 | RemoveRPCName = "Remove" 127 | StreamRemoveRPCName = "StreamRemove" 128 | MultiRemoveRPCName = "MultiRemove" 129 | RemoveByTimestampRPCName = "RemoveByTimestamp" 130 | 131 | FlushRPCName = "Flush" 132 | 133 | ExistsRPCName = "Exists" 134 | GetObjectRPCName = "GetObject" 135 | GetTimestampRPCName = "GetTimestamp" 136 | StreamGetObjectRPCName = "StreamGetObject" 137 | StreamListObjectRPCName = "StreamListObject" 138 | 139 | IndexInfoRPCName = "IndexInfo" 140 | IndexDetailRPCName = "IndexDetail" 141 | IndexStatisticsRPCName = "IndexStatistics" 142 | IndexStatisticsDetailRPCName = "IndexStatisticsDetail" 143 | IndexPropertyRPCName = "IndexProperty" 144 | ) 145 | 146 | type client struct { 147 | FlushClient 148 | IndexClient 149 | InsertClient 150 | ObjectClient 151 | RemoveClient 152 | SearchClient 153 | UpdateClient 154 | UpsertClient 155 | } 156 | 157 | func RegisterValdServer(s *grpc.Server, srv Server) { 158 | RegisterFlushServer(s, srv) 159 | RegisterIndexServer(s, srv) 160 | RegisterInsertServer(s, srv) 161 | RegisterObjectServer(s, srv) 162 | RegisterRemoveServer(s, srv) 163 | RegisterSearchServer(s, srv) 164 | RegisterUpdateServer(s, srv) 165 | RegisterUpsertServer(s, srv) 166 | } 167 | 168 | func RegisterValdServerWithFilter(s *grpc.Server, srv ServerWithFilter) { 169 | RegisterValdServer(s, srv) 170 | RegisterFilterServer(s, srv) 171 | } 172 | 173 | func NewValdClient(conn *grpc.ClientConn) Client { 174 | return &client{ 175 | FlushClient: NewFlushClient(conn), 176 | IndexClient: NewIndexClient(conn), 177 | InsertClient: NewInsertClient(conn), 178 | ObjectClient: NewObjectClient(conn), 179 | RemoveClient: NewRemoveClient(conn), 180 | SearchClient: NewSearchClient(conn), 181 | UpdateClient: NewUpdateClient(conn), 182 | UpsertClient: NewUpsertClient(conn), 183 | } 184 | } 185 | --------------------------------------------------------------------------------