From 155946d0db14b0ff2f4bb98a1856d891474c001a Mon Sep 17 00:00:00 2001 From: Uditha Atukorala Date: Thu, 14 Nov 2024 20:54:07 +0000 Subject: [PATCH] (examples) drop fileshare example Fileshare example is so outdated and not relevant anymore. --- examples/fileshare/Makefile | 39 - examples/fileshare/README.md | 16 - examples/fileshare/app/.eslintrc.yml | 24 - examples/fileshare/app/.gitignore | 6 - examples/fileshare/app/index.html | 12 - examples/fileshare/app/package-lock.json | 3406 ----------------- examples/fileshare/app/package.json | 24 - examples/fileshare/app/src/app.css | 19 - examples/fileshare/app/src/app.jsx | 33 - examples/fileshare/app/src/busy.css | 19 - examples/fileshare/app/src/busy.jsx | 9 - examples/fileshare/app/src/file.css | 49 - examples/fileshare/app/src/file.jsx | 94 - examples/fileshare/app/src/files.css | 39 - examples/fileshare/app/src/files.jsx | 94 - examples/fileshare/app/src/index.css | 119 - examples/fileshare/app/src/index.jsx | 26 - examples/fileshare/app/src/new-file.css | 29 - examples/fileshare/app/src/new-file.jsx | 75 - examples/fileshare/app/src/sign-up.css | 58 - examples/fileshare/app/src/sign-up.jsx | 68 - examples/fileshare/app/src/users.css | 3 - examples/fileshare/app/src/users.jsx | 92 - examples/fileshare/app/vite.config.js | 6 - examples/fileshare/go.mod | 49 - examples/fileshare/go.sum | 123 - examples/fileshare/main.go | 73 - examples/fileshare/pkg/handlers/handlers.go | 28 - examples/fileshare/pkg/handlers/v1/files.go | 492 --- .../fileshare/pkg/handlers/v1/files_test.go | 936 ----- examples/fileshare/pkg/handlers/v1/testing.go | 215 -- examples/fileshare/pkg/handlers/v1/users.go | 217 -- .../fileshare/pkg/handlers/v1/users_test.go | 280 -- examples/fileshare/pkg/handlers/v1/utils.go | 183 - examples/fileshare/pkg/handlers/v1/v1.go | 37 - .../pkg/pb/sentium/api/v1/authz.pb.go | 560 --- .../pkg/pb/sentium/api/v1/authz_grpc.pb.go | 183 - .../pkg/pb/sentium/api/v1/principals.pb.go | 747 ---- .../pb/sentium/api/v1/principals_grpc.pb.go | 257 -- .../pkg/pb/sentium/api/v1/resources.pb.go | 629 --- .../pb/sentium/api/v1/resources_grpc.pb.go | 146 - 41 files changed, 9514 deletions(-) delete mode 100644 examples/fileshare/Makefile delete mode 100644 examples/fileshare/README.md delete mode 100644 examples/fileshare/app/.eslintrc.yml delete mode 100644 examples/fileshare/app/.gitignore delete mode 100644 examples/fileshare/app/index.html delete mode 100644 examples/fileshare/app/package-lock.json delete mode 100644 examples/fileshare/app/package.json delete mode 100644 examples/fileshare/app/src/app.css delete mode 100644 examples/fileshare/app/src/app.jsx delete mode 100644 examples/fileshare/app/src/busy.css delete mode 100644 examples/fileshare/app/src/busy.jsx delete mode 100644 examples/fileshare/app/src/file.css delete mode 100644 examples/fileshare/app/src/file.jsx delete mode 100644 examples/fileshare/app/src/files.css delete mode 100644 examples/fileshare/app/src/files.jsx delete mode 100644 examples/fileshare/app/src/index.css delete mode 100644 examples/fileshare/app/src/index.jsx delete mode 100644 examples/fileshare/app/src/new-file.css delete mode 100644 examples/fileshare/app/src/new-file.jsx delete mode 100644 examples/fileshare/app/src/sign-up.css delete mode 100644 examples/fileshare/app/src/sign-up.jsx delete mode 100644 examples/fileshare/app/src/users.css delete mode 100644 examples/fileshare/app/src/users.jsx delete mode 100644 examples/fileshare/app/vite.config.js delete mode 100644 examples/fileshare/go.mod delete mode 100644 examples/fileshare/go.sum delete mode 100644 examples/fileshare/main.go delete mode 100644 examples/fileshare/pkg/handlers/handlers.go delete mode 100644 examples/fileshare/pkg/handlers/v1/files.go delete mode 100644 examples/fileshare/pkg/handlers/v1/files_test.go delete mode 100644 examples/fileshare/pkg/handlers/v1/testing.go delete mode 100644 examples/fileshare/pkg/handlers/v1/users.go delete mode 100644 examples/fileshare/pkg/handlers/v1/users_test.go delete mode 100644 examples/fileshare/pkg/handlers/v1/utils.go delete mode 100644 examples/fileshare/pkg/handlers/v1/v1.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/authz.pb.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/authz_grpc.pb.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/principals.pb.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/principals_grpc.pb.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/resources.pb.go delete mode 100644 examples/fileshare/pkg/pb/sentium/api/v1/resources_grpc.pb.go diff --git a/examples/fileshare/Makefile b/examples/fileshare/Makefile deleted file mode 100644 index a65b70ad..00000000 --- a/examples/fileshare/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -sourcedir = . - -lint: - gofmt -s -d -e $(sourcedir) - -lint\:fix: - gofmt -s -l -w $(sourcedir) - -run: - go run main.go - -pb: protoc-gen-go protoc-gen-go-grpc - protoc \ - --go_out=./pkg/pb \ - --go_opt=Msentium/api/v1/authz.proto=sentium/api/v1 \ - --go_opt=Msentium/api/v1/principals.proto=sentium/api/v1 \ - --go_opt=Msentium/api/v1/resources.proto=sentium/api/v1 \ - --go-grpc_opt=Msentium/api/v1/authz.proto=sentium/api/v1 \ - --go-grpc_opt=Msentium/api/v1/principals.proto=sentium/api/v1 \ - --go-grpc_opt=Msentium/api/v1/resources.proto=sentium/api/v1 \ - --go-grpc_out=./pkg/pb \ - --proto_path=../../proto \ - --proto_path=../../.build/_deps/googleapis-src \ - sentium/api/v1/authz.proto \ - sentium/api/v1/principals.proto \ - sentium/api/v1/resources.proto - -protoc-gen-go: -ifeq (, $(shell which protoc-gen-go)) - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest -endif - -protoc-gen-go-grpc: -ifeq (, $(shell which protoc-gen-go-grpc)) - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest -endif - -test: - go test -race ./... diff --git a/examples/fileshare/README.md b/examples/fileshare/README.md deleted file mode 100644 index 65b8e5b1..00000000 --- a/examples/fileshare/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# File Share - -## 🥽 WIP - -We are still working on this example. - - -## Usage - -### Generate `.pb.go` files - -> ⚠️ Expects `.build/` folder in project root, which is created when running `make` at the project root. - -``` -❯ make pb -``` diff --git a/examples/fileshare/app/.eslintrc.yml b/examples/fileshare/app/.eslintrc.yml deleted file mode 100644 index 00fe1858..00000000 --- a/examples/fileshare/app/.eslintrc.yml +++ /dev/null @@ -1,24 +0,0 @@ -env: - browser: true - es2021: true -extends: - - eslint:recommended - - plugin:solid/recommended -parserOptions: - ecmaVersion: latest - sourceType: module -plugins: - - solid -rules: - indent: - - error - - tab - linebreak-style: - - error - - unix - quotes: - - error - - single - semi: - - error - - always diff --git a/examples/fileshare/app/.gitignore b/examples/fileshare/app/.gitignore deleted file mode 100644 index 2068e0b3..00000000 --- a/examples/fileshare/app/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# .gitignore -# - -# node / npm -dist/ -node_modules/ diff --git a/examples/fileshare/app/index.html b/examples/fileshare/app/index.html deleted file mode 100644 index bfbc7292..00000000 --- a/examples/fileshare/app/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - File Share - - -
- - - diff --git a/examples/fileshare/app/package-lock.json b/examples/fileshare/app/package-lock.json deleted file mode 100644 index 91648e7c..00000000 --- a/examples/fileshare/app/package-lock.json +++ /dev/null @@ -1,3406 +0,0 @@ -{ - "name": "app", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "app", - "version": "0.0.0", - "dependencies": { - "@solidjs/router": "^0.10.6", - "solid-icons": "^1.1.0", - "solid-js": "^1.8.7" - }, - "devDependencies": { - "eslint": "^8.56.0", - "eslint-plugin-solid": "^0.13.1", - "vite": "^5.4.8", - "vite-plugin-solid": "^2.8.0" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", - "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", - "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", - "@babel/helper-optimise-call-expression": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz", - "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", - "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.23.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz", - "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-typescript": "^7.23.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", - "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", - "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", - "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", - "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", - "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", - "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", - "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", - "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", - "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", - "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", - "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", - "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", - "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", - "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", - "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", - "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", - "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@solidjs/router": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/@solidjs/router/-/router-0.10.6.tgz", - "integrity": "sha512-PiJO/wsAh0+0mmAIw/+gGgZa0xeMzKGrITWvBfNQ0wiAwNzOF/T0Bm10uhyaWdxPu9td0xK2LuMnC//4CXqnyA==", - "peerDependencies": { - "solid-js": "^1.8.6" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", - "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.17.0.tgz", - "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", - "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/utils": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.17.0.tgz", - "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.17.0", - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/typescript-estree": "6.17.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", - "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.17.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jsx-dom-expressions": { - "version": "0.37.11", - "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.37.11.tgz", - "integrity": "sha512-0NaWy4sFsE0AWlucvL/myEiZ851BgjeLwhtctOFmyVCK6fPXqQHQUBB5SrrrmvOiw/BZCmMe8dOy7JL3FSyTtQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "7.18.6", - "@babel/plugin-syntax-jsx": "^7.18.6", - "@babel/types": "^7.20.7", - "html-entities": "2.3.3", - "validate-html-nesting": "^1.2.1" - }, - "peerDependencies": { - "@babel/core": "^7.20.12" - } - }, - "node_modules/babel-plugin-jsx-dom-expressions/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/babel-preset-solid": { - "version": "1.8.8", - "resolved": "https://registry.npmjs.org/babel-preset-solid/-/babel-preset-solid-1.8.8.tgz", - "integrity": "sha512-m+sFxzriUgMiyUPz/oWxU+N6PwY2bVsZVlc4Jxx+5XhDt5lGE/meg+ZL/kLgSAZ75YuU9AJZr444Un1bO0vhJQ==", - "dev": true, - "dependencies": { - "babel-plugin-jsx-dom-expressions": "^0.37.11" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001574", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", - "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.623", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.623.tgz", - "integrity": "sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==", - "dev": true - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-solid": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-solid/-/eslint-plugin-solid-0.13.1.tgz", - "integrity": "sha512-PdNrAylFzeh/SbnLc2pQ432l+bXFGzXj/qNqkh5QNVZCoWIdSs0CJA2D7hqW0DloztwUrzkVZCDWFWc3iRAm/Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^6.4.0", - "is-html": "^2.0.0", - "kebab-case": "^1.0.2", - "known-css-properties": "^0.24.0", - "style-to-object": "^0.3.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/html-entities": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz", - "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", - "dev": true - }, - "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", - "dev": true - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-html": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-html/-/is-html-2.0.0.tgz", - "integrity": "sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==", - "dev": true, - "dependencies": { - "html-tags": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-what": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", - "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", - "dev": true, - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kebab-case": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/kebab-case/-/kebab-case-1.0.2.tgz", - "integrity": "sha512-7n6wXq4gNgBELfDCpzKc+mRrZFs7D+wgfF5WRFLNAr4DA/qtr9Js8uOAVAfHhuLMfAcQ0pRKqbpjx+TcJVdE1Q==", - "dev": true - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/known-css-properties": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.24.0.tgz", - "integrity": "sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==", - "dev": true - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/merge-anything": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-5.1.7.tgz", - "integrity": "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==", - "dev": true, - "dependencies": { - "is-what": "^4.1.8" - }, - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.1.0", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", - "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", - "dev": true, - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.0", - "@rollup/rollup-android-arm64": "4.24.0", - "@rollup/rollup-darwin-arm64": "4.24.0", - "@rollup/rollup-darwin-x64": "4.24.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", - "@rollup/rollup-linux-arm-musleabihf": "4.24.0", - "@rollup/rollup-linux-arm64-gnu": "4.24.0", - "@rollup/rollup-linux-arm64-musl": "4.24.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", - "@rollup/rollup-linux-riscv64-gnu": "4.24.0", - "@rollup/rollup-linux-s390x-gnu": "4.24.0", - "@rollup/rollup-linux-x64-gnu": "4.24.0", - "@rollup/rollup-linux-x64-musl": "4.24.0", - "@rollup/rollup-win32-arm64-msvc": "4.24.0", - "@rollup/rollup-win32-ia32-msvc": "4.24.0", - "@rollup/rollup-win32-x64-msvc": "4.24.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/seroval": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.0.3.tgz", - "integrity": "sha512-v5Psun3O2OdehTS/BpTC9EezHxyQRM4lqtvOdbngEq8qOZUECqG5XaoFNZgBQrJKXZFgcyZtMH6Dv7G96pKSSQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/solid-icons": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/solid-icons/-/solid-icons-1.1.0.tgz", - "integrity": "sha512-IesTfr/F1ElVwH2E1110s2RPXH4pujKfSs+koT8rwuTAdleO5s26lNSpqJV7D1+QHooJj18mcOiz2PIKs0ic+A==", - "peerDependencies": { - "solid-js": "*" - } - }, - "node_modules/solid-js": { - "version": "1.8.8", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.8.8.tgz", - "integrity": "sha512-9CtL5xWTYX1WWjQKqht3Tl0AJzgz4YWVQk8hoscO9TzRCgzlpAauEOexXa6bPG30W+fWLnFVE7XUiAzQFNeUKw==", - "dependencies": { - "csstype": "^3.1.0", - "seroval": "^1.0.2" - } - }, - "node_modules/solid-refresh": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/solid-refresh/-/solid-refresh-0.5.3.tgz", - "integrity": "sha512-Otg5it5sjOdZbQZJnvo99TEBAr6J7PQ5AubZLNU6szZzg3RQQ5MX04oteBIIGDs0y2Qv8aXKm9e44V8z+UnFdw==", - "dev": true, - "dependencies": { - "@babel/generator": "^7.21.1", - "@babel/helper-module-imports": "^7.18.6", - "@babel/types": "^7.21.2" - }, - "peerDependencies": { - "solid-js": "^1.3" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-to-object": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", - "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", - "dev": true, - "dependencies": { - "inline-style-parser": "0.1.1" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", - "dev": true, - "engines": { - "node": ">=16.13.0" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/validate-html-nesting": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.2.tgz", - "integrity": "sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==", - "dev": true - }, - "node_modules/vite": { - "version": "5.4.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", - "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", - "dev": true, - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-plugin-solid": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/vite-plugin-solid/-/vite-plugin-solid-2.8.0.tgz", - "integrity": "sha512-n5FAm7ZmTl94VWUoiJCgG7bouF2NlC9CA1wY/qbVnkFbYDWk++bFWyNoU48aLJ+lMtzNeYzJypJXOHzFKxL9xA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.3", - "@babel/preset-typescript": "^7.23.3", - "@types/babel__core": "^7.20.4", - "babel-preset-solid": "^1.8.4", - "merge-anything": "^5.1.7", - "solid-refresh": "^0.5.3", - "vitefu": "^0.2.5" - }, - "peerDependencies": { - "solid-js": "^1.7.2", - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" - } - }, - "node_modules/vitefu": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", - "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", - "dev": true, - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/examples/fileshare/app/package.json b/examples/fileshare/app/package.json deleted file mode 100644 index 5b58b5c7..00000000 --- a/examples/fileshare/app/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "app", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "build": "vite build", - "dev": "vite", - "lint": "eslint --ext .jsx src/", - "lint:fix": "eslint --fix --ext .jsx src/", - "preview": "vite preview" - }, - "dependencies": { - "@solidjs/router": "^0.10.6", - "solid-icons": "^1.1.0", - "solid-js": "^1.8.7" - }, - "devDependencies": { - "eslint": "^8.56.0", - "eslint-plugin-solid": "^0.13.1", - "vite": "^5.4.8", - "vite-plugin-solid": "^2.8.0" - } -} diff --git a/examples/fileshare/app/src/app.css b/examples/fileshare/app/src/app.css deleted file mode 100644 index 6e7c33e0..00000000 --- a/examples/fileshare/app/src/app.css +++ /dev/null @@ -1,19 +0,0 @@ -.toolbar { - display: flex; - justify-content: flex-end; - margin-bottom: 2em; -} -.toolbar > button { - margin-right: 1em; -} -.toolbar > button > span { - margin-left: 0.5em; -} -.toolbar > button > svg { - padding-top: 0.25em; - scale: 1.5; -} - -.app .toolbar { - justify-content: flex-start; -} diff --git a/examples/fileshare/app/src/app.jsx b/examples/fileshare/app/src/app.jsx deleted file mode 100644 index 3e21e895..00000000 --- a/examples/fileshare/app/src/app.jsx +++ /dev/null @@ -1,33 +0,0 @@ -import { createEffect } from 'solid-js'; -import { useNavigate } from '@solidjs/router'; -import { IoAdd, IoPeopleSharp } from 'solid-icons/io'; - -import Files from './files'; - -import './app.css'; - -function App(props) { - const nav = useNavigate(); - - createEffect(() => { - if (!props.user.id) { - nav('/users', { replace: true }); - } - }); - - return ( -
-
- - -
- - -
- ); -} - -export default App; diff --git a/examples/fileshare/app/src/busy.css b/examples/fileshare/app/src/busy.css deleted file mode 100644 index 0db239c3..00000000 --- a/examples/fileshare/app/src/busy.css +++ /dev/null @@ -1,19 +0,0 @@ -.busy { - animation: busyframes 0.8s linear infinite; - display: inline-block; - border-top: 0.1em solid #646cff; - border-right: 0.1em solid transparent; - border-radius: 50%; - box-sizing: border-box; - height: 2em; - width: 2em; -} - -@keyframes busyframes { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} diff --git a/examples/fileshare/app/src/busy.jsx b/examples/fileshare/app/src/busy.jsx deleted file mode 100644 index a0875d37..00000000 --- a/examples/fileshare/app/src/busy.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import './busy.css'; - -function Busy() { - return ( - - ); -} - -export default Busy; diff --git a/examples/fileshare/app/src/file.css b/examples/fileshare/app/src/file.css deleted file mode 100644 index 2861080b..00000000 --- a/examples/fileshare/app/src/file.css +++ /dev/null @@ -1,49 +0,0 @@ -.file-details { - border: 0.01em solid #bbb; - border-radius: 0.25em; - margin: 5em auto; - max-width: 40em; - transition: all .5s ease; - text-align: left; -} -.file-details .icon { - font-size: xx-large; -} -.file-details .toolbar > button { - background-color: transparent; - margin: 0.7em 0.7em 0 0; - transition: all .2s ease-out; -} -.file-details .toolbar > button:hover { - transform: translateY(-0.25em); - transition: all .5s ease; -} - -.detail { - border-left: 0.09em solid #eaeaea; - margin-left: 3em; - padding: 2em; -} -.detail .group { - margin-bottom: 1em; -} - -.flex { - display: flex; - padding: 0 2em 2em 2em; -} - -.icon { - align-items: center; - border: 0.05em solid #e8e8e8; - border-radius: 50%; - display: flex; - justify-content: center; - margin: auto 0; - padding: 1em; -} - -.label { - display: block; - font-weight: 700; -} diff --git a/examples/fileshare/app/src/file.jsx b/examples/fileshare/app/src/file.jsx deleted file mode 100644 index c0faafbb..00000000 --- a/examples/fileshare/app/src/file.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import { createEffect, createResource, Show } from 'solid-js'; -import { useNavigate, useParams } from '@solidjs/router'; -import { IoCloseCircleOutline, IoDocumentOutline } from 'solid-icons/io'; - -import Busy from './busy'; -import NewFile from './new-file'; - -import './file.css'; - -function FileDetails(props) { - function onClose() { - props?.onClose && props.onClose(); - } - - return ( -
-
- -
- -
-
- -
-
-
-
Id
-
{props.data.id}
-
-
-
Name
-
{props.data.name}
-
-
-
Access
-
{props.data.role}
-
-
-
-
- ); -} - -function File(props) { - const params = useParams(); - const nav = useNavigate(); - - const [file, {mutate : setFile}] = createResource( - () => [params.id, props.user.id], - async ([fileId, userId]) => { - if (fileId === ':new') { - return {}; - } - - const resp = await fetch(`http://localhost:3000/v1/files/${fileId}`, { - headers : { - 'user-id': userId, - }, - }); - - return resp.json(); - } - ); - - createEffect(() => { - if (!props.user.id) { - nav('/users', { replace: true }); - } - }); - - function onClose() { - nav('/'); - } - - function onNewFile(data) { - setFile(data); - } - - return ( - ()} - > - - - - - ); -} - -export default File; diff --git a/examples/fileshare/app/src/files.css b/examples/fileshare/app/src/files.css deleted file mode 100644 index 0f497cd0..00000000 --- a/examples/fileshare/app/src/files.css +++ /dev/null @@ -1,39 +0,0 @@ -.cell { - display: flex; -} -.cell > button { - display: flex; - padding: 0.3em 0.5em; - margin-right: 1.5em; - max-height: 2em; -} - -.cell .link > span { - padding-left: 0.3em; -} -.cell .link > svg { - padding: 0.2em 0.4em 0 0.3em; - scale: 1.5; -} - -.pagination { - margin-top: 1.5em; -} -.pagination > span { - padding: 1em; -} - -.row { - display: flex; - margin: 0.5em; - padding: 0 1em 0 1em; -} -.row > div { - flex: 1; - padding: 0.25em; - text-align: left; -} -.row.header { - border-bottom: thin solid #cbc4c4; - font-weight: bold; -} diff --git a/examples/fileshare/app/src/files.jsx b/examples/fileshare/app/src/files.jsx deleted file mode 100644 index ed730337..00000000 --- a/examples/fileshare/app/src/files.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import { createResource, createSignal, For, Show } from 'solid-js'; -import { A } from '@solidjs/router'; - -import { IoChevronBack, IoChevronForward, IoDocumentOutline } from 'solid-icons/io'; - -import Busy from './busy'; - -import './files.css'; - -function Files(props) { - const [pageTokens, setPageTokens] = createSignal([]); - const [token, setToken] = createSignal(''); - const [nextToken, setNextToken] = createSignal(''); - - const prev = () => { - const t = pageTokens().pop(); - setPageTokens(pageTokens()); - - setToken(t); - }; - - const next = () => { - setPageTokens([ ...pageTokens(), token() ]); - - const t = nextToken(); - setNextToken(''); - - setToken(t); - }; - - const [files] = createResource( - () => [token(), props.user.id], - async ([token, userId]) => { - const resp = await fetch(`http://localhost:3000/v1/files?pagination_limit=3&pagination_token=${token}`, { - headers : { - 'user-id': userId, - }, - }); - - const data = await resp.json(); - setNextToken( data.pagination_token ); - - return data.files; - } - ); - - return ( -
-
-
-
Name
-
Access
-
- - - { - (file) => ( -
- -
{file.role}
-
- ) - } -
-
-
- -
- ); -} - -export default Files; diff --git a/examples/fileshare/app/src/index.css b/examples/fileshare/app/src/index.css deleted file mode 100644 index e675ed09..00000000 --- a/examples/fileshare/app/src/index.css +++ /dev/null @@ -1,119 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 0.25em auto -webkit-focus-ring-color; -} - -input { - background: #fff; - border: 0.08em solid rgba(175, 184, 193, 0.6); - border-radius: 0.5em; - font-size: large; - margin-bottom: 1em; - padding: 0.8em; -} -input:focus { - border-color: #90c6ff; - outline: none; - transition: border .5s ease; -} -input::placeholder { - color: #a6afb8; -} -input[type="submit"] { - border: 0.1em solid #1a1a1a; - border-radius: 0.5em; - cursor: pointer; - font-weight: 500; - min-width: 10em; - transition: all .2s ease-out -} -input[type="submit"]:hover, -input[type="submit"]:focus-visible { - background: #1a1a1a; - box-shadow: rgba(0, 0, 0, 0.25) 0.1em 0.4em 1em; - color: #fff; - transform: translateY(-0.25em); - transition: all .5s ease; -} -input[type="text"] { - box-sizing: border-box; - width: 100%; -} - -label { - display: block; - font-size: large; - font-weight: 700; - margin-bottom: 0.5em; - padding-left: 0.5em; - text-align: left; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/examples/fileshare/app/src/index.jsx b/examples/fileshare/app/src/index.jsx deleted file mode 100644 index a2b4afec..00000000 --- a/examples/fileshare/app/src/index.jsx +++ /dev/null @@ -1,26 +0,0 @@ -/* @refresh reload */ -import { createSignal, lazy } from 'solid-js'; -import { render } from 'solid-js/web'; -import { Router, Route } from '@solidjs/router'; - -import './index.css'; -import App from './app'; - -const File = lazy(() => import('./file')); -const SignUp = lazy(() => import('./sign-up')); -const Users = lazy(() => import('./users')); - -const [user, setUser] = createSignal({}); -const root = document.getElementById('root'); - -render( - () => ( - - ()} /> - ()} /> - ()} /> - ()} /> - - ), - root -); diff --git a/examples/fileshare/app/src/new-file.css b/examples/fileshare/app/src/new-file.css deleted file mode 100644 index 06f1996e..00000000 --- a/examples/fileshare/app/src/new-file.css +++ /dev/null @@ -1,29 +0,0 @@ -.new-file { - border: 0.01em solid #bbb; - border-radius: 0.25em; - margin: 5em auto; - max-width: 40em; - transition: all .5s ease; -} - -.new-file form { - margin: 2em 4em; -} - -.new-file h2 { - margin-bottom: 2em; -} - -.new-file .action { - margin-top: 3em; -} - -.new-file .toolbar > button { - background-color: transparent; - margin: 0.7em 0.7em 0 0; - transition: all .2s ease-out; -} -.new-file .toolbar > button:hover { - transform: translateY(-0.25em); - transition: all .5s ease; -} diff --git a/examples/fileshare/app/src/new-file.jsx b/examples/fileshare/app/src/new-file.jsx deleted file mode 100644 index 1beed58d..00000000 --- a/examples/fileshare/app/src/new-file.jsx +++ /dev/null @@ -1,75 +0,0 @@ -import { createSignal, Show } from 'solid-js'; -import { IoCloseCircleOutline } from 'solid-icons/io'; - -import Busy from './busy'; - -import './new-file.css'; - -function NewFile(props) { - const [busy, setBusy] = createSignal(false); - const [fileName, setFileName] = createSignal(''); - - const createFile = async (e) => { - e.preventDefault(); - - setBusy(true); - const resp = await fetch('http://localhost:3000/v1/files', { - method: 'POST', - headers: { - 'content-type': 'application/json', - 'user-id': props.user.id, - }, - body: JSON.stringify({ name: fileName() }), - }); - - setBusy(false); - - if (props?.onSuccess) { - props.onSuccess(await resp.json()); - } - }; - - const onCancel = () => { - props?.onCancel && props.onCancel(); - }; - - return ( -
-
- -
- -
-

New file

-
- - setFileName(e.target.value)} - /> -
- -
- } - > - - -
-
-
- ); -} - -export default NewFile; diff --git a/examples/fileshare/app/src/sign-up.css b/examples/fileshare/app/src/sign-up.css deleted file mode 100644 index afd8548f..00000000 --- a/examples/fileshare/app/src/sign-up.css +++ /dev/null @@ -1,58 +0,0 @@ -.sign-up { - background: linear-gradient(rgba(35,43,85,0.75),rgba(35,43,85,0.95)); - background-size: cover; - border-radius: 0.25em; - box-shadow: 0.2em 0.2em 0.5em rgba(0,0,0,0.2); - margin: 5em auto; - max-width: 30em; - padding: 1em; - transition: all .5s ease; -} -.sign-up input { - background: rgba(255,255,255,.2); - border: none; - border-radius: 0.25em; - color: #fff; - font-size: large; - margin-bottom: 1em; - padding: 0.8em; -} -.sign-up input:focus { - background: rgba(255,255,255,.3); - outline: none; - transition: background .5s ease; -} -.sign-up input::placeholder { - color: #cbcbcb; -} -.sign-up label { - color: rgba(255,255,255,.7); - display: block; - font-weight: 500; -} - -.sign-up .action { - border-top: thin solid rgba(255,255,255,.3); - margin-top: 0.5em; - min-height: 4.2em; - padding: 1.5em 1em 0.5em 1em; -} -.sign-up .action > input { - width: 100%; -} -.sign-up .action > input[type="submit"] { - cursor: pointer; -} - -.sign-up .group { - margin: 1em; - text-align: left; - overflow: hidden; -} -.sign-up .group > input { - margin-top: 0.5em; -} -.sign-up .group > input[type="text"] { - box-sizing: border-box; - width: 100%; -} diff --git a/examples/fileshare/app/src/sign-up.jsx b/examples/fileshare/app/src/sign-up.jsx deleted file mode 100644 index d145c1ed..00000000 --- a/examples/fileshare/app/src/sign-up.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import { createSignal, Show } from 'solid-js'; -import { useNavigate } from '@solidjs/router'; - -import Busy from './busy'; - -import './sign-up.css'; - -function SignUp(props) { - const [busy, setBusy] = createSignal(false); - const [name, setName] = createSignal(''); - const nav = useNavigate(); - - const signup = async (e) => { - e.preventDefault(); - - setBusy(true); - try { - const resp = await fetch('http://localhost:3000/v1/users', { - method : 'POST', - headers : { - 'content-type': 'application/json', - }, - body : JSON.stringify({ name: name() }), - }); - - props.setUser(await resp.json()); - } catch (err) { - console.log(err); - return; - } - - setBusy(false); - nav('/'); - }; - - return ( - - ); -} - -export default SignUp; diff --git a/examples/fileshare/app/src/users.css b/examples/fileshare/app/src/users.css deleted file mode 100644 index d4972749..00000000 --- a/examples/fileshare/app/src/users.css +++ /dev/null @@ -1,3 +0,0 @@ -.users .toolbar { - justify-content: flex-start; -} diff --git a/examples/fileshare/app/src/users.jsx b/examples/fileshare/app/src/users.jsx deleted file mode 100644 index 29d9c6f0..00000000 --- a/examples/fileshare/app/src/users.jsx +++ /dev/null @@ -1,92 +0,0 @@ -import { - createEffect, - createSignal, - onMount, - For, - Show -} from 'solid-js'; -import { useNavigate } from '@solidjs/router'; -import { IoHome, IoLogInOutline } from 'solid-icons/io'; - -import Busy from './busy'; - -import './users.css'; - -function Users(props) { - const nav = useNavigate(); - - const [busy, setBusy] = createSignal(false); - const [token, setToken] = createSignal(''); - const [users, setUsers] = createSignal([]); - - async function fetchUsers(token) { - setBusy(true); - const resp = await fetch(`http://localhost:3000/v1/users?pagination_token=${token}`); - - const data = await resp.json(); - setToken(data.pagination_token); - - setUsers((prev) => ( - [ - ...prev, - ...data.users, - ] - )); - - setBusy(false); - } - - function onScroll() { - if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 1) { - const t = token(); - if (t) { - fetchUsers(token()); - } - } - } - - function switchUser(user) { - props.setUser(user); - nav('/'); - } - - createEffect(() => { - window.addEventListener('scroll', onScroll); - }); - - onMount(async () => { - await fetchUsers(token()); - }); - - return ( -
-
- -
-
-
-
Id
-
Name
-
- - { - (user) => ( -
-
- - {user.id} -
-
{user.name}
-
- ) - } -
- -
-
- ); -} - -export default Users; diff --git a/examples/fileshare/app/vite.config.js b/examples/fileshare/app/vite.config.js deleted file mode 100644 index 6ab51649..00000000 --- a/examples/fileshare/app/vite.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'vite'; -import solid from 'vite-plugin-solid'; - -export default defineConfig({ - plugins: [solid()], -}); diff --git a/examples/fileshare/go.mod b/examples/fileshare/go.mod deleted file mode 100644 index 6ffa61a3..00000000 --- a/examples/fileshare/go.mod +++ /dev/null @@ -1,49 +0,0 @@ -module github.com/sentium/examples/fileshare - -go 1.20 - -require ( - github.com/gin-contrib/cors v1.6.0 - github.com/gin-contrib/logger v0.3.0 - github.com/gin-gonic/gin v1.9.1 - github.com/go-playground/validator/v10 v10.19.0 - github.com/rs/xid v1.5.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 - google.golang.org/grpc v1.60.1 - google.golang.org/protobuf v1.33.0 -) - -require ( - github.com/bytedance/sonic v1.11.2 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect - github.com/chenzhuoyu/iasm v0.9.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gabriel-vasile/mimetype v1.4.3 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.7 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.4.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rs/zerolog v1.31.0 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.12 // indirect - golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/examples/fileshare/go.sum b/examples/fileshare/go.sum deleted file mode 100644 index 2d916979..00000000 --- a/examples/fileshare/go.sum +++ /dev/null @@ -1,123 +0,0 @@ -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= -github.com/bytedance/sonic v1.11.2 h1:ywfwo0a/3j9HR8wsYGWsIWl2mvRsI950HyoxiBERw5A= -github.com/bytedance/sonic v1.11.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= -github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= -github.com/gin-contrib/cors v1.6.0 h1:0Z7D/bVhE6ja07lI8CTjTonp6SB07o8bNuFyRbsBUQg= -github.com/gin-contrib/cors v1.6.0/go.mod h1:cI+h6iOAyxKRtUtC6iF/Si1KSFvGm/gK+kshxlCi8ro= -github.com/gin-contrib/logger v0.3.0 h1:YGZ1NfSSjwi7/cYh+osXwd4Bv9E1nDbhNFALjdmnqVw= -github.com/gin-contrib/logger v0.3.0/go.mod h1:jPffeHB+wCkEgBlEH+QTjeenpMBqYgxDYUrZHe2YcAg= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4= -github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= -github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= -github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= -golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/examples/fileshare/main.go b/examples/fileshare/main.go deleted file mode 100644 index 89b293ba..00000000 --- a/examples/fileshare/main.go +++ /dev/null @@ -1,73 +0,0 @@ -package main - -import ( - "context" - "flag" - "log" - "os" - "os/signal" - - "github.com/gin-contrib/cors" - "github.com/gin-contrib/logger" - "github.com/gin-gonic/gin" - - "github.com/sentium/examples/fileshare/pkg/handlers" -) - -func main() { - if err := run(); err != nil { - log.Fatalln(err) - } -} - -func run() (err error) { - var addr string - flag.StringVar(&addr, "l", "127.0.0.1:3000", "The address (host:port) to listen on") - flag.Parse() - - // Main running context during app lifecycle - ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) - defer stop() - - // Setup server - engine := gin.New() - engine.Use(logger.SetLogger()) // logger middleware - engine.Use(gin.Recovery()) // recovery middleware - - // cors - config := cors.DefaultConfig() - config.AllowAllOrigins = true - config.AllowHeaders = append(config.AllowHeaders, "user-id") - engine.Use(cors.New(config)) - - engine.NoRoute(func(c *gin.Context) { - c.JSON(404, gin.H{ - "error": gin.H{ - "message": "Not found", - }, - }) - }) - - router := engine.Group("/") - handlers.Init(router) - - // Serve HTTP in a goroutine - srvErr := make(chan error, 1) - go func() { - srvErr <- engine.Run(addr) - }() - - // Handle channels - select { - case err = <-srvErr: - // Error from server - return - case <-ctx.Done(): - // Wait for first CTRL+C - // Stop receiving signal notifications as soon as possible. - stop() - log.Println("shutting down gracefully, press Ctrl+C again to force") - } - - return -} diff --git a/examples/fileshare/pkg/handlers/handlers.go b/examples/fileshare/pkg/handlers/handlers.go deleted file mode 100644 index 0b373398..00000000 --- a/examples/fileshare/pkg/handlers/handlers.go +++ /dev/null @@ -1,28 +0,0 @@ -package handlers - -import ( - "net/http" - - "github.com/gin-gonic/gin" - - v1 "github.com/sentium/examples/fileshare/pkg/handlers/v1" -) - -func Init(router *gin.RouterGroup) { - router.GET("/", func(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "version": "1.0.0", - }) - }) - - router.GET("/healthz", healthz) - - v1Router := router.Group("/v1") - { - v1.Init(v1Router) - } -} - -func healthz(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/examples/fileshare/pkg/handlers/v1/files.go b/examples/fileshare/pkg/handlers/v1/files.go deleted file mode 100644 index b3f3aad1..00000000 --- a/examples/fileshare/pkg/handlers/v1/files.go +++ /dev/null @@ -1,492 +0,0 @@ -package v1 - -import ( - "net/http" - - "github.com/gin-gonic/gin" - "github.com/rs/xid" - "google.golang.org/protobuf/types/known/structpb" - - sentium "github.com/sentium/examples/fileshare/pkg/pb/sentium/api/v1" -) - -type CreateFileRequest struct { - Name string `json:"name" validate:"required"` -} - -func (req *CreateFileRequest) Validate() error { - validate := getValidator() - if err := validate.Struct(req); err != nil { - return err - } - - return nil -} - -type File struct { - Id string `json:"id" validate:"required"` - Name string `json:"name" validate:"required"` - Role string `json:"role" validate:"required,oneof=editor owner viewer"` -} - -func (f *File) Validate() error { - validate := getValidator() - if err := validate.Struct(f); err != nil { - return err - } - - return nil -} - -type ListFilesResponse struct { - Files []File `json:"files"` - PaginationToken string `json:"pagination_token"` -} - -type ShareFileRequest struct { - Role string `json:"role" validate:"required,oneof=editor owner viewer"` - UserId string `json:"id" validate:"required"` -} - -func (req *ShareFileRequest) Validate() error { - validate := getValidator() - if err := validate.Struct(req); err != nil { - return err - } - - return nil -} - -type FileUser struct { - Id string `json:"id"` - Name string `json:"name"` - Role string `json:"role"` - Segment string `json:"segment"` -} - -type ListFileUsersResponse struct { - PaginationToken string `json:"pagination_token"` - Users []FileUser `json:"users"` -} - -func createFile(c *gin.Context) { - ctx := c.Request.Context() - userId := c.GetHeader("user-id") - - // Read the request body - var request CreateFileRequest - if err := c.ShouldBindJSON(&request); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if err := request.Validate(); err != nil { - c.JSON(http.StatusBadRequest, err.Error()) - return - } - - // Map request - fileId := xid.New().String() - attrs, err := structpb.NewStruct(map[string]interface{}{ - "name": request.Name, - "role": "owner", - }) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - authzGrantRequest := sentium.AuthzGrantRequest{ - PrincipalId: userId, - ResourceId: fileId, - ResourceType: "files", - Attrs: attrs, - } - - // Grant access to file - authzClient, err := getAuthzClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if _, err := authzClient.Grant(ctx, &authzGrantRequest); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - resp := File{ - Id: fileId, - Name: request.Name, - Role: "owner", - } - - c.JSON(http.StatusCreated, resp) -} - -func deleteFile(c *gin.Context) { - ctx := c.Request.Context() - fileId := c.Param("file") - userId := c.GetHeader("user-id") - - // Check requestor has access to shared resource - role, err := getRole(ctx, userId, fileId) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if role == "" { - c.JSON(http.StatusForbidden, "no access to file") - return - } - - // Check requestor can delete file - if err := canDelete(role); err != nil { - c.JSON(http.StatusForbidden, err.Error()) - return - } - - // To delete a file, we revoke all access to it - // List all principals that have access to the file - listPrinipalsReq := sentium.ResourcesListPrincipalsRequest{ - ResourceId: fileId, - ResourceType: "files", - } - - resourcesClient, err := getResourcesClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - listPrincipalsResp, err := resourcesClient.ListPrincipals(ctx, &listPrinipalsReq) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Revoke access from each principal - authzClient, err := getAuthzClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - for _, principal := range listPrincipalsResp.Principals { - authzRevokeRequest := sentium.AuthzRevokeRequest{ - PrincipalId: principal.Id, - ResourceId: fileId, - ResourceType: "files", - } - - if _, err := authzClient.Revoke(ctx, &authzRevokeRequest); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - } - - c.Status(http.StatusNoContent) -} - -func getFile(c *gin.Context) { - ctx := c.Request.Context() - fileId := c.Param("file") - userId := c.GetHeader("user-id") - - // Check requestor has access to file - authzClient, err := getAuthzClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - authzCheckRequest := sentium.AuthzCheckRequest{ - PrincipalId: userId, - ResourceId: fileId, - ResourceType: "files", - } - - authzCheckResponse, err := authzClient.Check(ctx, &authzCheckRequest) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if !authzCheckResponse.GetOk() { - c.JSON(http.StatusForbidden, "no access to file") - return - } - - // Get the file - resourcesListReq := sentium.ResourcesListRequest{ - PrincipalId: userId, - ResourceType: "files", - } - - resourcesClient, err := getResourcesClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - resourcesListResp, err := resourcesClient.List(ctx, &resourcesListReq) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - var file *File - for _, resource := range resourcesListResp.Resources { - if resource.Id != fileId { - continue - } - - attrs := resource.GetAttrs() - if attrs == nil || attrs.Fields["name"] == nil || attrs.Fields["role"] == nil { - continue - } - - file = &File{ - Id: resource.GetId(), - Name: attrs.Fields["name"].GetStringValue(), - Role: attrs.Fields["role"].GetStringValue(), - } - - break - } - - if file == nil { - c.JSON(http.StatusNotFound, "not found") - } - - c.JSON(http.StatusOK, file) -} - -func listFiles(c *gin.Context) { - ctx := c.Request.Context() - userId := c.GetHeader("user-id") - - // Map request - paginationLimit, paginationToken := getPaginationParams(c) - resourcesListReq := sentium.ResourcesListRequest{ - PaginationLimit: paginationLimit, - PaginationToken: paginationToken, - PrincipalId: userId, - ResourceType: "files", - } - - resourcesClient, err := getResourcesClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - resourcesListResp, err := resourcesClient.List(ctx, &resourcesListReq) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - resp := ListFilesResponse{ - Files: []File{}, - } - - if resourcesListResp.PaginationToken != nil { - resp.PaginationToken = *resourcesListResp.PaginationToken - } - - for _, resource := range resourcesListResp.Resources { - attrs := resource.GetAttrs() - if attrs == nil || attrs.Fields["name"] == nil || attrs.Fields["role"] == nil { - continue - } - - resp.Files = append(resp.Files, File{ - Id: resource.GetId(), - Name: attrs.Fields["name"].GetStringValue(), - Role: attrs.Fields["role"].GetStringValue(), - }) - } - - c.JSON(http.StatusOK, resp) -} - -func listFileUsers(c *gin.Context) { - ctx := c.Request.Context() - fileId := c.Param("file") - userId := c.GetHeader("user-id") - paginationLimit, paginationToken := getPaginationParams(c) - - // Check requestor has access to file - role, err := getRole(ctx, userId, fileId) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if role == "" { - c.JSON(http.StatusForbidden, "no access to file") - return - } - - // Map request - listPrinipalsReq := sentium.ResourcesListPrincipalsRequest{ - ResourceId: fileId, - ResourceType: "files", - PaginationLimit: paginationLimit, - PaginationToken: paginationToken, - } - - // List Principals - resourcesClient, err := getResourcesClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - listPrincipalsResp, err := resourcesClient.ListPrincipals(ctx, &listPrinipalsReq) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - resp := ListFileUsersResponse{ - Users: []FileUser{}, - } - - if listPrincipalsResp.PaginationToken != nil { - resp.PaginationToken = *listPrincipalsResp.PaginationToken - } - - for _, principal := range listPrincipalsResp.Principals { - attrs := principal.GetAttrs() - if attrs == nil || attrs.Fields["name"] == nil || attrs.Fields["role"] == nil { - continue - } - - user, err := getUserFromPrincipalId(ctx, principal.Id) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - resp.Users = append(resp.Users, FileUser{ - Id: principal.Id, - Name: user.Name, - Role: attrs.Fields["role"].GetStringValue(), - Segment: user.Segment, - }) - } - - c.JSON(http.StatusOK, resp) -} - -func shareFile(c *gin.Context) { - ctx := c.Request.Context() - fileId := c.Param("file") - userId := c.GetHeader("user-id") - var request ShareFileRequest - if err := c.ShouldBindJSON(&request); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if err := request.Validate(); err != nil { - c.JSON(http.StatusBadRequest, err.Error()) - return - } - - // Check requestor has access to shared resource - role, err := getRole(ctx, userId, fileId) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if role == "" { - c.JSON(http.StatusForbidden, "no access to file") - return - } - - // Check requestor can share file - if err := canShare(role, request.Role); err != nil { - c.JSON(http.StatusForbidden, err.Error()) - return - } - - // Share resource - authzGrantRequest := sentium.AuthzGrantRequest{ - PrincipalId: request.UserId, - ResourceId: fileId, - ResourceType: "files", - } - - if _, err := authzClient.Grant(ctx, &authzGrantRequest); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - c.JSON(http.StatusNoContent, nil) -} - -func unshareFile(c *gin.Context) { - ctx := c.Request.Context() - fileId := c.Param("file") - userId := c.Param("user") - reqUserId := c.GetHeader("user-id") - - // Chech request user has access to file - requestorRole, err := getRole(ctx, reqUserId, fileId) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if requestorRole == "" { - c.JSON(http.StatusForbidden, "no access to file") - return - } - - // Get role of the user the file share is removed from - role, err := getRole(ctx, userId, fileId) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if role == "" { - c.Status(http.StatusNoContent) - return - } - - // Check if user can unsharefile - if err := canUnshare(requestorRole, role); err != nil { - c.JSON(http.StatusUnprocessableEntity, err.Error()) - return - } - - // Unshare file - authzRevokeRequest := sentium.AuthzRevokeRequest{ - PrincipalId: userId, - ResourceId: fileId, - ResourceType: "files", - } - - authzClient, err := getAuthzClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if _, err := authzClient.Revoke(ctx, &authzRevokeRequest); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - c.Status(http.StatusNoContent) -} diff --git a/examples/fileshare/pkg/handlers/v1/files_test.go b/examples/fileshare/pkg/handlers/v1/files_test.go deleted file mode 100644 index 57e748a2..00000000 --- a/examples/fileshare/pkg/handlers/v1/files_test.go +++ /dev/null @@ -1,936 +0,0 @@ -package v1 - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "testing" - - "github.com/gin-gonic/gin" - "github.com/rs/xid" - "github.com/stretchr/testify/require" -) - -func TestCreateFile(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.POST("/files", createFile) - - users, err := usersCreate(ctx, nil, 1) - require.NoError(t, err) - defer usersDelete(ctx, users) - headers := map[string]string{ - "user-id": users[0].Id, - } - - fileReq := CreateFileRequest{ - Name: "File Name", - } - - t.Run("FailPrincipalNotFound", func(t *testing.T) { - headers := map[string]string{ - "user-id": "unicorn", - } - - resp, err := RouteHttp(router, "POST", "/files", fileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusInternalServerError, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - expedtedResp := "\"rpc error: code = InvalidArgument desc = [sentium:1.3.2.400] Invalid principal for record\"" - require.Equal(t, expedtedResp, string(respBody)) - }) - - t.Run("FailMissingName", func(t *testing.T) { - resp, err := RouteHttp(router, "POST", "/files", CreateFileRequest{}, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusBadRequest, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - require.Equal( - t, - "\"Key: 'CreateFileRequest.Name' Error:Field validation for 'Name' failed on the 'required' tag\"", - string(respBody), - ) - }) - - t.Run("Success", func(t *testing.T) { - resp, err := RouteHttp(router, "POST", "/files", fileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusCreated, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var file File - json.Unmarshal(respBody, &file) - defer filesDelete(ctx, []File{file}, headers["user-id"]) - - expectedResp := File{ - Id: file.Id, - Name: fileReq.Name, - Role: "owner", - } - - require.Equal(t, expectedResp, file) - }) -} - -func TestDeleteFile(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.DELETE("/files/:file", deleteFile) - - users, err := usersCreate(ctx, nil, 4) - require.NoError(t, err) - defer usersDelete(ctx, users) - owner := users[0] - editor := users[1] - viewer := users[2] - noAccess := users[3] - - files, err := filesCreate(ctx, 3, owner.Id) - require.NoError(t, err) - defer filesDelete(ctx, files, owner.Id) - deleteByOwner := files[0] - deleteByEditor := files[1] - deleteByViewer := files[2] - - // Share files - err = filesShare(ctx, deleteByOwner, editor.Id, "editor") - require.NoError(t, err) - - err = filesShare(ctx, deleteByEditor, editor.Id, "editor") - require.NoError(t, err) - - err = filesShare(ctx, deleteByEditor, viewer.Id, "viewer") - require.NoError(t, err) - - err = filesShare(ctx, deleteByViewer, viewer.Id, "viewer") - require.NoError(t, err) - - t.Run("FailNoAccess", func(t *testing.T) { - headers := map[string]string{ - "user-id": noAccess.Id, - } - - path := fmt.Sprintf("/files/%s", deleteByViewer.Id) - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailViewer", func(t *testing.T) { - headers := map[string]string{ - "user-id": viewer.Id, - } - - path := fmt.Sprintf("/files/%s", deleteByViewer.Id) - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"cannot delee file (role: viewer)\"", - string(respBody), - ) - }) - - t.Run("SuccessOwner", func(t *testing.T) { - // Check owner and editor have acces to file - exists, err := checkFileExistsForUser(ctx, deleteByOwner.Id, owner.Id) - require.NoError(t, err) - require.True(t, exists) - - exists, err = checkFileExistsForUser(ctx, deleteByOwner.Id, editor.Id) - require.NoError(t, err) - require.True(t, exists) - - // Send request to delete file - headers := map[string]string{ - "user-id": owner.Id, - } - - path := fmt.Sprintf("/files/%s", deleteByOwner.Id) - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - // Check the file was deleted for owner - exists, err = checkFileExistsForUser(ctx, deleteByOwner.Id, owner.Id) - require.NoError(t, err) - require.False(t, exists) - - // Check the file was deleted for editor - exists, err = checkFileExistsForUser(ctx, deleteByOwner.Id, editor.Id) - require.NoError(t, err) - require.False(t, exists) - }) - - t.Run("SuccessEditor", func(t *testing.T) { - // Check owner, editor and viewer have access to file - exists, err := checkFileExistsForUser(ctx, deleteByEditor.Id, owner.Id) - require.NoError(t, err) - require.True(t, exists) - - exists, err = checkFileExistsForUser(ctx, deleteByEditor.Id, editor.Id) - require.NoError(t, err) - require.True(t, exists) - - exists, err = checkFileExistsForUser(ctx, deleteByEditor.Id, viewer.Id) - require.NoError(t, err) - require.True(t, exists) - - // Send request to delete file - headers := map[string]string{ - "user-id": editor.Id, - } - - path := fmt.Sprintf("/files/%s", deleteByEditor.Id) - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - // Check the file was deleted for owner - exists, err = checkFileExistsForUser(ctx, deleteByEditor.Id, owner.Id) - require.NoError(t, err) - require.False(t, exists) - - // Check the file was deleted for editor - exists, err = checkFileExistsForUser(ctx, deleteByEditor.Id, editor.Id) - require.NoError(t, err) - require.False(t, exists) - - // Check the file was deleted for viewer - exists, err = checkFileExistsForUser(ctx, deleteByEditor.Id, viewer.Id) - require.NoError(t, err) - require.False(t, exists) - }) -} - -func TestGetFile(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.GET("/files/:file", getFile) - - users, err := usersCreate(ctx, nil, 2) - require.NoError(t, err) - defer usersDelete(ctx, users) - userWithAccess := users[0] - userNoAccess := users[1] - - files, err := filesCreate(ctx, 1, userWithAccess.Id) - require.NoError(t, err) - defer filesDelete(ctx, files, userWithAccess.Id) - fileId := files[0].Id - - t.Run("FailNoAccess", func(t *testing.T) { - headers := map[string]string{ - "user-id": userNoAccess.Id, - } - - path := fmt.Sprintf("/files/%s", fileId) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailNotExists", func(t *testing.T) { - headers := map[string]string{ - "user-id": userWithAccess.Id, - } - - resp, err := RouteHttp(router, "GET", "/files/1234", nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("Success", func(t *testing.T) { - headers := map[string]string{ - "user-id": userWithAccess.Id, - } - - path := fmt.Sprintf("/files/%s", fileId) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var actual File - err = json.Unmarshal(respBody, &actual) - require.NoError(t, err) - require.Equal(t, files[0], actual) - }) -} - -func TestListFiles(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.GET("/files", listFiles) - - users, err := usersCreate(ctx, nil, 1) - require.NoError(t, err) - defer usersDelete(ctx, users) - userId := users[0].Id - headers := map[string]string{ - "user-id": userId, - } - - numFiles := 5 - files, err := filesCreate(ctx, numFiles, userId) - require.NoError(t, err) - defer filesDelete(ctx, files, userId) - - t.Run("SuccessWithPaginationLimitNoToken", func(t *testing.T) { - path := fmt.Sprintf("/files?pagination_limit=%d", numFiles-1) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFilesResp ListFilesResponse - json.Unmarshal(respBody, &listFilesResp) - - require.NotEmpty(t, listFilesResp.PaginationToken) - require.Len(t, listFilesResp.Files, numFiles-1) - }) - - t.Run("SuccessNoPaginationNoFiles", func(t *testing.T) { - headers := map[string]string{ - "Userid": "unicorn", - } - - resp, err := RouteHttp(router, "GET", "/files", nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFilesResp ListFilesResponse - json.Unmarshal(respBody, &listFilesResp) - - require.Equal(t, "", listFilesResp.PaginationToken) - require.Empty(t, listFilesResp.Files) - }) - - t.Run("SuccessWithTokenNoLimit", func(t *testing.T) { - // Run first search to iobrtain a token - limit := 3 - path := fmt.Sprintf("/files?pagination_limit=%d", limit) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFilesResp ListFilesResponse - json.Unmarshal(respBody, &listFilesResp) - - token := listFilesResp.PaginationToken - require.NotEmpty(t, token) - - // Second request using token - path = fmt.Sprintf("/files?pagination_token=%s", token) - resp, err = RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - respBody, err = io.ReadAll(resp.Body) - require.NoError(t, err) - - json.Unmarshal(respBody, &listFilesResp) - - require.Empty(t, listFilesResp.PaginationToken) - require.Len(t, listFilesResp.Files, numFiles-limit) - }) - - t.Run("SuccessMaxFilesReturned", func(t *testing.T) { - path := fmt.Sprintf("/files?pagination_limit=%d", numFiles) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFilesResp ListFilesResponse - json.Unmarshal(respBody, &listFilesResp) - - require.NotEqual(t, "", listFilesResp.PaginationToken) - require.Len(t, listFilesResp.Files, numFiles) - }) -} - -func TestListFileUsers(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.GET("/files/:file/users", listFileUsers) - - // Create users - users, err := usersCreate(ctx, nil, 4) - require.NoError(t, err) - defer usersDelete(ctx, users) - owner := users[0] - editor := users[1] - viewer := users[2] - noAccessUser := users[3] - - // Create files - files, err := filesCreate(ctx, 1, owner.Id) - require.NoError(t, err) - defer filesDelete(ctx, files, owner.Id) - file := files[0] - - // Share files - err = filesShare(ctx, file, editor.Id, "editor") - require.NoError(t, err) - - err = filesShare(ctx, file, viewer.Id, "viewer") - require.NoError(t, err) - - usersWithAccess := []FileUser{ - { - Id: owner.Id, - Name: owner.Name, - Role: "owner", - }, - { - Id: editor.Id, - Name: editor.Name, - Role: "editor", - }, - { - Id: viewer.Id, - Name: viewer.Name, - Role: "viewer", - }, - } - - t.Run("FailFileDoesNotExist", func(t *testing.T) { - headers := map[string]string{ - "user-id": owner.Id, - } - - resp, err := RouteHttp(router, "GET", "/files/1234/users", nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailUserDoesNotExist", func(t *testing.T) { - headers := map[string]string{ - "user-id": "1234", - } - - path := fmt.Sprintf("/files/%s/users", file.Id) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailNoFileAccess", func(t *testing.T) { - headers := map[string]string{ - "user-id": noAccessUser.Id, - } - - path := fmt.Sprintf("/files/%s/users", file.Id) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("SuccessOwner", func(t *testing.T) { - headers := map[string]string{ - "user-id": owner.Id, - } - - path := fmt.Sprintf("/files/%s/users", file.Id) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFileUsersResp ListFileUsersResponse - json.Unmarshal(respBody, &listFileUsersResp) - - require.Len(t, listFileUsersResp.Users, 3) - require.ElementsMatch(t, usersWithAccess, listFileUsersResp.Users) - }) - - t.Run("SuccessEditor", func(t *testing.T) { - headers := map[string]string{ - "user-id": editor.Id, - } - - path := fmt.Sprintf("/files/%s/users", file.Id) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFileUsersResp ListFileUsersResponse - json.Unmarshal(respBody, &listFileUsersResp) - - require.Len(t, listFileUsersResp.Users, 3) - require.ElementsMatch(t, usersWithAccess, listFileUsersResp.Users) - }) - - t.Run("SuccessViewer", func(t *testing.T) { - headers := map[string]string{ - "user-id": viewer.Id, - } - - path := fmt.Sprintf("/files/%s/users", file.Id) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFileUsersResp ListFileUsersResponse - json.Unmarshal(respBody, &listFileUsersResp) - - require.Len(t, listFileUsersResp.Users, 3) - require.ElementsMatch(t, usersWithAccess, listFileUsersResp.Users) - }) - - t.Run("seccessOwnerWithPaginationLimit", func(t *testing.T) { - headers := map[string]string{ - "user-id": owner.Id, - } - - numUsers := 2 - path := fmt.Sprintf("/files/%s/users?pagination_limit=%d", file.Id, numUsers) - resp, err := RouteHttp(router, "GET", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listFileUsersResp ListFileUsersResponse - json.Unmarshal(respBody, &listFileUsersResp) - - require.Len(t, listFileUsersResp.Users, numUsers) - require.NotEmpty(t, listFileUsersResp.PaginationToken) - }) -} - -func TestShareFile(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.POST("/files/:file/users", shareFile) - - // Create users - segment := xid.New().String() - users, err := usersCreate(ctx, &segment, 5) - require.NoError(t, err) - defer usersDelete(ctx, users) - ownerId := users[0].Id - editorId := users[1].Id - viewerId := users[2].Id - noAccessUser := users[3].Id - shareeId := users[4].Id - - // Create and share file with editor and viewer - files, err := filesCreate(ctx, 1, ownerId) - require.NoError(t, err) - file := files[0] - defer filesDelete(ctx, files, ownerId) - - err = filesShare(ctx, file, editorId, "editor") - require.NoError(t, err) - - err = filesShare(ctx, file, viewerId, "viewer") - require.NoError(t, err) - - shareFileReq := ShareFileRequest{ - Role: "editor", - UserId: shareeId, - } - - headers := map[string]string{ - "user-id": ownerId, - } - - t.Run("FailMissingSharee", func(t *testing.T) { - req := ShareFileRequest{ - Role: "editor", - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", req, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusBadRequest, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"Key: 'ShareFileRequest.UserId' Error:Field validation for 'UserId' failed on the 'required' tag\"", - string(respBody), - ) - }) - - t.Run("FailMissingRole", func(t *testing.T) { - req := ShareFileRequest{ - UserId: shareeId, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", req, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusBadRequest, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"Key: 'ShareFileRequest.Role' Error:Field validation for 'Role' failed on the 'required' tag\"", - string(respBody), - ) - }) - - t.Run("FailInvalidRole", func(t *testing.T) { - req := ShareFileRequest{ - Role: "invalid", - UserId: shareeId, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", req, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusBadRequest, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"Key: 'ShareFileRequest.Role' Error:Field validation for 'Role' failed on the 'oneof' tag\"", - string(respBody), - ) - }) - - t.Run("FailNoAccess", func(t *testing.T) { - headers := map[string]string{ - "user-id": noAccessUser, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailRoleCannotShare", func(t *testing.T) { - headers := map[string]string{ - "user-id": viewerId, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"role cannot share (sharer role: viewer)\"", - string(respBody), - ) - }) - - t.Run("FailCannotGiveHigherPermissions", func(t *testing.T) { - headers := map[string]string{ - "user-id": editorId, - } - - shareFileReq := ShareFileRequest{ - Role: "owner", - UserId: shareeId, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"cannot share to higher role (sharer role: editor, sharee role: owner)\"", - string(respBody), - ) - }) - - t.Run("FailShareeNotFound", func(t *testing.T) { - shareFileReq := ShareFileRequest{ - UserId: "unicorn", - Role: "editor", - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusInternalServerError, resp.StatusCode) - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal(t, "\"rpc error: code = InvalidArgument desc = [sentium:1.3.2.400] Invalid principal for record\"", string(respBody)) - }) - - t.Run("SuccessSharedByOwner", func(t *testing.T) { - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - }) - - t.Run("SuccessSharedByEditor", func(t *testing.T) { - headers := map[string]string{ - "user-id": editorId, - } - - resp, err := RouteHttp(router, "POST", "/files/"+file.Id+"/users", shareFileReq, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - }) -} - -func TestUnshareFile(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.DELETE("/files/:file/users/:user", unshareFile) - - // Create users - users, err := usersCreate(ctx, nil, 7) - require.NoError(t, err) - defer usersDelete(ctx, users) - owner := users[0] - editor1 := users[1] - editor2 := users[2] - viewer1 := users[3] - viewer2 := users[4] - viewer3 := users[5] - noAccessUser := users[6] - - // Create file - files, err := filesCreate(ctx, 1, owner.Id) - require.NoError(t, err) - defer filesDelete(ctx, files, owner.Id) - file := files[0] - - // Share file - err = filesShare(ctx, file, editor1.Id, "editor") - require.NoError(t, err) - err = filesShare(ctx, file, editor2.Id, "editor") - require.NoError(t, err) - - err = filesShare(ctx, file, viewer1.Id, "viewer") - require.NoError(t, err) - err = filesShare(ctx, file, viewer2.Id, "viewer") - require.NoError(t, err) - err = filesShare(ctx, file, viewer3.Id, "viewer") - require.NoError(t, err) - - t.Run("FailNoAccessToFile", func(t *testing.T) { - path := fmt.Sprintf("/files/%s/users/%s", file.Id, viewer1.Id) - headers := map[string]string{ - "user-id": noAccessUser.Id, - } - - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusForbidden, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"no access to file\"", - string(respBody), - ) - }) - - t.Run("FailUnsharingHigherRole", func(t *testing.T) { - path := fmt.Sprintf("/files/%s/users/%s", file.Id, editor1.Id) - headers := map[string]string{ - "user-id": viewer1.Id, - } - - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusUnprocessableEntity, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"cannot unshare from a higher role (requestor role: viewer, unshared role: editor)\"", - string(respBody), - ) - }) - - t.Run("SuccessOwnerUnshareEditor", func(t *testing.T) { - // Check user the file will be unshared woth has access to file - role, err := getRole(ctx, editor1.Id, file.Id) - require.NoError(t, err) - require.Equal(t, "editor", role) - - // Unshare file - path := fmt.Sprintf("/files/%s/users/%s", file.Id, editor1.Id) - headers := map[string]string{ - "user-id": owner.Id, - } - - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - role, err = getRole(ctx, editor1.Id, file.Id) - require.NoError(t, err) - require.Empty(t, role) - }) - - t.Run("SuccessEditorUnshareViewer", func(t *testing.T) { - // Check user the file will be unshared woth has access to file - role, err := getRole(ctx, viewer1.Id, file.Id) - require.NoError(t, err) - require.Equal(t, "viewer", role) - - // Unshare file - path := fmt.Sprintf("/files/%s/users/%s", file.Id, viewer1.Id) - headers := map[string]string{ - "user-id": editor2.Id, - } - - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - role, err = getRole(ctx, viewer1.Id, file.Id) - require.NoError(t, err) - require.Empty(t, role) - }) - - t.Run("SuccessViewerUnshareViewer", func(t *testing.T) { - // Check user the file will be unshared woth has access to file - role, err := getRole(ctx, viewer2.Id, file.Id) - require.NoError(t, err) - require.Equal(t, "viewer", role) - - // Unshare file - path := fmt.Sprintf("/files/%s/users/%s", file.Id, viewer2.Id) - headers := map[string]string{ - "user-id": viewer3.Id, - } - - resp, err := RouteHttp(router, "DELETE", path, nil, headers) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - role, err = getRole(ctx, viewer2.Id, file.Id) - require.NoError(t, err) - require.Empty(t, role) - }) -} diff --git a/examples/fileshare/pkg/handlers/v1/testing.go b/examples/fileshare/pkg/handlers/v1/testing.go deleted file mode 100644 index c649e270..00000000 --- a/examples/fileshare/pkg/handlers/v1/testing.go +++ /dev/null @@ -1,215 +0,0 @@ -package v1 - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http" - "net/http/httptest" - - "github.com/rs/xid" - sentium "github.com/sentium/examples/fileshare/pkg/pb/sentium/api/v1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/structpb" -) - -func RouteHttp( - handler http.Handler, - method string, - path string, - request interface{}, - headers map[string]string, -) (*http.Response, error) { - var buf bytes.Buffer - if err := json.NewEncoder(&buf).Encode(request); err != nil { - return nil, err - } - - req := httptest.NewRequest(method, path, &buf) - for k, v := range headers { - req.Header.Set(k, v) - } - - w := httptest.NewRecorder() - handler.ServeHTTP(w, req) - return w.Result(), nil -} - -func checkFileExistsForUser(ctx context.Context, fileId string, userId string) (bool, error) { - resourcesClient, err := getResourcesClient() - if err != nil { - return false, err - } - - resourcesListReq := sentium.ResourcesListRequest{ - PrincipalId: userId, - ResourceType: "files", - } - - resourcesListResp, err := resourcesClient.List(ctx, &resourcesListReq) - if err != nil { - return false, err - } - - for _, file := range resourcesListResp.Resources { - if file.Id == fileId { - return true, nil - } - } - - return false, nil -} - -func filesCreate(ctx context.Context, numFiles int, ownerId string) ([]File, error) { - files := []File{} - - authzClient, err := getAuthzClient() - if err != nil { - return nil, err - } - - for i := 0; i < numFiles; i++ { - attrs, err := structpb.NewStruct(map[string]interface{}{ - "name": fmt.Sprintf("File Name %d", i), - "role": "owner", - }) - if err != nil { - return nil, err - } - - authzGrantRequest := sentium.AuthzGrantRequest{ - Attrs: attrs, - PrincipalId: ownerId, - ResourceId: xid.New().String(), - ResourceType: "files", - } - - if _, err := authzClient.Grant(ctx, &authzGrantRequest); err != nil { - return nil, err - } - - file := File{ - Id: authzGrantRequest.ResourceId, - Name: attrs.Fields["name"].GetStringValue(), - Role: "owner", - } - - files = append([]File{file}, files...) - } - - return files, nil -} - -func filesDelete(ctx context.Context, files []File, principalId string) error { - authzClient, err := getAuthzClient() - if err != nil { - return err - } - - for _, file := range files { - delReq := sentium.AuthzRevokeRequest{ - PrincipalId: principalId, - ResourceId: file.Id, - ResourceType: "files", - } - - if _, err := authzClient.Revoke(ctx, &delReq); err != nil { - panic(err) - } - } - - return nil -} - -func filesShare(ctx context.Context, file File, principalId string, role string) error { - authzClient, err := getAuthzClient() - if err != nil { - return err - } - - attrs, err := structpb.NewStruct(map[string]interface{}{ - "name": file.Name, - "role": role, - }) - if err != nil { - return err - } - - authzGrantRequest := sentium.AuthzGrantRequest{ - Attrs: attrs, - PrincipalId: principalId, - ResourceId: file.Id, - ResourceType: "files", - } - - if _, err := authzClient.Grant(ctx, &authzGrantRequest); err != nil { - return err - } - - return nil -} - -func usersCreate(ctx context.Context, segment *string, numUsers int) ([]User, error) { - users := []User{} - - principalClient, err := getPrincipalsClient() - if err != nil { - return nil, err - } - - for i := 0; i < numUsers; i++ { - principalId := xid.New().String() - attrs, err := structpb.NewStruct(map[string]interface{}{ - "name": fmt.Sprintf("User Name %d", i), - }) - if err != nil { - return nil, err - } - - principalsCreateRequest := sentium.PrincipalsCreateRequest{ - Attrs: attrs, - Id: &principalId, - Segment: segment, - } - - principal, err := principalClient.Create(ctx, &principalsCreateRequest) - if err != nil { - return nil, err - } - - user := User{ - Id: principal.Id, - Name: principal.Attrs.Fields["name"].GetStringValue(), - } - - if segment != nil { - user.Segment = *segment - } - - users = append([]User{user}, users...) - } - - return users, nil -} - -func usersDelete(ctx context.Context, users []User) error { - for _, user := range users { - delReq := sentium.PrincipalsDeleteRequest{ - Id: user.Id, - } - - if _, err := principalsClient.Delete(ctx, &delReq); err != nil { - if stts, ok := status.FromError(err); ok { - if stts.Code() == codes.NotFound { - continue - } - } - - panic(err) - } - } - - return nil -} diff --git a/examples/fileshare/pkg/handlers/v1/users.go b/examples/fileshare/pkg/handlers/v1/users.go deleted file mode 100644 index bbdb4a43..00000000 --- a/examples/fileshare/pkg/handlers/v1/users.go +++ /dev/null @@ -1,217 +0,0 @@ -package v1 - -import ( - "net/http" - - "github.com/gin-gonic/gin" - "github.com/rs/xid" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/structpb" - - sentium "github.com/sentium/examples/fileshare/pkg/pb/sentium/api/v1" -) - -type CreateUserRequest struct { - Name string `json:"name" validate:"required"` -} - -func (req *CreateUserRequest) Validate() error { - validate := getValidator() - if err := validate.Struct(req); err != nil { - return err - } - - return nil -} - -type ListUsersResponse struct { - PaginationToken string `json:"pagination_token"` - Users []User `json:"users"` -} - -type User struct { - Id string `json:"id"` - Name string `json:"name"` - Segment string `json:"segment"` -} - -func createUser(c *gin.Context) { - ctx := c.Request.Context() - // Read the request body - var request CreateUserRequest - if err := c.ShouldBindJSON(&request); err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - if err := request.Validate(); err != nil { - c.JSON(http.StatusBadRequest, err.Error()) - return - } - - // Map request - principalId := xid.New().String() - attrs, err := structpb.NewStruct(map[string]interface{}{ - "name": request.Name, - }) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - principalsCreateRequest := sentium.PrincipalsCreateRequest{ - Id: &principalId, - Attrs: attrs, - } - - // Create principal - principalClient, err := getPrincipalsClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - principal, err := principalClient.Create(ctx, &principalsCreateRequest) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - resp := User{ - Id: principal.Id, - Name: principal.Attrs.Fields["name"].GetStringValue(), - } - - c.JSON(http.StatusCreated, resp) -} - -func deleteUser(c *gin.Context) { - ctx := c.Request.Context() - userId := c.Param("user") - - // Delete principal - principalsClient, err := getPrincipalsClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - principalDeleteRequest := sentium.PrincipalsDeleteRequest{ - Id: userId, - } - - if _, err = principalsClient.Delete(ctx, &principalDeleteRequest); err != nil { - if stts, ok := status.FromError(err); ok { - if stts.Code() == codes.NotFound { - c.Status((http.StatusNotFound)) - return - } - } - - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - c.Status(http.StatusNoContent) -} - -func getUser(c *gin.Context) { - ctx := c.Request.Context() - userId := c.Param("user") - - // Map request - principalRetriveReq := &sentium.PrincipalsRetrieveRequest{ - Id: userId, - } - - // Get principal - principalsClient, err := getPrincipalsClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - principalRetriveResp, err := principalsClient.Retrieve(ctx, principalRetriveReq) - if err != nil { - if stts, ok := status.FromError(err); ok { - if stts.Code() == codes.NotFound { - c.Status((http.StatusNotFound)) - return - } - } - - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - user := &User{ - Id: principalRetriveResp.Id, - Segment: *principalRetriveResp.Segment, - } - - attrs := principalRetriveResp.GetAttrs() - if attrs != nil && attrs.Fields["name"] != nil { - user.Name = attrs.Fields["name"].GetStringValue() - } - - c.JSON(http.StatusOK, user) -} - -func listUsers(c *gin.Context) { - ctx := c.Request.Context() - // Map request - paginationLimit, paginationToken := getPaginationParams(c) - principalsListReq := sentium.PrincipalsListRequest{ - PaginationLimit: paginationLimit, - PaginationToken: paginationToken, - } - - if segment, ok := c.GetQuery("segment"); ok { - principalsListReq.Segment = &segment - } - - // List principals - principalClient, err := getPrincipalsClient() - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - principalsList, err := principalClient.List(ctx, &principalsListReq) - if err != nil { - c.JSON(http.StatusInternalServerError, err.Error()) - return - } - - // Map response - resp := ListUsersResponse{ - Users: []User{}, - } - - if principalsList.PaginationToken != nil { - resp.PaginationToken = *principalsList.PaginationToken - } - - for _, principal := range principalsList.Principals { - attrs := principal.GetAttrs() - if attrs == nil || attrs.Fields["name"] == nil { - continue - } - - user := User{ - Id: principal.Id, - Name: attrs.Fields["name"].GetStringValue(), - } - - if principal.Segment != nil { - user.Segment = *principal.Segment - } - - resp.Users = append(resp.Users, user) - } - - c.JSON(http.StatusOK, resp) -} diff --git a/examples/fileshare/pkg/handlers/v1/users_test.go b/examples/fileshare/pkg/handlers/v1/users_test.go deleted file mode 100644 index 8fc98cb2..00000000 --- a/examples/fileshare/pkg/handlers/v1/users_test.go +++ /dev/null @@ -1,280 +0,0 @@ -package v1 - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "testing" - - "github.com/gin-gonic/gin" - "github.com/rs/xid" - sentium "github.com/sentium/examples/fileshare/pkg/pb/sentium/api/v1" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func TestCreateUser(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.POST("/users", createUser) - - t.Run("FailMissingName", func(t *testing.T) { - resp, err := RouteHttp(router, "POST", "/users", CreateUserRequest{}, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusBadRequest, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.Equal( - t, - "\"Key: 'CreateUserRequest.Name' Error:Field validation for 'Name' failed on the 'required' tag\"", - string(respBody), - ) - }) - - t.Run("Success", func(t *testing.T) { - userReq := CreateUserRequest{ - Name: "Best Users", - } - - resp, err := RouteHttp(router, "POST", "/users", userReq, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusCreated, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var user User - json.Unmarshal(respBody, &user) - defer usersDelete(ctx, []User{user}) - - expectedResp := User{ - Id: user.Id, - Name: userReq.Name, - } - - require.Equal(t, expectedResp, user) - }) -} - -func TestDeleteUser(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.DELETE("/users/:user", deleteUser) - - users, err := usersCreate(ctx, nil, 2) - require.NoError(t, err) - defer usersDelete(ctx, users) - owner := users[0] - editor := users[1] - - files, err := filesCreate(ctx, 1, users[0].Id) - require.NoError(t, err) - defer filesDelete(ctx, files, users[0].Id) - - err = filesShare(ctx, files[0], editor.Id, "editor") - require.NoError(t, err) - - t.Run("FailNotFound", func(t *testing.T) { - resp, err := RouteHttp(router, "DELETE", "/users/not-found", nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusNotFound, resp.StatusCode) - }) - - t.Run("Success", func(t *testing.T) { - path := fmt.Sprintf("/users/%s", owner.Id) - resp, err := RouteHttp(router, "DELETE", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusNoContent, resp.StatusCode) - - // Check the user does not exist - principalsClient, err := getPrincipalsClient() - require.NoError(t, err) - - principalRetriveReq := &sentium.PrincipalsRetrieveRequest{ - Id: owner.Id, - } - - _, err = principalsClient.Retrieve(ctx, principalRetriveReq) - require.NotNil(t, err) - - stts, ok := status.FromError(err) - require.True(t, ok) - require.Equal(t, codes.NotFound, stts.Code()) - - // Check the file access was revoked for deleted user - ok, err = checkFileExistsForUser(ctx, files[0].Id, owner.Id) - require.NoError(t, err) - require.False(t, ok) - - // Check editor still has access to file - ok, err = checkFileExistsForUser(ctx, files[0].Id, editor.Id) - require.NoError(t, err) - require.True(t, ok) - }) -} - -func TestGetUser(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.GET("/users/:user", getUser) - - segment := "user-segment" - users, err := usersCreate(ctx, &segment, 1) - require.NoError(t, err) - defer usersDelete(ctx, users) - - t.Run("NotFound", func(t *testing.T) { - path := fmt.Sprintf("/users/%s", "not-found") - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusNotFound, resp.StatusCode) - }) - - t.Run("Success", func(t *testing.T) { - path := fmt.Sprintf("/users/%s", users[0].Id) - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var actual User - err = json.Unmarshal(respBody, &actual) - require.NoError(t, err) - require.Equal(t, users[0], actual) - }) -} - -func TestListUsers(t *testing.T) { - ctx := context.Background() - router := gin.New() - router.GET("/users", listUsers) - - segment := xid.New().String() - numUsersWithSegment := 5 - usersWithSegment, err := usersCreate(ctx, &segment, numUsersWithSegment) - require.NoError(t, err) - defer usersDelete(ctx, usersWithSegment) - - numUsersNoSegment := 2 - usersNoSegment, err := usersCreate(ctx, nil, numUsersNoSegment) - require.NoError(t, err) - defer usersDelete(ctx, usersNoSegment) - - t.Run("SuccessWithUsers", func(t *testing.T) { - path := fmt.Sprintf("/users?segment=%s", segment) - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listUsersResp ListUsersResponse - json.Unmarshal(respBody, &listUsersResp) - - require.Empty(t, listUsersResp.PaginationToken) - require.Len(t, listUsersResp.Users, numUsersWithSegment) - require.Equal(t, usersWithSegment, listUsersResp.Users) - }) - - t.Run("SuccessNoUsers", func(t *testing.T) { - path := fmt.Sprintf("/users?segment=%s", xid.New().String()) - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listUsersResp ListUsersResponse - json.Unmarshal(respBody, &listUsersResp) - - require.Empty(t, listUsersResp.PaginationToken) - require.Empty(t, listUsersResp.Users) - }) - - t.Run("SuccessWithPaginationLimitNoToken", func(t *testing.T) { - path := fmt.Sprintf("/users?pagination_limit=%d&segment=%s", numUsersWithSegment-1, segment) - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listUsersResp ListUsersResponse - json.Unmarshal(respBody, &listUsersResp) - - require.NotEmpty(t, listUsersResp.PaginationToken) - require.Len(t, listUsersResp.Users, numUsersWithSegment-1) - }) - - t.Run("SuccessWithPaginationLimitAndToken", func(t *testing.T) { - // First search to obtain the token - path := fmt.Sprintf("/users?pagination_limit=%d&segment=%s", numUsersWithSegment-1, segment) - resp, err := RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listUsersResp ListUsersResponse - json.Unmarshal(respBody, &listUsersResp) - - require.NotEmpty(t, listUsersResp.PaginationToken) - require.Len(t, listUsersResp.Users, numUsersWithSegment-1) - - // Second search, using the token - path = fmt.Sprintf( - "/users?pagination_token=%s&segment=%s", - listUsersResp.PaginationToken, - segment, - ) - - resp, err = RouteHttp(router, "GET", path, nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err = io.ReadAll(resp.Body) - require.NoError(t, err) - - json.Unmarshal(respBody, &listUsersResp) - - require.Empty(t, listUsersResp.PaginationToken) - require.Len(t, listUsersResp.Users, 1) - }) - - t.Run("SuccessNoSegment", func(t *testing.T) { - resp, err := RouteHttp(router, "GET", "/users", nil, nil) - require.NoError(t, err) - - require.Equal(t, http.StatusOK, resp.StatusCode) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var listUsersResp ListUsersResponse - json.Unmarshal(respBody, &listUsersResp) - - require.Empty(t, listUsersResp.PaginationToken) - require.Len(t, listUsersResp.Users, 2) - }) -} diff --git a/examples/fileshare/pkg/handlers/v1/utils.go b/examples/fileshare/pkg/handlers/v1/utils.go deleted file mode 100644 index e791dab7..00000000 --- a/examples/fileshare/pkg/handlers/v1/utils.go +++ /dev/null @@ -1,183 +0,0 @@ -package v1 - -import ( - "context" - "fmt" - "strconv" - - "github.com/gin-gonic/gin" - sentium "github.com/sentium/examples/fileshare/pkg/pb/sentium/api/v1" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -var authzClient sentium.AuthzClient -var principalsClient sentium.PrincipalsClient -var resourcesClient sentium.ResourcesClient - -var shareOrder = map[string]int{ - "owner": 0, - "editor": 1, - "viewer": 2, -} - -func canDelete(role string) error { - if role == "viewer" { - return fmt.Errorf("cannot delee file (role: %s)", role) - } - - return nil -} - -func canShare(sharerRole string, sharedRole string) error { - if sharerRole != "owner" && sharerRole != "editor" { - return fmt.Errorf("role cannot share (sharer role: %s)", sharerRole) - } - - if shareOrder[sharerRole] > shareOrder[sharedRole] { - return fmt.Errorf( - "cannot share to higher role (sharer role: %s, sharee role: %s)", - sharerRole, - sharedRole, - ) - } - - return nil -} - -func canUnshare(requestorRole string, unsharedRole string) error { - if shareOrder[requestorRole] > shareOrder[unsharedRole] { - return fmt.Errorf( - "cannot unshare from a higher role (requestor role: %s, unshared role: %s)", - requestorRole, - unsharedRole, - ) - } - - return nil -} - -func getAuthzClient() (sentium.AuthzClient, error) { - if authzClient != nil { - return authzClient, nil - } - - opts := []grpc.DialOption{ - grpc.WithTransportCredentials(insecure.NewCredentials()), - } - - conn, err := grpc.Dial("127.0.0.1:8080", opts...) - if err != nil { - return nil, err - } - - authzClient = sentium.NewAuthzClient(conn) - return authzClient, nil -} - -func getPrincipalsClient() (sentium.PrincipalsClient, error) { - if principalsClient != nil { - return principalsClient, nil - } - - opts := []grpc.DialOption{ - grpc.WithTransportCredentials(insecure.NewCredentials()), - } - - conn, err := grpc.Dial("127.0.0.1:8080", opts...) - if err != nil { - return nil, err - } - - principalsClient = sentium.NewPrincipalsClient(conn) - return principalsClient, nil -} - -func getResourcesClient() (sentium.ResourcesClient, error) { - if resourcesClient != nil { - return resourcesClient, nil - } - - opts := []grpc.DialOption{ - grpc.WithTransportCredentials(insecure.NewCredentials()), - } - - conn, err := grpc.Dial("127.0.0.1:8080", opts...) - if err != nil { - return nil, err - } - - resourcesClient := sentium.NewResourcesClient(conn) - return resourcesClient, nil -} - -// Check the principal has access to resource -func getRole(ctx context.Context, principalId string, fileId string) (string, error) { - authzClient, err := getAuthzClient() - if err != nil { - return "", err - } - - authzCheckRequest := sentium.AuthzCheckRequest{ - PrincipalId: principalId, - ResourceId: fileId, - ResourceType: "files", - } - - authzCheckResponse, err := authzClient.Check(ctx, &authzCheckRequest) - if err != nil { - return "", err - } - - if !authzCheckResponse.GetOk() { - return "", nil - } - - return authzCheckResponse.Attrs.Fields["role"].GetStringValue(), nil -} - -func getUserFromPrincipalId(ctx context.Context, principalId string) (*User, error) { - principalsClient, err := getPrincipalsClient() - if err != nil { - return nil, err - } - - req := &sentium.PrincipalsRetrieveRequest{ - Id: principalId, - } - principal, err := principalsClient.Retrieve(ctx, req) - if err != nil { - return nil, err - } - - user := &User{ - Id: principal.Id, - } - - attrs := principal.GetAttrs() - if attrs != nil && attrs.Fields["name"] != nil { - user.Name = attrs.Fields["name"].GetStringValue() - } - - if principal.Segment != nil { - user.Segment = *principal.Segment - } - - return user, nil -} - -func getPaginationParams(c *gin.Context) (*uint32, *string) { - var paginationLimit *uint32 - if limit, ok := c.GetQuery("pagination_limit"); ok { - l64, _ := strconv.ParseUint(limit, 10, 32) - l32 := uint32(l64) - paginationLimit = &l32 - } - - var paginationToken *string - if token, ok := c.GetQuery("pagination_token"); ok { - paginationToken = &token - } - - return paginationLimit, paginationToken -} diff --git a/examples/fileshare/pkg/handlers/v1/v1.go b/examples/fileshare/pkg/handlers/v1/v1.go deleted file mode 100644 index d839d22a..00000000 --- a/examples/fileshare/pkg/handlers/v1/v1.go +++ /dev/null @@ -1,37 +0,0 @@ -package v1 - -import ( - "github.com/gin-gonic/gin" - "github.com/go-playground/validator/v10" -) - -var validate *validator.Validate - -func Init(router *gin.RouterGroup) { - router.DELETE("/files/:file", deleteFile) - router.DELETE("/files/:file/users/:user", unshareFile) - - router.GET("/files", listFiles) - router.GET("/files/:file", getFile) - router.GET("/files/:file/users", listFileUsers) - - router.POST("/files", createFile) - router.POST("/files/:file/users", shareFile) - - // User management - router.DELETE("/users/:user", deleteUser) - - router.GET("/users", listUsers) - router.GET("/users/:user", getUser) - - router.POST("/users", createUser) -} - -func getValidator() *validator.Validate { - if validate != nil { - return validate - } - - validate := validator.New() - return validate -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/authz.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/authz.pb.go deleted file mode 100644 index 5d3c76bf..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/authz.pb.go +++ /dev/null @@ -1,560 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.12 -// source: sentium/api/v1/authz.proto - -package v1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AuthzCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` -} - -func (x *AuthzCheckRequest) Reset() { - *x = AuthzCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzCheckRequest) ProtoMessage() {} - -func (x *AuthzCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzCheckRequest.ProtoReflect.Descriptor instead. -func (*AuthzCheckRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{0} -} - -func (x *AuthzCheckRequest) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -func (x *AuthzCheckRequest) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (x *AuthzCheckRequest) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -type AuthzCheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,2,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` -} - -func (x *AuthzCheckResponse) Reset() { - *x = AuthzCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzCheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzCheckResponse) ProtoMessage() {} - -func (x *AuthzCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzCheckResponse.ProtoReflect.Descriptor instead. -func (*AuthzCheckResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{1} -} - -func (x *AuthzCheckResponse) GetOk() bool { - if x != nil { - return x.Ok - } - return false -} - -func (x *AuthzCheckResponse) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -type AuthzGrantRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,4,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` -} - -func (x *AuthzGrantRequest) Reset() { - *x = AuthzGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzGrantRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzGrantRequest) ProtoMessage() {} - -func (x *AuthzGrantRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzGrantRequest.ProtoReflect.Descriptor instead. -func (*AuthzGrantRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{2} -} - -func (x *AuthzGrantRequest) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -func (x *AuthzGrantRequest) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (x *AuthzGrantRequest) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *AuthzGrantRequest) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -type AuthzGrantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AuthzGrantResponse) Reset() { - *x = AuthzGrantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzGrantResponse) ProtoMessage() {} - -func (x *AuthzGrantResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzGrantResponse.ProtoReflect.Descriptor instead. -func (*AuthzGrantResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{3} -} - -type AuthzRevokeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` -} - -func (x *AuthzRevokeRequest) Reset() { - *x = AuthzRevokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzRevokeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzRevokeRequest) ProtoMessage() {} - -func (x *AuthzRevokeRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzRevokeRequest.ProtoReflect.Descriptor instead. -func (*AuthzRevokeRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{4} -} - -func (x *AuthzRevokeRequest) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -func (x *AuthzRevokeRequest) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (x *AuthzRevokeRequest) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -type AuthzRevokeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AuthzRevokeResponse) Reset() { - *x = AuthzRevokeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_authz_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthzRevokeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthzRevokeResponse) ProtoMessage() {} - -func (x *AuthzRevokeResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_authz_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthzRevokeResponse.ProtoReflect.Descriptor instead. -func (*AuthzRevokeResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_authz_proto_rawDescGZIP(), []int{5} -} - -var File_sentium_api_v1_authz_proto protoreflect.FileDescriptor - -var file_sentium_api_v1_authz_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x65, - 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x62, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x32, 0x0a, 0x05, - 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x11, 0x41, - 0x75, 0x74, 0x68, 0x7a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, - 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x0a, - 0x12, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x13, - 0x41, 0x75, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xcf, 0x02, 0x0a, 0x05, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, 0x6a, 0x0a, - 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x65, 0x6e, 0x74, - 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x6a, 0x0a, 0x05, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x3a, 0x01, 0x2a, 0x1a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x3a, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x6e, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, - 0x22, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x3a, 0x01, 0x2a, 0x1a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sentium_api_v1_authz_proto_rawDescOnce sync.Once - file_sentium_api_v1_authz_proto_rawDescData = file_sentium_api_v1_authz_proto_rawDesc -) - -func file_sentium_api_v1_authz_proto_rawDescGZIP() []byte { - file_sentium_api_v1_authz_proto_rawDescOnce.Do(func() { - file_sentium_api_v1_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_sentium_api_v1_authz_proto_rawDescData) - }) - return file_sentium_api_v1_authz_proto_rawDescData -} - -var file_sentium_api_v1_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_sentium_api_v1_authz_proto_goTypes = []interface{}{ - (*AuthzCheckRequest)(nil), // 0: sentium.api.v1.AuthzCheckRequest - (*AuthzCheckResponse)(nil), // 1: sentium.api.v1.AuthzCheckResponse - (*AuthzGrantRequest)(nil), // 2: sentium.api.v1.AuthzGrantRequest - (*AuthzGrantResponse)(nil), // 3: sentium.api.v1.AuthzGrantResponse - (*AuthzRevokeRequest)(nil), // 4: sentium.api.v1.AuthzRevokeRequest - (*AuthzRevokeResponse)(nil), // 5: sentium.api.v1.AuthzRevokeResponse - (*structpb.Struct)(nil), // 6: google.protobuf.Struct -} -var file_sentium_api_v1_authz_proto_depIdxs = []int32{ - 6, // 0: sentium.api.v1.AuthzCheckResponse.attrs:type_name -> google.protobuf.Struct - 6, // 1: sentium.api.v1.AuthzGrantRequest.attrs:type_name -> google.protobuf.Struct - 0, // 2: sentium.api.v1.Authz.Check:input_type -> sentium.api.v1.AuthzCheckRequest - 2, // 3: sentium.api.v1.Authz.Grant:input_type -> sentium.api.v1.AuthzGrantRequest - 4, // 4: sentium.api.v1.Authz.Revoke:input_type -> sentium.api.v1.AuthzRevokeRequest - 1, // 5: sentium.api.v1.Authz.Check:output_type -> sentium.api.v1.AuthzCheckResponse - 3, // 6: sentium.api.v1.Authz.Grant:output_type -> sentium.api.v1.AuthzGrantResponse - 5, // 7: sentium.api.v1.Authz.Revoke:output_type -> sentium.api.v1.AuthzRevokeResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_sentium_api_v1_authz_proto_init() } -func file_sentium_api_v1_authz_proto_init() { - if File_sentium_api_v1_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sentium_api_v1_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_authz_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_authz_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzGrantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_authz_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzRevokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_authz_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthzRevokeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sentium_api_v1_authz_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_sentium_api_v1_authz_proto_msgTypes[2].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sentium_api_v1_authz_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_sentium_api_v1_authz_proto_goTypes, - DependencyIndexes: file_sentium_api_v1_authz_proto_depIdxs, - MessageInfos: file_sentium_api_v1_authz_proto_msgTypes, - }.Build() - File_sentium_api_v1_authz_proto = out.File - file_sentium_api_v1_authz_proto_rawDesc = nil - file_sentium_api_v1_authz_proto_goTypes = nil - file_sentium_api_v1_authz_proto_depIdxs = nil -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/authz_grpc.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/authz_grpc.pb.go deleted file mode 100644 index 56d44878..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/authz_grpc.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 -// source: sentium/api/v1/authz.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Authz_Check_FullMethodName = "/sentium.api.v1.Authz/Check" - Authz_Grant_FullMethodName = "/sentium.api.v1.Authz/Grant" - Authz_Revoke_FullMethodName = "/sentium.api.v1.Authz/Revoke" -) - -// AuthzClient is the client API for Authz service. -// -// 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. -type AuthzClient interface { - Check(ctx context.Context, in *AuthzCheckRequest, opts ...grpc.CallOption) (*AuthzCheckResponse, error) - Grant(ctx context.Context, in *AuthzGrantRequest, opts ...grpc.CallOption) (*AuthzGrantResponse, error) - Revoke(ctx context.Context, in *AuthzRevokeRequest, opts ...grpc.CallOption) (*AuthzRevokeResponse, error) -} - -type authzClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthzClient(cc grpc.ClientConnInterface) AuthzClient { - return &authzClient{cc} -} - -func (c *authzClient) Check(ctx context.Context, in *AuthzCheckRequest, opts ...grpc.CallOption) (*AuthzCheckResponse, error) { - out := new(AuthzCheckResponse) - err := c.cc.Invoke(ctx, Authz_Check_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authzClient) Grant(ctx context.Context, in *AuthzGrantRequest, opts ...grpc.CallOption) (*AuthzGrantResponse, error) { - out := new(AuthzGrantResponse) - err := c.cc.Invoke(ctx, Authz_Grant_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authzClient) Revoke(ctx context.Context, in *AuthzRevokeRequest, opts ...grpc.CallOption) (*AuthzRevokeResponse, error) { - out := new(AuthzRevokeResponse) - err := c.cc.Invoke(ctx, Authz_Revoke_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthzServer is the server API for Authz service. -// All implementations must embed UnimplementedAuthzServer -// for forward compatibility -type AuthzServer interface { - Check(context.Context, *AuthzCheckRequest) (*AuthzCheckResponse, error) - Grant(context.Context, *AuthzGrantRequest) (*AuthzGrantResponse, error) - Revoke(context.Context, *AuthzRevokeRequest) (*AuthzRevokeResponse, error) - mustEmbedUnimplementedAuthzServer() -} - -// UnimplementedAuthzServer must be embedded to have forward compatible implementations. -type UnimplementedAuthzServer struct { -} - -func (UnimplementedAuthzServer) Check(context.Context, *AuthzCheckRequest) (*AuthzCheckResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") -} -func (UnimplementedAuthzServer) Grant(context.Context, *AuthzGrantRequest) (*AuthzGrantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented") -} -func (UnimplementedAuthzServer) Revoke(context.Context, *AuthzRevokeRequest) (*AuthzRevokeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") -} -func (UnimplementedAuthzServer) mustEmbedUnimplementedAuthzServer() {} - -// UnsafeAuthzServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AuthzServer will -// result in compilation errors. -type UnsafeAuthzServer interface { - mustEmbedUnimplementedAuthzServer() -} - -func RegisterAuthzServer(s grpc.ServiceRegistrar, srv AuthzServer) { - s.RegisterService(&Authz_ServiceDesc, srv) -} - -func _Authz_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthzCheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthzServer).Check(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Authz_Check_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthzServer).Check(ctx, req.(*AuthzCheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Authz_Grant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthzGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthzServer).Grant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Authz_Grant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthzServer).Grant(ctx, req.(*AuthzGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Authz_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthzRevokeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthzServer).Revoke(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Authz_Revoke_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthzServer).Revoke(ctx, req.(*AuthzRevokeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Authz_ServiceDesc is the grpc.ServiceDesc for Authz service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Authz_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "sentium.api.v1.Authz", - HandlerType: (*AuthzServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Check", - Handler: _Authz_Check_Handler, - }, - { - MethodName: "Grant", - Handler: _Authz_Grant_Handler, - }, - { - MethodName: "Revoke", - Handler: _Authz_Revoke_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sentium/api/v1/authz.proto", -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/principals.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/principals.pb.go deleted file mode 100644 index 2e18c626..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/principals.pb.go +++ /dev/null @@ -1,747 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.12 -// source: sentium/api/v1/principals.proto - -package v1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Principal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,2,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` - Segment *string `protobuf:"bytes,3,opt,name=segment,proto3,oneof" json:"segment,omitempty"` -} - -func (x *Principal) Reset() { - *x = Principal{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Principal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Principal) ProtoMessage() {} - -func (x *Principal) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Principal.ProtoReflect.Descriptor instead. -func (*Principal) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{0} -} - -func (x *Principal) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Principal) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -func (x *Principal) GetSegment() string { - if x != nil && x.Segment != nil { - return *x.Segment - } - return "" -} - -type PrincipalsCreateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,2,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` - Segment *string `protobuf:"bytes,3,opt,name=segment,proto3,oneof" json:"segment,omitempty"` -} - -func (x *PrincipalsCreateRequest) Reset() { - *x = PrincipalsCreateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsCreateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsCreateRequest) ProtoMessage() {} - -func (x *PrincipalsCreateRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsCreateRequest.ProtoReflect.Descriptor instead. -func (*PrincipalsCreateRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{1} -} - -func (x *PrincipalsCreateRequest) GetId() string { - if x != nil && x.Id != nil { - return *x.Id - } - return "" -} - -func (x *PrincipalsCreateRequest) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -func (x *PrincipalsCreateRequest) GetSegment() string { - if x != nil && x.Segment != nil { - return *x.Segment - } - return "" -} - -type PrincipalsDeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *PrincipalsDeleteRequest) Reset() { - *x = PrincipalsDeleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsDeleteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsDeleteRequest) ProtoMessage() {} - -func (x *PrincipalsDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsDeleteRequest.ProtoReflect.Descriptor instead. -func (*PrincipalsDeleteRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{2} -} - -func (x *PrincipalsDeleteRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type PrincipalsDeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PrincipalsDeleteResponse) Reset() { - *x = PrincipalsDeleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsDeleteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsDeleteResponse) ProtoMessage() {} - -func (x *PrincipalsDeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsDeleteResponse.ProtoReflect.Descriptor instead. -func (*PrincipalsDeleteResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{3} -} - -type PrincipalsListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Segment *string `protobuf:"bytes,1,opt,name=segment,proto3,oneof" json:"segment,omitempty"` - PaginationLimit *uint32 `protobuf:"varint,2,opt,name=pagination_limit,json=paginationLimit,proto3,oneof" json:"pagination_limit,omitempty"` - PaginationToken *string `protobuf:"bytes,3,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *PrincipalsListRequest) Reset() { - *x = PrincipalsListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsListRequest) ProtoMessage() {} - -func (x *PrincipalsListRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsListRequest.ProtoReflect.Descriptor instead. -func (*PrincipalsListRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{4} -} - -func (x *PrincipalsListRequest) GetSegment() string { - if x != nil && x.Segment != nil { - return *x.Segment - } - return "" -} - -func (x *PrincipalsListRequest) GetPaginationLimit() uint32 { - if x != nil && x.PaginationLimit != nil { - return *x.PaginationLimit - } - return 0 -} - -func (x *PrincipalsListRequest) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -type PrincipalsListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Principals []*Principal `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"` - PaginationToken *string `protobuf:"bytes,2,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *PrincipalsListResponse) Reset() { - *x = PrincipalsListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsListResponse) ProtoMessage() {} - -func (x *PrincipalsListResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsListResponse.ProtoReflect.Descriptor instead. -func (*PrincipalsListResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{5} -} - -func (x *PrincipalsListResponse) GetPrincipals() []*Principal { - if x != nil { - return x.Principals - } - return nil -} - -func (x *PrincipalsListResponse) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -type PrincipalsRetrieveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *PrincipalsRetrieveRequest) Reset() { - *x = PrincipalsRetrieveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsRetrieveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsRetrieveRequest) ProtoMessage() {} - -func (x *PrincipalsRetrieveRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsRetrieveRequest.ProtoReflect.Descriptor instead. -func (*PrincipalsRetrieveRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{6} -} - -func (x *PrincipalsRetrieveRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type PrincipalsUpdateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,2,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` - Segment *string `protobuf:"bytes,3,opt,name=segment,proto3,oneof" json:"segment,omitempty"` -} - -func (x *PrincipalsUpdateRequest) Reset() { - *x = PrincipalsUpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_principals_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrincipalsUpdateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalsUpdateRequest) ProtoMessage() {} - -func (x *PrincipalsUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_principals_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalsUpdateRequest.ProtoReflect.Descriptor instead. -func (*PrincipalsUpdateRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_principals_proto_rawDescGZIP(), []int{7} -} - -func (x *PrincipalsUpdateRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PrincipalsUpdateRequest) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -func (x *PrincipalsUpdateRequest) GetSegment() string { - if x != nil && x.Segment != nil { - return *x.Segment - } - return "" -} - -var File_sentium_api_v1_principals_proto protoreflect.FileDescriptor - -var file_sentium_api_v1_principals_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, - 0x0a, 0x09, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x61, - 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x1d, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x17, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, - 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x01, 0x52, - 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x17, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x1a, 0x0a, 0x18, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcc, 0x01, 0x0a, - 0x15, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x16, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2b, 0x0a, 0x19, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x85, 0x05, 0x0a, 0x0a, 0x50, 0x72, 0x69, - 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x67, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, - 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, - 0x12, 0x7b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x2a, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb3, 0x01, - 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x12, 0x54, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x3f, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3d, 0x7b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x26, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3d, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x7d, 0x26, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x3d, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x7d, 0x12, 0x6d, 0x0a, 0x08, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x12, - 0x29, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x6c, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x73, - 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x1a, 0x13, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sentium_api_v1_principals_proto_rawDescOnce sync.Once - file_sentium_api_v1_principals_proto_rawDescData = file_sentium_api_v1_principals_proto_rawDesc -) - -func file_sentium_api_v1_principals_proto_rawDescGZIP() []byte { - file_sentium_api_v1_principals_proto_rawDescOnce.Do(func() { - file_sentium_api_v1_principals_proto_rawDescData = protoimpl.X.CompressGZIP(file_sentium_api_v1_principals_proto_rawDescData) - }) - return file_sentium_api_v1_principals_proto_rawDescData -} - -var file_sentium_api_v1_principals_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_sentium_api_v1_principals_proto_goTypes = []interface{}{ - (*Principal)(nil), // 0: sentium.api.v1.Principal - (*PrincipalsCreateRequest)(nil), // 1: sentium.api.v1.PrincipalsCreateRequest - (*PrincipalsDeleteRequest)(nil), // 2: sentium.api.v1.PrincipalsDeleteRequest - (*PrincipalsDeleteResponse)(nil), // 3: sentium.api.v1.PrincipalsDeleteResponse - (*PrincipalsListRequest)(nil), // 4: sentium.api.v1.PrincipalsListRequest - (*PrincipalsListResponse)(nil), // 5: sentium.api.v1.PrincipalsListResponse - (*PrincipalsRetrieveRequest)(nil), // 6: sentium.api.v1.PrincipalsRetrieveRequest - (*PrincipalsUpdateRequest)(nil), // 7: sentium.api.v1.PrincipalsUpdateRequest - (*structpb.Struct)(nil), // 8: google.protobuf.Struct -} -var file_sentium_api_v1_principals_proto_depIdxs = []int32{ - 8, // 0: sentium.api.v1.Principal.attrs:type_name -> google.protobuf.Struct - 8, // 1: sentium.api.v1.PrincipalsCreateRequest.attrs:type_name -> google.protobuf.Struct - 0, // 2: sentium.api.v1.PrincipalsListResponse.principals:type_name -> sentium.api.v1.Principal - 8, // 3: sentium.api.v1.PrincipalsUpdateRequest.attrs:type_name -> google.protobuf.Struct - 1, // 4: sentium.api.v1.Principals.Create:input_type -> sentium.api.v1.PrincipalsCreateRequest - 2, // 5: sentium.api.v1.Principals.Delete:input_type -> sentium.api.v1.PrincipalsDeleteRequest - 4, // 6: sentium.api.v1.Principals.List:input_type -> sentium.api.v1.PrincipalsListRequest - 6, // 7: sentium.api.v1.Principals.Retrieve:input_type -> sentium.api.v1.PrincipalsRetrieveRequest - 7, // 8: sentium.api.v1.Principals.Update:input_type -> sentium.api.v1.PrincipalsUpdateRequest - 0, // 9: sentium.api.v1.Principals.Create:output_type -> sentium.api.v1.Principal - 3, // 10: sentium.api.v1.Principals.Delete:output_type -> sentium.api.v1.PrincipalsDeleteResponse - 5, // 11: sentium.api.v1.Principals.List:output_type -> sentium.api.v1.PrincipalsListResponse - 0, // 12: sentium.api.v1.Principals.Retrieve:output_type -> sentium.api.v1.Principal - 0, // 13: sentium.api.v1.Principals.Update:output_type -> sentium.api.v1.Principal - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_sentium_api_v1_principals_proto_init() } -func file_sentium_api_v1_principals_proto_init() { - if File_sentium_api_v1_principals_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sentium_api_v1_principals_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Principal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsCreateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsDeleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsDeleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsRetrieveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_principals_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsUpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sentium_api_v1_principals_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_sentium_api_v1_principals_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_sentium_api_v1_principals_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_sentium_api_v1_principals_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_sentium_api_v1_principals_proto_msgTypes[7].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sentium_api_v1_principals_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_sentium_api_v1_principals_proto_goTypes, - DependencyIndexes: file_sentium_api_v1_principals_proto_depIdxs, - MessageInfos: file_sentium_api_v1_principals_proto_msgTypes, - }.Build() - File_sentium_api_v1_principals_proto = out.File - file_sentium_api_v1_principals_proto_rawDesc = nil - file_sentium_api_v1_principals_proto_goTypes = nil - file_sentium_api_v1_principals_proto_depIdxs = nil -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/principals_grpc.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/principals_grpc.pb.go deleted file mode 100644 index c553a388..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/principals_grpc.pb.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 -// source: sentium/api/v1/principals.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Principals_Create_FullMethodName = "/sentium.api.v1.Principals/Create" - Principals_Delete_FullMethodName = "/sentium.api.v1.Principals/Delete" - Principals_List_FullMethodName = "/sentium.api.v1.Principals/List" - Principals_Retrieve_FullMethodName = "/sentium.api.v1.Principals/Retrieve" - Principals_Update_FullMethodName = "/sentium.api.v1.Principals/Update" -) - -// PrincipalsClient is the client API for Principals service. -// -// 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. -type PrincipalsClient interface { - Create(ctx context.Context, in *PrincipalsCreateRequest, opts ...grpc.CallOption) (*Principal, error) - Delete(ctx context.Context, in *PrincipalsDeleteRequest, opts ...grpc.CallOption) (*PrincipalsDeleteResponse, error) - List(ctx context.Context, in *PrincipalsListRequest, opts ...grpc.CallOption) (*PrincipalsListResponse, error) - Retrieve(ctx context.Context, in *PrincipalsRetrieveRequest, opts ...grpc.CallOption) (*Principal, error) - Update(ctx context.Context, in *PrincipalsUpdateRequest, opts ...grpc.CallOption) (*Principal, error) -} - -type principalsClient struct { - cc grpc.ClientConnInterface -} - -func NewPrincipalsClient(cc grpc.ClientConnInterface) PrincipalsClient { - return &principalsClient{cc} -} - -func (c *principalsClient) Create(ctx context.Context, in *PrincipalsCreateRequest, opts ...grpc.CallOption) (*Principal, error) { - out := new(Principal) - err := c.cc.Invoke(ctx, Principals_Create_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *principalsClient) Delete(ctx context.Context, in *PrincipalsDeleteRequest, opts ...grpc.CallOption) (*PrincipalsDeleteResponse, error) { - out := new(PrincipalsDeleteResponse) - err := c.cc.Invoke(ctx, Principals_Delete_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *principalsClient) List(ctx context.Context, in *PrincipalsListRequest, opts ...grpc.CallOption) (*PrincipalsListResponse, error) { - out := new(PrincipalsListResponse) - err := c.cc.Invoke(ctx, Principals_List_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *principalsClient) Retrieve(ctx context.Context, in *PrincipalsRetrieveRequest, opts ...grpc.CallOption) (*Principal, error) { - out := new(Principal) - err := c.cc.Invoke(ctx, Principals_Retrieve_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *principalsClient) Update(ctx context.Context, in *PrincipalsUpdateRequest, opts ...grpc.CallOption) (*Principal, error) { - out := new(Principal) - err := c.cc.Invoke(ctx, Principals_Update_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PrincipalsServer is the server API for Principals service. -// All implementations must embed UnimplementedPrincipalsServer -// for forward compatibility -type PrincipalsServer interface { - Create(context.Context, *PrincipalsCreateRequest) (*Principal, error) - Delete(context.Context, *PrincipalsDeleteRequest) (*PrincipalsDeleteResponse, error) - List(context.Context, *PrincipalsListRequest) (*PrincipalsListResponse, error) - Retrieve(context.Context, *PrincipalsRetrieveRequest) (*Principal, error) - Update(context.Context, *PrincipalsUpdateRequest) (*Principal, error) - mustEmbedUnimplementedPrincipalsServer() -} - -// UnimplementedPrincipalsServer must be embedded to have forward compatible implementations. -type UnimplementedPrincipalsServer struct { -} - -func (UnimplementedPrincipalsServer) Create(context.Context, *PrincipalsCreateRequest) (*Principal, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (UnimplementedPrincipalsServer) Delete(context.Context, *PrincipalsDeleteRequest) (*PrincipalsDeleteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (UnimplementedPrincipalsServer) List(context.Context, *PrincipalsListRequest) (*PrincipalsListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (UnimplementedPrincipalsServer) Retrieve(context.Context, *PrincipalsRetrieveRequest) (*Principal, error) { - return nil, status.Errorf(codes.Unimplemented, "method Retrieve not implemented") -} -func (UnimplementedPrincipalsServer) Update(context.Context, *PrincipalsUpdateRequest) (*Principal, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedPrincipalsServer) mustEmbedUnimplementedPrincipalsServer() {} - -// UnsafePrincipalsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PrincipalsServer will -// result in compilation errors. -type UnsafePrincipalsServer interface { - mustEmbedUnimplementedPrincipalsServer() -} - -func RegisterPrincipalsServer(s grpc.ServiceRegistrar, srv PrincipalsServer) { - s.RegisterService(&Principals_ServiceDesc, srv) -} - -func _Principals_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrincipalsCreateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrincipalsServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Principals_Create_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrincipalsServer).Create(ctx, req.(*PrincipalsCreateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Principals_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrincipalsDeleteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrincipalsServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Principals_Delete_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrincipalsServer).Delete(ctx, req.(*PrincipalsDeleteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Principals_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrincipalsListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrincipalsServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Principals_List_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrincipalsServer).List(ctx, req.(*PrincipalsListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Principals_Retrieve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrincipalsRetrieveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrincipalsServer).Retrieve(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Principals_Retrieve_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrincipalsServer).Retrieve(ctx, req.(*PrincipalsRetrieveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Principals_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrincipalsUpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrincipalsServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Principals_Update_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrincipalsServer).Update(ctx, req.(*PrincipalsUpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Principals_ServiceDesc is the grpc.ServiceDesc for Principals service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Principals_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "sentium.api.v1.Principals", - HandlerType: (*PrincipalsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _Principals_Create_Handler, - }, - { - MethodName: "Delete", - Handler: _Principals_Delete_Handler, - }, - { - MethodName: "List", - Handler: _Principals_List_Handler, - }, - { - MethodName: "Retrieve", - Handler: _Principals_Retrieve_Handler, - }, - { - MethodName: "Update", - Handler: _Principals_Update_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sentium/api/v1/principals.proto", -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/resources.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/resources.pb.go deleted file mode 100644 index fae61fbc..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/resources.pb.go +++ /dev/null @@ -1,629 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.12 -// source: sentium/api/v1/resources.proto - -package v1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,3,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{0} -} - -func (x *Resource) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Resource) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Resource) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -type ResourcesPrincipal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Attrs *structpb.Struct `protobuf:"bytes,2,opt,name=attrs,proto3,oneof" json:"attrs,omitempty"` -} - -func (x *ResourcesPrincipal) Reset() { - *x = ResourcesPrincipal{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcesPrincipal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcesPrincipal) ProtoMessage() {} - -func (x *ResourcesPrincipal) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourcesPrincipal.ProtoReflect.Descriptor instead. -func (*ResourcesPrincipal) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourcesPrincipal) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ResourcesPrincipal) GetAttrs() *structpb.Struct { - if x != nil { - return x.Attrs - } - return nil -} - -type ResourcesListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - PaginationLimit *uint32 `protobuf:"varint,3,opt,name=pagination_limit,json=paginationLimit,proto3,oneof" json:"pagination_limit,omitempty"` - PaginationToken *string `protobuf:"bytes,4,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *ResourcesListRequest) Reset() { - *x = ResourcesListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcesListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcesListRequest) ProtoMessage() {} - -func (x *ResourcesListRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourcesListRequest.ProtoReflect.Descriptor instead. -func (*ResourcesListRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{2} -} - -func (x *ResourcesListRequest) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -func (x *ResourcesListRequest) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *ResourcesListRequest) GetPaginationLimit() uint32 { - if x != nil && x.PaginationLimit != nil { - return *x.PaginationLimit - } - return 0 -} - -func (x *ResourcesListRequest) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -type ResourcesListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` - PaginationToken *string `protobuf:"bytes,2,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *ResourcesListResponse) Reset() { - *x = ResourcesListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcesListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcesListResponse) ProtoMessage() {} - -func (x *ResourcesListResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourcesListResponse.ProtoReflect.Descriptor instead. -func (*ResourcesListResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{3} -} - -func (x *ResourcesListResponse) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *ResourcesListResponse) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -type ResourcesListPrincipalsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceId string `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - PaginationLimit *uint32 `protobuf:"varint,3,opt,name=pagination_limit,json=paginationLimit,proto3,oneof" json:"pagination_limit,omitempty"` - PaginationToken *string `protobuf:"bytes,4,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *ResourcesListPrincipalsRequest) Reset() { - *x = ResourcesListPrincipalsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcesListPrincipalsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcesListPrincipalsRequest) ProtoMessage() {} - -func (x *ResourcesListPrincipalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourcesListPrincipalsRequest.ProtoReflect.Descriptor instead. -func (*ResourcesListPrincipalsRequest) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{4} -} - -func (x *ResourcesListPrincipalsRequest) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (x *ResourcesListPrincipalsRequest) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *ResourcesListPrincipalsRequest) GetPaginationLimit() uint32 { - if x != nil && x.PaginationLimit != nil { - return *x.PaginationLimit - } - return 0 -} - -func (x *ResourcesListPrincipalsRequest) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -type ResourcesListPrincipalsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Principals []*ResourcesPrincipal `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"` - PaginationToken *string `protobuf:"bytes,2,opt,name=pagination_token,json=paginationToken,proto3,oneof" json:"pagination_token,omitempty"` -} - -func (x *ResourcesListPrincipalsResponse) Reset() { - *x = ResourcesListPrincipalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sentium_api_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcesListPrincipalsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcesListPrincipalsResponse) ProtoMessage() {} - -func (x *ResourcesListPrincipalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_sentium_api_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourcesListPrincipalsResponse.ProtoReflect.Descriptor instead. -func (*ResourcesListPrincipalsResponse) Descriptor() ([]byte, []int) { - return file_sentium_api_v1_resources_proto_rawDescGZIP(), []int{5} -} - -func (x *ResourcesListPrincipalsResponse) GetPrincipals() []*ResourcesPrincipal { - if x != nil { - return x.Principals - } - return nil -} - -func (x *ResourcesListPrincipalsResponse) GetPaginationToken() string { - if x != nil && x.PaginationToken != nil { - return *x.PaginationToken - } - return "" -} - -var File_sentium_api_v1_resources_proto protoreflect.FileDescriptor - -var file_sentium_api_v1_resources_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, - 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x22, 0x62, 0x0a, 0x12, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, - 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x22, 0xe8, - 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, - 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0xf0, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x65, - 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x52, - 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x32, 0x8d, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x6a, - 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, - 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x0e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x2e, 0x2e, - 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, - 0x73, 0x65, 0x6e, 0x74, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sentium_api_v1_resources_proto_rawDescOnce sync.Once - file_sentium_api_v1_resources_proto_rawDescData = file_sentium_api_v1_resources_proto_rawDesc -) - -func file_sentium_api_v1_resources_proto_rawDescGZIP() []byte { - file_sentium_api_v1_resources_proto_rawDescOnce.Do(func() { - file_sentium_api_v1_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_sentium_api_v1_resources_proto_rawDescData) - }) - return file_sentium_api_v1_resources_proto_rawDescData -} - -var file_sentium_api_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_sentium_api_v1_resources_proto_goTypes = []interface{}{ - (*Resource)(nil), // 0: sentium.api.v1.Resource - (*ResourcesPrincipal)(nil), // 1: sentium.api.v1.ResourcesPrincipal - (*ResourcesListRequest)(nil), // 2: sentium.api.v1.ResourcesListRequest - (*ResourcesListResponse)(nil), // 3: sentium.api.v1.ResourcesListResponse - (*ResourcesListPrincipalsRequest)(nil), // 4: sentium.api.v1.ResourcesListPrincipalsRequest - (*ResourcesListPrincipalsResponse)(nil), // 5: sentium.api.v1.ResourcesListPrincipalsResponse - (*structpb.Struct)(nil), // 6: google.protobuf.Struct -} -var file_sentium_api_v1_resources_proto_depIdxs = []int32{ - 6, // 0: sentium.api.v1.Resource.attrs:type_name -> google.protobuf.Struct - 6, // 1: sentium.api.v1.ResourcesPrincipal.attrs:type_name -> google.protobuf.Struct - 0, // 2: sentium.api.v1.ResourcesListResponse.resources:type_name -> sentium.api.v1.Resource - 1, // 3: sentium.api.v1.ResourcesListPrincipalsResponse.principals:type_name -> sentium.api.v1.ResourcesPrincipal - 2, // 4: sentium.api.v1.Resources.List:input_type -> sentium.api.v1.ResourcesListRequest - 4, // 5: sentium.api.v1.Resources.ListPrincipals:input_type -> sentium.api.v1.ResourcesListPrincipalsRequest - 3, // 6: sentium.api.v1.Resources.List:output_type -> sentium.api.v1.ResourcesListResponse - 5, // 7: sentium.api.v1.Resources.ListPrincipals:output_type -> sentium.api.v1.ResourcesListPrincipalsResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_sentium_api_v1_resources_proto_init() } -func file_sentium_api_v1_resources_proto_init() { - if File_sentium_api_v1_resources_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sentium_api_v1_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesPrincipal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesListPrincipalsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sentium_api_v1_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesListPrincipalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sentium_api_v1_resources_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_sentium_api_v1_resources_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_sentium_api_v1_resources_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_sentium_api_v1_resources_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_sentium_api_v1_resources_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_sentium_api_v1_resources_proto_msgTypes[5].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sentium_api_v1_resources_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_sentium_api_v1_resources_proto_goTypes, - DependencyIndexes: file_sentium_api_v1_resources_proto_depIdxs, - MessageInfos: file_sentium_api_v1_resources_proto_msgTypes, - }.Build() - File_sentium_api_v1_resources_proto = out.File - file_sentium_api_v1_resources_proto_rawDesc = nil - file_sentium_api_v1_resources_proto_goTypes = nil - file_sentium_api_v1_resources_proto_depIdxs = nil -} diff --git a/examples/fileshare/pkg/pb/sentium/api/v1/resources_grpc.pb.go b/examples/fileshare/pkg/pb/sentium/api/v1/resources_grpc.pb.go deleted file mode 100644 index a57a0e57..00000000 --- a/examples/fileshare/pkg/pb/sentium/api/v1/resources_grpc.pb.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 -// source: sentium/api/v1/resources.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Resources_List_FullMethodName = "/sentium.api.v1.Resources/List" - Resources_ListPrincipals_FullMethodName = "/sentium.api.v1.Resources/ListPrincipals" -) - -// ResourcesClient is the client API for Resources service. -// -// 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. -type ResourcesClient interface { - List(ctx context.Context, in *ResourcesListRequest, opts ...grpc.CallOption) (*ResourcesListResponse, error) - ListPrincipals(ctx context.Context, in *ResourcesListPrincipalsRequest, opts ...grpc.CallOption) (*ResourcesListPrincipalsResponse, error) -} - -type resourcesClient struct { - cc grpc.ClientConnInterface -} - -func NewResourcesClient(cc grpc.ClientConnInterface) ResourcesClient { - return &resourcesClient{cc} -} - -func (c *resourcesClient) List(ctx context.Context, in *ResourcesListRequest, opts ...grpc.CallOption) (*ResourcesListResponse, error) { - out := new(ResourcesListResponse) - err := c.cc.Invoke(ctx, Resources_List_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourcesClient) ListPrincipals(ctx context.Context, in *ResourcesListPrincipalsRequest, opts ...grpc.CallOption) (*ResourcesListPrincipalsResponse, error) { - out := new(ResourcesListPrincipalsResponse) - err := c.cc.Invoke(ctx, Resources_ListPrincipals_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ResourcesServer is the server API for Resources service. -// All implementations must embed UnimplementedResourcesServer -// for forward compatibility -type ResourcesServer interface { - List(context.Context, *ResourcesListRequest) (*ResourcesListResponse, error) - ListPrincipals(context.Context, *ResourcesListPrincipalsRequest) (*ResourcesListPrincipalsResponse, error) - mustEmbedUnimplementedResourcesServer() -} - -// UnimplementedResourcesServer must be embedded to have forward compatible implementations. -type UnimplementedResourcesServer struct { -} - -func (UnimplementedResourcesServer) List(context.Context, *ResourcesListRequest) (*ResourcesListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (UnimplementedResourcesServer) ListPrincipals(context.Context, *ResourcesListPrincipalsRequest) (*ResourcesListPrincipalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPrincipals not implemented") -} -func (UnimplementedResourcesServer) mustEmbedUnimplementedResourcesServer() {} - -// UnsafeResourcesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ResourcesServer will -// result in compilation errors. -type UnsafeResourcesServer interface { - mustEmbedUnimplementedResourcesServer() -} - -func RegisterResourcesServer(s grpc.ServiceRegistrar, srv ResourcesServer) { - s.RegisterService(&Resources_ServiceDesc, srv) -} - -func _Resources_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourcesListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcesServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Resources_List_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcesServer).List(ctx, req.(*ResourcesListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Resources_ListPrincipals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourcesListPrincipalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcesServer).ListPrincipals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Resources_ListPrincipals_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcesServer).ListPrincipals(ctx, req.(*ResourcesListPrincipalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Resources_ServiceDesc is the grpc.ServiceDesc for Resources service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Resources_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "sentium.api.v1.Resources", - HandlerType: (*ResourcesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "List", - Handler: _Resources_List_Handler, - }, - { - MethodName: "ListPrincipals", - Handler: _Resources_ListPrincipals_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sentium/api/v1/resources.proto", -}